v0.14.0
Interface.hpp
Go to the documentation of this file.
1 /** \file Interface.hpp
2  * \brief MoFEM interface
3  */
4 
5 #ifndef __INTERFACE_HPP__
6 #define __INTERFACE_HPP__
7 
8 /** \brief name space of MoFEM library functions and classes
9  */
10 namespace MoFEM {
11 
12 struct MeshsetsManager;
13 
14 /**
15  * \brief Interface
16  * \nosubgrouping
17  * \ingroup mofem
18  *
19  * This interface is used by user to: <br>
20  * - create approximation fields, <br>
21  * - declare elements, <br>
22  * - declare problems, <br>
23  *
24  * \todo Clean interface, organize groups outsource some functions to
25  * independent interface
26  */
28 
29  virtual ~CoreInterface() = default;
30 
31  /**
32  * @brief Get the core
33  *
34  * @return int
35  */
36  virtual const int getValue() const = 0;
37 
38  /**
39  * @brief Get RefEntity
40  *
41  * @param ent
42  * @return boost::shared_ptr<RefEntityTmp<0>>
43  */
44  virtual boost::shared_ptr<RefEntityTmp<0>>
45  make_shared_ref_entity(const EntityHandle ent) = 0;
46 
47  /** \name Interfaces */
48 
49  /**@{*/
50 
51  /**
52  * get moab instance
53  */
54  virtual moab::Interface &get_moab() = 0;
55 
56  /**
57  * get moab instance interface
58  */
59  virtual const moab::Interface &get_moab() const = 0;
60 
61  /**
62  * @brief Set the moab interface object
63  *
64  * @param new_moab
65  * @param verb
66  * @return MoFEMErrorCode
67  */
69  int verb = VERBOSE) = 0;
70 
71  /** \brief get MeshsetsManager pointer
72  */
74 
75  /** \brief get MeshsetsManager pointer
76  */
77  virtual const MeshsetsManager *get_meshsets_manager_ptr() const = 0;
78 
79  /** \brief get MeshsetsManager pointer
80  */
82 
83  /** \brief get MeshsetsManager pointer
84  */
85  virtual const MeshsetsManager &get_meshsets_manager() const = 0;
86 
87  /**@}*/
88 
89  /** \name Basic entity */
90 
91  /**@{*/
92 
93  /**
94  * \brief Get pointer to basic entity data.
95  *
96  * This structure keeps data like tags handlers and other data used to
97  * construct mofem entities, dofs and finite elements.
98  *
99  */
100  virtual boost::shared_ptr<BasicEntityData> &get_basic_entity_data_ptr() = 0;
101 
102  /**@}*/
103 
104  /** \name Communicator */
105 
106  /**@{*/
107 
108  /**
109  * get MPI communicator
110  *
111  */
112  virtual MPI_Comm &get_comm() const = 0;
113 
114  /**
115  * get communicator size
116  */
117  virtual int get_comm_size() const = 0;
118 
119  /**
120  * get comm rank
121  */
122  virtual int get_comm_rank() const = 0;
123 
124  /** \name Check consistency */
125 
126  /**@{*/
127 
128  /**
129  * \brief check data consistency in entitiesPtr
130  *
131  */
132  virtual MoFEMErrorCode
133  check_number_of_ents_in_ents_field(const std::string &name) const = 0;
134 
135  /**
136  * \brief check data consistency in entitiesPtr
137  *
138  */
140 
141  /**
142  * \brief check data consistency in entsFiniteElements
143  *
144  */
146  const std::string &name) const = 0;
147 
148  /**
149  * \brief check data consistency in entsFiniteElements
150  *
151  */
152  virtual MoFEMErrorCode
154 
155  /** \name Database */
156 
157  /**@{*/
158 
159  /**
160  * \brief Clear database
161  * @param verb Verbosity level
162  * @return Error code
163  */
164  virtual MoFEMErrorCode clear_database(int verb = DEFAULT_VERBOSITY) = 0;
165 
166  /**
167  * \brief Clear database and initialize it once again
168  * @param verb Verbosity level
169  * @return Error code
170  */
171  virtual MoFEMErrorCode rebuild_database(int verb = DEFAULT_VERBOSITY) = 0;
172 
173  /**@}*/
174 
175  /** \name Delete and remove */
176 
177  /**@{*/
178 
179  /**
180  * @brief Remove parents from entities
181  *
182  */
183  virtual MoFEMErrorCode
184  remove_parents_by_ents(const Range &ents, int verb = DEFAULT_VERBOSITY) = 0;
185 
186  /**
187  * @brief Remove parent from entities on bit level
188  *
189  * Evert entity created by refinement, split or any other change on the mesh
190  * can have parent. This function remove parent from entity,
191  *
192  * \note Functions makeing topological changes on entities should repsect
193  * parents child relation. This erase that relation. If you going to split
194  * faces and create interface is recommended to call this function before
195  * split opeartion.
196  *
197  * @param bit level
198  * @param mask of bit level
199  * @param verb verbosity level
200  * @return MoFEMErrorCode
201  */
202  virtual MoFEMErrorCode
204  int verb = DEFAULT_VERBOSITY) = 0;
205 
206  /**
207  * @brief Remove paremts from entities having parents in passed range
208  *
209  */
210  virtual MoFEMErrorCode
211  remove_parents_by_parents(const Range &ents,
212  int verb = DEFAULT_VERBOSITY) = 0;
213 
214  /** \brief delete entities form mofem and moab database
215  *
216  */
217  virtual MoFEMErrorCode
219  const bool remove_parent = false,
220  int verb = DEFAULT_VERBOSITY,
221  MoFEMTypes mf = MF_ZERO) = 0;
222 
223  /** \brief remove entities form mofem database
224  */
225  virtual MoFEMErrorCode remove_ents(const Range ents,
226  int verb = DEFAULT_VERBOSITY) = 0;
227 
228  /** \brief remove entities form mofem database
229  */
230  virtual MoFEMErrorCode
232  int verb = DEFAULT_VERBOSITY) = 0;
233 
234  /** \brief delete finite element from mofem database
235  */
236  virtual MoFEMErrorCode
237  delete_finite_element(const std::string name,
238  int verb = DEFAULT_VERBOSITY) = 0;
239 
240  /** \name Fields */
241 
242  /**@{*/
243 
244  /**
245  * \brief Add field
246  *
247  * \note add_file is a collective, should be executed on all processors.
248  * Otherwise could lead to deadlock.
249  *
250  * @param name name of the field
251  * @param space space (L2,H1,Hdiv,Hcurl)
252  * @param base approximation base, see FieldApproximationBase
253  * @param nb_of_coefficients number of field coefficients
254  * @param tag_type type of the tag MB_TAG_DENSE or MB_TAG_SPARSE
255  * (DENSE is faster and uses less memory, SPARSE is more flexible if you
256  * define field on subdomains)
257  * @param bh if MF_EXCL throws error if field exits, MF_ZERO
258  * no error if field exist
259  * @param verb verbosity level
260  * @return error code
261  */
263  const std::string name, const FieldSpace space,
264  const FieldApproximationBase base,
265  const FieldCoefficientsNumber nb_of_coefficients,
266 
267  const std::vector<
268 
269  std::pair<EntityType,
270  std::function<MoFEMErrorCode(BaseFunction::DofsSideMap &)>>
271 
272  >
273  list_dof_side_map,
274 
275  const TagType tag_type = MB_TAG_SPARSE,
276  const enum MoFEMTypes bh = MF_EXCL, int verb = DEFAULT_VERBOSITY) = 0;
277 
278  /**
279  * \brief Add field
280  *
281  * \note add_file is a collective, should be executed on all processors.
282  * Otherwise could lead to deadlock.
283  *
284  * @param name name of the field
285  * @param space space (L2,H1,Hdiv,Hcurl)
286  * @param continuity continuity (CONTINUOUS, DISCONTINUOUS)
287  * @param base approximation base, see FieldApproximationBase
288  * @param nb_of_coefficients number of field coefficients
289  * @param tag_type type of the tag MB_TAG_DENSE or MB_TAG_SPARSE
290  * (DENSE is faster and uses less memory, SPARSE is more flexible if you
291  * define field on subdomains)
292  * @param bh if MF_EXCL throws error if field exits, MF_ZERO
293  * no error if field exist
294  * @param verb verbosity level
295  * @return error code
296  */
297  virtual MoFEMErrorCode
298  add_field(const std::string name, const FieldSpace space,
299  const FieldApproximationBase base,
300  const FieldCoefficientsNumber nb_of_coefficients,
301  const TagType tag_type = MB_TAG_SPARSE,
302  const enum MoFEMTypes bh = MF_EXCL,
303  int verb = DEFAULT_VERBOSITY) = 0;
304 
305  /**
306  * @brief Delete field
307  *
308  * @param name field name
309  * @param verb verbosity level
310  * @return MoFEMErrorCode
311  */
312  virtual MoFEMErrorCode delete_field(const std::string name,
313  int verb = DEFAULT_VERBOSITY) = 0;
314 
315  /**
316  * \brief Add entities to field meshset
317  * \ingroup mofem_field
318  *
319  * \note not collective
320  *
321  * The lower dimension entities are added depending on the space type
322  *
323  * @param ents range of entities
324  * @param dim dimension of entities
325  * @param name name of field
326  * @param verb verbosity level
327  * @return error code
328  */
329  virtual MoFEMErrorCode
330  add_ents_to_field_by_dim(const Range &ents, const int dim,
331  const std::string &name,
332  int verb = DEFAULT_VERBOSITY) = 0;
333 
334  /**
335  * \brief Add entities to field meshset
336  * \ingroup mofem_field
337  *
338  * \note not collective
339  *
340  * The lower dimension entities are added depending on the space type
341  *
342  * @param ents range of entities
343  * @param type type of entities
344  * @param name name of field
345  * @param verb verbosity level
346  * @return error code
347  */
348  virtual MoFEMErrorCode
349  add_ents_to_field_by_type(const Range &ents, const EntityType type,
350  const std::string &name,
351  int verb = DEFAULT_VERBOSITY) = 0;
352 
353  /**
354  * \brief Add entities to field meshset
355  * \ingroup mofem_field
356  *
357  * \not collective
358  *
359  * The lower dimension entities are added depending on the space type
360  *
361  * @param meshset
362  * @param dim dimension
363  * @param name name of field
364  * @param recursive take entities recursively from embedded entities
365  * @param verb verbosity level
366  * @return error code
367  */
368  virtual MoFEMErrorCode
369  add_ents_to_field_by_dim(const EntityHandle meshset, const int dim,
370  const std::string &name, const bool recursive = true,
371  int verb = DEFAULT_VERBOSITY) = 0;
372 
373  /**
374  * \brief Add entities to field meshset
375  * \ingroup mofem_field
376  *
377  * \note not collective
378  *
379  * The lower dimension entities are added depending on the space type
380  *
381  * @param meshset
382  * @param type of entities
383  * @param name name of field
384  * @param recursive take entities recursively from embedded entities
385  * @param verb verbosity level
386  * @return error code
387  */
388  virtual MoFEMErrorCode
389  add_ents_to_field_by_type(const EntityHandle meshset, const EntityType type,
390  const std::string &name,
391  const bool recursive = true,
392  int verb = DEFAULT_VERBOSITY) = 0;
393 
394  /**
395  * @brief Create a vertices and add to field object
396  *
397  * Create vertices and add them to field. Those vertices would be carring
398  * DOFs of the field.
399  *
400  * \note This function is typically used when NOFIELD is created, for example
401  * load factor in arc-length control.
402  *
403  * @param name name of the field
404  * @param bit bit ref level of the created vertices
405  * @param coords of the vertices
406  * @param size number of vertices
407  * @param verb verbosity level
408  * @return MoFEMErrorCode
409  */
410  virtual MoFEMErrorCode
411  create_vertices_and_add_to_field(const std::string name,
412  const double coords[], int size,
413  int verb = DEFAULT_VERBOSITY) = 0;
414 
415  /**
416  * \brief remove entities from field
417  * \ingroup mofem_field
418  *
419  * \note not collective
420  *
421  */
422  virtual MoFEMErrorCode
424  const BitRefLevel mask,
425  int verb = DEFAULT_VERBOSITY) = 0;
426 
427  /**
428  * \brief remove entities from field
429  * \ingroup mofem_field
430  *
431  * \note not collective
432  *
433  */
434  virtual MoFEMErrorCode
435  remove_ents_from_field(const std::string name, const EntityHandle meshset,
436  const EntityType type,
437  int verb = DEFAULT_VERBOSITY) = 0;
438 
439  /**
440  * \brief remove entities from field
441  * \ingroup mofem_field
442  *
443  * \note not collective
444  *
445  */
446  virtual MoFEMErrorCode
447  remove_ents_from_field(const std::string name, const Range ents,
448  int verb = DEFAULT_VERBOSITY) = 0;
449 
450  /**
451  * \brief remove entities from all fields
452  * \ingroup mofem_field
453  *
454  * \note not collective
455  *
456  */
457  virtual MoFEMErrorCode
458  remove_ents_from_field(const Range ents, int verb = DEFAULT_VERBOSITY) = 0;
459 
460  /**
461  * \brief Set order approximation of the entities in the field
462  * \ingroup mofem_field
463  *
464  * \note not collective
465  *
466  * \param meshset containing set of the entities (use 0 for all the entities
467  * in the meshset) \param type selected type of the entities f.e. MBTET,
468  * MBTRI, MBEDGE, MBVERTEX, see moab documentation \param order
469  * approximation order
470  */
471  virtual MoFEMErrorCode set_field_order(const EntityHandle meshset,
472  const EntityType type,
473  const std::string &name,
475  int verb = DEFAULT_VERBOSITY) = 0;
476 
477  /**
478  * \brief Set order approximation of the entities in the field
479  * \ingroup mofem_field
480  *
481  * \note not collective
482  *
483  * \param entities
484  * \param type selected type of the entities f.e. MBTET, MBTRI, MBEDGE,
485  * MBVERTEX, see moab documentation \param order approximation order
486  */
487  virtual MoFEMErrorCode set_field_order(const Range &ents,
488  const std::string &name,
490  int verb = DEFAULT_VERBOSITY) = 0;
491 
492  /**
493  * \brief Set order approximation of the entities in the field
494  * \ingroup mofem_field
495  *
496  * \note not collective
497  *
498  * \param bit refinement level
499  * \param mask bit mask
500  * \param type selected type of the entities f.e. MBTET, MBTRI, MBEDGE,
501  * MBVERTEX, see moab documentation \param order approximation order
502  */
504  const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type,
505  const std::string &name, const ApproximationOrder order,
506  int verb = DEFAULT_VERBOSITY) = 0;
507 
508  /** \brief list entities in the field
509  * \ingroup mofem_field
510  */
511  virtual MoFEMErrorCode list_fields() const = 0;
512 
513  /** build fields
514  * \ingroup mofem_field
515  */
516  virtual MoFEMErrorCode build_fields(int verb = DEFAULT_VERBOSITY) = 0;
517 
518  /**
519  * @brief build field by name
520  *
521  * @param field_name
522  * @param verb
523  * m@return MoFEMErrorCode
524  */
525  virtual MoFEMErrorCode build_field(const std::string field_name,
526  int verb = DEFAULT_VERBOSITY) = 0;
527 
528  /**
529  * @brief Get field Id
530  *
531  * @param name of field
532  * @return BitFieldId
533  */
534  virtual BitFieldId get_field_id(const std::string &name) const = 0;
535 
536  /** \brief get field bit number
537  *
538  * \param name of field
539  * Example:\code
540  auto field_number = mField.get_field_bit_number("DISPLACEMENT");
541  * \endcode
542  */
543  virtual FieldBitNumber get_field_bit_number(const std::string name) const = 0;
544 
545  /**
546  * @brief get field name from id
547  *
548  * @param id
549  * @return std::string
550  */
551  virtual std::string get_field_name(const BitFieldId id) const = 0;
552 
553  /** \brief get field meshset
554  *
555  * \param name of Field
556  * Example:\code
557  EntityHandle disp_files_meshset = mField.get_field_meshset("DISPLACEMENT");
558  * \endcode
559  */
560  virtual EntityHandle get_field_meshset(const std::string name) const = 0;
561 
562  /**
563  * \brief get entities in the field by dimension
564  * @param name field name
565  * @param dim dim
566  * @param ents ents
567  * @return error code
568 
569  * \ingroup mofem_field
570  */
571  virtual MoFEMErrorCode get_field_entities_by_dimension(const std::string name,
572  int dim,
573  Range &ents) const = 0;
574 
575  /**
576  * \brief get entities in the field by type
577  * @param name field name
578  * @param type entity type
579  * @param ents ents
580  * @return error code
581 
582  * \ingroup mofem_field
583  */
584  virtual MoFEMErrorCode get_field_entities_by_type(const std::string name,
585  EntityType type,
586  Range &ents) const = 0;
587 
588  /**
589  * \brief get entities in the field by handle
590  * @param name field name
591  * @param ents ents
592  * @return error code
593 
594  * \ingroup mofem_field
595  */
596  virtual MoFEMErrorCode get_field_entities_by_handle(const std::string name,
597  Range &ents) const = 0;
598 
599  /** \brief check if field is in database
600  * \ingroup mofem_field
601  *
602  * \param name field name
603  * \return true if field exist
604  *
605  */
606  virtual bool check_field(const std::string &name) const = 0;
607 
608  /** \brief get field structure
609  * \ingroup mofem_field
610  *
611  * If field is not found throw error if bh == MF_EXIST, or return
612  * nullptr if bh == MF_ZERO, i.e. otherwise
613  *
614  * \param name field name
615  * \param bh controls behaviour
616  * \return const Field*
617  *
618  */
619  virtual const Field *
620  get_field_structure(const std::string &name,
621  enum MoFEMTypes bh = MF_EXIST) const = 0;
622 
623  /**@}*/
624 
625  /** \name Finite elements */
626 
627  /**@{*/
628 
629  /**
630  * @brief get finite element struture
631  *
632  * If finite element is not found throw error if bh == MF_EXIST, or return
633  * nullptr if bh == MF_ZERO, i.e. otherwise
634  *
635  * @param name
636  * @param bh
637  * @return FiniteElement*
638  */
639  virtual const FiniteElement *
640  get_finite_element_structure(const std::string &name,
641  enum MoFEMTypes bh = MF_EXIST) const = 0;
642 
643  /**
644  * \brief Check if finite element is in database
645  * @param name Name of finite element
646  * @return true if element is declared
647  */
648  virtual bool check_finite_element(const std::string &name) const = 0;
649 
650  /**
651  * \brief add finite element
652  * \ingroup mofem_fe
653  * \param name finite element name
654  *
655  * \note add_file is a collective, should be executed on all processors.
656  * Otherwise could lead to deadlock.
657  *
658  * Example \code
659  CHKERR mField.add_finite_element("ELASTIC");
660  CHKERR mField.add_finite_element("PLASTIC");
661  \endcode
662  */
663  virtual MoFEMErrorCode add_finite_element(const std::string &fe_name,
664  enum MoFEMTypes bh = MF_EXCL,
665  int verb = DEFAULT_VERBOSITY) = 0;
666 
667  /**
668  * \brief modify finite element table, only for advanced user
669  * \ingroup mofem_fe
670  *
671  * \note add_file is a collective, should be executed on all processors.
672  * Otherwise could lead to deadlock.
673  *
674  * Using that functions means that you like to do something not usual.
675  *
676  */
677  virtual MoFEMErrorCode
678  modify_finite_element_adjacency_table(const std::string &fe_name,
679  const EntityType type,
680  ElementAdjacencyFunct function) = 0;
681 
682  /** \brief set finite element field data
683  * \ingroup mofem_fe
684  *
685  * \note add_file is a collective, should be executed on all processors.
686  * Otherwise could lead to deadlock.
687  *
688  * \param name finite element name
689  * \param name field name
690  *
691  * This function will set memory in the form of a vector
692  */
693  virtual MoFEMErrorCode
694  modify_finite_element_add_field_data(const std::string &fe_name,
695  const std::string name_field) = 0;
696 
697  /** \brief unset finite element field data
698  * \ingroup mofem_fe
699  *
700  * \note add_file is a collective, should be executed on all processors.
701  * Otherwise could lead to deadlock.
702  *
703  * \param name finite element name
704  * \param name field name
705  *
706  * This function will set memory in the form of a vector
707  */
708  virtual MoFEMErrorCode
709  modify_finite_element_off_field_data(const std::string &fe_name,
710  const std::string name_field) = 0;
711 
712  /** \brief set field row which finite element use
713  * \ingroup mofem_fe
714  *
715  * \note add_file is a collective, should be executed on all processors.
716  * Otherwise could lead to deadlock.
717  *
718  * \param name finite element name
719  * \param name field name
720  */
721  virtual MoFEMErrorCode
722  modify_finite_element_add_field_row(const std::string &fe_name,
723  const std::string name_row) = 0;
724 
725  /** \brief unset field row which finite element use
726  * \ingroup mofem_fe
727  *
728  * \note add_file is a collective, should be executed on all processors.
729  * Otherwise could lead to deadlock.
730  *
731  * \param name finite element name
732  * \param name field name
733  */
734  virtual MoFEMErrorCode
735  modify_finite_element_off_field_row(const std::string &fe_name,
736  const std::string name_row) = 0;
737 
738  /** \brief set field col which finite element use
739  * \ingroup mofem_fe
740  *
741  * \note add_file is a collective, should be executed on all processors.
742  * Otherwise could lead to deadlock.
743  *
744  * \param name finite element name
745  * \param name field name
746  */
747  virtual MoFEMErrorCode
748  modify_finite_element_add_field_col(const std::string &fe_name,
749  const std::string name_row) = 0;
750 
751  /** \brief unset field col which finite element use
752  * \ingroup mofem_fe
753  *
754  * \note add_file is a collective, should be executed on all processors.
755  * Otherwise could lead to deadlock.
756  *
757  * \param name finite element name
758  * \param name field name
759  */
760  virtual MoFEMErrorCode
761  modify_finite_element_off_field_col(const std::string &fe_name,
762  const std::string name_row) = 0;
763 
764  /**
765  * \brief add entities to finite element
766  * \ingroup mofem_fe
767  *
768  * \note not collective
769  *
770  * @param entities meshset or range form were entities taken
771  * @param type type of entity
772  * @param name finite element name
773  * @param recursive take entities from meshsets in meshset
774  * @return error code
775  */
777  const EntityHandle entities, const EntityType type,
778  const std::string &name, const bool recursive = true) = 0;
779 
780  /**
781  * \brief add entities to finite element
782  * \ingroup mofem_fe
783  *
784  * \note not collective
785  *
786  * @param entities meshset or range form were entities taken
787  * @param dim dimension
788  * @param name finite element name
789  * @param recursive take entities from meshsets in meshset
790  * @return error code
791  */
792  virtual MoFEMErrorCode
793  add_ents_to_finite_element_by_dim(const EntityHandle entities, const int dim,
794  const std::string &name,
795  const bool recursive = true) = 0;
796 
797  /**
798  * \brief add entities to finite elements
799  * \ingroup mofem_fe
800  *
801  * \note not collective
802  *
803  * @param ents range of entities
804  * @param type type of entity (MBVERTEX, MBEDGE, MBTRI, ...)
805  * @param name name of finite element
806  * @return error code
807  */
808  virtual MoFEMErrorCode
809  add_ents_to_finite_element_by_type(const Range &ents, const EntityType type,
810  const std::string &name) = 0;
811 
812  /**
813  * \brief add entities to finite elements
814  * \ingroup mofem_fe
815  *
816  * \note not collective
817  *
818  * @param ents range of entities
819  * @param dim dimension of entities
820  * @param name name of finite element
821  * @return error code
822  */
823  virtual MoFEMErrorCode
824  add_ents_to_finite_element_by_dim(const Range &ents, const int dim,
825  const std::string &name) = 0;
826 
827  /** \brief add TET entities from given refinement level to finite element
828  * database given by name
829  * \ingroup mofem_fe
830  *
831  * \note not collective
832  *
833  * \param BitRefLevel bit
834  * \param BitRefLevel mask
835  * \param finite element name
836  * \param finite element type
837  * \param verbose level
838  */
840  const BitRefLevel &bit, const BitRefLevel &mask, const std::string &name,
841  EntityType type, int verb = DEFAULT_VERBOSITY) = 0;
842 
843  /** get finite element meshset
844  * \ingroup mofem_fe
845  *
846  */
847  virtual EntityHandle
848  get_finite_element_meshset(const std::string name) const = 0;
849 
850  /**
851  * \brief get entities in the finite element by dimension
852  * @param name finite element name
853  * @param dim dim
854  * @param ents ents
855  * @return error code
856 
857  * \ingroup mofem_field
858  */
859  virtual MoFEMErrorCode
860  get_finite_element_entities_by_dimension(const std::string name, int dim,
861  Range &ents) const = 0;
862 
863  /**
864  * \brief get entities in the finite element by type
865  * @param name finite element name
866  * @param type entity type
867  * @param ents ents
868  * @return error code
869 
870  * \ingroup mofem_field
871  */
872  virtual MoFEMErrorCode
873  get_finite_element_entities_by_type(const std::string name, EntityType type,
874  Range &ents) const = 0;
875 
876  /**
877  * \brief get entities in the finite element by handle
878  * @param name finite element name
879  * @param ents ents
880  * @return error code
881 
882  * \ingroup mofem_field
883  */
884  virtual MoFEMErrorCode
885  get_finite_element_entities_by_handle(const std::string name,
886  Range &ents) const = 0;
887 
888  /** \brief remove elements from given refinement level to finite element
889  * database \ingroup mofem_fe
890  *
891  * \param BitRefLevel bit
892  * \param BitRefLevel mask
893  * \param verbose level
894  */
895  virtual MoFEMErrorCode
897  const BitRefLevel mask,
898  int verb = DEFAULT_VERBOSITY) = 0;
899 
900  /** \brief remove entities from given refinement level to finite element
901  * database
902  *
903  */
905  const std::string name, const EntityHandle meshset, const EntityType type,
906  int verb = DEFAULT_VERBOSITY) = 0;
907 
908  /** \brief remove entities from finite element database
909  * \ingroup mofem_fe
910  *
911  */
912  virtual MoFEMErrorCode
913  remove_ents_from_finite_element(const std::string name, const Range ents,
914  int verb = DEFAULT_VERBOSITY) = 0;
915 
916  /** \brief remove entities from finite elements in database
917  * \ingroup mofem_fe
918  *
919  */
920  virtual MoFEMErrorCode
922  int verb = DEFAULT_VERBOSITY) = 0;
923 
924  /** \brief add MESHSET element to finite element database given by name
925  * \ingroup mofem_fe
926  *
927  * \note not collective
928  *
929  * \param meshset contains all entities that could be used for finite
930  * element \param name Finite Element name
931  */
932  virtual MoFEMErrorCode
934  const std::string &name,
935  const bool recursive = false) = 0;
936 
937  /** \brief list finite elements in database
938  * \ingroup mofem_fe
939  */
940  virtual MoFEMErrorCode list_finite_elements() const = 0;
941 
942  /**@}*/
943 
944  /** \name Problems */
945 
946  /**@{*/
947 
948  /** \brief Add problem
949  * \ingroup mofem_problems
950  *
951  * \note add_file is a collective, should be executed on all processors.
952  * Otherwise could lead to deadlock.
953  *
954  */
955  virtual MoFEMErrorCode add_problem(const std::string &name,
956  enum MoFEMTypes bh = MF_EXCL,
957  int verb = DEFAULT_VERBOSITY) = 0;
958 
959  /**
960  * \brief check if problem exist
961  * @param name problem name
962  * @return true if problem is in database
963  */
964  virtual bool check_problem(const std::string name) = 0;
965 
966  /** \brief Delete problem
967  * \ingroup mofem_problems
968  *
969  * \note add_file is a collective, should be executed on all processors.
970  * Otherwise could lead to deadlock.
971  *
972  */
973  virtual MoFEMErrorCode delete_problem(const std::string name) = 0;
974 
975  /** \brief add finite element to problem, this add entities assigned to
976  * finite element to a particular problem \ingroup mofem_problems
977  *
978  * \note add_file is a collective, should be executed on all processors.
979  * Otherwise could lead to deadlock.
980  *
981  * \param name Problem name
982  * \param name Finite Element name
983  */
984  virtual MoFEMErrorCode
985  modify_problem_add_finite_element(const std::string name_problem,
986  const std::string &fe_name) = 0;
987 
988  /** \brief unset finite element from problem, this remove entities assigned
989  * to finite element to a particular problem \ingroup mofem_problems
990  *
991  * Note: If problem is build, it need to be cleaned to make this effective
992  *
993  * \note add_file is a collective, should be executed on all processors.
994  * Otherwise could lead to deadlock.
995  *
996  * \param name Problem name
997  * \param name Finite Element name
998  */
999  virtual MoFEMErrorCode
1000  modify_problem_unset_finite_element(const std::string name_problem,
1001  const std::string &fe_name) = 0;
1002 
1003  /** \brief add ref level to problem
1004  * \ingroup mofem_problems
1005  *
1006  * \note add_file is a collective, should be executed on all processors.
1007  * Otherwise could lead to deadlock.
1008  *
1009  * if same finite element is solved using different level of refinements,
1010  * than the level of refinement has to be specificied to problem in query
1011  *
1012  * \param name Problem name
1013  * \param BitRefLevel bitLevel
1014  * Example: \code
1015  CHKERR
1016  mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF1","ELASTIC");
1017  CHKERR
1018  mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF2","ELASTIC");
1019  CHKERR
1020  mField.modify_problem_ref_level_add_bit("BEAM_BENDING_ON_MESH_REF1",bit_level1);
1021  CHKERR
1022  mField.modify_problem_ref_level_add_bit("BEAM_BENDING_ON_MESH_REF2",bit_level2);
1023  *\endcode
1024  * Two Problems exist and solved independently, both are elastic, but solved
1025  using different mesh refinement <br>
1026  */
1027  virtual MoFEMErrorCode
1028  modify_problem_ref_level_add_bit(const std::string &name_problem,
1029  const BitRefLevel &bit) = 0;
1030 
1031  /** \brief set dof mask ref level for problem
1032  * \ingroup mofem_problems
1033  *
1034  */
1035  virtual MoFEMErrorCode
1036  modify_problem_mask_ref_level_add_bit(const std::string &name_problem,
1037  const BitRefLevel &bit) = 0;
1038 
1039  /** \brief set ref level for problem
1040  * \ingroup mofem_problems
1041  *
1042  * \note add_file is a collective, should be executed on all processors.
1043  * Otherwise could lead to deadlock.
1044  *
1045  * if same finite element is solved using different level of refinements,
1046  * than the level of refinement has to be specificied to problem in query
1047  *
1048  * \param name Problem name
1049  * \param BitRefLevel bitLevel
1050  * Example: \code
1051  CHKERR
1052  mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF1","ELASTIC");
1053  CHKERR
1054  mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF2","ELASTIC");
1055 
1056  CHKERR
1057  mField.modify_problem_ref_level_set_bit("BEAM_BENDING_ON_MESH_REF1",bit_level1);
1058  CHKERR
1059  mField.modify_problem_ref_level_set_bit("BEAM_BENDING_ON_MESH_REF2",bit_level2);
1060  * \endcode
1061  * Two Problems exist and solved independently, both are elastic, but solved
1062  * using different mesh refinement <br>
1063  *
1064  */
1065  virtual MoFEMErrorCode
1066  modify_problem_ref_level_set_bit(const std::string &name_problem,
1067  const BitRefLevel &bit) = 0;
1068 
1069  /** \brief set dof mask ref level for problem
1070  * \ingroup mofem_problems
1071  *
1072  * \note add_file is a collective, should be executed on all processors.
1073  * Otherwise could lead to deadlock.
1074  *
1075  */
1076  virtual MoFEMErrorCode
1077  modify_problem_mask_ref_level_set_bit(const std::string &name_problem,
1078  const BitRefLevel &bit) = 0;
1079 
1080  /** \brief list problems
1081  * \ingroup mofem_problems
1082  */
1083  virtual MoFEMErrorCode list_problem() const = 0;
1084 
1085  /**@}*/
1086 
1087  /** \name Clear dofs and entities */
1088 
1089  /**@{*/
1090 
1091  /** list dofs
1092  * \ingroup mofem_field
1093  */
1094  virtual MoFEMErrorCode
1095  list_dofs_by_field_name(const std::string &name) const = 0;
1096 
1097  /** Clear inactive dofs
1098  * \ingroup mofem_field
1099  */
1100  virtual MoFEMErrorCode clear_inactive_dofs(int verb = DEFAULT_VERBOSITY) = 0;
1101 
1102  /** Clear dofs by bit level
1103  * \ingroup mofem_field
1104  */
1105  virtual MoFEMErrorCode
1107  int verb = DEFAULT_VERBOSITY) = 0;
1108 
1109  /** Clear dofs by ents
1110  * \ingroup mofem_field
1111  */
1112  virtual MoFEMErrorCode clear_dofs_fields(const Range ents,
1113  int verb = DEFAULT_VERBOSITY) = 0;
1114 
1115  /** Clear dofs by field name and ents
1116  * \ingroup mofem_field
1117  */
1118  virtual MoFEMErrorCode clear_dofs_fields(const std::string name,
1119  const Range ents,
1120  int verb = DEFAULT_VERBOSITY) = 0;
1121 
1122  /** Clear entities by field name
1123  * \ingroup mofem_field
1124  */
1125  virtual MoFEMErrorCode clear_ents_fields(const Range ents,
1126  int verb = DEFAULT_VERBOSITY) = 0;
1127 
1128  /** Clear entities by field name
1129  * \ingroup mofem_field
1130  */
1131  virtual MoFEMErrorCode clear_ents_fields(const std::string name,
1132  const Range ents,
1133  int verb = DEFAULT_VERBOSITY) = 0;
1134 
1135  /** Clear ents by bit level
1136  * \ingroup mofem_field
1137  */
1138  virtual MoFEMErrorCode
1140  int verb = DEFAULT_VERBOSITY) = 0;
1141 
1142  /**@}*/
1143 
1144  /** \name Build fields, finite elements and problems */
1145 
1146  /**@{*/
1147 
1148  /**
1149  * \brief Build finite elements
1150  * \ingroup mofem_fe
1151  *
1152  * Build finite element data structures. Have to be run before problem and
1153  * adjacencies are constructed.
1154  *
1155  * @param verb Verbosity level
1156  * @return Error code
1157  */
1158  virtual MoFEMErrorCode
1159  build_finite_elements(int verb = DEFAULT_VERBOSITY) = 0;
1160 
1161  /**
1162  * \brief Build finite elements
1163  * \ingroup mofem_fe
1164  *
1165  * Build finite element data structures. Have to be run before problem and
1166  * adjacencies are constructed.
1167  *
1168  * @param fe_name Name of finite element
1169  * @param ents_ptr Pointer to range of finite elements
1170  * @param verb Verbosity level
1171  * @return Error code
1172  */
1173  virtual MoFEMErrorCode
1174  build_finite_elements(const string fe_name,
1175  const Range *const ents_ptr = nullptr,
1176  int verb = DEFAULT_VERBOSITY) = 0;
1177 
1178  /**@}*/
1179 
1180  /** \name Clear finite elements */
1181 
1182  /**@{*/
1183 
1184  /** clear finite elements
1185  */
1186  virtual MoFEMErrorCode
1188  const BitRefLevel mask,
1189  int verb = DEFAULT_VERBOSITY) = 0;
1190 
1191  /** clear finite elements
1192  */
1193  virtual MoFEMErrorCode
1194  clear_finite_elements(const Range &ents, int verb = DEFAULT_VERBOSITY) = 0;
1195 
1196  /** clear finite elements
1197  */
1198  virtual MoFEMErrorCode
1199  clear_finite_elements(const std::string &fe_name, const Range &ents,
1200  int verb = DEFAULT_VERBOSITY) = 0;
1201 
1202  /**@}*/
1203 
1204  /** \name Build adjacencies */
1205 
1206  /**@{*/
1207 
1208  /** \brief build adjacencies
1209  *
1210  * \param list of entities
1211  *
1212  * This function will get information of adjacent finite elements and fields
1213  * of all entities. If this is not executed, partitioning the problem is not
1214  * possible. Adjacency map is based on degrees of freedom adjacent to
1215  * elements. This linked to geometric element connectivity.
1216  *
1217  * If new degrees of freedom or new finite elements are added to the
1218  * database, adjacency map has to be rebuild.
1219  *
1220  */
1221  virtual MoFEMErrorCode build_adjacencies(const Range &ents,
1222  int verb = DEFAULT_VERBOSITY) = 0;
1223 
1224  /** \brief build adjacencies
1225  *
1226  * \param bit adjacencies for refine level
1227  *
1228  * This function will get information of adjacent finite elements and fields
1229  * of all entities. If this is not executed, partitioning the problem is not
1230  * possible. Adjacency map is based on degrees of freedom adjacent to
1231  * elements. This linked to geometric element connectivity.
1232  *
1233  * If new degrees of freedom or new finite elements are added to the
1234  * database, adjacency map has to be rebuild.
1235  *
1236  */
1238  int verb = DEFAULT_VERBOSITY) = 0;
1239 
1240  /** \brief build adjacencies
1241  *
1242  * \param bit adjacencies for refine level
1243  * \param mask mask for bit level
1244  *
1245  * This function will get information of adjacent finite elements and fields
1246  * of all entities. If this is not executed, partitioning the problem is not
1247  * possible. Adjacency map is based on degrees of freedom adjacent to
1248  * elements. This linked to geometric element connectivity.
1249  *
1250  * If new degrees of freedom or new finite elements are added to the
1251  * database, adjacency map has to be rebuild.
1252  *
1253  */
1255  const BitRefLevel &mask,
1256  int verb = DEFAULT_VERBOSITY) = 0;
1257 
1258  /**@}*/
1259 
1260  /** \name Clear adjacencies */
1261 
1262  /**@{*/
1263 
1264  /** \brief clear adjacency map for finite elements on given bit level
1265  *
1266  * \param bit
1267  * \param mask
1268  */
1269  virtual MoFEMErrorCode
1271  const BitRefLevel mask,
1272  int verb = DEFAULT_VERBOSITY) = 0;
1273 
1274  /** \brief clear adjacency map for entities on given bit level
1275  *
1276  * \param bit
1277  * \param mask
1278  */
1279  virtual MoFEMErrorCode
1281  int verb = DEFAULT_VERBOSITY) = 0;
1282 
1283  /** \brief clear adjacencies for field entities by entities
1284  */
1285  virtual MoFEMErrorCode
1286  clear_adjacencies_entities(const Range ents,
1287  int verb = DEFAULT_VERBOSITY) = 0;
1288 
1289  /** \brief clear adjacencies for field entities by entities and field namd
1290  */
1291  virtual MoFEMErrorCode
1292  clear_adjacencies_entities(const std::string name, const Range ents,
1293  int verb = DEFAULT_VERBOSITY) = 0;
1294 
1295  /**@}*/
1296 
1297  /** \name Problems */
1298 
1299  /**@{*/
1300 
1301  /** \brief clear problem
1302  * \ingroup mofem_problems
1303  */
1304  virtual MoFEMErrorCode clear_problem(const std::string name,
1305  int verb = DEFAULT_VERBOSITY) = 0;
1306 
1307  /** \brief clear problems
1308  * \ingroup mofem_problems
1309  */
1310  virtual MoFEMErrorCode clear_problems(int verb = DEFAULT_VERBOSITY) = 0;
1311 
1312  /**
1313  * \brief add finite elements to the meshset
1314  * \ingroup mofem_problems
1315  *
1316  * \param name is problem name
1317  * \param fe_name
1318  * \param meshset
1319  */
1320  virtual MoFEMErrorCode
1321  get_problem_finite_elements_entities(const std::string name,
1322  const std::string &fe_name,
1323  const EntityHandle meshset) = 0;
1324 
1325  /**@}*/
1326 
1327  /** \name Making loops on elements and entities */
1328 
1329  /**@{*/
1330 
1331  /** \brief Set data for BasicMethod
1332  *
1333  * This function set data about problem, adjacencies and other multi-indices
1334  * in database. This function can be used a special case when user need to
1335  * do some pre- and post-processing before matrix or vector is initiated, or
1336  * to assemble matrix for group of FEMethods. Is used by classes
1337  * SnesCtx and TsCtx. Look for more details there.
1338  *
1339  * FIXME: Here we need example
1340  *
1341  * \param pointer to problem data structure
1342  * \param method user method derived from BasicMethod
1343  *
1344  **/
1345  virtual MoFEMErrorCode
1346  problem_basic_method_preProcess(const Problem *problem_ptr,
1347  BasicMethod &method,
1348  int verb = DEFAULT_VERBOSITY) = 0;
1349 
1350  /** \brief Set data for BasicMethod
1351  *
1352  * This function set data about problem, adjacencies and other multi-indices
1353  * in database. This function can be used a special case when user need to
1354  * do some pre- and post-processing before matrix or vector is initiated, or
1355  * to assemble matrix for group of FEMethods. Is used by classes
1356  * SnesCtx and TsCtx. Look for more details there.
1357  *
1358  * FIXME: Here we need example
1359  *
1360  * \param problem_name name of the problem
1361  * \param method user method derived from BasicMethod
1362  *
1363  **/
1364  virtual MoFEMErrorCode
1365  problem_basic_method_preProcess(const std::string &problem_name,
1366  BasicMethod &method,
1367  int verb = DEFAULT_VERBOSITY) = 0;
1368 
1369  /** \brief Set data for BasicMethod
1370  * \ingroup mofem_loops
1371  *
1372  * This function set data about problem, adjacencies and other multi-indices
1373  * in database. This function can be used a special case when user need to
1374  * do some pre- and post-processing before matrix or vector is initiated, or
1375  * to assemble matrix for group of FEMethods. Is used by classes
1376  * SnesCtx and TsCtx. Look for more details there.
1377  *
1378  * FIXME: Here we need example
1379  *
1380  * \param pointer to problem data structure
1381  * \param method user method derived from BasicMethod
1382  *
1383  **/
1384  virtual MoFEMErrorCode
1385  problem_basic_method_postProcess(const Problem *problem_ptr,
1386  BasicMethod &method,
1387  int verb = DEFAULT_VERBOSITY) = 0;
1388 
1389  /** \brief Set data for BasicMethod
1390  * \ingroup mofem_loops
1391  *
1392  * This function set data about problem, adjacencies and other multi-indices
1393  * in database. This function can be used a special case when user need to
1394  * do some pre- and post-processing before matrix or vector is initiated, or
1395  * to assemble matrix for group of FEMethods. Is used by classes
1396  * SnesCtx and TsCtx. Look for more details there.
1397  *
1398  * FIXME: Here we need example
1399  *
1400  * \param problem_name name of the problem
1401  * \param method user method derived from BasicMethod
1402  *
1403  **/
1404  virtual MoFEMErrorCode
1405  problem_basic_method_postProcess(const std::string &problem_name,
1406  BasicMethod &method,
1407  int verb = DEFAULT_VERBOSITY) = 0;
1408 
1409  /**
1410  * @brief Cache variables
1411  *
1412  * @param prb_name
1413  * @param cache_ptr
1414  * @return MoFEMErrorCode
1415  */
1416  virtual MoFEMErrorCode
1417  cache_problem_entities(const std::string prb_name,
1418  CacheTupleWeakPtr cache_ptr) = 0;
1419 
1420  /** \brief Make a loop over finite elements.
1421  *
1422  * This function is like swiss knife, is can be used to post-processing or
1423  * matrix and vectors assembly. It makes loop over given finite element for
1424  * given
1425  * problem. The particular methods executed on each element are given by
1426  * class derived form Interface::FEMethod. At beginning of each loop user
1427  * defined function (method) preProcess() is called, for each element
1428  * operator() is
1429  * executed, at the end loop finalizes with user defined function (method)
1430  * postProcess().
1431  *
1432  * Methods are executed only for local elements at given processor.
1433  *
1434  * For more details pleas look to examples.
1435  *
1436  * \note If fe_ptr is given it is expected that multi-index is supbes of
1437  * problem multi-index. If this is not the case behavior of the code is
1438  * undetermined.
1439  *
1440  * @param problem_name problem consisting set of elements
1441  * @param fe_name name of element in problem
1442  * @param method class derived form Interface::FEMethod
1443  * @param fe_ptr pointer to finite elements multi-index
1444  * @param bh if bH = MF_EXIST, throws error if fe_name does not
1445  exist
1446  * @param cache_tuple_ptr cache
1447  * @param verb verbosity level
1448  * @return error code
1449 
1450  * \ingroup mofem_loops
1451  **/
1453  const std::string problem_name, const std::string &fe_name,
1454  FEMethod &method,
1455  boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr = nullptr,
1456  MoFEMTypes bh = MF_EXIST,
1457  CacheTupleWeakPtr cache_ptr = CacheTupleSharedPtr(),
1458  int verb = DEFAULT_VERBOSITY) = 0;
1459 
1460  /** \brief Make a loop over finite elements on partitions from upper to
1461  lower rank.
1462  *
1463  * This function is like swiss knife, is can be used to post-processing or
1464  matrix
1465  * and vectors assembly. It makes loop over given finite element for given
1466  * problem. The particular methods executed on each element are given by
1467  * class derived form Interface::FEMethod. At beginning of each loop user
1468  defined
1469  * function (method) preProcess() is called, for each element operator() is
1470  * executed, at the end loop finalizes with user defined function (method)
1471  * postProcess().
1472  *
1473  * \note If fe_ptr is given it is expected that multi-index is supbes of
1474  * problem multi-index. If this is not the case behavior of the code is
1475  * undetermined.
1476  *
1477  * For more details please look to examples.
1478  *
1479  * Interface::FEMethod
1480 
1481  * @param problem_ptr pointer to problem consisting set of elements
1482  * @param fe_name name of element in problem
1483  * @param method class derived form Interface::FEMethod
1484  * @param lower_rank lower rank of process owned by finite element
1485  * @param upper_rank lower rank of process owned by finite element
1486  * @param fe_ptr pointer to finite elements multi-index
1487  * @param bh if bH = MF_EXIST, throws error if fe_name does not
1488  exist
1489  * @param cache_data cache data vector
1490  * @param cache_row cache row vector
1491  * @param cache_col cache row vector
1492  * @param verb verbosity level
1493  * @return error code
1494 
1495  * \ingroup mofem_loops
1496  **/
1498  const Problem *problem_ptr, const std::string &fe_name, FEMethod &method,
1499  int lower_rank, int upper_rank,
1500  boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr = nullptr,
1501  MoFEMTypes bh = MF_EXIST,
1502  CacheTupleWeakPtr cache_ptr = CacheTupleSharedPtr(),
1503  int verb = DEFAULT_VERBOSITY) = 0;
1504 
1505  /** \brief Make a loop over finite elements on partitions from upper to
1506  lower rank.
1507  *
1508  * This function is like swiss knife, is can be used to post-processing or
1509  matrix
1510  * and vectors assembly. It makes loop over given finite element for given
1511  * problem. The particular methods executed on each element are given by
1512  * class derived form Interface::FEMethod. At beginning of each loop user
1513  defined
1514  * function (method) preProcess() is called, for each element operator() is
1515  * executed, at the end loop finalizes with user defined function (method)
1516  * postProcess().
1517  *
1518  * \note If fe_ptr is given it is expected that multi-index is supbes of
1519  * problem multi-index. If this is not the case behavior of the code is
1520  * undetermined.
1521  *
1522  * For more details please look to examples.
1523  *
1524  * @param problem_name pointer to problem consisting set of elements
1525  * @param fe_name name of element in problem
1526  * @param method class derived form Interface::FEMethod
1527  * @param lower_rank lower rank of process owned by finite element
1528  * @param upper_rank lower rank of process owned by finite element
1529  * @param fe_ptr pointer to finite elements multi-index
1530  * @param bh if bH = MF_EXIST, throws error if fe_name does not
1531  exist
1532  * @param cache_data cache data vector
1533  * @param cache_row cache row vector
1534  * @param cache_col cache row vector
1535  * @param verb verbosity level
1536  * @return error code
1537 
1538  * \ingroup mofem_loops
1539  **/
1541  const std::string problem_name, const std::string &fe_name,
1542  FEMethod &method, int lower_rank, int upper_rank,
1543  boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr = nullptr,
1544  MoFEMTypes bh = MF_EXIST,
1545  CacheTupleWeakPtr cache_ptr = CacheTupleSharedPtr(),
1546  int verb = DEFAULT_VERBOSITY) = 0;
1547 
1548  /** \brief Make a loop over dofs
1549 
1550  * \ingroup mofem_loops
1551  */
1552  virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr,
1553  const std::string &field_name, RowColData rc,
1554  DofMethod &method, int lower_rank,
1555  int upper_rank,
1556  int verb = DEFAULT_VERBOSITY) = 0;
1557 
1558  /** \brief Make a loop over dofs
1559 
1560  * \ingroup mofem_loops
1561  */
1562  virtual MoFEMErrorCode loop_dofs(const std::string &problem_name,
1563  const std::string &field_name, RowColData rc,
1564  DofMethod &method, int lower_rank,
1565  int upper_rank,
1566  int verb = DEFAULT_VERBOSITY) = 0;
1567 
1568  /** \brief Make a loop over dofs
1569 
1570  * \ingroup mofem_loops
1571  */
1572  virtual MoFEMErrorCode loop_dofs(const std::string &problem_name,
1573  const std::string &field_name, RowColData rc,
1574  DofMethod &method,
1575  int verb = DEFAULT_VERBOSITY) = 0;
1576 
1577  /** \brief Make a loop over dofs
1578 
1579  * \ingroup mofem_field
1580  */
1581  virtual MoFEMErrorCode loop_dofs(const std::string &field_name,
1582  DofMethod &method,
1583  int verb = DEFAULT_VERBOSITY) = 0;
1584 
1585  /**
1586  * @brief Loop over field entities
1587  * @ingroup mofem_field
1588  *
1589  * @param field_name field entities
1590  * @param method user method
1591  * @param ents if given loop only on subset of entities in the field
1592  * @param verb
1593  * @return MoFEMErrorCode
1594  */
1595  virtual MoFEMErrorCode loop_entities(const std::string field_name,
1596  EntityMethod &method,
1597  Range const *const ents = nullptr,
1598  int verb = DEFAULT_VERBOSITY) = 0;
1599 
1600  /**
1601  * @brief Loop over field entities in the problem
1602  * @ingroup mofem_field
1603  *
1604  * @param problem_ptr
1605  * @param field_name
1606  * @param rc
1607  * @param method
1608  * @param lower_rank
1609  * @param upper_rank
1610  * @param verb
1611  * @return MoFEMErrorCode
1612  */
1613  virtual MoFEMErrorCode loop_entities(const Problem *problem_ptr,
1614  const std::string field_name,
1615  RowColData rc, EntityMethod &method,
1616  int lower_rank, int upper_rank,
1617  int verb = DEFAULT_VERBOSITY) = 0;
1618 
1619  /**
1620  * @brief Loop over field entities in the problem
1621  * @ingroup mofem_field
1622  *
1623  * @param problem_name
1624  * @param field_name
1625  * @param rc
1626  * @param method
1627  * @param lower_rank
1628  * @param upper_rank
1629  * @param verb
1630  * @return MoFEMErrorCode
1631  */
1632  virtual MoFEMErrorCode loop_entities(const std::string problem_name,
1633  const std::string field_name,
1634  RowColData rc, EntityMethod &method,
1635  int lower_rank, int upper_rank,
1636  int verb = DEFAULT_VERBOSITY) = 0;
1637  /**
1638  * @brief Loop over field entities in the problem
1639  * @ingroup mofem_field
1640  *
1641  * @param problem_name
1642  * @param field_name
1643  * @param rc
1644  * @param method
1645  * @param verb
1646  * @return MoFEMErrorCode
1647  */
1648  virtual MoFEMErrorCode loop_entities(const std::string problem_name,
1649  const std::string field_name,
1650  RowColData rc, EntityMethod &method,
1651  int verb = DEFAULT_VERBOSITY) = 0;
1652 
1653  /**@}*/
1654 
1655  /** \name Get pointers to multi-index database */
1656 
1657  /**@{*/
1658 
1659  /**
1660  * @brief Get the fields object
1661  * @ingroup mofem_access
1662  *
1663  * @return const Field_multiIndex*
1664  */
1665  virtual const Field_multiIndex *get_fields() const = 0;
1666 
1667  /**
1668  * @brief Get the ref ents object
1669  * @ingroup mofem_access
1670  *
1671  * @return const RefEntity_multiIndex*
1672  */
1673  virtual const RefEntity_multiIndex *get_ref_ents() const = 0;
1674 
1675  /**
1676  * @brief Get the ref finite elements object
1677  * @ingroup mofem_access
1678  *
1679  * @return const RefElement_multiIndex*
1680  */
1681  virtual const RefElement_multiIndex *get_ref_finite_elements() const = 0;
1682 
1683  /**
1684  * @brief Get the finite elements object
1685  * @ingroup mofem_access
1686  *
1687  * @return const FiniteElement_multiIndex*
1688  */
1689  virtual const FiniteElement_multiIndex *get_finite_elements() const = 0;
1690 
1691  /**
1692  * @brief Get the ents finite elements object
1693  * @ingroup mofem_access
1694  *
1695  * @return const EntFiniteElement_multiIndex*
1696  */
1697  virtual const EntFiniteElement_multiIndex *
1698  get_ents_finite_elements() const = 0;
1699 
1700  /**
1701  * @brief Get the field ents object
1702  * @ingroup mofem_access
1703  *
1704  * @return const FieldEntity_multiIndex*
1705  */
1706  virtual const FieldEntity_multiIndex *get_field_ents() const = 0;
1707 
1708  /**
1709  * @brief Get the dofs object
1710  * @ingroup mofem_access
1711  *
1712  * @return const DofEntity_multiIndex*
1713  */
1714  virtual const DofEntity_multiIndex *get_dofs() const = 0;
1715 
1716  /**
1717  * @brief Get the problem object
1718  * @ingroup mofem_access
1719  *
1720  * @param problem_name
1721  * @return const Problem*
1722  */
1723  virtual const Problem *get_problem(const std::string problem_name) const = 0;
1724 
1725  /**
1726  * @brief Get the problems object
1727  * @ingroup mofem_access
1728  *
1729  * @return const Problem_multiIndex*
1730  */
1731  virtual const Problem_multiIndex *get_problems() const = 0;
1732 
1733  /**
1734  * @brief Get the dofs elements adjacency object
1735  *
1736  * @param dofs_elements_adjacency
1737  * @return MoFEMErrorCode
1738  */
1741  *dofs_elements_adjacency) const = 0;
1742 
1743  /**
1744  * @brief Get the dofs elements adjacency object
1745  *
1746  * @return const FieldEntityEntFiniteElementAdjacencyMap_multiIndex*
1747  */
1749  get_ents_elements_adjacency() const = 0;
1750 
1751  /** \brief Get fields multi-index from database
1752  * \ingroup mofem_access
1753  */
1754  virtual MoFEMErrorCode
1755  get_fields(const Field_multiIndex **fields_ptr) const = 0;
1756 
1757  /** \brief Get ref entities multi-index from database
1758  * \ingroup mofem_access
1759  */
1760  virtual MoFEMErrorCode
1761  get_ref_ents(const RefEntity_multiIndex **refined_ents_ptr) const = 0;
1762 
1763  /** \brief Get ref finite elements multi-index form database
1764  * \ingroup mofem_access
1765  */
1767  const RefElement_multiIndex **refined_finite_elements_ptr) const = 0;
1768 
1769  /** \brief Get finite elements multi-index
1770  * \ingroup mofem_access
1771  */
1772  virtual MoFEMErrorCode
1773  get_finite_elements(const FiniteElement_multiIndex **fe_ptr) const = 0;
1774 
1775  /** \brief Get entities finite elements multi-index
1776  * \ingroup mofem_access
1777  */
1779  const EntFiniteElement_multiIndex **fe_ent_ptr) const = 0;
1780 
1781  /** \brief Get problem database (data structure)
1782  * \ingroup mofem_access
1783  */
1784  virtual MoFEMErrorCode get_problem(const std::string &problem_name,
1785  const Problem **problem_ptr) const = 0;
1786 
1787  /**
1788  * \brief Get pointer to problems multi-index
1789  * \ingroup mofem_access
1790  */
1791  virtual MoFEMErrorCode
1792  get_problems(const Problem_multiIndex **problems_ptr) const = 0;
1793 
1794  /** \brief Get field multi index
1795  *
1796  * \ingroup mofem_access
1797  *
1798  */
1799  virtual MoFEMErrorCode
1800  get_field_ents(const FieldEntity_multiIndex **field_ents) const = 0;
1801 
1802  /** \brief Get dofs multi index
1803  *
1804  * \ingroup mofem_access
1805  *
1806  */
1807  virtual MoFEMErrorCode
1808  get_dofs(const DofEntity_multiIndex **dofs_ptr) const = 0;
1809 
1810  /**
1811  * \brief get begin iterator of field ents of given name (instead you can
1812  * use _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1813  *
1814  * \ingroup mofem_field
1815  *
1816  * for(_IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1817  * ...
1818  * }
1819  *
1820  * \param field_name
1821  */
1822  virtual FieldEntityByUId::iterator
1823  get_ent_field_by_name_begin(const std::string &field_name) const = 0;
1824 
1825  /**
1826  * \brief get begin iterator of field dofs of given name (instead you can
1827  * use _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1828  * \ingroup mofem_field
1829  *
1830  * for(_IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1831  * ...
1832  * }
1833  *
1834  * \param field_name
1835  */
1836  virtual FieldEntityByUId::iterator
1837  get_ent_field_by_name_end(const std::string &field_name) const = 0;
1838 
1839  /** \brief loop over all dofs from a moFEM field and particular field
1840  * \ingroup mofem_field
1841  */
1842 #define _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT) \
1843  auto IT = (MFIELD).get_ent_field_by_name_begin(NAME); \
1844  IT != (MFIELD).get_ent_field_by_name_end(NAME); \
1845  IT++
1846 
1847  /**
1848  * \brief get begin iterator of field dofs of given name (instead you can
1849  * use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1850  * \ingroup mofem_field
1851  *
1852  * for(_IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1853  * ...
1854  * }
1855  *
1856  * \param field_name
1857  */
1858  virtual DofEntityByUId::iterator
1859  get_dofs_by_name_begin(const std::string &field_name) const = 0;
1860 
1861  /**
1862  * \brief get begin iterator of field dofs of given name (instead you can
1863  * use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1864  * \ingroup mofem_field
1865  *
1866  * for(_IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1867  * ...
1868  * }
1869  *
1870  * \param field_name
1871  */
1872  virtual DofEntityByUId::iterator
1873  get_dofs_by_name_end(const std::string &field_name) const = 0;
1874 
1875  /** loop over all dofs from a moFEM field and particular field
1876  * \ingroup mofem_field
1877  */
1878 #define _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT) \
1879  DofEntityByUId::iterator IT = (MFIELD).get_dofs_by_name_begin(NAME); \
1880  IT != (MFIELD).get_dofs_by_name_end(NAME); \
1881  IT++
1882 
1883  /**
1884  * \brief get begin iterator of field dofs of given name and ent(instead you
1885  * can use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,ENT,IT)
1886  *
1887  * \ingroup mofem_field
1888  *
1889  * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_(MFIELD,NAME,ENT,IT)) {
1890  * ...
1891  * }
1892  *
1893  * \param field_name
1894  */
1895  virtual DofEntityByUId::iterator
1896  get_dofs_by_name_and_ent_begin(const std::string &field_name,
1897  const EntityHandle ent) const = 0;
1898 
1899  /**
1900  * \brief get begin iterator of field dofs of given name and ent (instead
1901  * you can use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,ENT,IT)
1902  * \ingroup mofem_field
1903  *
1904  * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_(MFIELD,NAME,ENT,IT)) {
1905  * ...
1906  * }
1907  *
1908  * \param field_name
1909  */
1910  virtual DofEntityByUId::iterator
1911  get_dofs_by_name_and_ent_end(const std::string &field_name,
1912  const EntityHandle ent) const = 0;
1913 
1914  /** \brief loop over all dofs from a moFEM field and particular field
1915  * \ingroup mofem_access
1916  */
1917 #define _IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_(MFIELD, NAME, ENT, IT) \
1918  DofEntityByUId::iterator IT = \
1919  (MFIELD).get_dofs_by_name_and_ent_begin(NAME, ENT); \
1920  IT != (MFIELD).get_dofs_by_name_and_ent_end(NAME, ENT); \
1921  IT++
1922 
1923  /**
1924  * \brief get begin iterator of field dofs of given name and ent type
1925  * (instead you can use
1926  * _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,TYPE,IT)
1927  *
1928  * \ingroup mofem_field
1929  *
1930  * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_(MFIELD,NAME,TYPE,IT)) {
1931  * ...
1932  * }
1933  *
1934  * \param field_name
1935  */
1936  virtual DofEntityByUId::iterator
1937  get_dofs_by_name_and_type_begin(const std::string &field_name,
1938  const EntityType type) const = 0;
1939 
1940  /**
1941  * \brief get begin iterator of field dofs of given name end ent
1942  * type(instead you can use
1943  * _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,TYPE,IT)
1944  *
1945  * \ingroup mofem_field
1946  *
1947  * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_(MFIELD,NAME,TYPE,IT)) {
1948  * ...
1949  * }
1950  *
1951  * \param field_name
1952  */
1953  virtual DofEntityByUId::iterator
1954  get_dofs_by_name_and_type_end(const std::string &field_name,
1955  const EntityType type) const = 0;
1956 
1957  /** \brief loop over all dofs from a moFEM field and particular field
1958  * \ingroup mofem_field
1959  */
1960 #define _IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_(MFIELD, NAME, TYPE, IT) \
1961  DofEntityByUId::iterator IT = \
1962  (MFIELD).get_dofs_by_name_and_type_begin(NAME, TYPE); \
1963  IT != (MFIELD).get_dofs_by_name_and_type_end(NAME, TYPE); \
1964  IT++
1965 
1966  /**
1967  * \brief get begin iterator of finite elements of given name (instead you
1968  * can use _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1969  *
1970  * \ingroup mofem_access
1971  *
1972  * for(_IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1973  * ...
1974  * }
1975  *
1976  * \param fe_name
1977  */
1978  virtual EntFiniteElement_multiIndex::index<Unique_mi_tag>::type::iterator
1979  get_fe_by_name_begin(const std::string &fe_name) const = 0;
1980 
1981  /**
1982  * \brief get end iterator of finite elements of given name (instead you can
1983  * use _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1984  *
1985  * \ingroup mofem_access
1986  *
1987  * for(_IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1988  * ...
1989  * }
1990  *
1991  * \param fe_name
1992  */
1993  virtual EntFiniteElement_multiIndex::index<Unique_mi_tag>::type::iterator
1994  get_fe_by_name_end(const std::string &fe_name) const = 0;
1995 
1996  /** \brief loop over all finite elements from a moFEM field and FE
1997  * \ingroup mofem_access
1998  */
1999 #define _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT) \
2000  auto IT = (MFIELD).get_fe_by_name_begin(NAME); \
2001  IT != (MFIELD).get_fe_by_name_end(NAME); \
2002  IT++
2003 };
2004 } // namespace MoFEM
2005 
2006 #include <DeprecatedCoreInterface.hpp>
2007 
2008 namespace MoFEM {
2009 
2011 
2012 } // namespace MoFEM
2013 
2014 #endif // __INTERFACE_HPP__
2015 
2016 /**
2017  * \defgroup mofem_field Fields
2018  * \brief Data structure for adding and managing fields
2019  *
2020  * \ingroup mofem
2021  ******************************************************************************/
2022 
2023 /**
2024  * \defgroup mofem_ref_ents Get entities and adjacencies
2025  * \brief Get adjacencies/entities for given BitRefLevel (mesh refinement)
2026  *
2027  * \ingroup mofem
2028  ******************************************************************************/
2029 
2030 /**
2031  * \defgroup mofem_fe Finite elements
2032  * \brief Adding and managing finite elements
2033  *
2034  * \ingroup mofem
2035  ******************************************************************************/
2036 
2037 /**
2038  * \defgroup mofem_problems Problems
2039  * \brief Adding and managing problems
2040  *
2041  * \ingroup mofem
2042  ******************************************************************************/
2043 
2044 /**
2045  * \defgroup mofem_loops Loops
2046  * \brief Manages complexities for integrating over finite elements and dofs.
2047  *
2048  * \ingroup mofem
2049  ******************************************************************************/
2050 
2051 /**
2052  * \defgroup mofem_access Pointers to multi-indices
2053  * \brief Get direct access to multi-indices in database
2054  *
2055  * \ingroup mofem
2056  ******************************************************************************/
MoFEM::CoreInterface::modify_finite_element_adjacency_table
virtual MoFEMErrorCode modify_finite_element_adjacency_table(const std::string &fe_name, const EntityType type, ElementAdjacencyFunct function)=0
modify finite element table, only for advanced user
FieldEntityEntFiniteElementAdjacencyMap_multiIndex
multi_index_container< FieldEntityEntFiniteElementAdjacencyMap, indexed_by< ordered_unique< tag< Composite_Unique_mi_tag >, composite_key< FieldEntityEntFiniteElementAdjacencyMap, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getEntUniqueId >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getFeUniqueId > > >, ordered_non_unique< tag< Unique_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getEntUniqueId > >, ordered_non_unique< tag< FE_Unique_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, UId, &FieldEntityEntFiniteElementAdjacencyMap::getFeUniqueId > >, ordered_non_unique< tag< FEEnt_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, EntityHandle, &FieldEntityEntFiniteElementAdjacencyMap::getFeHandle > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntityEntFiniteElementAdjacencyMap, EntityHandle, &FieldEntityEntFiniteElementAdjacencyMap::getEntHandle > > > > FieldEntityEntFiniteElementAdjacencyMap_multiIndex
MultiIndex container keeps Adjacencies Element and dof entities adjacencies and vice versa.
Definition: AdjacencyMultiIndices.hpp:114
DEFAULT_VERBOSITY
@ DEFAULT_VERBOSITY
Definition: definitions.h:220
MoFEM::CoreInterface::get_meshsets_manager_ptr
virtual MeshsetsManager * get_meshsets_manager_ptr()=0
get MeshsetsManager pointer
MoFEM::CoreInterface::get_field_name
virtual std::string get_field_name(const BitFieldId id) const =0
get field name from id
MoFEM::CoreInterface::get_ents_finite_elements
virtual const EntFiniteElement_multiIndex * get_ents_finite_elements() const =0
Get the ents finite elements object.
MoFEM::CoreInterface::problem_basic_method_postProcess
virtual MoFEMErrorCode problem_basic_method_postProcess(const Problem *problem_ptr, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
Set data for BasicMethod.
MoFEM::CoreInterface::loop_finite_elements
virtual MoFEMErrorCode loop_finite_elements(const std::string problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, CacheTupleWeakPtr cache_ptr=CacheTupleSharedPtr(), int verb=DEFAULT_VERBOSITY)=0
Make a loop over finite elements.
MoFEM::CoreInterface::add_ents_to_finite_element_by_MESHSET
virtual MoFEMErrorCode add_ents_to_finite_element_by_MESHSET(const EntityHandle meshset, const std::string &name, const bool recursive=false)=0
add MESHSET element to finite element database given by name
MoFEM::CoreInterface::loop_dofs
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.
MoFEM::CoreInterface::clear_adjacencies_entities
virtual MoFEMErrorCode clear_adjacencies_entities(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
clear adjacency map for entities on given bit level
MoFEM::CoreInterface::get_finite_element_meshset
virtual EntityHandle get_finite_element_meshset(const std::string name) const =0
MoFEM::CoreInterface::list_finite_elements
virtual MoFEMErrorCode list_finite_elements() const =0
list finite elements in database
MoFEM::CoreInterface::modify_problem_ref_level_set_bit
virtual MoFEMErrorCode modify_problem_ref_level_set_bit(const std::string &name_problem, const BitRefLevel &bit)=0
set ref level for problem
EntityHandle
MoFEM::CoreInterface::check_number_of_ents_in_ents_finite_element
virtual MoFEMErrorCode check_number_of_ents_in_ents_finite_element() const =0
check data consistency in entsFiniteElements
MoFEM::EntityMethod
Data structure to exchange data between mofem and User Loop Methods on entities.
Definition: LoopMethods.hpp:471
MoFEM::FEMethod
structure for User Loop Methods on finite elements
Definition: LoopMethods.hpp:369
MoFEM::BaseFunction::DofsSideMap
multi_index_container< DofsSideMapData, indexed_by< ordered_non_unique< tag< TypeSide_mi_tag >, composite_key< DofsSideMapData, member< DofsSideMapData, EntityType, &DofsSideMapData::type >, member< DofsSideMapData, int, &DofsSideMapData::side > >>, ordered_unique< tag< EntDofIdx_mi_tag >, member< DofsSideMapData, int, &DofsSideMapData::dof > > > > DofsSideMap
Map entity stype and side to element/entity dof index.
Definition: BaseFunction.hpp:73
MoFEM::CoreInterface::get_ents_elements_adjacency
virtual const FieldEntityEntFiniteElementAdjacencyMap_multiIndex * get_ents_elements_adjacency() const =0
Get the dofs elements adjacency object.
MoFEM::CoreInterface::set_moab_interface
virtual MoFEMErrorCode set_moab_interface(moab::Interface &new_moab, int verb=VERBOSE)=0
Set the moab interface object.
MoFEM::CoreInterface::get_comm
virtual MPI_Comm & get_comm() const =0
MoFEM::CoreInterface::modify_finite_element_add_field_row
virtual MoFEMErrorCode modify_finite_element_add_field_row(const std::string &fe_name, const std::string name_row)=0
set field row which finite element use
MoFEM::CoreInterface::get_ent_field_by_name_end
virtual FieldEntityByUId::iterator get_ent_field_by_name_end(const std::string &field_name) const =0
get begin iterator of field dofs of given name (instead you can use IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP...
MoFEM::CoreInterface::make_shared_ref_entity
virtual boost::shared_ptr< RefEntityTmp< 0 > > make_shared_ref_entity(const EntityHandle ent)=0
Get RefEntity.
MoFEM::RefElement_multiIndex
multi_index_container< boost::shared_ptr< RefElement >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefElement::interface_type_RefEntity, EntityHandle, &RefElement::getEnt > > > > RefElement_multiIndex
Definition: RefElementMultiIndices.hpp:180
MoFEM::CoreInterface::get_field_structure
virtual const Field * get_field_structure(const std::string &name, enum MoFEMTypes bh=MF_EXIST) const =0
get field structure
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::CoreInterface::create_vertices_and_add_to_field
virtual MoFEMErrorCode create_vertices_and_add_to_field(const std::string name, const double coords[], int size, int verb=DEFAULT_VERBOSITY)=0
Create a vertices and add to field object.
MoFEM::CoreInterface::clear_ents_fields_by_bit_ref
virtual MoFEMErrorCode clear_ents_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
MoFEM::CoreInterface::clear_finite_elements_by_bit_ref
virtual MoFEMErrorCode clear_finite_elements_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
MoFEM::CoreInterface::list_dofs_by_field_name
virtual MoFEMErrorCode list_dofs_by_field_name(const std::string &name) const =0
MoFEM::CoreInterface::remove_ents_from_field
virtual MoFEMErrorCode remove_ents_from_field(const std::string name, const EntityHandle meshset, const EntityType type, int verb=DEFAULT_VERBOSITY)=0
remove entities from field
MoFEM::CoreInterface::get_field_bit_number
virtual FieldBitNumber get_field_bit_number(const std::string name) const =0
get field bit number
MoFEM::CoreInterface::get_comm_rank
virtual int get_comm_rank() const =0
MoFEM::CoreInterface::get_dofs_by_name_end
virtual DofEntityByUId::iterator get_dofs_by_name_end(const std::string &field_name) const =0
get begin iterator of field dofs of given name (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOO...
MoFEM::CoreInterface::get_problem_finite_elements_entities
virtual MoFEMErrorCode get_problem_finite_elements_entities(const std::string name, const std::string &fe_name, const EntityHandle meshset)=0
add finite elements to the meshset
MoFEM::Types::BitFieldId
std::bitset< BITFIELDID_SIZE > BitFieldId
Field Id.
Definition: Types.hpp:42
MoFEM::CoreInterface::remove_ents
virtual MoFEMErrorCode remove_ents(const Range ents, int verb=DEFAULT_VERBOSITY)=0
remove entities form mofem database
MoFEM::CoreInterface::get_problem
virtual const Problem * get_problem(const std::string problem_name) const =0
Get the problem object.
MoFEM::CoreInterface::remove_ents_from_field_by_bit_ref
virtual MoFEMErrorCode remove_ents_from_field_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
remove entities from field
MoFEM::CoreInterface::add_broken_field
virtual MoFEMErrorCode add_broken_field(const std::string name, const FieldSpace space, const FieldApproximationBase base, const FieldCoefficientsNumber nb_of_coefficients, const std::vector< std::pair< EntityType, std::function< MoFEMErrorCode(BaseFunction::DofsSideMap &)>> > list_dof_side_map, const TagType tag_type=MB_TAG_SPARSE, const enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add field.
MoFEM::CoreInterface::get_finite_elements
virtual const FiniteElement_multiIndex * get_finite_elements() const =0
Get the finite elements object.
MoFEM::CoreInterface::get_finite_element_entities_by_type
virtual MoFEMErrorCode get_finite_element_entities_by_type(const std::string name, EntityType type, Range &ents) const =0
get entities in the finite element by type
MoFEM::CoreInterface::get_dofs_by_name_and_ent_end
virtual DofEntityByUId::iterator get_dofs_by_name_and_ent_end(const std::string &field_name, const EntityHandle ent) const =0
get begin iterator of field dofs of given name and ent (instead you can use IT_GET_DOFS_FIELD_BY_NAME...
MoFEM::CoreInterface::get_field_meshset
virtual EntityHandle get_field_meshset(const std::string name) const =0
get field meshset
MoFEM::CoreInterface::modify_finite_element_off_field_data
virtual MoFEMErrorCode modify_finite_element_off_field_data(const std::string &fe_name, const std::string name_field)=0
unset finite element field data
MoFEM::DofMethod
Data structure to exchange data between mofem and User Loop Methods on entities.
Definition: LoopMethods.hpp:493
MoFEM::CoreInterface::remove_parents_by_parents
virtual MoFEMErrorCode remove_parents_by_parents(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
Remove paremts from entities having parents in passed range.
MoFEM::RefEntity_multiIndex
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getEnt > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
Definition: RefEntsMultiIndices.hpp:760
MoFEM::CoreInterface::modify_problem_mask_ref_level_set_bit
virtual MoFEMErrorCode modify_problem_mask_ref_level_set_bit(const std::string &name_problem, const BitRefLevel &bit)=0
set dof mask ref level for problem
MoFEM::CoreInterface::add_ents_to_field_by_dim
virtual MoFEMErrorCode add_ents_to_field_by_dim(const Range &ents, const int dim, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
MoFEM::CoreInterface::add_ents_to_field_by_type
virtual MoFEMErrorCode add_ents_to_field_by_type(const Range &ents, const EntityType type, const std::string &name, int verb=DEFAULT_VERBOSITY)=0
Add entities to field meshset.
MoFEM::Field
Provide data structure for (tensor) field approximation.
Definition: FieldMultiIndices.hpp:51
order
constexpr int order
Definition: dg_projection.cpp:18
MoFEM::CoreInterface::check_problem
virtual bool check_problem(const std::string name)=0
check if problem exist
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::CoreInterface::get_dofs
virtual const DofEntity_multiIndex * get_dofs() const =0
Get the dofs object.
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:2010
MoFEM::CoreInterface::remove_parents_by_ents
virtual MoFEMErrorCode remove_parents_by_ents(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
Remove parents from entities.
MoFEM::CoreInterface::rebuild_database
virtual MoFEMErrorCode rebuild_database(int verb=DEFAULT_VERBOSITY)=0
Clear database and initialize it once again.
FieldSpace
FieldSpace
approximation spaces
Definition: definitions.h:82
MoFEM::CoreInterface::add_ents_to_finite_element_by_type
virtual MoFEMErrorCode add_ents_to_finite_element_by_type(const EntityHandle entities, const EntityType type, const std::string &name, const bool recursive=true)=0
add entities to finite element
VERBOSE
@ VERBOSE
Definition: definitions.h:222
MoFEM::CoreInterface::problem_basic_method_preProcess
virtual MoFEMErrorCode problem_basic_method_preProcess(const Problem *problem_ptr, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
Set data for BasicMethod.
MoFEM::CoreInterface::get_dofs_by_name_and_type_begin
virtual DofEntityByUId::iterator get_dofs_by_name_and_type_begin(const std::string &field_name, const EntityType type) const =0
get begin iterator of field dofs of given name and ent type (instead you can use IT_GET_DOFS_FIELD_BY...
MoFEM::CoreInterface::get_finite_element_structure
virtual const FiniteElement * get_finite_element_structure(const std::string &name, enum MoFEMTypes bh=MF_EXIST) const =0
get finite element struture
MoFEM::CoreInterface::remove_ents_from_finite_element
virtual MoFEMErrorCode remove_ents_from_finite_element(const std::string name, const EntityHandle meshset, const EntityType type, int verb=DEFAULT_VERBOSITY)=0
remove entities from given refinement level to finite element database
DeprecatedCoreInterface.hpp
Deprecated interface functions.
MoFEM::CoreInterface::add_finite_element
virtual MoFEMErrorCode add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
MoFEM::CoreInterface::get_field_id
virtual BitFieldId get_field_id(const std::string &name) const =0
Get field Id.
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::CoreInterface::remove_parents_by_bit_ref
virtual MoFEMErrorCode remove_parents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
Remove parent from entities on bit level.
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::CoreInterface::modify_finite_element_add_field_col
virtual MoFEMErrorCode modify_finite_element_add_field_col(const std::string &fe_name, const std::string name_row)=0
set field col which finite element use
MoFEM::CoreInterface::build_finite_elements
virtual MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
MoFEM::CoreInterface::remove_ents_by_bit_ref
virtual MoFEMErrorCode remove_ents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
remove entities form mofem database
MoFEM::CoreInterface::~CoreInterface
virtual ~CoreInterface()=default
MoFEM::CoreInterface::add_ents_to_finite_element_by_bit_ref
virtual MoFEMErrorCode add_ents_to_finite_element_by_bit_ref(const BitRefLevel &bit, const BitRefLevel &mask, const std::string &name, EntityType type, int verb=DEFAULT_VERBOSITY)=0
add TET entities from given refinement level to finite element database given by name
bit
auto bit
set bit
Definition: hanging_node_approx.cpp:75
RowColData
RowColData
RowColData.
Definition: definitions.h:136
MoFEM::Types::FieldCoefficientsNumber
int FieldCoefficientsNumber
Number of field coefficients.
Definition: Types.hpp:27
convert.type
type
Definition: convert.py:64
MoFEM::CoreInterface::remove_ents_from_finite_element_by_bit_ref
virtual MoFEMErrorCode remove_ents_from_finite_element_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
remove elements from given refinement level to finite element database
MoFEM::CoreInterface::get_basic_entity_data_ptr
virtual boost::shared_ptr< BasicEntityData > & get_basic_entity_data_ptr()=0
Get pointer to basic entity data.
MoFEM::CoreInterface::get_ent_field_by_name_begin
virtual FieldEntityByUId::iterator get_ent_field_by_name_begin(const std::string &field_name) const =0
get begin iterator of field ents of given name (instead you can use IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP...
MoFEM::CoreInterface::delete_field
virtual MoFEMErrorCode delete_field(const std::string name, int verb=DEFAULT_VERBOSITY)=0
Delete field.
MoFEM::CoreInterface::modify_problem_unset_finite_element
virtual MoFEMErrorCode modify_problem_unset_finite_element(const std::string name_problem, const std::string &fe_name)=0
unset finite element from problem, this remove entities assigned to finite element to a particular pr...
MoFEM::CoreInterface::delete_finite_element
virtual MoFEMErrorCode delete_finite_element(const std::string name, int verb=DEFAULT_VERBOSITY)=0
delete finite element from mofem database
MoFEM::CoreInterface::get_comm_size
virtual int get_comm_size() const =0
MoFEM::CoreInterface::cache_problem_entities
virtual MoFEMErrorCode cache_problem_entities(const std::string prb_name, CacheTupleWeakPtr cache_ptr)=0
Cache variables.
MoFEM::CoreInterface::get_field_ents
virtual const FieldEntity_multiIndex * get_field_ents() const =0
Get the field ents object.
MoFEM::CoreInterface::get_field_entities_by_handle
virtual MoFEMErrorCode get_field_entities_by_handle(const std::string name, Range &ents) const =0
get entities in the field by handle
MoFEM::CoreInterface::clear_ents_fields
virtual MoFEMErrorCode clear_ents_fields(const Range ents, int verb=DEFAULT_VERBOSITY)=0
MoFEM::CoreInterface::check_field
virtual bool check_field(const std::string &name) const =0
check if field is in database
MoFEM::CoreInterface::delete_ents_by_bit_ref
virtual MoFEMErrorCode delete_ents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, const bool remove_parent=false, int verb=DEFAULT_VERBOSITY, MoFEMTypes mf=MF_ZERO)=0
delete entities form mofem and moab database
MoFEM::BasicMethod
Data structure to exchange data between mofem and User Loop Methods.
Definition: LoopMethods.hpp:183
MoFEM::CoreInterface::clear_dofs_fields
virtual MoFEMErrorCode clear_dofs_fields(const Range ents, int verb=DEFAULT_VERBOSITY)=0
MoFEM::CoreInterface::add_ents_to_finite_element_by_dim
virtual MoFEMErrorCode add_ents_to_finite_element_by_dim(const EntityHandle entities, const int dim, const std::string &name, const bool recursive=true)=0
add entities to finite element
MoFEM::CoreInterface::get_problems
virtual const Problem_multiIndex * get_problems() const =0
Get the problems object.
MoFEM::CoreInterface::get_fe_by_name_end
virtual EntFiniteElement_multiIndex::index< Unique_mi_tag >::type::iterator get_fe_by_name_end(const std::string &fe_name) const =0
get end iterator of finite elements of given name (instead you can use IT_GET_FES_BY_NAME_FOR_LOOP(MF...
MoFEM::CacheTupleSharedPtr
boost::shared_ptr< CacheTuple > CacheTupleSharedPtr
Definition: FEMultiIndices.hpp:495
MoFEM::FieldEntity_multiIndex
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, member< FieldEntity, UId, &FieldEntity::localUId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntity::interface_type_RefEntity, EntityHandle, &FieldEntity::getEnt > > > > FieldEntity_multiIndex
Definition: FieldEntsMultiIndices.hpp:489
MoFEM::CoreInterface::modify_finite_element_add_field_data
virtual MoFEMErrorCode modify_finite_element_add_field_data(const std::string &fe_name, const std::string name_field)=0
set finite element field data
MoFEM::FiniteElement
Finite element definition.
Definition: FEMultiIndices.hpp:26
MoFEM::CoreInterface::modify_finite_element_off_field_col
virtual MoFEMErrorCode modify_finite_element_off_field_col(const std::string &fe_name, const std::string name_row)=0
unset field col which finite element use
MoFEM::CoreInterface::modify_problem_ref_level_add_bit
virtual MoFEMErrorCode modify_problem_ref_level_add_bit(const std::string &name_problem, const BitRefLevel &bit)=0
add ref level to problem
MoFEM::CoreInterface::get_meshsets_manager
virtual MeshsetsManager & get_meshsets_manager()=0
get MeshsetsManager pointer
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MoFEM::CoreInterface::clear_problems
virtual MoFEMErrorCode clear_problems(int verb=DEFAULT_VERBOSITY)=0
clear problems
Problem_multiIndex
multi_index_container< Problem, indexed_by< ordered_unique< tag< Meshset_mi_tag >, member< Problem, EntityHandle, &Problem::meshset > >, hashed_unique< tag< BitProblemId_mi_tag >, const_mem_fun< Problem, BitProblemId, &Problem::getId >, HashBit< BitProblemId >, EqBit< BitProblemId > >, hashed_unique< tag< Problem_mi_tag >, const_mem_fun< Problem, std::string, &Problem::getName > > > > Problem_multiIndex
MultiIndex for entities for Problem.
Definition: ProblemsMultiIndices.hpp:657
MoFEM::CoreInterface::get_finite_element_entities_by_dimension
virtual MoFEMErrorCode get_finite_element_entities_by_dimension(const std::string name, int dim, Range &ents) const =0
get entities in the finite element by dimension
MoFEM::CoreInterface::get_finite_element_entities_by_handle
virtual MoFEMErrorCode get_finite_element_entities_by_handle(const std::string name, Range &ents) const =0
get entities in the finite element by handle
MoFEM::CoreInterface::clear_database
virtual MoFEMErrorCode clear_database(int verb=DEFAULT_VERBOSITY)=0
Clear database.
MoFEM::CoreInterface::get_fields
virtual const Field_multiIndex * get_fields() const =0
Get the fields object.
MoFEM::UnknownInterface
base class for all interface classes
Definition: UnknownInterface.hpp:34
MoFEM::ElementAdjacencyFunct
boost::function< MoFEMErrorCode(Interface &moab, const Field &field, const EntFiniteElement &fe, std::vector< EntityHandle > &adjacency)> ElementAdjacencyFunct
user adjacency function
Definition: FEMultiIndices.hpp:20
Range
MoFEM::CoreInterface::get_dofs_by_name_begin
virtual DofEntityByUId::iterator get_dofs_by_name_begin(const std::string &field_name) const =0
get begin iterator of field dofs of given name (instead you can use IT_GET_DOFS_FIELD_BY_NAME_FOR_LOO...
MF_ZERO
@ MF_ZERO
Definition: definitions.h:111
MoFEM::CoreInterface::clear_finite_elements
virtual MoFEMErrorCode clear_finite_elements(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
MoFEM::Types::ApproximationOrder
int ApproximationOrder
Approximation on the entity.
Definition: Types.hpp:26
Field_multiIndex
multi_index_container< boost::shared_ptr< Field >, indexed_by< hashed_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, HashBit< BitFieldId >, EqBit< BitFieldId > >, ordered_unique< tag< Meshset_mi_tag >, member< Field, EntityHandle, &Field::meshSet > >, ordered_unique< tag< FieldName_mi_tag >, const_mem_fun< Field, boost::string_ref, &Field::getNameRef > >, ordered_non_unique< tag< BitFieldId_space_mi_tag >, const_mem_fun< Field, FieldSpace, &Field::getSpace > > > > Field_multiIndex
Field_multiIndex for Field.
Definition: FieldMultiIndices.hpp:508
MoFEM::CoreInterface::check_number_of_ents_in_ents_field
virtual MoFEMErrorCode check_number_of_ents_in_ents_field() const =0
check data consistency in entitiesPtr
MoFEM::CoreInterface::clear_inactive_dofs
virtual MoFEMErrorCode clear_inactive_dofs(int verb=DEFAULT_VERBOSITY)=0
MoFEM::CoreInterface::get_fe_by_name_begin
virtual EntFiniteElement_multiIndex::index< Unique_mi_tag >::type::iterator get_fe_by_name_begin(const std::string &fe_name) const =0
get begin iterator of finite elements of given name (instead you can use IT_GET_FES_BY_NAME_FOR_LOOP(...
MoFEM::CoreInterface::get_dofs_by_name_and_ent_begin
virtual DofEntityByUId::iterator get_dofs_by_name_and_ent_begin(const std::string &field_name, const EntityHandle ent) const =0
get begin iterator of field dofs of given name and ent(instead you can use IT_GET_DOFS_FIELD_BY_NAME_...
MoFEM::CoreInterface::list_problem
virtual MoFEMErrorCode list_problem() const =0
list problems
MoFEM::Types::FieldBitNumber
char FieldBitNumber
Field bit number.
Definition: Types.hpp:28
MoFEM::CoreInterface::get_ref_ents
virtual const RefEntity_multiIndex * get_ref_ents() const =0
Get the ref ents object.
MoFEM::CoreInterface::get_ref_finite_elements
virtual const RefElement_multiIndex * get_ref_finite_elements() const =0
Get the ref finite elements object.
MoFEM::MeshsetsManager
Interface for managing meshsets containing materials and boundary conditions.
Definition: MeshsetsManager.hpp:104
MoFEM::CacheTupleWeakPtr
boost::weak_ptr< CacheTuple > CacheTupleWeakPtr
Definition: FEMultiIndices.hpp:494
MoFEM::CoreInterface::build_fields
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
MoFEM::CoreInterface::clear_problem
virtual MoFEMErrorCode clear_problem(const std::string name, int verb=DEFAULT_VERBOSITY)=0
clear problem
MoFEM::CoreInterface::modify_finite_element_off_field_row
virtual MoFEMErrorCode modify_finite_element_off_field_row(const std::string &fe_name, const std::string name_row)=0
unset field row which finite element use
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::CoreInterface::clear_dofs_fields_by_bit_ref
virtual MoFEMErrorCode clear_dofs_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
FiniteElement_multiIndex
multi_index_container< boost::shared_ptr< FiniteElement >, indexed_by< hashed_unique< tag< FiniteElement_Meshset_mi_tag >, member< FiniteElement, EntityHandle, &FiniteElement::meshset > >, hashed_unique< tag< BitFEId_mi_tag >, const_mem_fun< FiniteElement, BitFEId, &FiniteElement::getId >, HashBit< BitFEId >, EqBit< BitFEId > >, ordered_unique< tag< FiniteElement_name_mi_tag >, const_mem_fun< FiniteElement, boost::string_ref, &FiniteElement::getNameRef > > > > FiniteElement_multiIndex
MultiIndex for entities for FiniteElement.
Definition: FEMultiIndices.hpp:849
MoFEM::CoreInterface::modify_problem_add_finite_element
virtual MoFEMErrorCode modify_problem_add_finite_element(const std::string name_problem, const std::string &fe_name)=0
add finite element to problem, this add entities assigned to finite element to a particular problem
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::CoreInterface::modify_problem_mask_ref_level_add_bit
virtual MoFEMErrorCode modify_problem_mask_ref_level_add_bit(const std::string &name_problem, const BitRefLevel &bit)=0
set dof mask ref level for problem
MoFEM::CoreInterface::build_adjacencies
virtual MoFEMErrorCode build_adjacencies(const Range &ents, int verb=DEFAULT_VERBOSITY)=0
build adjacencies
MoFEM::CoreInterface::build_field
virtual MoFEMErrorCode build_field(const std::string field_name, int verb=DEFAULT_VERBOSITY)=0
build field by name
MoFEM::Problem
keeps basic data about problem
Definition: ProblemsMultiIndices.hpp:54
MoFEM::CoreInterface::check_finite_element
virtual bool check_finite_element(const std::string &name) const =0
Check if finite element is in database.
MoFEM::CoreInterface
Interface.
Definition: Interface.hpp:27
MoFEM::CoreInterface::set_field_order
virtual MoFEMErrorCode set_field_order(const EntityHandle meshset, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
Set order approximation of the entities in the field.
MoFEM::CoreInterface::get_field_entities_by_dimension
virtual MoFEMErrorCode get_field_entities_by_dimension(const std::string name, int dim, Range &ents) const =0
get entities in the field by dimension
DofEntity_multiIndex
multi_index_container< boost::shared_ptr< DofEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< DofEntity, UId, &DofEntity::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< DofEntity, EntityHandle, &DofEntity::getEnt > > > > DofEntity_multiIndex
MultiIndex container keeps DofEntity.
Definition: DofsMultiIndices.hpp:317
MoFEM::CoreInterface::list_fields
virtual MoFEMErrorCode list_fields() const =0
list entities in the field
MoFEM::CoreInterface::get_field_entities_by_type
virtual MoFEMErrorCode get_field_entities_by_type(const std::string name, EntityType type, Range &ents) const =0
get entities in the field by type
MF_EXCL
@ MF_EXCL
Definition: definitions.h:112
MoFEM::CoreInterface::get_dofs_by_name_and_type_end
virtual DofEntityByUId::iterator get_dofs_by_name_and_type_end(const std::string &field_name, const EntityType type) const =0
get begin iterator of field dofs of given name end ent type(instead you can use IT_GET_DOFS_FIELD_BY_...
MoFEM::CoreInterface::add_problem
virtual MoFEMErrorCode add_problem(const std::string &name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add problem.
MF_EXIST
@ MF_EXIST
Definition: definitions.h:113
MoFEM::CoreInterface::delete_problem
virtual MoFEMErrorCode delete_problem(const std::string name)=0
Delete problem.
EntFiniteElement_multiIndex
multi_index_container< boost::shared_ptr< EntFiniteElement >, indexed_by< ordered_unique< tag< Unique_mi_tag >, const_mem_fun< EntFiniteElement, UId, &EntFiniteElement::getLocalUniqueId > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_RefEntity, EntityHandle, &EntFiniteElement::getEnt > > > > EntFiniteElement_multiIndex
MultiIndex container for EntFiniteElement.
Definition: FEMultiIndices.hpp:800
MoFEM::CoreInterface::set_field_order_by_entity_type_and_bit_ref
virtual MoFEMErrorCode set_field_order_by_entity_type_and_bit_ref(const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type, const std::string &name, const ApproximationOrder order, int verb=DEFAULT_VERBOSITY)=0
Set order approximation of the entities in the field.
MoFEM::CoreInterface::add_field
virtual MoFEMErrorCode add_field(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_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add field.
MoFEM::CoreInterface::getValue
virtual const int getValue() const =0
Get the core.
MoFEM::CoreInterface::clear_adjacencies_finite_elements
virtual MoFEMErrorCode clear_adjacencies_finite_elements(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
clear adjacency map for finite elements on given bit level
MoFEM::CoreInterface::loop_entities
virtual MoFEMErrorCode loop_entities(const std::string field_name, EntityMethod &method, Range const *const ents=nullptr, int verb=DEFAULT_VERBOSITY)=0
Loop over field entities.