|
| v0.14.0
|
◆ Poisson2DHomogeneous()
◆ assembleSystem()
[Boundary condition]
[Assemble system]
- Examples
- poisson_2d_homogeneous.cpp.
Definition at line 101 of file poisson_2d_homogeneous.cpp.
108 pipeline_mng->getOpDomainLhsPipeline(), {H1});
109 pipeline_mng->getOpDomainLhsPipeline().push_back(
115 auto set_values_to_bc_dofs = [&](
auto &fe) {
116 auto get_bc_hook = [&]() {
120 fe->preProcessHook = get_bc_hook();
124 auto calculate_residual_from_set_values_on_bc = [&](
auto &pipeline) {
131 auto grad_u_vals_ptr = boost::make_shared<MatrixDouble>();
132 pipeline_mng->getOpDomainRhsPipeline().push_back(
135 pipeline_mng->getOpDomainRhsPipeline().push_back(
137 [](
double,
double,
double) constexpr {
return -1; }));
141 pipeline_mng->getOpDomainRhsPipeline(), {H1});
142 set_values_to_bc_dofs(pipeline_mng->getDomainRhsFE());
143 calculate_residual_from_set_values_on_bc(
144 pipeline_mng->getOpDomainRhsPipeline());
145 pipeline_mng->getOpDomainRhsPipeline().push_back(
◆ boundaryCondition()
◆ outputResults()
[Solve system]
[Output results]
- Examples
- poisson_2d_homogeneous.cpp.
Definition at line 196 of file poisson_2d_homogeneous.cpp.
202 auto post_proc_fe = boost::make_shared<PostProcFaceEle>(
mField);
204 post_proc_fe->getOpPtrVector(), {H1});
206 auto u_ptr = boost::make_shared<VectorDouble>();
207 auto grad_u_ptr = boost::make_shared<MatrixDouble>();
208 post_proc_fe->getOpPtrVector().push_back(
211 post_proc_fe->getOpPtrVector().push_back(
216 post_proc_fe->getOpPtrVector().push_back(
218 new OpPPMap(post_proc_fe->getPostProcMesh(),
219 post_proc_fe->getMapGaussPts(),
233 pipeline_mng->getDomainRhsFE() = post_proc_fe;
234 CHKERR pipeline_mng->loopFiniteElements();
235 CHKERR post_proc_fe->writeFile(
"out_result.h5m");
◆ readMesh()
◆ runProgram()
◆ setIntegrationRules()
[Assemble system]
[Set integration rules]
- Examples
- poisson_2d_homogeneous.cpp.
Definition at line 154 of file poisson_2d_homogeneous.cpp.
157 auto rule_lhs = [](
int,
int,
int p) ->
int {
return 2 * (p - 1); };
158 auto rule_rhs = [](
int,
int,
int p) ->
int {
return p; };
161 CHKERR pipeline_mng->setDomainLhsIntegrationRule(rule_lhs);
162 CHKERR pipeline_mng->setDomainRhsIntegrationRule(rule_rhs);
◆ setupProblem()
◆ solveSystem()
◆ mField
◆ oRder
int Poisson2DHomogeneous::oRder |
|
private |
◆ simpleInterface
Simple* Poisson2DHomogeneous::simpleInterface |
|
private |
The documentation for this struct was generated from the following file:
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
MoFEMErrorCode solveSystem()
[Set integration rules]
MoFEMErrorCode setupProblem()
[Read mesh]
std::map< std::string, boost::shared_ptr< VectorDouble > > DataMapVec
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name, LoadFileFunc loadFunc=defaultLoadFileFunc)
Load mesh file.
PipelineManager interface.
MoFEMErrorCode assembleSystem()
[Boundary condition]
MoFEMErrorCode outputResults()
[Solve system]
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
set local (or ghosted) vector values on mesh for partition only
Get field gradients at integration pts for scalar filed rank 0, i.e. vector field.
MoFEMErrorCode getOptions()
get options
MoFEMErrorCode getDM(DM *dm)
Get DM.
#define CHKERR
Inline error check.
auto createDMVector(DM dm)
Get smart vector from DM.
Simple interface for fast problem set-up.
OpPostProcMapInMoab< SPACE_DIM, SPACE_DIM > OpPPMap
Get value at integration points for scalar field.
MoFEMErrorCode addDomainField(const std::string &name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_ZERO, int verb=-1)
Add field on domain.
SmartPetscObj< KSP > createKSP(SmartPetscObj< DM > dm=nullptr)
Create KSP (linear) solver.
MoFEM::Interface & mField
MoFEMErrorCode setIntegrationRules()
[Assemble system]
std::map< std::string, boost::shared_ptr< MatrixDouble > > DataMapMat
FormsIntegrators< DomainEleOp >::Assembly< A >::LinearForm< I >::OpGradTimesTensor< 1, FIELD_DIM, SPACE_DIM > OpGradTimesTensor
constexpr auto field_name
MoFEMErrorCode boundaryCondition()
[Setup problem]
MoFEMErrorCode setFieldOrder(const std::string field_name, const int order, const Range *ents=NULL)
Set field order.
Add operators pushing bases from local to physical configuration.
Specialization for TemperatureCubitBcData.
boost::shared_ptr< FEMethod > & getDomainLhsFE()
SmartPetscObj< Vec > vectorDuplicate(Vec vec)
Create duplicate vector of smart vector.
ForcesAndSourcesCore::UserDataOperator UserDataOperator
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
const double D
diffusivity
ElementsAndOps< SPACE_DIM >::DomainEle DomainEle
MoFEMErrorCode readMesh()
[Read mesh]
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
const std::string getProblemName() const
Get the Problem Name.
PetscErrorCode PetscOptionsGetInt(PetscOptions *, const char pre[], const char name[], PetscInt *ivalue, PetscBool *set)
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Post post-proc data at points from hash maps.