v0.13.1
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 * \param name field name
577 * \return const Field*
578 *
579 */
580 virtual Field *get_field_structure(const std::string &name) = 0;
581
582 /**@}*/
583
584 /** \name Finite elements */
585
586 /**@{*/
587
588 /**
589 * \brief Check if finite element is in database
590 * @param name Name of finite element
591 * @return true if element is declared
592 */
593 virtual bool check_finite_element(const std::string &name) const = 0;
594
595 /**
596 * \brief add finite element
597 * \ingroup mofem_fe
598 * \param name finite element name
599 *
600 * \note add_file is a collective, should be executed on all processors.
601 * Otherwise could lead to deadlock.
602 *
603 * Example \code
604 CHKERR mField.add_finite_element("ELASTIC");
605 CHKERR mField.add_finite_element("PLASTIC");
606 \endcode
607 */
608 virtual MoFEMErrorCode add_finite_element(const std::string &fe_name,
609 enum MoFEMTypes bh = MF_EXCL,
610 int verb = DEFAULT_VERBOSITY) = 0;
611
612 /**
613 * \brief modify finite element table, only for advanced user
614 * \ingroup mofem_fe
615 *
616 * \note add_file is a collective, should be executed on all processors.
617 * Otherwise could lead to deadlock.
618 *
619 * Using that functions means that you like to do something not usual.
620 *
621 */
622 virtual MoFEMErrorCode
623 modify_finite_element_adjacency_table(const std::string &fe_name,
624 const EntityType type,
625 ElementAdjacencyFunct function) = 0;
626
627 /** \brief set finite element field data
628 * \ingroup mofem_fe
629 *
630 * \note add_file is a collective, should be executed on all processors.
631 * Otherwise could lead to deadlock.
632 *
633 * \param name finite element name
634 * \param name field name
635 *
636 * This function will set memory in the form of a vector
637 */
638 virtual MoFEMErrorCode
639 modify_finite_element_add_field_data(const std::string &fe_name,
640 const std::string &name_filed) = 0;
641
642 /** \brief unset finite element field data
643 * \ingroup mofem_fe
644 *
645 * \note add_file is a collective, should be executed on all processors.
646 * Otherwise could lead to deadlock.
647 *
648 * \param name finite element name
649 * \param name field name
650 *
651 * This function will set memory in the form of a vector
652 */
653 virtual MoFEMErrorCode
654 modify_finite_element_off_field_data(const std::string &fe_name,
655 const std::string &name_filed) = 0;
656
657 /** \brief set field row which finite element use
658 * \ingroup mofem_fe
659 *
660 * \note add_file is a collective, should be executed on all processors.
661 * Otherwise could lead to deadlock.
662 *
663 * \param name finite element name
664 * \param name field name
665 */
666 virtual MoFEMErrorCode
667 modify_finite_element_add_field_row(const std::string &fe_name,
668 const std::string &name_row) = 0;
669
670 /** \brief unset field row which finite element use
671 * \ingroup mofem_fe
672 *
673 * \note add_file is a collective, should be executed on all processors.
674 * Otherwise could lead to deadlock.
675 *
676 * \param name finite element name
677 * \param name field name
678 */
679 virtual MoFEMErrorCode
680 modify_finite_element_off_field_row(const std::string &fe_name,
681 const std::string &name_row) = 0;
682
683 /** \brief set field col which finite element use
684 * \ingroup mofem_fe
685 *
686 * \note add_file is a collective, should be executed on all processors.
687 * Otherwise could lead to deadlock.
688 *
689 * \param name finite element name
690 * \param name field name
691 */
692 virtual MoFEMErrorCode
693 modify_finite_element_add_field_col(const std::string &fe_name,
694 const std::string &name_row) = 0;
695
696 /** \brief unset field col which finite element use
697 * \ingroup mofem_fe
698 *
699 * \note add_file is a collective, should be executed on all processors.
700 * Otherwise could lead to deadlock.
701 *
702 * \param name finite element name
703 * \param name field name
704 */
705 virtual MoFEMErrorCode
706 modify_finite_element_off_field_col(const std::string &fe_name,
707 const std::string &name_row) = 0;
708
709 /**
710 * \brief add entities to finite element
711 * \ingroup mofem_fe
712 *
713 * \note not collective
714 *
715 * @param entities meshset or range form were entities taken
716 * @param type type of entity
717 * @param name name of field
718 * @param recursive take entities from meshsets in meshset
719 * @return error code
720 */
722 const EntityHandle entities, const EntityType type,
723 const std::string &name, const bool recursive = true) = 0;
724
725 /**
726 * \brief add entities to finite element
727 * \ingroup mofem_fe
728 *
729 * \note not collective
730 *
731 * @param entities meshset or range form were entities taken
732 * @param dim dimension
733 * @param name name of field
734 * @param recursive take entities from meshsets in meshset
735 * @return error code
736 */
737 virtual MoFEMErrorCode
739 const std::string &name,
740 const bool recursive = true) = 0;
741
742 /**
743 * \brief add entities to finite elements
744 * \ingroup mofem_fe
745 *
746 * \note not collective
747 *
748 * @param ents range of entities
749 * @param type type of entity (MBVERTEX, MBEDGE, MBTRI, ...)
750 * @param name name of finite element
751 * @return error code
752 */
753 virtual MoFEMErrorCode
755 const std::string &name) = 0;
756
757 /**
758 * \brief add entities to finite elements
759 * \ingroup mofem_fe
760 *
761 * \note not collective
762 *
763 * @param ents range of entities
764 * @param dim dimension of entities
765 * @param name name of finite element
766 * @return error code
767 */
768 virtual MoFEMErrorCode
770 const std::string &name) = 0;
771
772 /** \brief add TET entities from given refinement level to finite element
773 * database given by name
774 * \ingroup mofem_fe
775 *
776 * \note not collective
777 *
778 * \param BitRefLevel bit
779 * \param BitRefLevel mask
780 * \param finite element name
781 * \param finite element type
782 * \param verbose level
783 */
785 const BitRefLevel &bit, const BitRefLevel &mask, const std::string &name,
786 EntityType type, int verb = DEFAULT_VERBOSITY) = 0;
787
788 /** get finite element meshset
789 * \ingroup mofem_fe
790 *
791 */
792 virtual EntityHandle
793 get_finite_element_meshset(const std::string &name) const = 0;
794
795 /**
796 * \brief get entities in the finite element by dimension
797 * @param name finite element name
798 * @param dim dim
799 * @param ents ents
800 * @return error code
801
802 * \ingroup mofem_field
803 */
804 virtual MoFEMErrorCode
806 Range &ents) const = 0;
807
808 /**
809 * \brief get entities in the finite element by type
810 * @param name finite element name
811 * @param type entity type
812 * @param ents ents
813 * @return error code
814
815 * \ingroup mofem_field
816 */
817 virtual MoFEMErrorCode
819 Range &ents) const = 0;
820
821 /**
822 * \brief get entities in the finite element by handle
823 * @param name finite element name
824 * @param ents ents
825 * @return error code
826
827 * \ingroup mofem_field
828 */
829 virtual MoFEMErrorCode
831 Range &ents) const = 0;
832
833 /** \brief remove elements from given refinement level to finite element
834 * database \ingroup mofem_fe
835 *
836 * \param BitRefLevel bit
837 * \param BitRefLevel mask
838 * \param verbose level
839 */
840 virtual MoFEMErrorCode
842 const BitRefLevel mask,
843 int verb = DEFAULT_VERBOSITY) = 0;
844
845 /** \brief remove entities from given refinement level to finite element
846 * database
847 *
848 */
850 const std::string name, const EntityHandle meshset, const EntityType type,
851 int verb = DEFAULT_VERBOSITY) = 0;
852
853 /** \brief remove entities from finite element database
854 * \ingroup mofem_fe
855 *
856 */
857 virtual MoFEMErrorCode
858 remove_ents_from_finite_element(const std::string name, const Range ents,
859 int verb = DEFAULT_VERBOSITY) = 0;
860
861 /** \brief remove entities from finite elements in database
862 * \ingroup mofem_fe
863 *
864 */
865 virtual MoFEMErrorCode
867 int verb = DEFAULT_VERBOSITY) = 0;
868
869 /** \brief add MESHSET element to finite element database given by name
870 * \ingroup mofem_fe
871 *
872 * \note not collective
873 *
874 * \param meshset contains all entities that could be used for finite
875 * element \param name Finite Element name
876 */
877 virtual MoFEMErrorCode
879 const std::string &name,
880 const bool recursive = false) = 0;
881
882 /** \brief list finite elements in database
883 * \ingroup mofem_fe
884 */
886
887 /**@}*/
888
889 /** \name Problems */
890
891 /**@{*/
892
893 /** \brief Add problem
894 * \ingroup mofem_problems
895 *
896 * \note add_file is a collective, should be executed on all processors.
897 * Otherwise could lead to deadlock.
898 *
899 */
900 virtual MoFEMErrorCode add_problem(const std::string &name,
901 enum MoFEMTypes bh = MF_EXCL,
902 int verb = DEFAULT_VERBOSITY) = 0;
903
904 /**
905 * \brief check if problem exist
906 * @param name problem name
907 * @return true if problem is in database
908 */
909 virtual bool check_problem(const std::string name) = 0;
910
911 /** \brief Delete problem
912 * \ingroup mofem_problems
913 *
914 * \note add_file is a collective, should be executed on all processors.
915 * Otherwise could lead to deadlock.
916 *
917 */
918 virtual MoFEMErrorCode delete_problem(const std::string name) = 0;
919
920 /** \brief add finite element to problem, this add entities assigned to
921 * finite element to a particular problem \ingroup mofem_problems
922 *
923 * \note add_file is a collective, should be executed on all processors.
924 * Otherwise could lead to deadlock.
925 *
926 * \param name Problem name
927 * \param name Finite Element name
928 */
929 virtual MoFEMErrorCode
930 modify_problem_add_finite_element(const std::string &name_problem,
931 const std::string &fe_name) = 0;
932
933 /** \brief unset finite element from problem, this remove entities assigned
934 * to finite element to a particular problem \ingroup mofem_problems
935 *
936 * Note: If problem is build, it need to be cleaned to make this effective
937 *
938 * \note add_file is a collective, should be executed on all processors.
939 * Otherwise could lead to deadlock.
940 *
941 * \param name Problem name
942 * \param name Finite Element name
943 */
944 virtual MoFEMErrorCode
945 modify_problem_unset_finite_element(const std::string &name_problem,
946 const std::string &fe_name) = 0;
947
948 /** \brief add ref level to problem
949 * \ingroup mofem_problems
950 *
951 * \note add_file is a collective, should be executed on all processors.
952 * Otherwise could lead to deadlock.
953 *
954 * if same finite element is solved using different level of refinements,
955 * than the level of refinement has to be specificied to problem in query
956 *
957 * \param name Problem name
958 * \param BitRefLevel bitLevel
959 * Example: \code
960 CHKERR
961 mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF1","ELASTIC");
962 CHKERR
963 mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF2","ELASTIC");
964 CHKERR
965 mField.modify_problem_ref_level_add_bit("BEAM_BENDING_ON_MESH_REF1",bit_level1);
966 CHKERR
967 mField.modify_problem_ref_level_add_bit("BEAM_BENDING_ON_MESH_REF2",bit_level2);
968 *\endcode
969 * Two Problems exist and solved independently, both are elastic, but solved
970 using different mesh refinement <br>
971 */
972 virtual MoFEMErrorCode
973 modify_problem_ref_level_add_bit(const std::string &name_problem,
974 const BitRefLevel &bit) = 0;
975
976 /** \brief set dof mask ref level for problem
977 * \ingroup mofem_problems
978 *
979 */
980 virtual MoFEMErrorCode
981 modify_problem_mask_ref_level_add_bit(const std::string &name_problem,
982 const BitRefLevel &bit) = 0;
983
984 /** \brief set ref level for problem
985 * \ingroup mofem_problems
986 *
987 * \note add_file is a collective, should be executed on all processors.
988 * Otherwise could lead to deadlock.
989 *
990 * if same finite element is solved using different level of refinements,
991 * than the level of refinement has to be specificied to problem in query
992 *
993 * \param name Problem name
994 * \param BitRefLevel bitLevel
995 * Example: \code
996 CHKERR
997 mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF1","ELASTIC");
998 CHKERR
999 mField.modify_problem_add_finite_element("BEAM_BENDING_ON_MESH_REF2","ELASTIC");
1000
1001 CHKERR
1002 mField.modify_problem_ref_level_set_bit("BEAM_BENDING_ON_MESH_REF1",bit_level1);
1003 CHKERR
1004 mField.modify_problem_ref_level_set_bit("BEAM_BENDING_ON_MESH_REF2",bit_level2);
1005 * \endcode
1006 * Two Problems exist and solved independently, both are elastic, but solved
1007 * using different mesh refinement <br>
1008 *
1009 */
1010 virtual MoFEMErrorCode
1011 modify_problem_ref_level_set_bit(const std::string &name_problem,
1012 const BitRefLevel &bit) = 0;
1013
1014 /** \brief set dof mask ref level for problem
1015 * \ingroup mofem_problems
1016 *
1017 * \note add_file is a collective, should be executed on all processors.
1018 * Otherwise could lead to deadlock.
1019 *
1020 */
1021 virtual MoFEMErrorCode
1022 modify_problem_mask_ref_level_set_bit(const std::string &name_problem,
1023 const BitRefLevel &bit) = 0;
1024
1025 /** \brief list problems
1026 * \ingroup mofem_problems
1027 */
1028 virtual MoFEMErrorCode list_problem() const = 0;
1029
1030 /**@}*/
1031
1032 /** \name Clear dofs and entities */
1033
1034 /**@{*/
1035
1036 /** list dofs
1037 * \ingroup mofem_field
1038 */
1039 virtual MoFEMErrorCode
1040 list_dofs_by_field_name(const std::string &name) const = 0;
1041
1042 /** Clear inactive dofs
1043 * \ingroup mofem_field
1044 */
1046
1047 /** Clear dofs by bit level
1048 * \ingroup mofem_field
1049 */
1050 virtual MoFEMErrorCode
1052 int verb = DEFAULT_VERBOSITY) = 0;
1053
1054 /** Clear dofs by ents
1055 * \ingroup mofem_field
1056 */
1058 int verb = DEFAULT_VERBOSITY) = 0;
1059
1060 /** Clear dofs by field name and ents
1061 * \ingroup mofem_field
1062 */
1063 virtual MoFEMErrorCode clear_dofs_fields(const std::string name,
1064 const Range ents,
1065 int verb = DEFAULT_VERBOSITY) = 0;
1066
1067 /** Clear entities by field name
1068 * \ingroup mofem_field
1069 */
1071 int verb = DEFAULT_VERBOSITY) = 0;
1072
1073 /** Clear entities by field name
1074 * \ingroup mofem_field
1075 */
1076 virtual MoFEMErrorCode clear_ents_fields(const std::string name,
1077 const Range ents,
1078 int verb = DEFAULT_VERBOSITY) = 0;
1079
1080 /** Clear ents by bit level
1081 * \ingroup mofem_field
1082 */
1083 virtual MoFEMErrorCode
1085 int verb = DEFAULT_VERBOSITY) = 0;
1086
1087 /**@}*/
1088
1089 /** \name Build fields, finite elements and problems */
1090
1091 /**@{*/
1092
1093 /**
1094 * \brief Build finite elements
1095 * \ingroup mofem_fe
1096 *
1097 * Build finite element data structures. Have to be run before problem and
1098 * adjacencies are constructed.
1099 *
1100 * @param verb Verbosity level
1101 * @return Error code
1102 */
1103 virtual MoFEMErrorCode
1105
1106 /**
1107 * \brief Build finite elements
1108 * \ingroup mofem_fe
1109 *
1110 * Build finite element data structures. Have to be run before problem and
1111 * adjacencies are constructed.
1112 *
1113 * @param fe_name Name of finite element
1114 * @param ents_ptr Pointer to range of finite elements
1115 * @param verb Verbosity level
1116 * @return Error code
1117 */
1118 virtual MoFEMErrorCode
1119 build_finite_elements(const string fe_name,
1120 const Range *const ents_ptr = nullptr,
1121 int verb = DEFAULT_VERBOSITY) = 0;
1122
1123 /**@}*/
1124
1125 /** \name Clear finite elements */
1126
1127 /**@{*/
1128
1129 /** clear finite elements
1130 */
1131 virtual MoFEMErrorCode
1133 const BitRefLevel mask,
1134 int verb = DEFAULT_VERBOSITY) = 0;
1135
1136 /** clear finite elements
1137 */
1138 virtual MoFEMErrorCode
1139 clear_finite_elements(const Range ents, int verb = DEFAULT_VERBOSITY) = 0;
1140
1141 /** clear finite elements
1142 */
1143 virtual MoFEMErrorCode
1144 clear_finite_elements(const std::string name, const Range ents,
1145 int verb = DEFAULT_VERBOSITY) = 0;
1146
1147 /**@}*/
1148
1149 /** \name Build adjacencies */
1150
1151 /**@{*/
1152
1153 /** \brief build adjacencies
1154 *
1155 * \param list of entities
1156 *
1157 * This function will get information of adjacent finite elements and fields
1158 * of all entities. If this is not executed, partitioning the problem is not
1159 * possible. Adjacency map is based on degrees of freedom adjacent to
1160 * elements. This linked to geometric element connectivity.
1161 *
1162 * If new degrees of freedom or new finite elements are added to the
1163 * database, adjacency map has to be rebuild.
1164 *
1165 */
1167 int verb = DEFAULT_VERBOSITY) = 0;
1168
1169 /** \brief build adjacencies
1170 *
1171 * \param bit adjacencies for refine level
1172 *
1173 * This function will get information of adjacent finite elements and fields
1174 * of all entities. If this is not executed, partitioning the problem is not
1175 * possible. Adjacency map is based on degrees of freedom adjacent to
1176 * elements. This linked to geometric element connectivity.
1177 *
1178 * If new degrees of freedom or new finite elements are added to the
1179 * database, adjacency map has to be rebuild.
1180 *
1181 */
1183 int verb = DEFAULT_VERBOSITY) = 0;
1184
1185 /** \brief build adjacencies
1186 *
1187 * \param bit adjacencies for refine level
1188 * \param mask mask for bit level
1189 *
1190 * This function will get information of adjacent finite elements and fields
1191 * of all entities. If this is not executed, partitioning the problem is not
1192 * possible. Adjacency map is based on degrees of freedom adjacent to
1193 * elements. This linked to geometric element connectivity.
1194 *
1195 * If new degrees of freedom or new finite elements are added to the
1196 * database, adjacency map has to be rebuild.
1197 *
1198 */
1200 const BitRefLevel &mask,
1201 int verb = DEFAULT_VERBOSITY) = 0;
1202
1203 /**@}*/
1204
1205 /** \name Clear adjacencies */
1206
1207 /**@{*/
1208
1209 /** \brief clear adjacency map for finite elements on given bit level
1210 *
1211 * \param bit
1212 * \param mask
1213 */
1214 virtual MoFEMErrorCode
1216 const BitRefLevel mask,
1217 int verb = DEFAULT_VERBOSITY) = 0;
1218
1219 /** \brief clear adjacency map for entities on given bit level
1220 *
1221 * \param bit
1222 * \param mask
1223 */
1224 virtual MoFEMErrorCode
1226 int verb = DEFAULT_VERBOSITY) = 0;
1227
1228 /** \brief clear adjacencies for field entities by entities
1229 */
1230 virtual MoFEMErrorCode
1232 int verb = DEFAULT_VERBOSITY) = 0;
1233
1234 /** \brief clear adjacencies for field entities by entities and field namd
1235 */
1236 virtual MoFEMErrorCode
1237 clear_adjacencies_entities(const std::string name, const Range ents,
1238 int verb = DEFAULT_VERBOSITY) = 0;
1239
1240 /**@}*/
1241
1242 /** \name Problems */
1243
1244 /**@{*/
1245
1246 /** \brief clear problem
1247 * \ingroup mofem_problems
1248 */
1249 virtual MoFEMErrorCode clear_problem(const std::string name,
1250 int verb = DEFAULT_VERBOSITY) = 0;
1251
1252 /** \brief clear problems
1253 * \ingroup mofem_problems
1254 */
1256
1257 /**
1258 * \brief add finite elements to the meshset
1259 * \ingroup mofem_problems
1260 *
1261 * \param name is problem name
1262 * \param fe_name
1263 * \param meshset
1264 */
1265 virtual MoFEMErrorCode
1267 const std::string &fe_name,
1268 const EntityHandle meshset) = 0;
1269
1270 /**@}*/
1271
1272 /** \name Making loops on elements and entities */
1273
1274 /**@{*/
1275
1276 /** \brief Set data for BasicMethod
1277 *
1278 * This function set data about problem, adjacencies and other multi-indices
1279 * in database. This function can be used a special case when user need to
1280 * do some pre- and post-processing before matrix or vector is initiated, or
1281 * to assemble matrix for group of FEMethods. Is used by classes
1282 * SnesCtx and TsCtx. Look for more details there.
1283 *
1284 * FIXME: Here we need example
1285 *
1286 * \param pointer to problem data structure
1287 * \param method user method derived from BasicMethod
1288 *
1289 **/
1290 virtual MoFEMErrorCode
1292 BasicMethod &method,
1293 int verb = DEFAULT_VERBOSITY) = 0;
1294
1295 /** \brief Set data for BasicMethod
1296 *
1297 * This function set data about problem, adjacencies and other multi-indices
1298 * in database. This function can be used a special case when user need to
1299 * do some pre- and post-processing before matrix or vector is initiated, or
1300 * to assemble matrix for group of FEMethods. Is used by classes
1301 * SnesCtx and TsCtx. Look for more details there.
1302 *
1303 * FIXME: Here we need example
1304 *
1305 * \param problem_name name of the problem
1306 * \param method user method derived from BasicMethod
1307 *
1308 **/
1309 virtual MoFEMErrorCode
1310 problem_basic_method_preProcess(const std::string &problem_name,
1311 BasicMethod &method,
1312 int verb = DEFAULT_VERBOSITY) = 0;
1313
1314 /** \brief Set data for BasicMethod
1315 * \ingroup mofem_loops
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 pointer to problem data structure
1326 * \param method user method derived from BasicMethod
1327 *
1328 **/
1329 virtual MoFEMErrorCode
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 problem_name name of the problem
1346 * \param method user method derived from BasicMethod
1347 *
1348 **/
1349 virtual MoFEMErrorCode
1350 problem_basic_method_postProcess(const std::string &problem_name,
1351 BasicMethod &method,
1352 int verb = DEFAULT_VERBOSITY) = 0;
1353
1354 /**
1355 * @brief Cache variables
1356 *
1357 * @param prb_name
1358 * @param cache_ptr
1359 * @return MoFEMErrorCode
1360 */
1361 virtual MoFEMErrorCode
1362 cache_problem_entities(const std::string prb_name,
1363 CacheTupleWeakPtr cache_ptr) = 0;
1364
1365 /** \brief Make a loop over finite elements.
1366 *
1367 * This function is like swiss knife, is can be used to post-processing or
1368 * matrix and vectors assembly. It makes loop over given finite element for
1369 * given
1370 * problem. The particular methods executed on each element are given by
1371 * class derived form Interface::FEMethod. At beginning of each loop user
1372 * defined function (method) preProcess() is called, for each element
1373 * operator() is
1374 * executed, at the end loop finalizes with user defined function (method)
1375 * postProcess().
1376 *
1377 * Methods are executed only for local elements at given processor.
1378 *
1379 * For more details pleas look to examples.
1380 *
1381 * \note If fe_ptr is given it is expected that multi-index is supbes of
1382 * problem multi-index. If this is not the case behavior of the code is
1383 * undetermined.
1384 *
1385 * @param problem_name problem consisting set of elements
1386 * @param fe_name name of element in problem
1387 * @param method class derived form Interface::FEMethod
1388 * @param fe_ptr pointer to finite elements multi-index
1389 * @param bh if bH = MF_EXIST, throws error if fe_name does not
1390 exist
1391 * @param cache_tuple_ptr cache
1392 * @param verb verbosity level
1393 * @return error code
1394
1395 * \ingroup mofem_loops
1396 **/
1398 const std::string &problem_name, const std::string &fe_name,
1399 FEMethod &method,
1400 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr = nullptr,
1401 MoFEMTypes bh = MF_EXIST,
1403 int verb = DEFAULT_VERBOSITY) = 0;
1404
1405 /** \brief Make a loop over finite elements on partitions from upper to
1406 lower rank.
1407 *
1408 * This function is like swiss knife, is can be used to post-processing or
1409 matrix
1410 * and vectors assembly. It makes loop over given finite element for given
1411 * problem. The particular methods executed on each element are given by
1412 * class derived form Interface::FEMethod. At beginning of each loop user
1413 defined
1414 * function (method) preProcess() is called, for each element operator() is
1415 * executed, at the end loop finalizes with user defined function (method)
1416 * postProcess().
1417 *
1418 * \note If fe_ptr is given it is expected that multi-index is supbes of
1419 * problem multi-index. If this is not the case behavior of the code is
1420 * undetermined.
1421 *
1422 * For more details please look to examples.
1423 *
1424 * Interface::FEMethod
1425
1426 * @param problem_ptr pointer to problem consisting set of elements
1427 * @param fe_name name of element in problem
1428 * @param method class derived form Interface::FEMethod
1429 * @param lower_rank lower rank of process owned by finite element
1430 * @param upper_rank lower rank of process owned by finite element
1431 * @param fe_ptr pointer to finite elements multi-index
1432 * @param bh if bH = MF_EXIST, throws error if fe_name does not
1433 exist
1434 * @param cache_data cache data vector
1435 * @param cache_row cache row vector
1436 * @param cache_col cache row vector
1437 * @param verb verbosity level
1438 * @return error code
1439
1440 * \ingroup mofem_loops
1441 **/
1443 const Problem *problem_ptr, const std::string &fe_name, FEMethod &method,
1444 int lower_rank, int upper_rank,
1445 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr = nullptr,
1446 MoFEMTypes bh = MF_EXIST,
1448 int verb = DEFAULT_VERBOSITY) = 0;
1449
1450 /** \brief Make a loop over finite elements on partitions from upper to
1451 lower rank.
1452 *
1453 * This function is like swiss knife, is can be used to post-processing or
1454 matrix
1455 * and vectors assembly. It makes loop over given finite element for given
1456 * problem. The particular methods executed on each element are given by
1457 * class derived form Interface::FEMethod. At beginning of each loop user
1458 defined
1459 * function (method) preProcess() is called, for each element operator() is
1460 * executed, at the end loop finalizes with user defined function (method)
1461 * postProcess().
1462 *
1463 * \note If fe_ptr is given it is expected that multi-index is supbes of
1464 * problem multi-index. If this is not the case behavior of the code is
1465 * undetermined.
1466 *
1467 * For more details please look to examples.
1468 *
1469 * @param problem_name pointer to problem consisting set of elements
1470 * @param fe_name name of element in problem
1471 * @param method class derived form Interface::FEMethod
1472 * @param lower_rank lower rank of process owned by finite element
1473 * @param upper_rank lower rank of process owned by finite element
1474 * @param fe_ptr pointer to finite elements multi-index
1475 * @param bh if bH = MF_EXIST, throws error if fe_name does not
1476 exist
1477 * @param cache_data cache data vector
1478 * @param cache_row cache row vector
1479 * @param cache_col cache row vector
1480 * @param verb verbosity level
1481 * @return error code
1482
1483 * \ingroup mofem_loops
1484 **/
1486 const std::string &problem_name, const std::string &fe_name,
1487 FEMethod &method, int lower_rank, int upper_rank,
1488 boost::shared_ptr<NumeredEntFiniteElement_multiIndex> fe_ptr = nullptr,
1489 MoFEMTypes bh = MF_EXIST,
1491 int verb = DEFAULT_VERBOSITY) = 0;
1492
1493 /** \brief Make a loop over dofs
1494
1495 * \ingroup mofem_loops
1496 */
1497 virtual MoFEMErrorCode loop_dofs(const Problem *problem_ptr,
1498 const std::string &field_name, RowColData rc,
1499 DofMethod &method, int lower_rank,
1500 int upper_rank,
1501 int verb = DEFAULT_VERBOSITY) = 0;
1502
1503 /** \brief Make a loop over dofs
1504
1505 * \ingroup mofem_loops
1506 */
1507 virtual MoFEMErrorCode loop_dofs(const std::string &problem_name,
1508 const std::string &field_name, RowColData rc,
1509 DofMethod &method, int lower_rank,
1510 int upper_rank,
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 std::string &problem_name,
1518 const std::string &field_name, RowColData rc,
1519 DofMethod &method,
1520 int verb = DEFAULT_VERBOSITY) = 0;
1521
1522 /** \brief Make a loop over dofs
1523
1524 * \ingroup mofem_field
1525 */
1526 virtual MoFEMErrorCode loop_dofs(const std::string &field_name,
1527 DofMethod &method,
1528 int verb = DEFAULT_VERBOSITY) = 0;
1529
1530 /**
1531 * @brief Loop over field entities
1532 * @ingroup mofem_field
1533 *
1534 * @param field_name field entities
1535 * @param method user method
1536 * @param ents if given loop only on subset of entities in the field
1537 * @param verb
1538 * @return MoFEMErrorCode
1539 */
1540 virtual MoFEMErrorCode loop_entities(const std::string field_name,
1541 EntityMethod &method,
1542 Range const *const ents = nullptr,
1543 int verb = DEFAULT_VERBOSITY) = 0;
1544
1545 /**
1546 * @brief Loop over field entities in the problem
1547 * @ingroup mofem_field
1548 *
1549 * @param problem_ptr
1550 * @param field_name
1551 * @param rc
1552 * @param method
1553 * @param lower_rank
1554 * @param upper_rank
1555 * @param verb
1556 * @return MoFEMErrorCode
1557 */
1558 virtual MoFEMErrorCode loop_entities(const Problem *problem_ptr,
1559 const std::string field_name,
1560 RowColData rc, EntityMethod &method,
1561 int lower_rank, int upper_rank,
1562 int verb = DEFAULT_VERBOSITY) = 0;
1563
1564 /**
1565 * @brief Loop over field entities in the problem
1566 * @ingroup mofem_field
1567 *
1568 * @param problem_name
1569 * @param field_name
1570 * @param rc
1571 * @param method
1572 * @param lower_rank
1573 * @param upper_rank
1574 * @param verb
1575 * @return MoFEMErrorCode
1576 */
1577 virtual MoFEMErrorCode loop_entities(const std::string problem_name,
1578 const std::string field_name,
1579 RowColData rc, EntityMethod &method,
1580 int lower_rank, int upper_rank,
1581 int verb = DEFAULT_VERBOSITY) = 0;
1582 /**
1583 * @brief Loop over field entities in the problem
1584 * @ingroup mofem_field
1585 *
1586 * @param problem_name
1587 * @param field_name
1588 * @param rc
1589 * @param method
1590 * @param verb
1591 * @return MoFEMErrorCode
1592 */
1593 virtual MoFEMErrorCode loop_entities(const std::string problem_name,
1594 const std::string field_name,
1595 RowColData rc, EntityMethod &method,
1596 int verb = DEFAULT_VERBOSITY) = 0;
1597
1598 /**@}*/
1599
1600 /** \name Get pointers to multi-index database */
1601
1602 /**@{*/
1603
1604 /**
1605 * @brief Get the fields object
1606 * @ingroup mofem_access
1607 *
1608 * @return const Field_multiIndex*
1609 */
1610 virtual const Field_multiIndex *get_fields() const = 0;
1611
1612 /**
1613 * @brief Get the ref ents object
1614 * @ingroup mofem_access
1615 *
1616 * @return const RefEntity_multiIndex*
1617 */
1618 virtual const RefEntity_multiIndex *get_ref_ents() const = 0;
1619
1620 /**
1621 * @brief Get the ref finite elements object
1622 * @ingroup mofem_access
1623 *
1624 * @return const RefElement_multiIndex*
1625 */
1627
1628 /**
1629 * @brief Get the finite elements object
1630 * @ingroup mofem_access
1631 *
1632 * @return const FiniteElement_multiIndex*
1633 */
1635
1636 /**
1637 * @brief Get the ents finite elements object
1638 * @ingroup mofem_access
1639 *
1640 * @return const EntFiniteElement_multiIndex*
1641 */
1642 virtual const EntFiniteElement_multiIndex *
1644
1645 /**
1646 * @brief Get the field ents object
1647 * @ingroup mofem_access
1648 *
1649 * @return const FieldEntity_multiIndex*
1650 */
1651 virtual const FieldEntity_multiIndex *get_field_ents() const = 0;
1652
1653 /**
1654 * @brief Get the dofs object
1655 * @ingroup mofem_access
1656 *
1657 * @return const DofEntity_multiIndex*
1658 */
1659 virtual const DofEntity_multiIndex *get_dofs() const = 0;
1660
1661 /**
1662 * @brief Get the problem object
1663 * @ingroup mofem_access
1664 *
1665 * @param problem_name
1666 * @return const Problem*
1667 */
1668 virtual const Problem *get_problem(const std::string problem_name) const = 0;
1669
1670 /**
1671 * @brief Get the problems object
1672 * @ingroup mofem_access
1673 *
1674 * @return const Problem_multiIndex*
1675 */
1676 virtual const Problem_multiIndex *get_problems() const = 0;
1677
1678 /**
1679 * @brief Get the dofs elements adjacency object
1680 *
1681 * @param dofs_elements_adjacency
1682 * @return MoFEMErrorCode
1683 */
1686 *dofs_elements_adjacency) const = 0;
1687
1688 /**
1689 * @brief Get the dofs elements adjacency object
1690 *
1691 * @return const FieldEntityEntFiniteElementAdjacencyMap_multiIndex*
1692 */
1695
1696 /** \brief Get fields multi-index from database
1697 * \ingroup mofem_access
1698 */
1699 virtual MoFEMErrorCode
1700 get_fields(const Field_multiIndex **fields_ptr) const = 0;
1701
1702 /** \brief Get ref entities multi-index from database
1703 * \ingroup mofem_access
1704 */
1705 virtual MoFEMErrorCode
1706 get_ref_ents(const RefEntity_multiIndex **refined_ents_ptr) const = 0;
1707
1708 /** \brief Get ref finite elements multi-index form database
1709 * \ingroup mofem_access
1710 */
1712 const RefElement_multiIndex **refined_finite_elements_ptr) const = 0;
1713
1714 /** \brief Get finite elements multi-index
1715 * \ingroup mofem_access
1716 */
1717 virtual MoFEMErrorCode
1719
1720 /** \brief Get entities finite elements multi-index
1721 * \ingroup mofem_access
1722 */
1724 const EntFiniteElement_multiIndex **fe_ent_ptr) const = 0;
1725
1726 /** \brief Get problem database (data structure)
1727 * \ingroup mofem_access
1728 */
1729 virtual MoFEMErrorCode get_problem(const std::string &problem_name,
1730 const Problem **problem_ptr) const = 0;
1731
1732 /**
1733 * \brief Get pointer to problems multi-index
1734 * \ingroup mofem_access
1735 */
1736 virtual MoFEMErrorCode
1737 get_problems(const Problem_multiIndex **problems_ptr) const = 0;
1738
1739 /** \brief Get field multi index
1740 *
1741 * \ingroup mofem_access
1742 *
1743 */
1744 virtual MoFEMErrorCode
1745 get_field_ents(const FieldEntity_multiIndex **field_ents) const = 0;
1746
1747 /** \brief Get dofs multi index
1748 *
1749 * \ingroup mofem_access
1750 *
1751 */
1752 virtual MoFEMErrorCode
1753 get_dofs(const DofEntity_multiIndex **dofs_ptr) const = 0;
1754
1755 /**
1756 * \brief get begin iterator of filed ents of given name (instead you can
1757 * use _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1758 *
1759 * \ingroup mofem_field
1760 *
1761 * for(_IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1762 * ...
1763 * }
1764 *
1765 * \param field_name
1766 */
1767 virtual FieldEntityByUId::iterator
1768 get_ent_field_by_name_begin(const std::string &field_name) const = 0;
1769
1770 /**
1771 * \brief get begin iterator of filed dofs of given name (instead you can
1772 * use _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1773 * \ingroup mofem_field
1774 *
1775 * for(_IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1776 * ...
1777 * }
1778 *
1779 * \param field_name
1780 */
1781 virtual FieldEntityByUId::iterator
1782 get_ent_field_by_name_end(const std::string &field_name) const = 0;
1783
1784 /** \brief loop over all dofs from a moFEM field and particular field
1785 * \ingroup mofem_field
1786 */
1787#define _IT_GET_ENT_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT) \
1788 auto IT = (MFIELD).get_ent_field_by_name_begin(NAME); \
1789 IT != (MFIELD).get_ent_field_by_name_end(NAME); \
1790 IT++
1791
1792 /**
1793 * \brief get begin iterator of filed dofs of given name (instead you can
1794 * use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1795 * \ingroup mofem_field
1796 *
1797 * for(_IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1798 * ...
1799 * }
1800 *
1801 * \param field_name
1802 */
1803 virtual DofEntityByUId::iterator
1804 get_dofs_by_name_begin(const std::string &field_name) const = 0;
1805
1806 /**
1807 * \brief get begin iterator of filed dofs of given name (instead you can
1808 * use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1809 * \ingroup mofem_field
1810 *
1811 * for(_IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1812 * ...
1813 * }
1814 *
1815 * \param field_name
1816 */
1817 virtual DofEntityByUId::iterator
1818 get_dofs_by_name_end(const std::string &field_name) const = 0;
1819
1820 /** loop over all dofs from a moFEM field and particular field
1821 * \ingroup mofem_field
1822 */
1823#define _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT) \
1824 DofEntityByUId::iterator IT = (MFIELD).get_dofs_by_name_begin(NAME); \
1825 IT != (MFIELD).get_dofs_by_name_end(NAME); \
1826 IT++
1827
1828 /**
1829 * \brief get begin iterator of filed dofs of given name and ent(instead you
1830 * can use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,ENT,IT)
1831 *
1832 * \ingroup mofem_field
1833 *
1834 * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_(MFIELD,NAME,ENT,IT)) {
1835 * ...
1836 * }
1837 *
1838 * \param field_name
1839 */
1840 virtual DofEntityByUId::iterator
1842 const EntityHandle ent) const = 0;
1843
1844 /**
1845 * \brief get begin iterator of filed dofs of given name and ent (instead
1846 * you can use _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,ENT,IT)
1847 * \ingroup mofem_field
1848 *
1849 * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_(MFIELD,NAME,ENT,IT)) {
1850 * ...
1851 * }
1852 *
1853 * \param field_name
1854 */
1855 virtual DofEntityByUId::iterator
1857 const EntityHandle ent) const = 0;
1858
1859 /** \brief loop over all dofs from a moFEM field and particular field
1860 * \ingroup mofem_access
1861 */
1862#define _IT_GET_DOFS_FIELD_BY_NAME_AND_ENT_FOR_LOOP_(MFIELD, NAME, ENT, IT) \
1863 DofEntityByUId::iterator IT = \
1864 (MFIELD).get_dofs_by_name_and_ent_begin(NAME, ENT); \
1865 IT != (MFIELD).get_dofs_by_name_and_ent_end(NAME, ENT); \
1866 IT++
1867
1868 /**
1869 * \brief get begin iterator of filed dofs of given name and ent type
1870 * (instead you can use
1871 * _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,TYPE,IT)
1872 *
1873 * \ingroup mofem_field
1874 *
1875 * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_(MFIELD,NAME,TYPE,IT)) {
1876 * ...
1877 * }
1878 *
1879 * \param field_name
1880 */
1881 virtual DofEntityByUId::iterator
1883 const EntityType type) const = 0;
1884
1885 /**
1886 * \brief get begin iterator of filed dofs of given name end ent
1887 * type(instead you can use
1888 * _IT_GET_DOFS_FIELD_BY_NAME_FOR_LOOP_(MFIELD,NAME,TYPE,IT)
1889 *
1890 * \ingroup mofem_field
1891 *
1892 * for(_IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_(MFIELD,NAME,TYPE,IT)) {
1893 * ...
1894 * }
1895 *
1896 * \param field_name
1897 */
1898 virtual DofEntityByUId::iterator
1900 const EntityType type) const = 0;
1901
1902 /** \brief loop over all dofs from a moFEM field and particular field
1903 * \ingroup mofem_field
1904 */
1905#define _IT_GET_DOFS_FIELD_BY_NAME_AND_TYPE_FOR_LOOP_(MFIELD, NAME, TYPE, IT) \
1906 DofEntityByUId::iterator IT = \
1907 (MFIELD).get_dofs_by_name_and_type_begin(NAME, TYPE); \
1908 IT != (MFIELD).get_dofs_by_name_and_type_end(NAME, TYPE); \
1909 IT++
1910
1911 /**
1912 * \brief get begin iterator of finite elements of given name (instead you
1913 * can use _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1914 *
1915 * \ingroup mofem_access
1916 *
1917 * for(_IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1918 * ...
1919 * }
1920 *
1921 * \param fe_name
1922 */
1923 virtual EntFiniteElementByName::iterator
1924 get_fe_by_name_begin(const std::string &fe_name) const = 0;
1925
1926 /**
1927 * \brief get end iterator of finite elements of given name (instead you can
1928 * use _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)
1929 *
1930 * \ingroup mofem_access
1931 *
1932 * for(_IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD,NAME,IT)) {
1933 * ...
1934 * }
1935 *
1936 * \param fe_name
1937 */
1938 virtual EntFiniteElementByName::iterator
1939 get_fe_by_name_end(const std::string &fe_name) const = 0;
1940
1941 /** \brief loop over all finite elements from a moFEM field and FE
1942 * \ingroup mofem_access
1943 */
1944#define _IT_GET_FES_BY_NAME_FOR_LOOP_(MFIELD, NAME, IT) \
1945 EntFiniteElementByName::iterator IT = (MFIELD).get_fe_by_name_begin(NAME); \
1946 IT != (MFIELD).get_fe_by_name_end(NAME); \
1947 IT++
1948};
1949} // namespace MoFEM
1950
1952
1953namespace MoFEM {
1954
1956
1957} // namespace MoFEM
1958
1959#endif // __INTERFACE_HPP__
1960
1961/**
1962 * \defgroup mofem_field Fields
1963 * \brief Data structure for adding and managing fields
1964 *
1965 * \ingroup mofem
1966 ******************************************************************************/
1967
1968/**
1969 * \defgroup mofem_ref_ents Get entities and adjacencies
1970 * \brief Get adjacencies/entities for given BitRefLevel (mesh refinement)
1971 *
1972 * \ingroup mofem
1973 ******************************************************************************/
1974
1975/**
1976 * \defgroup mofem_fe Finite elements
1977 * \brief Adding and managing finite elements
1978 *
1979 * \ingroup mofem
1980 ******************************************************************************/
1981
1982/**
1983 * \defgroup mofem_problems Problems
1984 * \brief Adding and managing problems
1985 *
1986 * \ingroup mofem
1987 ******************************************************************************/
1988
1989/**
1990 * \defgroup mofem_loops Loops
1991 * \brief Manages complexities for integrating over finite elements and dofs.
1992 *
1993 * \ingroup mofem
1994 ******************************************************************************/
1995
1996/**
1997 * \defgroup mofem_access Pointers to multi-indices
1998 * \brief Get direct access to multi-indices in database
1999 *
2000 * \ingroup mofem
2001 ******************************************************************************/
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
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 > >, ordered_non_unique< tag< FiniteElement_name_mi_tag >, const_mem_fun< EntFiniteElement::interface_type_FiniteElement, boost::string_ref, &EntFiniteElement::getNameRef > >, 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::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 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 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 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 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 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_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_row(const std::string &fe_name, const std::string &name_row)=0
unset field row which finite element use
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 add_finite_element(const std::string &fe_name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
add finite element
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 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 MoFEMErrorCode build_finite_elements(int verb=DEFAULT_VERBOSITY)=0
Build finite elements.
virtual EntityHandle get_finite_element_meshset(const std::string &name) const =0
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 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_data(const std::string &fe_name, const std::string &name_filed)=0
set finite element field data
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 modify_finite_element_off_field_data(const std::string &fe_name, const std::string &name_filed)=0
unset finite element field data
virtual MoFEMErrorCode list_dofs_by_field_name(const std::string &name) const =0
virtual MoFEMErrorCode build_fields(int verb=DEFAULT_VERBOSITY)=0
virtual Field * get_field_structure(const std::string &name)=0
get field structure
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 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 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 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_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 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 problem_basic_method_postProcess(const std::string &problem_name, BasicMethod &method, int verb=DEFAULT_VERBOSITY)=0
Set data for BasicMethod.
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 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
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 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 add_problem(const std::string &name, enum MoFEMTypes bh=MF_EXCL, int verb=DEFAULT_VERBOSITY)=0
Add problem.
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
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 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 MoFEMErrorCode clear_finite_elements(const Range ents, int verb=DEFAULT_VERBOSITY)=0
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 clear_finite_elements(const std::string name, const Range ents, int verb=DEFAULT_VERBOSITY)=0
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 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 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.
Interface for managing meshsets containing materials and boundary conditions.
keeps basic data about problem
base class for all interface classes