Finite Element Domain Decomposition Library
FEDDLib
Loading...
Searching...
No Matches
FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO > Class Template Reference

Public Types

typedef Mesh< SC, LO, GO, NO > Mesh_Type
 
typedef MeshUnstructured< SC, LO, GO, NO > MeshUnstr_Type
 
typedef Teuchos::RCP< MeshUnstructured< SC, LO, GO, NO > > MeshUnstrPtr_Type
 
typedef std::vector< MeshUnstrPtr_Type > MeshUnstrPtrArray_Type
 
typedef Mesh_Type::CommPtr_Type CommPtr_Type
 
typedef Mesh_Type::CommConstPtr_Type CommConstPtr_Type
 
typedef Elements Elements_Type
 
typedef Teuchos::RCP< Elements_TypeElementsPtr_Type
 
typedef SurfaceElements SurfaceElements_Type
 
typedef Teuchos::RCP< SurfaceElements_TypeSurfaceElementsPtr_Type
 
typedef EdgeElements EdgeElements_Type
 
typedef Teuchos::RCP< EdgeElements_TypeEdgeElementsPtr_Type
 
typedef Map< LO, GO, NO > Map_Type
 
typedef Map_Type::MapPtr_Type MapPtr_Type
 
typedef Map_Type::MapConstPtr_Type MapConstPtr_Type
 
typedef MultiVector< SC, LO, GO, NO > MultiVector_Type
 
typedef Teuchos::RCP< MultiVector_TypeMultiVectorPtr_Type
 
typedef MultiVector< LO, LO, GO, NO > MultiVectorLO_Type
 
typedef Teuchos::RCP< MultiVectorLO_TypeMultiVectorLOPtr_Type
 
typedef MultiVector< GO, LO, GO, NO > MultiVectorGO_Type
 
typedef Teuchos::RCP< MultiVectorGO_TypeMultiVectorGOPtr_Type
 
typedef Teuchos::RCP< const MultiVector_TypeMultiVectorConstPtr_Type
 
typedef Teuchos::OrdinalTraits< LO > OTLO
 
typedef Matrix< SC, LO, GO, NO > Matrix_Type
 
typedef Teuchos::RCP< Matrix_TypeMatrixPtr_Type
 
typedef ExporterParaViewAMR< SC, LO, GO, NO > Exporter_Type
 
typedef Teuchos::RCP< Exporter_TypeExporterPtr_Type
 
typedef Teuchos::RCP< ExporterTxtExporterTxtPtr_Type
 
typedef Problem< SC, LO, GO, NO > Problem_Type
 
typedef Teuchos::RCP< Problem_TypeProblemPtr_Type
 
typedef Domain< SC, LO, GO, NO > Domain_Type
 
typedef Teuchos::RCP< Domain_TypeDomainPtr_Type
 
typedef std::vector< DomainPtr_Type > DomainPtrArray_Type
 
typedef std::vector< MultiVectorPtr_Type > MultiVectorPtrArray_Type
 
typedef BlockMultiVector< SC, LO, GO, NO > BlockMultiVector_Type
 
typedef Teuchos::RCP< BlockMultiVector_TypeBlockMultiVectorPtr_Type
 
typedef Teuchos::RCP< const BlockMultiVector_TypeBlockMultiVectorConstPtr_Type
 

Public Member Functions

 AdaptiveMeshRefinement (ParameterListPtr_Type parameterListAll)
 Initializing mesh refinement with minimal information. This is only useful for refining either uniformaly or only a certain area.
 
 AdaptiveMeshRefinement (std::string problemType, ParameterListPtr_Type parameterListAll)
 Initializing problem with the kind of problem we are solving for determining the correct error estimation. ParameterListAll delivers all necessary information (i.e. dim, feType). This constructor is used if no exact solutions are known.
 
 AdaptiveMeshRefinement (std::string problemType, ParameterListPtr_Type parameterListAll, Func_Type exactSolFunc)
 Initializing problem with the kind of problem we are solving for determining the correct error estimation. ParameterListAll delivers all necessary information (i.e. dim, feType).
 
 AdaptiveMeshRefinement (std::string problemType, ParameterListPtr_Type parameterListAll, Func_Type exactSolFuncU, Func_Type exactSolFuncP)
 Initializing problem with the kind of problem we are solving for determining the correct error estimation. ParameterListAll delivers all necessary information (i.e. dim, feType).
 
DomainPtr_Type globalAlgorithm (DomainPtr_Type domainP1, DomainPtr_Type domainP12, BlockMultiVectorConstPtr_Type solution, ProblemPtr_Type problem, RhsFunc_Type rhsFunc)
 Global Algorithm of Mesh Refinement.
 
DomainPtr_Type refineArea (DomainPtr_Type domainP1, vec2D_dbl_Type area, int level)
 Initializing problem if only a certain area should be refined.
 
DomainPtr_Type refineUniform (DomainPtr_Type domainP1, int level)
 Initializing problem if uniform refinement is requested.
 
DomainPtr_Type refineFlag (DomainPtr_Type domainP1, int level, int flag)
 
MultiVectorConstPtr_Type calcExactSolution ()
 Calculating exact solution for velocity if possible with exactSolFunc_.
 
MultiVectorConstPtr_Type calcExactSolutionP ()
 Calculating exact solution for pressure if possible with exactSolPFunc_.
 
void identifyProblem (BlockMultiVectorConstPtr_Type valuesSolution)
 Identifying the problem with respect to the degrees of freedom and whether we calculate pressure. By telling how many blocks the MultiVector has, we can tell whether we calculate pressure or not. Depending on the numbers of entries within the solution vector, we can tell how many degreesOfFreedom (dofs) we have.
 
void calcErrorNorms (MultiVectorConstPtr_Type exactSolution, MultiVectorConstPtr_Type solutionP12, MultiVectorConstPtr_Type exactSolutionP)
 Calculating error norms. If the exact solution is unknown we use approxmated error norm and error indicators.
 
void initExporter (ParameterListPtr_Type parameterListAll)
 ParaViewExporter initiation. ParameterListAll contains most settings for ExporterParaView. ExporterParaViewAMR is an extension of ExportParaView and as such uses its setup.
 
void exportSolution (MeshUnstrPtr_Type mesh, MultiVectorConstPtr_Type exportSolutionMv, MultiVectorConstPtr_Type errorValues, MultiVectorConstPtr_Type exactSolutionMv, MultiVectorConstPtr_Type exportSolutionPMv, MultiVectorConstPtr_Type exactSolutionPMv)
 ParaViewExporter export of solutions and other error values on current mesh.
 
void exportError (MeshUnstrPtr_Type mesh, MultiVectorConstPtr_Type errorElConst, MultiVectorConstPtr_Type errorElConstH1, MultiVectorConstPtr_Type difH1Eta, MultiVectorConstPtr_Type vecDecompositionConst)
 ParaViewExporter export of solutions and other error values on current mesh.
 
void writeRefinementInfo ()
 Writing refinement information at the end of mesh refinement.
 
void buildSurfaceTriangleElements (ElementsPtr_Type elements, EdgeElementsPtr_Type edgeElements, SurfaceElementsPtr_Type surfaceTriangleElements)
 
vec_bool_Type checkInterfaceSurface (EdgeElementsPtr_Type edgeElements, vec_int_Type originFlag, vec_int_Type edgeNumbers, int indexElement)
 

Constructor & Destructor Documentation

◆ AdaptiveMeshRefinement() [1/4]

template<class SC, class LO, class GO, class NO>
FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::AdaptiveMeshRefinement ( ParameterListPtr_Type parameterListAll)

Initializing mesh refinement with minimal information. This is only useful for refining either uniformaly or only a certain area.

Parameters
[in]intdim

◆ AdaptiveMeshRefinement() [2/4]

template<class SC, class LO, class GO, class NO>
FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::AdaptiveMeshRefinement ( std::string problemType,
ParameterListPtr_Type parameterListAll )

Initializing problem with the kind of problem we are solving for determining the correct error estimation. ParameterListAll delivers all necessary information (i.e. dim, feType). This constructor is used if no exact solutions are known.

Parameters
[in]problemTypeLaplace, Stokes, NavierStokes.
[in]parameterListAllParameterlist as used as input parametersProblem.xml.

◆ AdaptiveMeshRefinement() [3/4]

template<class SC, class LO, class GO, class NO>
FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::AdaptiveMeshRefinement ( std::string problemType,
ParameterListPtr_Type parameterListAll,
Func_Type exactSolFunc )

Initializing problem with the kind of problem we are solving for determining the correct error estimation. ParameterListAll delivers all necessary information (i.e. dim, feType).

Parameters
[in]problemTypeLaplace, Stokes, NavierStokes.
[in]paramerterListAllParameterlist as used as input parametersProblem.xml.
[in]exactSolFunExact solution function.

◆ AdaptiveMeshRefinement() [4/4]

template<class SC, class LO, class GO, class NO>
FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::AdaptiveMeshRefinement ( std::string problemType,
ParameterListPtr_Type parameterListAll,
Func_Type exactSolFuncU,
Func_Type exactSolFuncP )

Initializing problem with the kind of problem we are solving for determining the correct error estimation. ParameterListAll delivers all necessary information (i.e. dim, feType).

Parameters
[in]problemTypeLaplace, Stokes, NavierStokes.
[in]paramerterListAllParameterlist as used as input parametersProblem.xml.
[in]exactSolFunUExact solution for velocity u.
[in]exactSolFunPExact solution for velocity p.

Member Function Documentation

◆ calcErrorNorms()

template<class SC, class LO, class GO, class NO>
void FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::calcErrorNorms ( MultiVectorConstPtr_Type exactSolution,
MultiVectorConstPtr_Type solutionP12,
MultiVectorConstPtr_Type exactSolutionP )

Calculating error norms. If the exact solution is unknown we use approxmated error norm and error indicators.

Parameters
[in]exactSolutionIf known, otherwise a dummy vector with all zeros is input.
[in]solutionP12Finite element solution u_h and maybe p_h.
[in]exactSolutionPIf known, otherwise a vector with all zeros is input.
Here is the caller graph for this function:

◆ exportError()

template<class SC, class LO, class GO, class NO>
void FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::exportError ( MeshUnstrPtr_Type mesh,
MultiVectorConstPtr_Type errorElConst,
MultiVectorConstPtr_Type errorElConstH1,
MultiVectorConstPtr_Type difH1Eta,
MultiVectorConstPtr_Type vecDecompositionConst )

ParaViewExporter export of solutions and other error values on current mesh.

Parameters
[in]meshThe current mesh on which refinement is performed.
[in]errorElConstEstimated error eta_T.
[in]errorElConstH1H1 error elmentwise.
[in]difH1Eta|eta_T-|\nabla u_h|_T| difference between estimated error an H1-error.
[in]vecDecompositionConstInformation of distribution of elements among processors.
Here is the caller graph for this function:

◆ exportSolution()

template<class SC, class LO, class GO, class NO>
void FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::exportSolution ( MeshUnstrPtr_Type mesh,
MultiVectorConstPtr_Type exportSolutionMv,
MultiVectorConstPtr_Type errorValues,
MultiVectorConstPtr_Type exactSolutionMv,
MultiVectorConstPtr_Type exportSolutionPMv,
MultiVectorConstPtr_Type exactSolutionPMv )

ParaViewExporter export of solutions and other error values on current mesh.

Parameters
[in]meshThe current mesh on which refinement is performed.
[in]exportSolutionMvExport vector of velocity fe solution.
[in]exportSolutionPMvExport vector of pressure fe solution.
[in]errorValue|u-u_h| on domainP12.
[in]exactSolutionMvExport vector of exact velocity solution.
[in]exactSolutionPMvExport vector of exact pressure solution.
Here is the caller graph for this function:

◆ globalAlgorithm()

template<class SC, class LO, class GO, class NO>
AdaptiveMeshRefinement< SC, LO, GO, NO >::DomainPtr_Type FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::globalAlgorithm ( DomainPtr_Type domainP1,
DomainPtr_Type domainP12,
BlockMultiVectorConstPtr_Type solution,
ProblemPtr_Type problem,
RhsFunc_Type rhsFunc )

Global Algorithm of Mesh Refinement.

Given domains and solutions depending on problem a global mesh refinement algorithm and error estimation is performed. For example if to solve simple laplace problem, we have only one solution to put in, if to estimate error for Navier-Stokes equation we need pressure and velocity solutions.

Parameters
[in]domainP1Domain with P_1 discretization, always neccesary as refinement is performed on P_1 mesh.
[in]domainP12Domain with P_1 or P_2 discretization if available, otherwise input domainP1.
[in]solutionSolution of problem on P_1 or P_2 discretization, can contain velocity and pressure solution.
[in]problemThe problem itself as the problemPtr. Contains Laplace, Stokes or Navier-Stokes problem.
[in]rhsRight hand side function from the pde system. Necessary for error estimation.
Here is the call graph for this function:

◆ identifyProblem()

template<class SC, class LO, class GO, class NO>
void FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::identifyProblem ( BlockMultiVectorConstPtr_Type valuesSolution)

Identifying the problem with respect to the degrees of freedom and whether we calculate pressure. By telling how many blocks the MultiVector has, we can tell whether we calculate pressure or not. Depending on the numbers of entries within the solution vector, we can tell how many degreesOfFreedom (dofs) we have.

Parameters
[in]valuesSolutionBlock that contains solution for velocity and as the case may be pressure.
Here is the caller graph for this function:

◆ refineArea()

template<class SC, class LO, class GO, class NO>
AdaptiveMeshRefinement< SC, LO, GO, NO >::DomainPtr_Type FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::refineArea ( DomainPtr_Type domainP1,
vec2D_dbl_Type area,
int level )

Initializing problem if only a certain area should be refined.

Parameters
[in]domainP1P_1 Domain
[in]areaArea that is suppose to be refined. If is a vector defining the area as follows: row1:[x_0,x_1] x-limits, row2: [y_0,y_1] y-limits, row3: [z_0,z_1] z-limits.
[in]levelintensity of refinement. Number of levels equals number of performed refinements.
Here is the call graph for this function:

◆ refineUniform()

template<class SC, class LO, class GO, class NO>
AdaptiveMeshRefinement< SC, LO, GO, NO >::DomainPtr_Type FEDD::AdaptiveMeshRefinement< SC, LO, GO, NO >::refineUniform ( DomainPtr_Type domainP1,
int level )

Initializing problem if uniform refinement is requested.

Parameters
[in]domainP1P_1 Domain
[in]levelintensity of refinement. Number of levels equals number of performed refinements.
Here is the call graph for this function:

The documentation for this class was generated from the following files: