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