77 {
78
80
81 try {
82
83
84 moab::Core mb_instance;
85 moab::Interface &moab = mb_instance;
86
89
90
91 DMType dm_name = "DMMOFEM";
93
94
97 {
98
99
101
103
106
108
110
113
114
115 auto dm = simple_interface->
getDM();
118
119 if (simple_interface->
getDim() == 3) {
120
121 std::array<double, 3> point = {0, 0, 0};
122 const double dist = 0.1;
123
124 std::array<double, 12> eval_points = {0.0, 0.0, 0.0, 0.0, 0.01, 0.0,
125 -0.1, 0.0, 0.0, 0.1, 0.0, 0.0};
126
129
130
131
133
134
135 if (auto fe_method = data->feMethodPtr.lock()) {
137 fe_method->getOpPtrVector().push_back(
new MyOp<VolOp>(eval_points));
138 } else
140 "Pointer to element does not exists");
141
142
145
146 data->setEvalPoints(eval_points.data(), eval_points.size() / 3);
147
148
150 &point[0], dist, prb_ptr->
getName(),
153 }
154
155 if (simple_interface->
getDim() == 2) {
156
157 std::array<double, 3> point = {0, 0, 0};
158 const double dist = 0.1;
159
160 std::array<double, 12> eval_points = {
161 0.0, 0.0, 0.0,
162 0.0, 0.01, 0.0,
163 -0.1, 0.0, 0.0,
164 0.1, 0.0, 0.0};
165
168
169
170
172
173
174 if (auto fe_method = data->feMethodPtr.lock()) {
176 fe_method->getOpPtrVector().push_back(
new MyOp<FaceOp>(eval_points));
177 } else
179 "Pointer to element does not exists");
180
181
184
185 data->setEvalPoints(eval_points.data(), eval_points.size() / 3);
186
187
189 &point[0], dist, prb_ptr->
getName(),
192 }
193
194 }
195 }
197
199
200 return 0;
201}
#define CATCH_ERRORS
Catch errors.
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base nme:nme847.
@ MOFEM_DATA_INCONSISTENCY
#define CHKERR
Inline error check.
PetscErrorCode DMMoFEMGetProblemPtr(DM dm, const MoFEM::Problem **problem_ptr)
Get pointer to problem data structure.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
virtual int get_comm_rank() const =0
static MoFEMErrorCode Initialize(int *argc, char ***args, const char file[], const char help[])
Initializes the MoFEM database PETSc, MOAB and MPI.
static MoFEMErrorCode Finalize()
Checks for options to be called at the conclusion of the program.
Deprecated interface functions.
default operator for TRI element
friend class UserDataOperator
Field evaluator interface.
MoFEMErrorCode buildTree3D(boost::shared_ptr< SetPtsData > spd_ptr, const std::string finite_element)
Build spatial tree.
MoFEMErrorCode buildTree2D(boost::shared_ptr< SetPtsData > spd_ptr, const std::string finite_element)
Build spatial tree.
MoFEMErrorCode evalFEAtThePoint2D(const double *const point, const double distance, const std::string problem, const std::string finite_element, boost::shared_ptr< SetPtsData > data_ptr, int lower_rank, int upper_rank, boost::shared_ptr< CacheTuple > cache_ptr, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET)
Evaluate field at artbitray position.
boost::shared_ptr< SPD > getData(const double *ptr=nullptr, const int nb_eval_points=0, const double eps=1e-12, VERBOSITY_LEVELS verb=QUIET)
Get the Data object.
MoFEMErrorCode evalFEAtThePoint3D(const double *const point, const double distance, const std::string problem, const std::string finite_element, boost::shared_ptr< SetPtsData > data_ptr, int lower_rank, int upper_rank, boost::shared_ptr< CacheTuple > cache_ptr, MoFEMTypes bh=MF_EXIST, VERBOSITY_LEVELS verb=QUIET)
Evaluate field at artbitray position.
keeps basic data about problem
Simple interface for fast problem set-up.
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.
int getDim() const
Get the problem dimension.
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name, LoadFileFunc loadFunc=defaultLoadFileFunc)
Load mesh file.
MoFEMErrorCode getOptions()
get options
MoFEMErrorCode getDM(DM *dm)
Get DM.
MoFEMErrorCode setFieldOrder(const std::string field_name, const int order, const Range *ents=NULL)
Set field order.
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
const std::string getDomainFEName() const
Get the Domain FE Name.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.
Volume finite element base.
friend class UserDataOperator
Operator used to check consistency between local coordinates and global cooridnates for integrated po...