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