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