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