LifeV
|
Laplacian problem. More...
#include <Epetra_ConfigDefs.h>
#include <Epetra_SerialComm.h>
#include <lifev/core/LifeV.hpp>
#include <lifev/core/util/LifeChronoManager.hpp>
#include <lifev/core/mesh/MeshPartitioner.hpp>
#include <lifev/core/mesh/RegionMesh3DStructured.hpp>
#include <lifev/core/mesh/RegionMesh.hpp>
#include <lifev/core/array/MatrixEpetra.hpp>
#include <lifev/core/fem/BCManage.hpp>
#include <lifev/eta/fem/ETFESpace.hpp>
#include <lifev/eta/expression/BuildGraph.hpp>
#include <lifev/eta/expression/Integrate.hpp>
#include <Epetra_FECrsGraph.h>
#include <Teuchos_ParameterList.hpp>
#include <Teuchos_XMLParameterListHelpers.hpp>
#include <Teuchos_RCP.hpp>
#include <lifev/core/algorithm/LinearSolver.hpp>
#include <lifev/core/algorithm/PreconditionerIfpack.hpp>
#include <lifev/core/filter/ExporterHDF5.hpp>
#include <lifev/eta/examples/laplacian/laplacianFunctor.hpp>
#include <lifev/core/mesh/ElementShapes.hpp>
#include <lifev/core/mesh/MeshEntityContainer.hpp>
#include <lifev/core/mesh/MeshData.hpp>
#include <lifev/core/mesh/MeshVolumeSubdivision.hpp>
Go to the source code of this file.
Macros | |
#define | TESTMESHSUB |
Functions | |
Real | zeroFunction (const Real &, const Real &, const Real &, const Real &, const ID &) |
Real | sourceFunction (const Real &, const Real &x, const Real &y, const Real &z, const ID &) |
Real | diffusion4Function1 (const Real &, const Real &x, const Real &y, const Real &z, const ID &) |
Real | diffusion4Function2 (const Real &, const Real &x, const Real &y, const Real &z, const ID &) |
Real | diffusion4Function3 (const Real &, const Real &x, const Real &y, const Real &z, const ID &) |
Real | diffusion4Function4 (const Real &, const Real &x, const Real &y, const Real &z, const ID &) |
Real | diffusion4FunctionTotal (const Real &, const Real &x, const Real &y, const Real &z, const ID &) |
int | main (int argc, char **argv) |
Variables | |
const int | BACK = 101 |
const int | FRONT = 102 |
const int | LEFT = 103 |
const int | RIGHT = 104 |
const int | BOTTOM = 105 |
const int | TOP = 106 |
Real | mu1 = 1.0 |
Real | mu2 = 1.0 |
Real | mu3 = 1.0 |
Real | mu4 = 1.0 |
Laplacian problem.
This code aims at showing how to assemble a stiffness matrix as sum of matrices corresponding to the restriction of the bilinear form to subdomains. This is done by a extension of the method integrate that computes the stiffness matrix only over a subset of the volumes identified by a specific physical flag. The volume subdivision is done through the class lifev/core/mesh/MeshVolumeSubdivision
The macro TESTMESHSUB allows to check the correctness of the local matrices by comparing them to the ones computed by the usual integrate (simply by defining for every subdomain a diffusion coefficient that is an indicator function on it). The matrices computed in this way are saved and can be checked. Then the full matrix is assembled using the standard integrate and both results are exported in paraview. The check is coded for the mesh 4cube1.mesh which correspond to have a [0,1]^3 cube divided in 4 regions. The diffusion coefficients are read from datafile.
Definition in file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
#define TESTMESHSUB |
Definition at line 106 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Definition at line 89 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Definition at line 94 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real diffusion4Function1 | ( | const Real & | , |
const Real & | x, | ||
const Real & | y, | ||
const Real & | z, | ||
const ID & | |||
) |
Definition at line 109 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real diffusion4Function2 | ( | const Real & | , |
const Real & | x, | ||
const Real & | y, | ||
const Real & | z, | ||
const ID & | |||
) |
Definition at line 115 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real diffusion4Function3 | ( | const Real & | , |
const Real & | x, | ||
const Real & | y, | ||
const Real & | z, | ||
const ID & | |||
) |
Definition at line 122 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real diffusion4Function4 | ( | const Real & | , |
const Real & | x, | ||
const Real & | y, | ||
const Real & | z, | ||
const ID & | |||
) |
Definition at line 128 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real diffusion4FunctionTotal | ( | const Real & | , |
const Real & | x, | ||
const Real & | y, | ||
const Real & | z, | ||
const ID & | |||
) |
Definition at line 140 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 150 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
const int BACK = 101 |
Definition at line 99 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
const int FRONT = 102 |
Definition at line 100 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
const int LEFT = 103 |
Definition at line 101 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
const int RIGHT = 104 |
Definition at line 102 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
const int BOTTOM = 105 |
Definition at line 103 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
const int TOP = 106 |
Definition at line 104 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real mu1 = 1.0 |
Definition at line 135 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real mu2 = 1.0 |
Definition at line 136 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real mu3 = 1.0 |
Definition at line 137 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.
Real mu4 = 1.0 |
Definition at line 138 of file lifev/eta/examples/mesh_volume_subdivision/main.cpp.