152 {
153
154
156
157 try {
158
159
160 moab::Core moab_core;
161 moab::Interface &moab = moab_core;
162
163
166
167
168 DMType dm_name = "DMMOFEM";
170
171
174 {
175
177
179
181 enum bases { AINSWORTH, DEMKOWICZ, LASTBASEOP };
182 const char *list_bases[] = {"ainsworth", "demkowicz"};
183 PetscBool flg;
184 PetscInt choice_base_value = AINSWORTH;
186 LASTBASEOP, &choice_base_value, &flg);
187 if (flg == PETSC_TRUE) {
189 if (choice_base_value == AINSWORTH)
191 else if (choice_base_value == DEMKOWICZ)
193 return base;
194 }
196 };
197
198
199 auto base = get_base();
202
204
206
207 auto dm = simple_interface->
getDM();
208
209
211 boost::shared_ptr<EdgeEle> skeleton_fe =
212 boost::shared_ptr<EdgeEle>(
new EdgeEle(m_field));
213
214 skeleton_fe->getOpPtrVector().push_back(
216 skeleton_fe->getOpPtrVector().push_back(
218
219
221 skeleton_fe);
222 }
223 }
225
226
228
229 return 0;
230}
MoFEM::EdgeElementForcesAndSourcesCore EdgeEle
#define CATCH_ERRORS
Catch errors.
FieldApproximationBase
approximation base
@ AINSWORTH_LEGENDRE_BASE
Ainsworth Cole (Legendre) approx. base .
@ HCURL
field with continuous tangents
#define CHKERR
Inline error check.
PetscErrorCode DMRegister_MoFEM(const char sname[])
Register MoFEM problem.
PetscErrorCode DMoFEMLoopFiniteElements(DM dm, const char fe_name[], MoFEM::FEMethod *method, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr())
Executes FEMethod for finite elements in DM.
PetscErrorCode PetscOptionsGetEList(PetscOptions *, const char pre[], const char name[], const char *const *list, PetscInt next, PetscInt *value, PetscBool *set)
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.
Simple interface for fast problem set-up.
const std::string getSkeletonFEName() const
Get the Skeleton FE Name.
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.
MoFEMErrorCode getOptions()
get options
MoFEMErrorCode getDM(DM *dm)
Get DM.
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name)
Load mesh file.
MoFEMErrorCode setFieldOrder(const std::string field_name, const int order, const Range *ents=NULL)
Set field order.
MoFEMErrorCode addSkeletonField(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 skeleton.
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.