LifeV
lifev/eta/examples/mesh_volume_subdivision/main.cpp File Reference

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>
+ Include dependency graph for lifev/eta/examples/mesh_volume_subdivision/main.cpp:

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
 

Detailed Description

Laplacian problem.

Author
Niccolo' Dal Santo nicco.nosp@m.lo.d.nosp@m.alsan.nosp@m.to@e.nosp@m.pfl.c.nosp@m.h
Date
19-05-2015

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.

Macro Definition Documentation

◆ TESTMESHSUB

#define TESTMESHSUB

Function Documentation

◆ zeroFunction()

Real zeroFunction ( const Real ,
const Real ,
const Real ,
const Real ,
const ID  
)

◆ sourceFunction()

Real sourceFunction ( const Real ,
const Real x,
const Real y,
const Real z,
const ID  
)

◆ diffusion4Function1()

Real diffusion4Function1 ( const Real ,
const Real x,
const Real y,
const Real z,
const ID  
)

◆ diffusion4Function2()

Real diffusion4Function2 ( const Real ,
const Real x,
const Real y,
const Real z,
const ID  
)

◆ diffusion4Function3()

Real diffusion4Function3 ( const Real ,
const Real x,
const Real y,
const Real z,
const ID  
)

◆ diffusion4Function4()

Real diffusion4Function4 ( const Real ,
const Real x,
const Real y,
const Real z,
const ID  
)

◆ diffusion4FunctionTotal()

Real diffusion4FunctionTotal ( const Real ,
const Real x,
const Real y,
const Real z,
const ID  
)

◆ main()

int main ( int  argc,
char **  argv 
)

Variable Documentation

◆ BACK

const int BACK = 101

◆ FRONT

const int FRONT = 102

◆ LEFT

const int LEFT = 103

◆ RIGHT

const int RIGHT = 104

◆ BOTTOM

const int BOTTOM = 105

◆ TOP

const int TOP = 106

◆ mu1

Real mu1 = 1.0

◆ mu2

Real mu2 = 1.0

◆ mu3

Real mu3 = 1.0

◆ mu4

Real mu4 = 1.0