v0.14.0
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 
18 namespace MoFEM {
19 
20 template <int DIM> struct ParentFiniteElementAdjacencyFunction;
21 template <int DIM> struct ParentFiniteElementAdjacencyFunctionSkeleton;
22 
23 /**
24  * \brief Simple interface for fast problem set-up
25  * \ingroup mofem_simple_interface
26  */
27 struct 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  */
445  }
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 
552 private:
554 
555  BitRefLevel bitLevel; ///< BitRefLevel of the problem
556  BitRefLevel bitLevelMask; ///< BitRefLevel of the problem
557 
558  PetscLogEvent MOFEM_EVENT_SimpleSetUP;
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::Simple::boundaryFields
std::vector< std::string > boundaryFields
boundary fields
Definition: Simple.hpp:579
MoFEM::Simple::parentAdjFunctionDim1
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 1 > > parentAdjFunctionDim1
Definition: Simple.hpp:620
MoFEM::Simple::setSkeletonAdjacency
MoFEMErrorCode setSkeletonAdjacency(int dim=-1, std::string fe_name="")
Set the skeleton adjacency object.
Definition: Simple.cpp:143
MoFEM::Simple::otherFEs
std::vector< std::string > otherFEs
Other finite elements.
Definition: Simple.hpp:596
MoFEM::CoreTmp< 0 >
Core (interface) class.
Definition: Core.hpp:82
MoFEM::Simple::addParentAdjacencies
bool addParentAdjacencies
If set to true parent adjacencies are build.
Definition: Simple.hpp:571
DEPRECATED
#define DEPRECATED
Definition: definitions.h:17
MoFEM::Simple::addBoundaryFE
bool addBoundaryFE
Add boundary FE.
Definition: Simple.hpp:570
MoFEM::Simple::exchangeGhostCells
MoFEMErrorCode exchangeGhostCells()
Definition: Simple.cpp:954
MoFEM::Simple::fieldsOrder
std::list< std::tuple< std::string, int, Range, bool > > fieldsOrder
Definition: Simple.hpp:587
EntityHandle
MoFEM::Simple::Simple
Simple(const MoFEM::Core &core)
Definition: Simple.cpp:162
MoFEM::Simple::parentAdjFunctionDim2
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 2 > > parentAdjFunctionDim2
Definition: Simple.hpp:618
MoFEM::Simple::query_interface
MoFEMErrorCode query_interface(boost::typeindex::type_index type_index, UnknownInterface **iface) const
Definition: Simple.cpp:8
MoFEM::Simple::noFieldFields
std::vector< std::string > noFieldFields
NOFIELD field name.
Definition: Simple.hpp:583
MoFEM::Simple::meshSet
EntityHandle meshSet
domain meshset
Definition: Simple.hpp:565
MoFEM::Simple::getDM
SmartPetscObj< DM > getDM()
Return smart DM object.
Definition: Simple.hpp:321
MoFEM::Simple::getBitAdjParentMask
auto & getBitAdjParentMask()
bit ref level for parent parent
Definition: Simple.hpp:522
MoFEM::Simple::getDomainFEName
std::string & getDomainFEName()
Get the Domain FE Name.
Definition: Simple.hpp:415
MoFEM::Simple::createBoundaryMeshset
MoFEMErrorCode createBoundaryMeshset()
Definition: Simple.cpp:873
MoFEM::Simple::meshFileName
char meshFileName[255]
mesh file name
Definition: Simple.hpp:600
MoFEM::Simple::MOFEM_EVENT_SimpleKSPSolve
PetscLogEvent MOFEM_EVENT_SimpleKSPSolve
Definition: Simple.hpp:563
MoFEM::Simple::buildProblem
MoFEMErrorCode buildProblem()
Build problem.
Definition: Simple.cpp:751
MoFEM::Simple::meshsetFields
std::vector< std::string > meshsetFields
meshset fields
Definition: Simple.hpp:582
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::Simple::addDataField
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:396
MoFEM::Simple::MOFEM_EVENT_SimpleBuildFields
PetscLogEvent MOFEM_EVENT_SimpleBuildFields
Definition: Simple.hpp:560
MoFEM::Simple::getSkeletonFEName
const std::string getSkeletonFEName() const
Get the Skeleton FE Name.
Definition: Simple.hpp:401
MoFEM::Simple::loadFile
MoFEMErrorCode loadFile(const std::string options, const std::string mesh_file_name, LoadFileFunc loadFunc=defaultLoadFileFunc)
Load mesh file.
Definition: Simple.cpp:194
MoFEM::Simple::dIm
int dIm
dimension of problem
Definition: Simple.hpp:601
MoFEM::Simple::getBoundaryMeshSet
EntityHandle & getBoundaryMeshSet()
Get the BoundaryMeshSet object.
Definition: Simple.hpp:359
MoFEM::Simple::getMeshset
EntityHandle & getMeshset()
Get the MeshSet object.
Definition: Simple.hpp:352
MoFEM::Simple::getBitRefLevelMask
BitRefLevel & getBitRefLevelMask()
Get the BitRefLevel.
Definition: Simple.hpp:380
MoFEM::Simple::addSkeletonFE
bool addSkeletonFE
Add skeleton FE.
Definition: Simple.hpp:569
MoFEM::Simple::nameOfProblem
std::string nameOfProblem
problem name
Definition: Simple.hpp:590
MoFEM::Simple::parentAdjSkeletonFunctionDim2
boost::shared_ptr< ParentFiniteElementAdjacencyFunctionSkeleton< 2 > > parentAdjSkeletonFunctionDim2
Definition: Simple.hpp:623
MoFEM::Simple
Simple interface for fast problem set-up.
Definition: Simple.hpp:27
MoFEM::Simple::removeBoundaryField
MoFEMErrorCode removeBoundaryField(const std::string name)
Remove field form boundary.
Definition: Simple.cpp:446
MoFEM::Simple::getBitAdjEnt
auto & getBitAdjEnt()
bit ref level for parent
Definition: Simple.hpp:529
order
constexpr int order
Definition: dg_projection.cpp:18
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::Simple::MOFEM_EVENT_SimpleLoadMesh
PetscLogEvent MOFEM_EVENT_SimpleLoadMesh
Definition: Simple.hpp:559
MoFEM::Simple::addMeshsetField
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:414
MoFEM::Simple::deleteDM
MoFEMErrorCode deleteDM()
Delete dm.
Definition: Simple.cpp:841
MoFEM::Simple::getOptions
MoFEMErrorCode getOptions()
get options
Definition: Simple.cpp:180
MoFEM::Simple::bitLevelMask
BitRefLevel bitLevelMask
BitRefLevel of the problem.
Definition: Simple.hpp:556
MoFEM::Simple::dataFields
std::vector< std::string > dataFields
Data fields.
Definition: Simple.hpp:581
FieldSpace
FieldSpace
approximation spaces
Definition: definitions.h:82
MoFEM::Simple::getAddSkeletonFE
bool & getAddSkeletonFE()
Get the addSkeletonFE.
Definition: Simple.hpp:487
MoFEM::Simple::meshsetFiniteElementEntities
std::vector< Range > meshsetFiniteElementEntities
Meshset element entities.
Definition: Simple.hpp:598
MoFEM::Simple::bitAdjEntMask
BitRefLevel bitAdjEntMask
bit ref level for parent parent
Definition: Simple.hpp:576
MoFEM::Simple::meshsetFE
std::string meshsetFE
meshset finite element
Definition: Simple.hpp:594
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::Simple::deleteFiniteElements
MoFEMErrorCode deleteFiniteElements()
Delete finite elements.
Definition: Simple.cpp:852
MoFEM::Simple::removeSkeletonField
MoFEMErrorCode removeSkeletonField(const std::string name)
Remove field form skeleton.
Definition: Simple.cpp:460
MoFEM::Simple::getProblemName
std::string & getProblemName()
Get the Problem Name.
Definition: Simple.hpp:452
MoFEM::Simple::domainFE
std::string domainFE
domain finite element
Definition: Simple.hpp:591
MoFEM::Simple::getMeshSet
DEPRECATED EntityHandle & getMeshSet()
Definition: Simple.hpp:345
MoFEM::Types::FieldCoefficientsNumber
int FieldCoefficientsNumber
Number of field coefficients.
Definition: Types.hpp:27
MoFEM::Simple::MOFEM_EVENT_SimpleBuildFiniteElements
PetscLogEvent MOFEM_EVENT_SimpleBuildFiniteElements
Definition: Simple.hpp:561
MoFEM::Simple::LoadFileFunc
boost::function< MoFEMErrorCode(Interface &, const char *, const char *)> LoadFileFunc
Definition: Simple.hpp:43
MoFEM::Simple::createSkeletonMeshset
MoFEMErrorCode createSkeletonMeshset()
Definition: Simple.cpp:920
MoFEM::Simple::boundaryFE
std::string boundaryFE
boundary finite element
Definition: Simple.hpp:592
MoFEM::Simple::~Simple
virtual ~Simple()=default
MoFEM::Simple::getMeshsetFiniteElementEntities
auto & getMeshsetFiniteElementEntities()
Get the Domain Fields.
Definition: Simple.hpp:443
MoFEM::Simple::getAddBoundaryFE
bool & getAddBoundaryFE()
Get the addSkeletonFE.
Definition: Simple.hpp:498
MoFEM::Simple::getDomainFEName
const std::string getDomainFEName() const
Get the Domain FE Name.
Definition: Simple.hpp:387
MoFEM::Simple::parentAdjFunctionDim3
boost::shared_ptr< ParentFiniteElementAdjacencyFunction< 3 > > parentAdjFunctionDim3
Definition: Simple.hpp:616
MoFEM::Simple::bitAdjParentMask
BitRefLevel bitAdjParentMask
bit ref level for parent parent
Definition: Simple.hpp:574
MoFEM::Simple::addBoundaryField
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:358
UnknownInterface.hpp
MoFEM interface.
MoFEM::Simple::skeletonFE
std::string skeletonFE
skeleton finite element
Definition: Simple.hpp:593
MoFEM::Simple::getBoundaryFEName
std::string & getBoundaryFEName()
Get the Boundary FE Name.
Definition: Simple.hpp:422
MoFEM::Simple::getSkeletonMeshSet
EntityHandle & getSkeletonMeshSet()
Get the SkeletonMeshSet object.
Definition: Simple.hpp:366
MoFEM::Simple::removeDomainField
MoFEMErrorCode removeDomainField(const std::string name)
Remove field form domain.
Definition: Simple.cpp:432
MoFEM::Simple::bitAdjEnt
BitRefLevel bitAdjEnt
bit ref level for parent
Definition: Simple.hpp:575
MoFEM::Simple::setDim
void setDim(int dim)
Set the problem dimension.
Definition: Simple.hpp:338
MoFEM::Simple::defaultLoadFileFunc
static MoFEMErrorCode defaultLoadFileFunc(Interface &m_field, const char *file_name, const char *options)
Set function for loading mesh file.
Definition: Simple.hpp:51
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
mesh_file_name
char mesh_file_name[255]
Definition: mesh_smoothing.cpp:22
MoFEM::Simple::setFieldOrder
MoFEMErrorCode setFieldOrder(const std::string field_name, const int order, const Range *ents=NULL)
Set field order.
Definition: Simple.cpp:599
MoFEM::Simple::buildFiniteElements
MoFEMErrorCode buildFiniteElements()
Build finite elements.
Definition: Simple.cpp:697
MoFEM::Simple::getBitAdjParent
auto & getBitAdjParent()
bit ref level for parent
Definition: Simple.hpp:515
MoFEM::UnknownInterface
base class for all interface classes
Definition: UnknownInterface.hpp:34
MoFEM::Simple::getBitAdjEntMask
auto & getBitAdjEntMask()
bit ref level for parent parent
Definition: Simple.hpp:536
Range
MF_ZERO
@ MF_ZERO
Definition: definitions.h:111
MoFEM::Simple::getSkeletonFEName
std::string & getSkeletonFEName()
Get the Skeleton FE Name.
Definition: Simple.hpp:429
MoFEM::Simple::domainFields
std::vector< std::string > domainFields
domain fields
Definition: Simple.hpp:578
MoFEM::Simple::getParentAdjacencies
bool & getParentAdjacencies()
Get the addParentAdjacencies.
Definition: Simple.hpp:508
MoFEM::Simple::addDomainBrokenField
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:285
MoFEM::Simple::skeletonFields
std::vector< std::string > skeletonFields
fields on the skeleton
Definition: Simple.hpp:580
MoFEM::Simple::getBoundaryFEName
const std::string getBoundaryFEName() const
Get the Boundary FE Name.
Definition: Simple.hpp:394
MoFEM::Simple::bitLevel
BitRefLevel bitLevel
BitRefLevel of the problem.
Definition: Simple.hpp:555
MoFEM::Simple::defineFiniteElements
MoFEMErrorCode defineFiniteElements()
Define finite elements.
Definition: Simple.cpp:474
MoFEM::Simple::getBitRefLevel
BitRefLevel & getBitRefLevel()
Get the BitRefLevel.
Definition: Simple.hpp:373
MoFEM::Simple::getDim
int getDim() const
Get the problem dimension.
Definition: Simple.hpp:331
MoFEM::Simple::buildFields
MoFEMErrorCode buildFields()
Build fields.
Definition: Simple.cpp:608
MoFEM::Simple::bitAdjParent
BitRefLevel bitAdjParent
bit ref level for parent
Definition: Simple.hpp:573
MoFEM::Simple::noFieldDataFields
std::vector< std::string > noFieldDataFields
NOFIELD field name.
Definition: Simple.hpp:584
FieldApproximationBase
FieldApproximationBase
approximation base
Definition: definitions.h:58
MoFEMTypes
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
Definition: definitions.h:110
MoFEM::Simple::getMeshsetFEName
std::string & getMeshsetFEName()
Get the Skeleton FE Name.
Definition: Simple.hpp:436
MoFEM::Simple::reSetUp
MoFEMErrorCode reSetUp(bool only_dm=false)
Rebuild internal MoFEM data structures.
Definition: Simple.cpp:791
MoFEM::Simple::addSkeletonField
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:376
MoFEM::Simple::boundaryMeshset
EntityHandle boundaryMeshset
meshset with boundary
Definition: Simple.hpp:566
MoFEM::Simple::parentAdjSkeletonFunctionDim1
boost::shared_ptr< ParentFiniteElementAdjacencyFunctionSkeleton< 1 > > parentAdjSkeletonFunctionDim1
Definition: Simple.hpp:625
MoFEM::Types::BitRefLevel
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:40
MoFEM::Simple::defineProblem
MoFEMErrorCode defineProblem(const PetscBool is_partitioned=PETSC_TRUE)
define problem
Definition: Simple.cpp:575
MoFEM::Simple::dM
SmartPetscObj< DM > dM
Discrete manager (interface to PETSc/MoFEM functions)
Definition: Simple.hpp:604
MoFEM::SmartPetscObj< DM >
MoFEM::Simple::setParentAdjacency
MoFEMErrorCode setParentAdjacency()
Definition: Simple.cpp:67
MoFEM::Simple::setUp
MoFEMErrorCode setUp(const PetscBool is_partitioned=PETSC_TRUE)
Setup problem.
Definition: Simple.cpp:765
MoFEM::Simple::getOtherFiniteElements
std::vector< std::string > & getOtherFiniteElements()
Get the Other Finite Elements.
Definition: Simple.hpp:462
MoFEM::Simple::getProblemName
const std::string getProblemName() const
Get the Problem Name.
Definition: Simple.hpp:408
MoFEM::Simple::addFieldToEmptyFieldBlocks
MoFEMErrorCode addFieldToEmptyFieldBlocks(const std::string row_field, const std::string col_field) const
add empty block to problem
Definition: Simple.cpp:864
MoFEM::Simple::cOre
MoFEM::Core & cOre
Definition: Simple.hpp:553
MoFEM::Simple::skeletonMeshset
EntityHandle skeletonMeshset
skeleton meshset with boundary
Definition: Simple.hpp:567
MoFEM::Simple::MOFEM_EVENT_SimpleSetUP
PetscLogEvent MOFEM_EVENT_SimpleSetUP
Definition: Simple.hpp:558
MoFEM::Simple::addDomainField
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:264
MoFEM::Simple::MOFEM_EVENT_SimpleBuildProblem
PetscLogEvent MOFEM_EVENT_SimpleBuildProblem
Definition: Simple.hpp:562