Commit bcb3a0f5 authored by Jan Zapletal's avatar Jan Zapletal

ENH: added repr. formula to test, updated readme

parent 9ba74bb8
......@@ -31,6 +31,17 @@ int elems [ 3 * nElems ] = {
4, 6, 7
};
double dirichlet [ nNodes ] = {
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0,
1.0
};
void testHeatDtN(
);
......@@ -60,25 +71,24 @@ void testHeatDtN(
bool nonsymmetric = false;
bool verbose = true;
bem4i::getLaplaceSteklovPoincare( S,
a,
&beta,
nNodes,
nodes,
nElems,
elems,
alpha,
qType,
orderNear,
orderFar,
data,
nonsymmetric,
verbose );
bem4i::deleteBem4iData<int, double>( data );
bem4i::getLaplaceSteklovPoincare(
S,
a,
&beta,
nNodes,
nodes,
nElems,
elems,
alpha,
qType,
orderNear,
orderFar,
data,
nonsymmetric,
verbose );
if( verbose ){
std::cout << "S: " << std::endl;
for( size_t i = 0; i < nNodes; ++i ){
for( size_t j = 0; j < nNodes; ++j ){
......@@ -86,19 +96,39 @@ void testHeatDtN(
}
std::cout << std::endl;
}
std::cout << "a: " << std::endl;
for( size_t i = 0; i < nNodes; ++i ){
std::cout << a[ i ] << " ";
}
}
std::cout << std::endl;
std::cout << "beta: " << std::endl;
std::cout << beta << std::endl;
}
delete [] S;
delete [] a;
}
double value;
double point [] = { 0.1, 0.2, 0.3 };
bem4i::evaluateLaplaceRepresentationFormula(
nNodes,
nodes,
nElems,
elems,
1,
point,
&value,
dirichlet,
orderFar,
data,
verbose );
if( verbose )
std::cout << "value: " << value << std::endl;
bem4i::deleteBem4iData<int, double>( data );
}
......@@ -104,19 +104,19 @@ void getLaplaceSteklovPoincare(
```
* `S` ... pointer to an **allocated** array of the size `nNodes * nNodes`,
* `a` ... pointer to an **allocated** array of the size `nNodes`,
* `beta` ... pointer to an **allocated** array of the size `1`,
* `nNodes` ... number of mesh nodes,
* `nodes` ... pointer to an array of node coordinates `{ x1, y1, z1, x2, y2, z2, ... }`
* `nElems` ... number of triangular elements
* `elems` ... indices to the array of nodes defining triangular elements `{ i1, j1, k1, i2, j2, k2, ... }`, exterior normal direction to *i*-th element **must** agree with ((xj,yj,zj)-(xi,yi,zi))x((xk,yk,zk)-(xj,yj,zj))
* `alpha` ... heat conduction parameter,
* `qType` ... `0` for semi-analytic quadrature, `1` for regularized numerical scheme,
* `orderNear` ... near-field quadrature order, choose from {1,...,7} for `qType = 0` (`5` recommended), {3,...,10} for `qType = 1` (`4` recommended),
* `orderFar` ... far-field quadrature order, choose from {0,...,7}, (`4` recommended, `0` uses near-field quadrature for far-field as well),
* `data` ... pointer to heatDtN data,
* `nonsymmetric` ... `false` for symmetric, `true` for non-symmetric version,
* `verbose` ... `false` for silent computation, `true` for progress info.
* `a` ... pointer to an **allocated** array of the size `nNodes`,
* `beta` ... pointer to an **allocated** array of the size `1`,
* `nNodes` ... number of mesh nodes,
* `nodes` ... pointer to an array of node coordinates `{ x1, y1, z1, x2, y2, z2, ... }`
* `nElems` ... number of triangular elements
* `elems` ... indices to the array of nodes defining triangular elements `{ i1, j1, k1, i2, j2, k2, ... }`, exterior normal direction to *i*-th element **must** agree with ((xj,yj,zj)-(xi,yi,zi))x((xk,yk,zk)-(xj,yj,zj)),
* `alpha` ... heat conduction parameter,
* `qType` ... `0` for semi-analytic quadrature, `1` for regularized numerical scheme,
* `orderNear` ... near-field quadrature order, choose from {1,...,7} for `qType = 0` (`5` recommended), {3,...,10} for `qType = 1` (`4` recommended),
* `orderFar` ... far-field quadrature order, choose from {0,...,7}, (`4` recommended, `0` uses near-field quadrature for far-field as well),
* `data` ... pointer to heatDtN data,
* `nonsymmetric` ... `false` for symmetric, `true` for non-symmetric version,
* `verbose` ... `false` for silent computation, `true` for progress info.
### Representation formula
......@@ -144,6 +144,8 @@ void deleteBem4iData(
);
```
The function has to be called to delete all heatDtN data correctly.
## Compilation with ESPRESO
......
# ESPRESO Configuration File
#BENCHMARK ARG0 [ TETRA4, TETRA10, PYRAMID5, PYRAMID13, PRISMA6, PRISMA15, HEXA8, HEXA20 ]
#BENCHMARK ARG10 [ TOTAL_FETI, HYBRID_FETI ]
DEFAULT_ARGS {
0 HEXA8;
1 3;
2 2;
3 1;
4 1;
5 2;
6 3;
7 4;
8 3;
9 4;
10 TOTAL_FETI;
}
INPUT GENERATOR;
PHYSICS HEAT_TRANSFER_3D;
DECOMPOSITION {
BALANCE_CLUSTERS TRUE;
}
GENERATOR {
SHAPE GRID;
GRID {
LENGTH_X 1;
LENGTH_Y 1;
LENGTH_Z 1;
NODES {
BOTTOM <1 , 1> <0 , 1> <0 , 1>;
TOP <0 , 0> <0 , 1> <0 , 1>;
}
ELEMENT_TYPE [ARG0];
BLOCKS_X 1;
BLOCKS_Y 1;
BLOCKS_Z 1;
CLUSTERS_X [ARG1];
CLUSTERS_Y [ARG2];
CLUSTERS_Z [ARG3];
DOMAINS_X [ARG4];
DOMAINS_Y [ARG5];
DOMAINS_Z [ARG6];
ELEMENTS_X [ARG7];
ELEMENTS_Y [ARG8];
ELEMENTS_Z [ARG9];
}
}
HEAT_TRANSFER_3D {
LOAD_STEPS 1;
DISCRETIZATION {
ALL_ELEMENTS BEM;
}
MATERIALS {
1 {
DENS 1;
CP 1;
THERMAL_CONDUCTIVITY {
MODEL ISOTROPIC;
KXX 1;
}
}
}
MATERIAL_SET {
ALL_ELEMENTS 1;
}
INITIAL_TEMPERATURE {
# ALL_ELEMENTS 200;
}
STABILIZATION CAU;
SIGMA 0;
LOAD_STEPS_SETTINGS {
1 {
DURATION_TIME 1;
TYPE STEADY_STATE;
MODE LINEAR;
SOLVER FETI;
FETI {
METHOD [ARG10];
PRECONDITIONER NONE;
PRECISION 1E-10;
ITERATIVE_SOLVER GMRES;
REGULARIZATION ANALYTIC;
}
TEMPERATURE {
TOP 100;
BOTTOM 300;
}
}
}
}
ENV {
PRINT_MATRICES 0;
}
OUTPUT {
RESULTS_STORE_FREQUENCY EVERY_TIMESTEP;
MONITORS_STORE_FREQUENCY EVERY_TIMESTEP;
DEBUG FALSE;
MONITORING {
1 {
REGION TOP;
STATISTICS MAX;
PROPERTY TEMPERATURE;
}
2 {
REGION BOTTOM;
STATISTICS MIN;
PROPERTY TEMPERATURE;
}
5 {
REGION ALL_ELEMENTS;
STATISTICS AVG;
PROPERTY TEMPERATURE;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment