v0.15.0
Loading...
Searching...
No Matches
Simple.hpp
Go to the documentation of this file.
1/** \file Simple.hpp
2 * \brief Header file for simple interface
3 * \ingroup mofem_simple_interface
4 *
5 * Make simplified interface, to speedup problem setup and analysts.
6 * See discussion here
7 * <a
8 * href=https://groups.google.com/d/msg/mofem-group/Vkc00aia4dU/o9RF3ZmPAAAJ>link
9 * to google groups</a>
10 *
11 */
12
13#ifndef __SIMPLE_HPP__
14#define __SIMPLE_HPP__
15
16#include "UnknownInterface.hpp"
17
18namespace MoFEM {
19
20template <int DIM> struct ParentFiniteElementAdjacencyFunction;
21template <int DIM> struct ParentFiniteElementAdjacencyFunctionSkeleton;
22
23/**
24 * \brief Simple interface for fast problem set-up
25 * \ingroup mofem_simple_interface
26 */
27struct Simple : public UnknownInterface {
28
29 MoFEMErrorCode query_interface(boost::typeindex::type_index type_index,
30 UnknownInterface **iface) const;
31
32 Simple(const MoFEM::Core &core);
33 virtual ~Simple() = default;
34
35 /**
36 * \brief get options
37 * @return error code
38 */
40
41 typedef boost::function<MoFEMErrorCode(Interface &, const char *,
42 const char *)>
44 /**
45 * \brief Set function for loading mesh file
46 * @param m_field interface
47 * @param file_name file name
48 * @param options loader options
49 * @return error code
50 */
52 const char *file_name,
53 const char *options) {
54 // Default behavior using the member moab.load_file
55 return m_field.get_moab().load_file(file_name, 0, options);
56 }
57
58 /**
59 * \brief Load mesh file
60 * @param options file load options
61 * @param mesh_file_name file name if not set default or set by command line
62 * @param loadFunc function for loading mesh file
63 * is used.
64 *
65 * \note If bitRefLevel is set to any, bit ref level of loaded entities is not
66 * changed. After mesh is load, bit ref level should be set to create problem.
67 * Default setting of bit ref level is on first bit, and if is set all mesh
68 * entities on load are set to set level.
69 *
70 * @return error code
71 */
72 MoFEMErrorCode loadFile(const std::string options,
73 const std::string mesh_file_name,
75 /**
76 * \brief Load mesh file with parallel options if number of cores > 1
77 * @param mesh_file_name file name if not set default or set by command line
78 * is used.
79 * @return error code
80 */
81 MoFEMErrorCode loadFile(const std::string mesh_file_name = "");
82
83 /**
84 * \brief Add field on domain
85 * @param name name of the field
86 * @param space space (L2,H1,Hdiv,Hcurl)
87 * @param base approximation base, see FieldApproximationBase
88 * @param nb_of_coefficients number of field coefficients
89 * @param tag_type type of the tag MB_TAG_DENSE or MB_TAG_SPARSE
90 * (DENSE is faster and uses less memory, SPARSE is more flexible if you
91 * define field on subdomains)
92 * @param bh if MF_EXCL throws error if field exits, MF_ZERO
93 * no error if field exist
94 * @param verb verbosity level
95 * @return error code
96 */
98 addDomainField(const std::string name, const FieldSpace space,
99 const FieldApproximationBase base,
100 const FieldCoefficientsNumber nb_of_coefficients,
101 const TagType tag_type = MB_TAG_SPARSE,
102 const enum MoFEMTypes bh = MF_ZERO, int verb = -1);
103
104 /**
105 * \brief Add broken field on domain
106 * @param name name of the field
107 * @param space space (L2,H1,Hdiv,Hcurl)
108 * @param base approximation base, see FieldApproximationBase
109 * @param nb_of_coefficients number of field coefficients
110 * @param tag_type type of the tag MB_TAG_DENSE or MB_TAG_SPARSE
111 * (DENSE is faster and uses less memory, SPARSE is more flexible if you
112 * define field on subdomains)
113 * @param bh if MF_EXCL throws error if field exits, MF_ZERO
114 * no error if field exist
115 * @param verb verbosity level
116 * @return error code
117 */
119 addDomainBrokenField(const std::string name, const FieldSpace space,
120 const FieldApproximationBase base,
121 const FieldCoefficientsNumber nb_of_coefficients,
122 const TagType tag_type = MB_TAG_SPARSE,
123 const enum MoFEMTypes bh = MF_ZERO, int verb = -1);
124
125 /**
126 * \brief Add field on boundary
127 * @param name name of the field
128 * @param space space (L2,H1,Hdiv,Hcurl)
129 * @param base approximation base, see FieldApproximationBase
130 * @param nb_of_coefficients number of field coefficients
131 * @param tag_type type of the tag MB_TAG_DENSE or MB_TAG_SPARSE
132 * (DENSE is faster and uses less memory, SPARSE is more flexible if you
133 * define field on subdomains)
134 * @param bh if MF_EXCL throws error if field exits, MF_ZERO
135 * no error if field exist
136 * @param verb verbosity level
137 * @return error code
138 */
140 addBoundaryField(const std::string name, const FieldSpace space,
141 const FieldApproximationBase base,
142 const FieldCoefficientsNumber nb_of_coefficients,
143 const TagType tag_type = MB_TAG_SPARSE,
144 const enum MoFEMTypes bh = MF_ZERO, int verb = -1);
145
146 /**
147 * \brief Add field on skeleton
148 * @param name name of the field
149 * @param space space (L2,H1,Hdiv,Hcurl)
150 * @param base approximation base, see FieldApproximationBase
151 * @param nb_of_coefficients number of field coefficients
152 * @param tag_type type of the tag MB_TAG_DENSE or MB_TAG_SPARSE
153 * (DENSE is faster and uses less memory, SPARSE is more flexible if you
154 * define field on subdomains)
155 * @param bh if MF_EXCL throws error if field exits, MF_ZERO
156 * no error if field exist
157 * @param verb verbosity level
158 * @return error code
159 */
161 addSkeletonField(const std::string name, const FieldSpace space,
162 const FieldApproximationBase base,
163 const FieldCoefficientsNumber nb_of_coefficients,
164 const TagType tag_type = MB_TAG_SPARSE,
165 const enum MoFEMTypes bh = MF_ZERO, int verb = -1);
166
167 /**
168 * \brief Add field on domain
169 * @param name name of the field
170 * @param space space (L2,H1,Hdiv,Hcurl)
171 * @param base approximation base, see FieldApproximationBase
172 * @param nb_of_coefficients number of field coefficients
173 * @param tag_type type of the tag MB_TAG_DENSE or MB_TAG_SPARSE
174 * (DENSE is faster and uses less memory, SPARSE is more flexible if you
175 * define field on subdomains)
176 * @param bh if MF_EXCL throws error if field exits, MF_ZERO
177 * no error if field exist
178 * @param verb verbosity level
179 * @return error code
180 */
181 MoFEMErrorCode addDataField(const std::string name, const FieldSpace space,
182 const FieldApproximationBase base,
183 const FieldCoefficientsNumber nb_of_coefficients,
184 const TagType tag_type = MB_TAG_SPARSE,
185 const enum MoFEMTypes bh = MF_ZERO,
186 int verb = -1);
187
188 /**
189 * @brief Add meshset field
190 *
191 * @param name
192 * @param space
193 * @param base
194 * @param nb_of_coefficients
195 * @param tag_type
196 * @param bh
197 * @param verb
198 * @return MoFEMErrorCode
199 */
201 addMeshsetField(const std::string name, const FieldSpace space,
202 const FieldApproximationBase base,
203 const FieldCoefficientsNumber nb_of_coefficients,
204 const TagType tag_type = MB_TAG_SPARSE,
205 const enum MoFEMTypes bh = MF_ZERO, int verb = -1);
206
207 /**
208 * @brief Remove field form domain
209 *
210 * @param name
211 * @return MoFEMErrorCode
212 */
213 MoFEMErrorCode removeDomainField(const std::string name);
214
215 /**
216 * @brief Remove field form boundary
217 *
218 * @param name
219 * @return MoFEMErrorCode
220 */
221 MoFEMErrorCode removeBoundaryField(const std::string name);
222
223 /**
224 * @brief Remove field form skeleton
225 *
226 * @param name
227 * @return MoFEMErrorCode
228 */
229 MoFEMErrorCode removeSkeletonField(const std::string name);
230
231 /**
232 * \brief Define finite elements
233 * @return Error code
234 */
236
237 /**
238 * \brief define problem
239 * @return error code
240 */
241 MoFEMErrorCode defineProblem(const PetscBool is_partitioned = PETSC_TRUE);
242
243 /**
244 * \brief Set field order
245 * @param std::field_name field name
246 * @param order order
247 * @param range of entities to which order is set (If null it sat to all
248 * entities)
249 * @return error code
250 */
251 MoFEMErrorCode setFieldOrder(const std::string field_name, const int order,
252 const Range *ents = NULL);
253
254 /**
255 * \brief Build fields
256 * @return error code
257 */
259
260 /**
261 * \brief Build finite elements
262 * @return error code
263 */
265
266 /**
267 * @brief Set the skeleton adjacency object
268 *
269 * @param dim
270 * @param fe_name
271 * @return MoFEMErrorCode
272 */
273 MoFEMErrorCode setSkeletonAdjacency(int dim = -1, std::string fe_name = "");
274
275 /**
276 * \brief Build problem
277 * @return error code
278 */
280
281 /**
282 * \brief Setup problem
283 * @return error code
284 */
285 MoFEMErrorCode setUp(const PetscBool is_partitioned = PETSC_TRUE);
286
287 /**
288 * @brief Rebuild internal MoFEM data structures
289 *
290 * Call this function after you add field or remove it.
291 *
292 * \note If you add field, or remove it, finite element and problem needs to
293 * be rebuild. However DM can remain the same.
294 *
295 * @return MoFEMErrorCode
296 */
297 MoFEMErrorCode reSetUp(bool only_dm = false);
298
299 /**
300 * \brief Get DM
301 * @param dm discrete manager
302 * @return error code
303 */
304 MoFEMErrorCode getDM(DM *dm);
305
306 /**
307 * @brief Return smart DM object
308 *
309 * \code
310 * {
311 * auto dm = simple_interface->getDM();
312 *
313 * // ...
314 *
315 * // dm is automatically destroyed when out of the scope
316 * }
317 * \endcode
318 *
319 * @return SmartPetscObj<DM>
320 */
321 inline SmartPetscObj<DM> getDM() { return dM; }
322
323 /**
324 * @brief Get the problem dimension
325 *
326 * Problem dimension is determined by highest dimension of entities on the
327 * mesh.
328 *
329 * @return int
330 */
331 inline int getDim() const { return dIm; }
332
333 /**
334 * @brief Set the problem dimension
335 *
336 * @return int
337 */
338 void setDim(int dim) { dIm = dim; };
339
340 /**
341 * @deprecated Use getMeshset
342 *
343 * @return EntityHandle&
344 */
346
347 /**
348 * @brief Get the MeshSet object
349 *
350 * @return EntityHandle&
351 */
352 inline EntityHandle &getMeshset() { return meshSet; }
353
354 /**
355 * @brief Get the BoundaryMeshSet object
356 *
357 * @return EntityHandle&
358 */
360
361 /**
362 * @brief Get the SkeletonMeshSet object
363 *
364 * @return EntityHandle&
365 */
367
368 /**
369 * @brief Get the BitRefLevel
370 *
371 * @return BitRefLevel
372 */
373 inline BitRefLevel &getBitRefLevel() { return bitLevel; }
374
375 /**
376 * @brief Get the BitRefLevel
377 *
378 * @return BitRefLevel
379 */
381
382 /**
383 * @brief Get the Domain FE Name
384 *
385 * @return const std::string
386 */
387 inline const std::string getDomainFEName() const { return domainFE; }
388
389 /**
390 * @brief Get the Boundary FE Name
391 *
392 * @return const std::string
393 */
394 inline const std::string getBoundaryFEName() const { return boundaryFE; }
395
396 /**
397 * @brief Get the Skeleton FE Name
398 *
399 * @return const std::string
400 */
401 inline const std::string getSkeletonFEName() const { return skeletonFE; }
402
403 /**
404 * @brief Get the Problem Name
405 *
406 * @return const std::string
407 */
408 inline const std::string getProblemName() const { return nameOfProblem; }
409
410 /**
411 * @brief Get the Domain FE Name
412 *
413 * @return std::string&
414 */
415 inline std::string &getDomainFEName() { return domainFE; }
416
417 /**
418 * @brief Get the Boundary FE Name
419 *
420 * @return std::string&
421 */
422 inline std::string &getBoundaryFEName() { return boundaryFE; }
423
424 /**
425 * @brief Get the Skeleton FE Name
426 *
427 * @return std::string&
428 */
429 inline std::string &getSkeletonFEName() { return skeletonFE; }
430
431 /**
432 * @brief Get the Skeleton FE Name
433 *
434 * @return std::string&
435 */
436 inline std::string &getMeshsetFEName() { return meshsetFE; }
437
438 /**
439 * @brief Get the Domain Fields
440 *
441 * @return std::vector<std::string>&
442 */
446
447 /**
448 * @brief Get the Problem Name
449 *
450 * @return std::string&
451 */
452 inline std::string &getProblemName() { return nameOfProblem; }
453
454 /**
455 * @brief Get the Other Finite Elements
456 *
457 * User can create finite elements using directly core interface and
458 * and them to simple problem by this function
459 *
460 * @return std::vector<std::string>&
461 */
462 inline std::vector<std::string> &getOtherFiniteElements() { return otherFEs; }
463
464 /**
465 * @brief Delete dm
466 *
467 * @return MoFEMErrorCode
468 */
470
471 /**
472 * @brief Delete finite elements
473 *
474 * @return MoFEMErrorCode
475 */
477
478 /**
479 * @brief Get the addSkeletonFE
480 *
481 * If variable set to true, skeleton element is created regardless field on
482 * skelton is added or not.
483 *
484 * @return true
485 * @return false
486 */
487 bool &getAddSkeletonFE() { return addSkeletonFE; }
488
489 /**
490 * @brief Get the addSkeletonFE
491 *
492 * If variable set to true, boundary element is created regardless field on
493 * skelton is added or not.
494 *
495 * @return true
496 * @return false
497 */
498 bool &getAddBoundaryFE() { return addBoundaryFE; }
499
500 /**
501 * @brief Get the addParentAdjacencies
502 *
503 * If set true add parent adjacencies
504 *
505 * @return true
506 * @return false
507 */
509
510 /**
511 * @brief bit ref level for parent
512 *
513 * @return auto&
514 */
515 auto &getBitAdjParent() { return bitAdjParent; }
516
517 /**
518 * @brief bit ref level for parent parent
519 *
520 * @return auto&
521 */
523
524 /**
525 * @brief bit ref level for parent
526 *
527 * @return auto&
528 */
529 auto &getBitAdjEnt() { return bitAdjEnt; }
530
531 /**
532 * @brief bit ref level for parent parent
533 *
534 * @return auto&
535 */
536 auto &getBitAdjEntMask() { return bitAdjEntMask; }
537
538 /**
539 * @brief add empty block to problem
540 *
541 * MatrixManager assumes that all blocks, i.e. all fields combinations are non
542 * zero. This is not always the case, to optimise code and reduce memory usage
543 * user can specifi which blocks are empty.
544 *
545 * @param row_field row field name
546 * @param col_field col field name
547 * @return MoFEMErrorCode
548 */
549 MoFEMErrorCode addFieldToEmptyFieldBlocks(const std::string row_field,
550 const std::string col_field) const;
551
552private:
554
555 BitRefLevel bitLevel; ///< BitRefLevel of the problem
556 BitRefLevel bitLevelMask; ///< BitRefLevel of the problem
557
564
565 EntityHandle meshSet; ///< domain meshset
566 EntityHandle boundaryMeshset; ///< meshset with boundary
567 EntityHandle skeletonMeshset; ///< skeleton meshset with boundary
568
569 bool addSkeletonFE; ///< Add skeleton FE
570 bool addBoundaryFE; ///< Add boundary FE
571 bool addParentAdjacencies; ///< If set to true parent adjacencies are build
572
573 BitRefLevel bitAdjParent; ///< bit ref level for parent
574 BitRefLevel bitAdjParentMask; ///< bit ref level for parent parent
575 BitRefLevel bitAdjEnt; ///< bit ref level for parent
576 BitRefLevel bitAdjEntMask; ///< bit ref level for parent parent
577
578 std::vector<std::string> domainFields; ///< domain fields
579 std::vector<std::string> boundaryFields; ///< boundary fields
580 std::vector<std::string> skeletonFields; ///< fields on the skeleton
581 std::vector<std::string> dataFields; ///< Data fields
582 std::vector<std::string> meshsetFields; ///< meshset fields
583 std::vector<std::string> noFieldFields; ///< NOFIELD field name
584 std::vector<std::string> noFieldDataFields; ///< NOFIELD field name
585
586 std::list<std::tuple<std::string, int, Range, bool>>
587 fieldsOrder; ///< fields order. 1: field name, order, range, set by range
588 ///< if true
589
590 std::string nameOfProblem = "SimpleProblem"; ///< problem name
591 std::string domainFE = "dFE"; ///< domain finite element
592 std::string boundaryFE = "bFE"; ///< boundary finite element
593 std::string skeletonFE = "sFE"; ///< skeleton finite element
594 std::string meshsetFE = "mFE"; ///< meshset finite element
595
596 std::vector<std::string> otherFEs; ///< Other finite elements
597
598 std::vector<Range> meshsetFiniteElementEntities; ///< Meshset element entities
599
600 char meshFileName[255]; ///< mesh file name
601 int dIm; ///< dimension of problem
602
604 dM; ///< Discrete manager (interface to PETSc/MoFEM functions)
605
609
610 template <int DIM = -1>
611 MoFEMErrorCode setSkeletonAdjacency(std::string fe_name);
612
613 template <int DIM = -1> MoFEMErrorCode setParentAdjacency();
614
615 boost::shared_ptr<ParentFiniteElementAdjacencyFunction<3>>
617 boost::shared_ptr<ParentFiniteElementAdjacencyFunction<2>>
619 boost::shared_ptr<ParentFiniteElementAdjacencyFunction<1>>
621
622 boost::shared_ptr<ParentFiniteElementAdjacencyFunctionSkeleton<2>>
624 boost::shared_ptr<ParentFiniteElementAdjacencyFunctionSkeleton<1>>
626};
627
628} // namespace MoFEM
629
630#endif // __SIMPLE_HPP__
631
632/**
633 * \defgroup mofem_simple_interface Simple interface
634 * \brief Implementation of simple interface for fast problem set-up.
635 *
636 * \ingroup mofem
637 **/
MoFEM interface.
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
@ MF_ZERO
FieldApproximationBase
approximation base
Definition definitions.h:58
FieldSpace
approximation spaces
Definition definitions.h:82
#define DEPRECATED
Definition definitions.h:17
constexpr int order
char mesh_file_name[255]
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
int FieldCoefficientsNumber
Number of field coefficients.
Definition Types.hpp:27
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition Types.hpp:40
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
constexpr auto field_name
virtual moab::Interface & get_moab()=0
Core (interface) class.
Definition Core.hpp:82
Deprecated interface functions.
Simple interface for fast problem set-up.
Definition Simple.hpp:27
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 2 > > parentAdjFunctionDim2
Definition Simple.hpp:618
EntityHandle boundaryMeshset
meshset with boundary
Definition Simple.hpp:566
MoFEMErrorCode buildProblem()
Build problem.
Definition Simple.cpp:753
std::string & getDomainFEName()
Get the Domain FE Name.
Definition Simple.hpp:415
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.
Definition Simple.cpp:261
bool & getAddBoundaryFE()
Get the addSkeletonFE.
Definition Simple.hpp:498
const std::string getBoundaryFEName() const
Get the Boundary FE Name.
Definition Simple.hpp:394
std::vector< std::string > dataFields
Data fields.
Definition Simple.hpp:581
MoFEMErrorCode setParentAdjacency()
Definition Simple.cpp:67
std::list< std::tuple< std::string, int, Range, bool > > fieldsOrder
Definition Simple.hpp:587
std::vector< std::string > domainFields
domain fields
Definition Simple.hpp:578
MoFEMErrorCode defineFiniteElements()
Define finite elements.
Definition Simple.cpp:471
MoFEM::Core & cOre
Definition Simple.hpp:553
BitRefLevel bitAdjEnt
bit ref level for parent
Definition Simple.hpp:575
EntityHandle & getMeshset()
Get the MeshSet object.
Definition Simple.hpp:352
char meshFileName[255]
mesh file name
Definition Simple.hpp:600
EntityHandle meshSet
domain meshset
Definition Simple.hpp:565
auto & getBitAdjParent()
bit ref level for parent
Definition Simple.hpp:515
int getDim() const
Get the problem dimension.
Definition Simple.hpp:331
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name, LoadFileFunc loadFunc=defaultLoadFileFunc)
Load mesh file.
Definition Simple.cpp:191
std::vector< std::string > otherFEs
Other finite elements.
Definition Simple.hpp:596
MoFEMErrorCode buildFiniteElements()
Build finite elements.
Definition Simple.cpp:699
MoFEMErrorCode addMeshsetField(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 meshset field.
Definition Simple.cpp:411
boost::shared_ptr< ParentFiniteElementAdjacencyFunctionSkeleton< 2 > > parentAdjSkeletonFunctionDim2
Definition Simple.hpp:623
MoFEMErrorCode exchangeGhostCells()
Definition Simple.cpp:956
PetscLogEvent MOFEM_EVENT_SimpleBuildFields
Definition Simple.hpp:560
const std::string getSkeletonFEName() const
Get the Skeleton FE Name.
Definition Simple.hpp:401
PetscLogEvent MOFEM_EVENT_SimpleLoadMesh
Definition Simple.hpp:559
static MoFEMErrorCode defaultLoadFileFunc(Interface &m_field, const char *file_name, const char *options)
Set function for loading mesh file.
Definition Simple.hpp:51
MoFEMErrorCode reSetUp(bool only_dm=false)
Rebuild internal MoFEM data structures.
Definition Simple.cpp:793
MoFEMErrorCode addBoundaryField(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 boundary.
Definition Simple.cpp:355
std::vector< std::string > noFieldFields
NOFIELD field name.
Definition Simple.hpp:583
std::string meshsetFE
meshset finite element
Definition Simple.hpp:594
bool addSkeletonFE
Add skeleton FE.
Definition Simple.hpp:569
BitRefLevel bitAdjParent
bit ref level for parent
Definition Simple.hpp:573
bool addBoundaryFE
Add boundary FE.
Definition Simple.hpp:570
std::vector< std::string > & getOtherFiniteElements()
Get the Other Finite Elements.
Definition Simple.hpp:462
MoFEMErrorCode addFieldToEmptyFieldBlocks(const std::string row_field, const std::string col_field) const
add empty block to problem
Definition Simple.cpp:866
std::string skeletonFE
skeleton finite element
Definition Simple.hpp:593
std::vector< std::string > noFieldDataFields
NOFIELD field name.
Definition Simple.hpp:584
std::vector< std::string > meshsetFields
meshset fields
Definition Simple.hpp:582
EntityHandle & getSkeletonMeshSet()
Get the SkeletonMeshSet object.
Definition Simple.hpp:366
std::string boundaryFE
boundary finite element
Definition Simple.hpp:592
std::string nameOfProblem
problem name
Definition Simple.hpp:590
void setDim(int dim)
Set the problem dimension.
Definition Simple.hpp:338
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 3 > > parentAdjFunctionDim3
Definition Simple.hpp:616
MoFEMErrorCode getOptions()
get options
Definition Simple.cpp:180
virtual ~Simple()=default
std::string domainFE
domain finite element
Definition Simple.hpp:591
std::vector< std::string > boundaryFields
boundary fields
Definition Simple.hpp:579
boost::shared_ptr< ParentFiniteElementAdjacencyFunctionSkeleton< 1 > > parentAdjSkeletonFunctionDim1
Definition Simple.hpp:625
std::string & getBoundaryFEName()
Get the Boundary FE Name.
Definition Simple.hpp:422
MoFEMErrorCode removeSkeletonField(const std::string name)
Remove field form skeleton.
Definition Simple.cpp:457
BitRefLevel bitAdjEntMask
bit ref level for parent parent
Definition Simple.hpp:576
auto & getBitAdjEnt()
bit ref level for parent
Definition Simple.hpp:529
DEPRECATED EntityHandle & getMeshSet()
Definition Simple.hpp:345
SmartPetscObj< DM > dM
Discrete manager (interface to PETSc/MoFEM functions)
Definition Simple.hpp:604
MoFEMErrorCode removeDomainField(const std::string name)
Remove field form domain.
Definition Simple.cpp:429
MoFEMErrorCode buildFields()
Build fields.
Definition Simple.cpp:610
SmartPetscObj< DM > getDM()
Return smart DM object.
Definition Simple.hpp:321
std::string & getMeshsetFEName()
Get the Skeleton FE Name.
Definition Simple.hpp:436
std::vector< Range > meshsetFiniteElementEntities
Meshset element entities.
Definition Simple.hpp:598
BitRefLevel bitLevel
BitRefLevel of the problem.
Definition Simple.hpp:555
MoFEMErrorCode setFieldOrder(const std::string field_name, const int order, const Range *ents=NULL)
Set field order.
Definition Simple.cpp:601
auto & getMeshsetFiniteElementEntities()
Get the Domain Fields.
Definition Simple.hpp:443
MoFEMErrorCode defineProblem(const PetscBool is_partitioned=PETSC_TRUE)
define problem
Definition Simple.cpp:577
BitRefLevel & getBitRefLevelMask()
Get the BitRefLevel.
Definition Simple.hpp:380
std::vector< std::string > skeletonFields
fields on the skeleton
Definition Simple.hpp:580
MoFEMErrorCode addDataField(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.
Definition Simple.cpp:393
EntityHandle & getBoundaryMeshSet()
Get the BoundaryMeshSet object.
Definition Simple.hpp:359
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition Simple.cpp:8
auto & getBitAdjEntMask()
bit ref level for parent parent
Definition Simple.hpp:536
bool & getAddSkeletonFE()
Get the addSkeletonFE.
Definition Simple.hpp:487
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
Definition Simple.cpp:767
boost::function< MoFEMErrorCode(Interface &, const char *, const char *)> LoadFileFunc
Definition Simple.hpp:43
MoFEMErrorCode removeBoundaryField(const std::string name)
Remove field form boundary.
Definition Simple.cpp:443
std::string & getSkeletonFEName()
Get the Skeleton FE Name.
Definition Simple.hpp:429
const std::string getProblemName() const
Get the Problem Name.
Definition Simple.hpp:408
const std::string getDomainFEName() const
Get the Domain FE Name.
Definition Simple.hpp:387
int dIm
dimension of problem
Definition Simple.hpp:601
MoFEMErrorCode setSkeletonAdjacency(int dim=-1, std::string fe_name="")
Set the skeleton adjacency object.
Definition Simple.cpp:143
MoFEMErrorCode deleteDM()
Delete dm.
Definition Simple.cpp:843
std::string & getProblemName()
Get the Problem Name.
Definition Simple.hpp:452
PetscLogEvent MOFEM_EVENT_SimpleSetUP
Definition Simple.hpp:558
PetscLogEvent MOFEM_EVENT_SimpleKSPSolve
Definition Simple.hpp:563
MoFEMErrorCode createBoundaryMeshset()
Definition Simple.cpp:875
PetscLogEvent MOFEM_EVENT_SimpleBuildFiniteElements
Definition Simple.hpp:561
BitRefLevel bitLevelMask
BitRefLevel of the problem.
Definition Simple.hpp:556
auto & getBitAdjParentMask()
bit ref level for parent parent
Definition Simple.hpp:522
BitRefLevel bitAdjParentMask
bit ref level for parent parent
Definition Simple.hpp:574
PetscLogEvent MOFEM_EVENT_SimpleBuildProblem
Definition Simple.hpp:562
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 1 > > parentAdjFunctionDim1
Definition Simple.hpp:620
BitRefLevel & getBitRefLevel()
Get the BitRefLevel.
Definition Simple.hpp:373
bool & getParentAdjacencies()
Get the addParentAdjacencies.
Definition Simple.hpp:508
MoFEMErrorCode deleteFiniteElements()
Delete finite elements.
Definition Simple.cpp:854
EntityHandle skeletonMeshset
skeleton meshset with boundary
Definition Simple.hpp:567
MoFEMErrorCode createSkeletonMeshset()
Definition Simple.cpp:922
bool addParentAdjacencies
If set to true parent adjacencies are build.
Definition Simple.hpp:571
MoFEMErrorCode addDomainBrokenField(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 broken field on domain.
Definition Simple.cpp:282
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.
Definition Simple.cpp:373
intrusive_ptr for managing petsc objects
base class for all interface classes