36class AdaptiveMeshRefinement {
41 typedef Teuchos::RCP<MeshUnstructured<SC,LO,GO,NO> > MeshUnstrPtr_Type;
43 typedef std::vector<MeshUnstrPtr_Type> MeshUnstrPtrArray_Type;
45 typedef typename Mesh_Type::CommPtr_Type CommPtr_Type;
46 typedef typename Mesh_Type::CommConstPtr_Type CommConstPtr_Type;
49 typedef Teuchos::RCP<Elements_Type> ElementsPtr_Type;
51 typedef Teuchos::RCP<SurfaceElements_Type> SurfaceElementsPtr_Type;
53 typedef Teuchos::RCP<EdgeElements_Type> EdgeElementsPtr_Type;
56 typedef typename Map_Type::MapPtr_Type MapPtr_Type;
57 typedef typename Map_Type::MapConstPtr_Type MapConstPtr_Type;
60 typedef Teuchos::RCP<MultiVector_Type> MultiVectorPtr_Type;
62 typedef Teuchos::RCP<MultiVectorLO_Type> MultiVectorLOPtr_Type;
64 typedef Teuchos::RCP<MultiVectorGO_Type> MultiVectorGOPtr_Type;
65 typedef Teuchos::RCP<const MultiVector_Type> MultiVectorConstPtr_Type;
66 typedef Teuchos::OrdinalTraits<LO> OTLO;
69 typedef Teuchos::RCP<Matrix_Type> MatrixPtr_Type;
72 typedef Teuchos::RCP<Exporter_Type> ExporterPtr_Type;
73 typedef Teuchos::RCP<ExporterTxt> ExporterTxtPtr_Type;
76 typedef Teuchos::RCP<Problem_Type> ProblemPtr_Type;
79 typedef Teuchos::RCP<Domain_Type> DomainPtr_Type;
80 typedef std::vector<DomainPtr_Type> DomainPtrArray_Type;
82 typedef std::vector<MultiVectorPtr_Type> MultiVectorPtrArray_Type;
85 typedef Teuchos::RCP<BlockMultiVector_Type> BlockMultiVectorPtr_Type;
86 typedef Teuchos::RCP<const BlockMultiVector_Type> BlockMultiVectorConstPtr_Type;
88 AdaptiveMeshRefinement();
90 AdaptiveMeshRefinement(ParameterListPtr_Type parameterListAll);
92 AdaptiveMeshRefinement(std::string problemType, ParameterListPtr_Type parameterListAll);
94 AdaptiveMeshRefinement(std::string problemType, ParameterListPtr_Type parameterListAll , Func_Type exactSolFunc );
95 AdaptiveMeshRefinement(std::string problemType, ParameterListPtr_Type parameterListAll , Func_Type exactSolFuncU,Func_Type exactSolFuncP );
97 ~AdaptiveMeshRefinement();
99 DomainPtr_Type
globalAlgorithm(DomainPtr_Type domainP1, DomainPtr_Type domainP12, BlockMultiVectorConstPtr_Type solution,ProblemPtr_Type problem, RhsFunc_Type rhsFunc );
101 DomainPtr_Type
refineArea(DomainPtr_Type domainP1, vec2D_dbl_Type area,
int level);
103 DomainPtr_Type
refineUniform(DomainPtr_Type domainP1,
int level);
105 DomainPtr_Type refineFlag(DomainPtr_Type domainP1,
int level ,
int flag);
113 void calcErrorNorms(MultiVectorConstPtr_Type exactSolution, MultiVectorConstPtr_Type solutionP12,MultiVectorConstPtr_Type exactSolutionP);
115 void initExporter( ParameterListPtr_Type parameterListAll);
117 void exportSolution(MeshUnstrPtr_Type mesh, MultiVectorConstPtr_Type exportSolutionMv, MultiVectorConstPtr_Type errorValues, MultiVectorConstPtr_Type exactSolutionMv,MultiVectorConstPtr_Type exportSolutionPMv, MultiVectorConstPtr_Type exactSolutionPMv);
119 void exportError(MeshUnstrPtr_Type mesh, MultiVectorConstPtr_Type errorElConst, MultiVectorConstPtr_Type errorElConstH1 , MultiVectorConstPtr_Type difH1Eta ,MultiVectorConstPtr_Type vecDecompositionConst );
123 void buildSurfaceTriangleElements(ElementsPtr_Type elements, EdgeElementsPtr_Type edgeElements, SurfaceElementsPtr_Type surfaceTriangleElements );
125 vec_bool_Type checkInterfaceSurface( EdgeElementsPtr_Type edgeElements,vec_int_Type originFlag, vec_int_Type edgeNumbers,
int indexElement);
133 RhsFunc_Type rhsFunc_;
134 Func_Type exactSolFunc_;
136 Func_Type exactSolPFunc_;
138 MeshUnstrPtr_Type inputMeshP1_;
139 MeshUnstrPtr_Type inputMeshP12_;
140 MeshUnstrPtr_Type outputMesh_;
142 MultiVectorPtrArray_Type errorEstimationMv_;
144 MultiVectorPtr_Type errorElementsMv_;
145 MultiVectorPtr_Type errorH1ElementsMv_;
146 MultiVectorPtr_Type difH1EtaElementsMv_;
148 MultiVectorConstPtr_Type errorNodesMv_;
149 MultiVectorConstPtr_Type errorNodesPMv_;
151 BlockMultiVectorConstPtr_Type solution_;
153 CommConstPtr_Type comm_;
155 bool exportWithParaview_ =
true;
156 bool initExporter_=
false;
158 ExporterPtr_Type exporterSol_;
159 ExporterPtr_Type exporterSolP_;
160 ExporterPtr_Type exporterError_;
162 DomainPtrArray_Type domainsP1_;
163 DomainPtrArray_Type domainsP12_;
165 DomainPtr_Type domainP1_;
166 DomainPtr_Type domainP12_;
168 ProblemPtr_Type problem_;
170 std::string refinementRestriction_ =
"keepRegularity";
171 std::string markingStrategy_ =
"Maximum";
176 bool meshQualityPrint_ =
"false";
177 bool timeTablePrint_ =
"false";
178 int refinement3DDiagonal_ = 0;
180 std::string problemType_;
187 std::string FEType1_;
188 std::string FEType2_;
190 vec_dbl_Type maxErrorEl;
191 vec_dbl_Type maxErrorKn;
192 vec_int_Type numElements;
193 vec_int_Type numElementsProc;
194 vec_dbl_Type relError;
195 vec_dbl_Type eRelError;
196 vec_dbl_Type errorH1;
197 vec_dbl_Type errorL2;
198 vec_dbl_Type errorL2P;
199 vec_int_Type numNodes;
201 bool writeRefinementTime_ = true ;
202 bool writeRefinementInfo_ = true ;
203 bool writeMeshQuality_ = true ;
205 bool hasProblemType_=
true;
207 ParameterListPtr_Type parameterListAll_ ;
212 bool exactSolInput_ = false ;
213 bool exactSolPInput_ = false ;
215 bool calculatePressure_=
false;
217 int restrictionLayer_=2;
219 int coarseningCycle_=0 ;
220 int coarseningM_ = 1;
221 int coarseningN_ = 1;
223 std::string refinementMode_ =
"Regular";
Definition Domain_decl.hpp:20