|
| v0.14.0
|
- Examples
- approx_sphere.cpp.
Definition at line 262 of file approx_sphere.cpp.
◆ ApproxSphere()
◆ getOptions()
◆ outputResults()
[Solve]
- Examples
- approx_sphere.cpp.
Definition at line 394 of file approx_sphere.cpp.
397 auto x_ptr = boost::make_shared<MatrixDouble>();
398 auto det_ptr = boost::make_shared<VectorDouble>();
399 auto jac_ptr = boost::make_shared<MatrixDouble>();
400 auto inv_jac_ptr = boost::make_shared<MatrixDouble>();
403 auto dm =
simple->getDM();
406 boost::make_shared<PostProcBrokenMeshInMoab<DomainEle>>(
mField);
408 post_proc_fe->getOpPtrVector().push_back(
413 post_proc_fe->getOpPtrVector().push_back(
415 new OpPPMap(post_proc_fe->getPostProcMesh(),
416 post_proc_fe->getMapGaussPts(),
420 {{
"HO_POSITIONS", x_ptr}},
429 CHKERR post_proc_fe->writeFile(
"out_approx.h5m");
431 auto error_fe = boost::make_shared<DomainEle>(
mField);
433 error_fe->getOpPtrVector().push_back(
435 error_fe->getOpPtrVector().push_back(
437 error_fe->getOpPtrVector().push_back(
new OpError(
"HO_POSITIONS", x_ptr));
439 error_fe->preProcessHook = [&]() {
441 MOFEM_LOG(
"EXAMPLE", Sev::inform) <<
"Create vec ";
448 error_fe->postProcessHook = [&]() {
455 <<
"Error " << std::sqrt(error2 / (4 * M_PI *
A *
A));
466 "PARALLEL=WRITE_PART");
◆ readMesh()
◆ runProblem()
◆ setOPs()
[Set up problem]
[Push operators to pipeline]
- Examples
- approx_sphere.cpp.
Definition at line 325 of file approx_sphere.cpp.
335 auto x_ptr = boost::make_shared<MatrixDouble>();
336 auto dot_x_ptr = boost::make_shared<MatrixDouble>();
337 auto det_ptr = boost::make_shared<VectorDouble>();
338 auto jac_ptr = boost::make_shared<MatrixDouble>();
339 auto inv_jac_ptr = boost::make_shared<MatrixDouble>();
341 auto def_ops = [&](
auto &pipeline) {
352 new OpRhs(
"HO_POSITIONS", x_ptr, dot_x_ptr));
354 new OpLhs(
"HO_POSITIONS", x_ptr, dot_x_ptr));
◆ setupProblem()
◆ solveSystem()
[Push operators to pipeline]
[Solve]
- Examples
- approx_sphere.cpp.
Definition at line 361 of file approx_sphere.cpp.
371 auto dm =
simple->getDM();
373 ts = pipeline_mng->createTSIM();
376 CHKERR TSSetMaxSteps(ts, 1);
377 CHKERR TSSetExactFinalTime(ts, TS_EXACTFINALTIME_MATCHSTEP);
382 CHKERR TSSetSolution(ts, T);
383 CHKERR TSSetFromOptions(ts);
386 CHKERR TSGetTime(ts, &ftime);
◆ mField
The documentation for this struct was generated from the following file:
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr, const std::string &field_name, RowColData rc, DofMethod &method, int lower_rank, int upper_rank, int verb=DEFAULT_VERBOSITY)=0
Make a loop over dofs.
MoFEMErrorCode getOptions()
[Run programme]
virtual MPI_Comm & get_comm() const =0
MoFEMErrorCode setupProblem()
[Read mesh]
MoFEMErrorCode readMesh()
[Read mesh]
Get values at integration pts for tensor filed rank 1, i.e. vector field.
boost::ptr_deque< UserDataOperator > & getOpDomainRhsPipeline()
Get the Op Domain Rhs Pipeline object.
virtual int get_comm_rank() const =0
static SmartPetscObj< Vec > errorVec
PipelineManager interface.
PetscErrorCode DMoFEMMeshToLocalVector(DM dm, Vec l, InsertMode mode, ScatterMode scatter_mode)
set local (or ghosted) vector values on mesh for partition only
Projection of edge entities with one mid-node on hierarchical basis.
Simple interface for fast problem set-up.
Approximate field values for given petsc vector.
#define CHKERR
Inline error check.
MoFEMErrorCode setOPs()
[Set up problem]
auto createDMVector(DM dm)
Get smart vector from DM.
virtual moab::Interface & get_moab()=0
MoFEMErrorCode outputResults()
[Solve]
void simple(double P1[], double P2[], double P3[], double c[], const int N)
OpPostProcMapInMoab< SPACE_DIM, SPACE_DIM > OpPPMap
virtual int get_comm_size() const =0
Calculate normals at Gauss points of triangle element.
MoFEMErrorCode setDomainRhsIntegrationRule(RuleHookFun rule)
boost::ptr_deque< UserDataOperator > & getOpDomainLhsPipeline()
Get the Op Domain Lhs Pipeline object.
MoFEMErrorCode solveSystem()
[Push operators to pipeline]
MoFEMErrorCode setDomainLhsIntegrationRule(RuleHookFun rule)
MoFEM::Interface & mField
#define MOFEM_LOG(channel, severity)
Log.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
auto createVectorMPI(MPI_Comm comm, PetscInt n, PetscInt N)
Create MPI Vector.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
intrusive_ptr for managing petsc objects
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
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.