v0.8.23
DeprecatedCoreInterface.hpp
Go to the documentation of this file.
1 /** \file DeprecatedCoreInterface.hpp
2  * \brief Deprecated interface functions
3  */
4 
5 /*
6  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
7  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
9  * License for more details.
10  *
11  * You should have received a copy of the GNU Lesser General Public
12  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
13  */
14 
15 #ifndef __INTERFACE_DEPRECATED_HPP__
16 #define __INTERFACE_DEPRECATED_HPP__
17 
18 /** \brief name space of MoFEM library functions and classes
19  */
20 namespace MoFEM {
21 
22 /**
23  * \brief Deprecated interface functions
24  * \nosubgrouping
25  */
27 
28  /** \name Interfaces */
29 
30  /**@{*/
31 
32  template <class IFace>
35  ierr = getInterface(ptr);
36  CHKERRG(ierr);
38  }
39 
40  template <class IFace> DEPRECATED IFace *query_interface() const {
41  IFace *tmp_ptr;
42  ierr = getInterface(tmp_ptr);
43  CHKERRABORT(PETSC_COMM_SELF, ierr);
44  return tmp_ptr;
45  }
46 
47  /**@}*/
48 
49  /**@}*/
50 
51  /** \name Seed entities */
52 
53  /**@{*/
54 
55  /** \deprecated use BitRefManager
56  * \brief seed 2D entities (Triangles entities only) in the meshset and their
57  * adjacencies (only TRIs adjacencies) in a particular BitRefLevel \todo
58  * Should be outsourced to separate interface, i.e. BitLevelManager
59  *
60  * \param EntityHandle MeshSet
61  * \param BitRefLevel bitLevel
62  *
63  */
65  seed_ref_level_2D(const EntityHandle meshset, const BitRefLevel &bit,
66  int verb = -1);
67 
68  /** \deprecated use BitRefManager
69  * \brief seed 2D entities in the meshset and their adjacencies (only TETs
70  adjacencies) in a particular BitRefLevel
71  * \todo Should be outsourced to separate interface, i.e. BitLevelManager
72  *
73  * \param EntityHandle MeshSet
74  * \param BitRefLevel bitLevel
75  *
76  * \brief Example:\code
77  EntityHandle meshset1; //contains ent1,ent2,ent3
78  BitRefLevel myLevel0;
79  myLevel0.set(0);
80  seed_ref_level_3D(meshset1,myLevel0);
81  //refine meshset1 into meshset2 and get new ents which are ent4, ent5
82  EntityHandle meshset2; //contains ent1,ent2,ent3,ent4,ent5
83  BitRefLevel myLevel1;
84  myLevel1.set(1);
85  seed_ref_level_3D(meshset2,myLevel1); \endcode
86 
87  * So entities 1,2,3 would be assigned to bit level 0 and 1 <br>
88  * ent1[1,1,0,0,0,0,0], ent2[1,1,0,0,0,0,0], ent3[1,1,0,0,0,0,0], <br>
89  * and entities 4 and 5 are assigned to bit level 1 only <br>
90  * ent4[0,1,0,0,0,0,0], ent5[0,1,0,0,0,0,0] <br>
91  *
92  */
94  const BitRefLevel &bit,
95  int verb = -1);
96 
97  /** \deprecated use BitRefManager
98  * \brief seed entities in the range and their adjacencies in a particular
99  * BitRefLevel \todo Should be outsourced to separate interface, i.e.
100  * BitLevelManager
101  */
102  DEPRECATED MoFEMErrorCode seed_ref_level(const Range &ents,
103  const BitRefLevel &bit,
104  const bool only_tets = true,
105  int verb = -1);
106 
107  /** \deprecated use BitRefManager
108  * brief seed ref level by MESHSET that contains entities other than volumes
109  *
110  * \param EntityHandle MeshSet
111  * \param BitRefLevel bitLevel
112  */
114  const BitRefLevel &bit,
115  int verb = -1);
116 
117  /** \deprecated use BitRefManager and setElementsBitRefLevel
118  * Create finite elements based from entities in meshsets. Throw error if
119  * entity is not in database \todo Should be outsourced to separate
120  * interface, i.e. BitLevelManager
121  *
122  * \param EntityHandle meshset
123  *
124  */
126  int verb = -1);
127 
128  /** \deprecated use BitRefManager and setElementsBitRefLevel
129  * Create finite elements based from entities in meshsets. Throw error if
130  * entity is not in database \todo Should be outsourced to separate
131  * interface, i.e. BitLevelManager
132  *
133  * \param Range entities
134  *
135  */
136  DEPRECATED MoFEMErrorCode seed_finite_elements(const Range &entities,
137  int verb = -1);
138 
139  /**@}*/
140 
141  /** \name Getting entities by BitRefLevel */
142 
143  /**@{*/
144 
145  /**\brief add all ents from ref level given by bit to meshset
146  * \deprecated Use MoFEM::BitRefManager interface instead
147  * \ingroup mofem_ref_ents
148  *
149  * \param BitRefLevel bitLevel
150  * \param BitRefLevel mask
151  * \param EntityType type of entities
152  * \retval EntityHandle meshset
153  *
154  */
156  const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type,
157  const EntityHandle meshset, int verb = -1);
158 
159  /**\brief add all ents from ref level given by bit to meshset
160  * \deprecated Use MoFEM::BitRefManager interface instead
161  * \ingroup mofem_ref_ents
162  *
163  * \param BitRefLevel bitLevel
164  * \param BitRefLevel mask
165  * \param EntityType type of entities
166  * \retval ents
167  *
168  */
170  const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type,
171  Range &ents, int verb = -1);
172 
173  /**\brief add all ents from ref level given by bit to meshset
174  * \deprecated Use MoFEM::BitRefManager interface instead
175  * \ingroup mofem_ref_ents
176  *
177  * \param BitRefLevel bitLevel
178  * \param BitRefLevel mask
179  * \param EntityHandle meshset
180  *
181  */
183  get_entities_by_ref_level(const BitRefLevel &bit, const BitRefLevel &mask,
184  const EntityHandle meshset);
185 
186  /**\brief add all ents from ref level given by bit to meshset
187  * \ingroup mofem_ref_ents
188  * \deprecated Use MoFEM::BitRefManager interface instead
189  *
190  * \param BitRefLevel bitLevel
191  * \param BitRefLevel mask
192  * \retval ents
193  */
195  const BitRefLevel &mask,
196  Range &ents);
197 
198  /**@}*/
199 
200  /**@}*/
201 
202  /** \name Mange meshest */
203 
204  /**@{*/
205 
206  /**
207  * \brief check for CUBIT Id and CUBIT type
208 
209  \deprecated use MeshsetsManager
210  \todo All cubit interface functions should be outsourced to dedicated
211  interface
212 
213  * \param msId id of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
214  * \param see CubitBC (NODESET, SIDESET or BLOCKSET and more)
215  */
216  DEPRECATED bool check_msId_meshset(const int msId,
217  const CubitBCType cubit_bc_type);
218 
219  /**
220  * \brief add cubit meshset
221 
222  \deprecated use MeshsetsManager
223 
224  * \param see CubitBC (NODESET, SIDESET or BLOCKSET and more)
225  * \param ms_id id of the BLOCKSET/SIDESET/BLOCKSET
226  * \param name of set
227 
228  */
230  const int msId,
231  const std::string name = "");
232 
233  /**
234  * \brief set attributes to cubit meshset
235 
236  \deprecated use MeshsetsManager
237 
238  * @param cubit_bc_type type of meshset, see CubitBC, i.e. BLOCKSET, NODESET,
239  SIDESET
240  * @param ms_id id of meshset
241  * @param attributes attributes
242  * @return error code
243  */
245  const CubitBCType cubit_bc_type, const int ms_id,
246  const std::vector<double> &attributes, const std::string name = "");
247 
248  /**
249  * \brief set (material) data structure to cubit meshset
250 
251  \deprecated use MeshsetsManager
252  \todo All cubit interface functions should be outsourced to dedicated
253  interface
254 
255  * @param cubit_bc_type type of meshset, see CubitBC, i.e. BLOCKSET, NODESET,
256  SIDESET
257  * @param ms_id id of meshset
258  * @param attributes attributes
259  * @return error code
260  */
262  const CubitBCType cubit_bc_type, const int ms_id,
263  const GenericAttributeData &data, const std::string name = "");
264 
265  /**
266  * \brief set boundary data structure to meshset
267 
268  \deprecated use MeshsetsManager
269  \todo All cubit interface functions should be outsourced to dedicated
270  interface
271 
272  * @param cubit_bc_type type of meshset, see CubitBC, i.e. BLOCKSET, NODESET,
273  SIDESET
274  * @param ms_id id of meshset
275  * @param data data structure
276  * @return error code
277  */
279  const CubitBCType cubit_bc_type, const int ms_id,
280  const GenericCubitBcData &data);
281 
282  /**
283  * \brief delete cubit meshset
284  * \ingroup mopfem_bc
285 
286  \deprecated use MeshsetsManager
287  \todo All cubit interface functions should be outsourced to dedicated
288  interface
289 
290  * \param see CubitBC (NODESET, SIDESET or BLOCKSET and more)
291  * \param msId id of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
292  *
293  */
295  const int msId);
296 
297  /**
298  * \brief get cubit meshset
299 
300  \deprecated use MeshsetsManager
301  \todo All cubit interface functions should be outsourced to dedicated
302  interface
303 
304  */
306  get_cubit_msId(const int msId, const CubitBCType cubit_bc_type,
307  const CubitMeshSets **cubit_meshset_ptr);
308 
310  const int ms_id, const CubitBCType cubit_bc_type, const int dimension,
311  Range &entities, const bool recursive = false);
313  const int ms_id, const CubitBCType cubit_bc_type, Range &entities,
314  const bool recursive = false);
315  // DEPRECATED MoFEMErrorCode get_cubit_msId_entities_by_dimension(
316  // const int ms_id,const unsigned int cubit_bc_type, const int
317  // dimension,Range &entities,const bool recursive = false
318  // );
319  // DEPRECATED MoFEMErrorCode get_cubit_msId_entities_by_dimension(
320  // const int ms_id,const unsigned int cubit_bc_type, Range &entities,const
321  // bool recursive = false
322  // );
323 
324  /**
325  * \brief get entities from CUBIT/meshset of a particular entity dimension
326 
327  * Nodeset can contain nodes, edges, triangles and tets. This applies to other
328  meshsets too.
329  * The nodeset's meshset contain the nodes in the MIDDLE of the surface or
330  volume which is done by default in Cubit,
331  * Hence if all nodes on a particular nodeset are required,
332  * one should get all triangles or tetrahedron for which the nodeset was create
333  in Cubit,
334  * and get all the connectivities of tris/tets.
335 
336  \deprecated use MeshsetsManager
337  \todo All cubit interface functions should be outsourced to dedicated
338  interface
339 
340  \code
341  MeshsetsManager *meshset_manager_ptr;
342  ierr = m_field.getInterface(meshset_manager_ptr); CHKERRG(ierr);
343  ierr =
344  meshset_manager_ptr->getEntitiesByDimension(ms_id,cubit_bc_type,dimension,entities,true);
345  CHKERRG(ierr); \endcode
346 
347  * \param msId id of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
348  * \param see CubitBC (NODESET, SIDESET or BLOCKSET and more)
349  * \param dimensions (0 - Nodes, 1 - Edges, 2 - Faces, 3 - Volume(tetrahedral))
350  * \param Range containing the retreived entities
351  * \param recursive If true, meshsets containing meshsets are queried
352  recursively. Returns the contents of meshsets, but not the meshsets themselves
353  if true.
354  */
356  const int msId, const unsigned int cubit_bc_type, const int dimension,
357  Range &entities, const bool recursive = false);
358 
359  /**
360  * \brief get entities related to CUBIT/meshset,
361 
362  * NODESET will get Vertices only, even if the NODESET contains edges, tris and
363  tets
364  * SIDESET will get Tris, BLOCKSET will get Tets, DISPLACEMENTSET and FORCESET
365  are stored in NODESET, PRESSURESET is stored in Sideset.
366 
367  \deprecated use MeshsetsManager
368  \todo All cubit interface functions should be outsourced to dedicated
369  interface
370 
371  * \param msId id of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
372  * \param see CubitBC (NODESET, SIDESET or BLOCKSET and more)
373  * \param Range containing the retreived entities related to the
374  * \param recursive If true, meshsets containing meshsets are queried
375  recursively. Returns the contents of meshsets, but not the meshsets
376  themselves if true.
377  */
379  const int msId, const unsigned int cubit_bc_type, Range &entities,
380  const bool recursive = false);
381 
382  /**
383  * \brief get meshset from CUBIT Id and CUBIT type
384 
385  \deprecated use MeshsetsManager
386  \todo All cubit interface functions should be outsourced to dedicated
387  interface
388 
389  * \param msId id of the BLOCKSET/SIDESET/BLOCKSET: from CUBIT
390  * \param see CubitBC (NODESET, SIDESET or BLOCKSET and more)
391  * \param meshset where to store the retrieved entities
392  */
394  const int msId, const unsigned int cubit_bc_type, EntityHandle &meshset);
395 
396  /**
397  * \brief get all CUBIT meshsets by CUBIT type
398 
399  \deprecated use MeshsetsManager
400  \todo All cubit interface functions should be outsourced to dedicated
401  interface
402 
403  * \param see CubitBC (NODESET, SIDESET or BLOCKSET and more).
404  * \param meshsets is range of meshsets
405  */
406  DEPRECATED MoFEMErrorCode get_cubit_meshsets(const unsigned int cubit_bc_type,
407  Range &meshsets);
408 
409  /** \deprecated use MeshsetsManager interface instead
410  */
412 
413  /** \deprecated use MeshsetsManager interface instead
414  */
416 
417  /** \deprecated use MeshsetsManager interface instead
418  */
420 
421  /** \deprecated use MeshsetsManager interface instead
422  */
424 
425  /**@}*/
426 
427  /** \name Updating entities (DO NOT USE THIS USE BitRefManager interface)*/
428 
429  /**@{*/
430 
431  /** \brief Get child entities form meshset containing parent entities
432  * \deprecated do not us this use BitRefManager interface
433  *
434  * Search for refined entities of given type whose parent are entities in the
435  * parent meshset. It can be used for example to transfer information about
436  * boundary conditions to refined mesh or split mesh by interface
437  * elements. It is used by function refine_MESHSET, to update MESHSET finite
438  *elements.
439  *
440  * \param parent meshset
441  * \param child_bit refinement level
442  * \param type of refined entity
443  * \param child_type meshset where child entities are stored (if the child
444  *meshset is set to be the parent meshset, the parent would be updated with
445  *the refined entities) \param recursive if true parent meshset is searched
446  *recursively
447  *
448  **/
450  const EntityHandle parent, const BitRefLevel &child_bit,
451  const EntityHandle child, EntityType child_type,
452  const bool recursive = false, int verb = -1);
453 
454  /** \brief update fields meshesets by child entities
455  * \deprecated do not us this use BitRefManager interface
456  * \ingroup mofem_field
457  */
459  const BitRefLevel &child_bit, int verb = -1);
460 
461  /** \brief update field mesheset by child entities
462  * \deprecated do not us this use BitRefManager interface
463  * \ingroup mofem_field
464  */
466  const std::string name, const BitRefLevel &child_bit, int verb = -1);
467 
468  /** \brief update finite element mesheset by child entities
469  * \deprecated do not us this use BitRefManager interface
470  */
472  const std::string name, const BitRefLevel &child_bit,
473  const EntityType fe_ent_type, int verb = -1);
474 
475  /**@}*/
476 
477  /**@}*/
478 
479  /** \name Shift BitRefLevl */
480 
481  /**@{*/
482 
483  /** \deprecated use BitRefManager to do this operation
484  * \brief right shift bit ref level
485  * \todo Should be outsourced to separate interface, i.e. BitLevelManage
486  */
487  DEPRECATED MoFEMErrorCode shift_right_bit_ref(const int shift, int verb = -1);
488 
489  /**@}*/
490 
491  /** \brief add EDGES entities from range to finite element database given by
492  * name \ingroup mofem_fe
493  *
494  * \deprecated use add_ents_to_finite_element_by_type
495  *
496  * \param range contains tetrahedron
497  * \param name Finite Element name
498  */
499  DEPRECATED virtual MoFEMErrorCode
500  add_ents_to_finite_element_by_EDGEs(const Range &edge,
501  const std::string &name) = 0;
502 
503  /**
504  * \brief add EDGES finite elements
505  *
506  * \deprecated use add_ents_to_finite_element_by_type
507  *
508  * @param meshset
509  * @param name name of finite element
510  * @param recursive take entities from meshsets in meshset
511  * @return error code
512  */
513  DEPRECATED virtual MoFEMErrorCode
515  const std::string &name,
516  const bool recursive = false) = 0;
517 
518  /** \brief add VERTICES entities from range to finite element database given
519  * by name \ingroup mofem_fe
520  *
521  * \deprecated use add_ents_to_finite_element_by_type
522  *
523  * \param range contains tetrahedron
524  * \param name Finite Element name
525  */
526  DEPRECATED virtual MoFEMErrorCode
527  add_ents_to_finite_element_by_VERTICEs(const Range &vert,
528  const std::string &name) = 0;
529 
530  /** \brief add TRI entities from range to finite element database given by
531  * name \ingroup mofem_fe
532  *
533  * \deprecated use add_ents_to_finite_element_by_type
534  *
535  * \param range contains tetrahedron
536  * \param name Finite Element name
537  */
538  DEPRECATED virtual MoFEMErrorCode
539  add_ents_to_finite_element_by_TRIs(const Range &tris,
540  const std::string &name) = 0;
541 
542  /** \brief add TRI entities from meshset to finite element database given by
543  * name \ingroup mofem_fe
544  *
545  * \deprecated use add_ents_to_finite_element_by_type
546  *
547  * \param range contains tetrahedron
548  * \param name Finite Element name
549  * \param recursive if true parent meshset is searched recursively
550  */
551  DEPRECATED virtual MoFEMErrorCode
553  const std::string &name,
554  const bool recursive = false) = 0;
555 
556  /** \brief add TET entities from range to finite element database given by
557  * name \ingroup mofem_fe
558  *
559  * \deprecated use add_ents_to_finite_element_by_type
560  *
561  * \param range contains tetrahedron
562  * \param name Finite Element name
563  */
564  DEPRECATED virtual MoFEMErrorCode
565  add_ents_to_finite_element_by_TETs(const Range &tets,
566  const std::string &name) = 0;
567 
568  /** \brief add TET entities from meshset to finite element database given by
569  * name \ingroup mofem_fe
570  *
571  * \deprecated use add_ents_to_finite_element_by_type
572  *
573  * \param meshset contains tetrahedron
574  * \param name Finite Element name
575  * \param recursive if true parent meshset is searched recursively
576  */
577  DEPRECATED virtual MoFEMErrorCode
579  const std::string &name,
580  const bool recursive = false) = 0;
581 
582  /** \brief add PRISM entities from meshset to finite element database given by
583  * name \ingroup mofem_fe
584  *
585  * \deprecated use add_ents_to_finite_element_by_type
586  *
587  * \param range contains tetrahedron
588  * \param name Finite Element name
589  */
590  DEPRECATED virtual MoFEMErrorCode
591  add_ents_to_finite_element_by_PRISMs(const Range &prims,
592  const std::string &name) = 0;
593 
594  /** \brief add TET entities from meshset to finite element database given by
595  * name \ingroup mofem_fe
596  *
597  * \deprecated use add_ents_to_finite_element_by_type
598  *
599  * \param meshset contains tetrahedron
600  * \param name Finite Element name
601  * \param recursive if true parent meshset is searched recursively
602  */
603  DEPRECATED virtual MoFEMErrorCode
605  const std::string &name,
606  const bool recursive = false) = 0;
607 
608  /** \brief add TET elements from given refinement level to finite element
609  * database given by name \ingroup mofem_fe
610  *
611  * \deprecated use add_ents_to_finite_element_by_bit_ref with mask explicitly
612  * given
613  *
614  * \param BitRefLevel bit
615  * \param finite element name
616  * \param finite elenent type
617  * \param verrbose level
618  */
619  DEPRECATED virtual MoFEMErrorCode
621  const std::string &name,
622  EntityType type,
623  int verb = -1) = 0;
624 
625  /** \brief add TET entities from given refinement level to finite element
626  * database given by name \ingroup mofem_fe
627  *
628  * \deprecated use add_ents_to_finite_element_by_bit_ref with mask explicitly
629  * given
630  *
631  * \param BitRefLevel bit
632  * \param BitRefLevel mask
633  * \param finite element name
634  * \param finite element type
635  * \param verrbose level
636  */
637  DEPRECATED virtual MoFEMErrorCode
639  const BitRefLevel &mask,
640  const std::string &name,
641  EntityType type,
642  int verb = -1) = 0;
643 
644  /** \name Build problems (DEPRECATED SHOULD NOT USE THIS)*/
645 
646  /**@{*/
647 
648  /** \brief build problem data structures
649  *
650  * \note If square_matrix is set to true, that indicate that problem is
651  structurally
652  * symmetric, i.e. rows and columns have the same dofs and are indexed in the
653  same
654  * way.
655 
656  \deprecated Use ProblemsManager to build and partition problems
657 
658  *
659  * @param problem pointer
660  * @param square_matrix structurally symmetric problem
661  * @param verb verbosity level
662  * @return error code
663  *
664  */
665  DEPRECATED MoFEMErrorCode build_problem(const std::string &name,
666  const bool square_matrix,
667  int verb = -1);
668 
669  /** \brief build problem data structures
670  *
671  * \note If square_matrix is set to true, that indicate that problem is
672  structurally
673  * symmetric, i.e. rows and columns have the same dofs and are indexed in the
674  same
675  * way.
676 
677  \deprecated Use ProblemsManager to build and partition problems
678 
679  * @param name problem name
680  * @param square_matrix structurally symmetric problem
681  * @param verb verbosity level
682  * @return error code
683  *
684  */
686  const bool square_matrix,
687  int verb = -1);
688 
689  /** \brief build problem data structures
690 
691  \deprecated Use MoFEM::Interface::build_problem(const std::string &name,const
692  bool square_matrix,int verb = -1) instead. This function not allows to Control
693  if problem is structurally symmetric.
694 
695  */
696  DEPRECATED virtual MoFEMErrorCode build_problems(int verb = -1) = 0;
697 
698  /** \brief build problem data structures, assuming that mesh is distributed
699  (collective)
700 
701  \deprecated Use ProblemsManager to build and partition problems
702 
703  Mesh is distributed, that means that each processor keeps only own part of
704  the mesh and shared entities.
705 
706  Collective - need to be run on all processors in communicator, i.e. each
707  function has to call this function.
708 
709  */
711  const std::string &name, const bool square_matrix = true, int verb = -1);
712 
713  /** \brief build problem data structures, assuming that mesh is distributed
714  (collective)
715 
716  \deprecated Use ProblemsManager to build and partition problems
717 
718  Mesh is distributed, that means that each processor keeps only own part of
719  the mesh and shared entities.
720 
721  Collective - need to be run on all processors in communicator, i.e. each
722  function has to call this function.
723 
724  */
726  Problem *problem_ptr, const bool square_matrix = true, int verb = -1);
727 
728  /** \brief build problem data structures, assuming that mesh is distributed
729  (collective)
730 
731  \deprecated Use ProblemsManager to build and partition problems
732 
733  Mesh is distributed, that means that each processor keeps only own part of
734  the mesh and shared entities.
735 
736  Collective - need to be run on all processors in communicator, i.e. each
737  function has to call this function.
738 
739  */
740  DEPRECATED virtual MoFEMErrorCode
741  build_problem_on_distributed_mesh(int verb = -1) = 0;
742 
743  /**
744  * \brief Set partition tag to each finite element in the problem
745  *
746  * This will use one of the mesh partitioning programs available from PETSc
747  * See
748  * <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Mat/MatPartitioningType.html>
749  *
750  * @param ents Entities to partition
751  * @param dim Dimension of entities to partition
752  * @param adj_dim Adjacency dimension
753  * @param n_parts Number of partitions
754  * @param verb Verbosity level
755  * @return Error code
756  */
757  DEPRECATED MoFEMErrorCode partition_mesh(const Range &ents, const int dim,
758  const int adj_dim, const int n_parts,
759  int verb = -1);
760 
761  /** \brief partition problem dofs
762 
763  \deprecated Use ProblemsManager to build and partition problems
764 
765  *
766  * \param name problem name
767  */
768  DEPRECATED MoFEMErrorCode partition_simple_problem(const std::string &name,
769  int verb = -1);
770 
771  /** \brief partition problem dofs (collective)
772 
773  \deprecated Use ProblemsManager to build and partition problems
774 
775  *
776  * \param name problem name
777  */
778  DEPRECATED MoFEMErrorCode partition_problem(const std::string &name,
779  int verb = -1);
780 
781  /**
782  * \brief build indexing and partition problem inheriting indexing and
783  partitioning from two other problems
784  *
785  \deprecated Use ProblemsManager to build and partition problems
786  * \param name problem name
787  * \param problem_for_rows problem used to index rows
788  * \param copy_rows just copy rows dofs
789  * \param problem_for_cols problem used to index cols
790  * \param copy_cols just copy cols dofs
791  *
792  * If copy_rows/copy_cols is set to false only partition is copied between
793  problems.
794  *
795  */
797  const std::string &name, const std::string &problem_for_rows,
798  const bool copy_rows, const std::string &problem_for_cols,
799  const bool copy_cols, int verb = -1);
800 
801  /**
802  * \brief build sub problem
803 
804  \deprecated Use ProblemsManager to build and partition problems
805 
806  * @param out_name problem
807  * @param fields_row vector of fields composing problem
808  * @param fields_col vector of fields composing problem
809  * @param main_problem main problem
810  * @return error code
811  */
813  const std::string &out_name, const std::vector<std::string> &fields_row,
814  const std::vector<std::string> &fields_col,
815  const std::string &main_problem, const bool square_matrix = true,
816  int verb = -1);
817 
818  /** \brief determine ghost nodes
819  * \ingroup mofem_field
820  * \deprecated Use ProblemsManager to build and partition problems
821  *
822  * \param name problem name
823  */
824  DEPRECATED MoFEMErrorCode partition_ghost_dofs(const std::string &name,
825  int verb = -1);
826 
827  /** \brief partition finite elements
828  *
829  * Function which partition finite elements based on dofs partitioning.<br>
830  * In addition it sets information about local row and cols dofs at given
831  * element on partition.
832  *
833  * \deprecated Use ProblemsManager to build and partition problems
834  *
835  * \param name problem name
836  */
838  const std::string &name, bool part_from_moab = false, int low_proc = -1,
839  int hi_proc = -1, int verb = -1);
840 
841  /** \deprecated use ProblemsManager
842  * \brief Get layout of elements in the problem
843  * \ingroup mofem_problems
844  *
845  * In layout is stored information how many elements is on each processor, for
846  * more information look int petsc documentation
847  * <http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/IS/PetscLayoutCreate.html#PetscLayoutCreate>
848  *
849  * @param name problem name
850  * @param fe_name finite elements
851  * @param layout layout
852  * @param verb verbosity level
853  * @return error code
854  */
856  const std::string &name, const std::string &fe_name, PetscLayout *layout,
857  int verb = -1);
858 
859  /**@}*/
860 
861  /** \name Create vectors */
862 
863  /**@{*/
864 
865  /** \deprecated use VecManager
866  * \brief create local vector for problem
867  * \ingroup mofem_vectors
868  *
869  * \param name problem name
870  * \param RowColData specify what data is taken from Row, Col or Data
871  * \param Vec the vector where data is stored
872  */
873  DEPRECATED MoFEMErrorCode VecCreateSeq(const std::string &name, RowColData rc,
874  Vec *V) const;
875 
876  /** \deprecated use VecManager
877  * \brief create ghost vector for problem (collective)
878  * \ingroup mofem_vectors
879 
880  collective - need to be run on all processors in communicator
881 
882  * \param name problem name
883  * \param RowColData specify what data is taken from Row, Col or Data
884  * \param Vec the vector where data is stored
885  */
886  DEPRECATED MoFEMErrorCode VecCreateGhost(const std::string &name,
887  RowColData rc, Vec *V) const;
888 
889  /**@}*/
890 
891  /** \name Create IS */
892 
893  /**@{*/
894 
895  /** \deprecated Use ISManager
896  * \brief create IS for give two problems and field
897 
898  Note that indices are ordered in ascending order of local indices in problem_y
899 
900  \param x_problem name of problem
901  \param x_field_name name of field in problem_x
902  \param x_rc that is ROW or COL
903  \param y_problem name of problem
904  \param y_field_name name of field in problem_y
905  \param y_rc that is ROW or COL
906 
907  \retval idx indexes in problem_x
908  \retval idy indexes in problem_y
909 
910  */
912  const std::string &x_problem, const std::string &x_field_name,
913  RowColData x_rc, const std::string &y_problem,
914  const std::string &y_field_name, RowColData y_rc, std::vector<int> &idx,
915  std::vector<int> &idy, int verb = -1) const;
916 
917  /** \deprecated Use ISManager
918  * \brief create IS for give two problems and field
919 
920  Indices are sorted by global PETSc index in problem_x.
921 
922  \param x_problem name of problem
923  \param x_field_name name of field in problem_x
924  \param x_rc that is ROW or COL
925  \param y_problem name of problem
926  \param y_field_name name of field in problem_y
927  \param y_rc that is ROW or COL
928 
929  \retval ix IS indexes in problem_x (can be PETSC_NULL)
930  \retval iy IS indexes in problem_y
931 
932  */
934  const std::string &x_problem, const std::string &x_field_name,
935  RowColData x_rc, const std::string &y_problem,
936  const std::string &y_field_name, RowColData y_rc, IS *ix, IS *iy,
937  int verb = -1) const;
938 
939  /** \deprecated Use ISManager
940  * \brief create IS for given order range (collective)
941 
942  * \param problem name
943  * \param rc ROW or COL
944  * \param min_order
945  * \param max_order
946  * \retval is out value
947 
948  */
949  DEPRECATED MoFEMErrorCode ISCreateProblemOrder(const std::string &problem,
950  RowColData rc, int min_order,
951  int max_order, IS *is,
952  int verb = -1) const;
953 
954  /** \deprecated Use ISManager
955  * \brief create IS for given problem, field and rank range (collective)
956  * \ingroup mofem_vectors
957 
958  * \param problem name
959  * \param rc ROW or COL
960  * \param field name
961  * \param min_coeff_idx
962  * \param max_coeff_idx
963  * \retval is out value
964 
965  */
967  const std::string &problem, RowColData rc, const std::string &field,
968  int min_coeff_idx, int max_coeff_idx, IS *is, int verb = -1) const;
969 
970  /**@}*/
971 
972  /** \name Scatter vectors */
973 
974  /**@{*/
975 
976  /** \deprecated use VecManager
977  * \brief create scatter for vectors form one to another problem (collective)
978  * \ingroup mofem_vectors
979  *
980  * User specify what name of field on one problem is scattered to another.
981  *
982  * \ingroup mofem_vectors
983  *
984  * \param xin vector
985  * \param x_proble problem name
986  * \param x_field name
987  * \param yin vector
988  * \param y_problem problem name
989  * \param y_field_name
990  * \retval newctx scatter
991 
992  */
994  Vec xin, const std::string &x_problem, const std::string &x_field_name,
995  RowColData x_rc, Vec yin, const std::string &y_problem,
996  const std::string &y_field_name, RowColData y_rc, VecScatter *newctx,
997  int verb = -1) const;
998 
999  /** \deprecated use VecManager
1000  * \brief create scatter for vectors form one to another problem (collective)
1001  * \ingroup mofem_vectors
1002  *
1003  * \param xin vector
1004  * \param x_proble problem name
1005  * \param yin vector
1006  * \param y_problem problem name
1007  * \retval newctx scatter
1008 
1009  */
1011  VecScatterCreate(Vec xin, const std::string &x_problem, RowColData x_rc,
1012  Vec yin, const std::string &y_problem, RowColData y_rc,
1013  VecScatter *newctx, int verb = -1) const;
1014 
1015  /**@}*/
1016 
1017  /** \name Set vector and mesh values */
1018 
1019  /**@{*/
1020 
1021  /** \deprecated use VecManager
1022  * \brief set values of vector from/to meshdatabase
1023  * \ingroup mofem_vectors
1024  *
1025  * \param pointer to problem struture
1026  * \param RowColData for row or column:e (i.e. Row,Col)
1027  * \param V vector
1028  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1029  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1030  * are: SCATTER_FORWARD or SCATTER_REVERSE)
1031  *
1032  * SCATTER_REVERSE set data to field entities from V vector.
1033  *
1034  * SCATTER_FORWARD set vector V from data field entities
1035  *
1036  */
1038  set_local_ghost_vector(const Problem *problem_ptr, RowColData rc, Vec V,
1039  InsertMode mode, ScatterMode scatter_mode) const;
1040 
1041  /** \deprecated use VecManager
1042  * \brief set values of vector from/to meshdatabase
1043  * \ingroup mofem_vectors
1044  *
1045  * \param name of the problem
1046  * \param RowColData for row or column:e (i.e. Row,Col)
1047  * \param V vector
1048  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1049  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1050  * are: SCATTER_FORWARD or SCATTER_REVERSE)
1051  *
1052  * SCATTER_REVERSE set data to field entities from V vector.
1053  *
1054  * SCATTER_FORWARD set vector V from data field entities
1055  *
1056  */
1058  set_local_ghost_vector(const std::string &name, RowColData rc, Vec V,
1059  InsertMode mode, ScatterMode scatter_mode) const;
1060 
1061  /** \deprecated use VecManager
1062  * \brief set values of vector from/to mesh database (collective)
1063  * \ingroup mofem_vectors
1064 
1065  collective - need tu be run on all processors in communicator
1066 
1067  * \param pointer to porblem struture
1068  * \param RowColData for row or column (i.e. Row,Col)
1069  * \param V vector
1070  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1071  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1072  are: SCATTER_FORWARD or SCATTER_REVERSE)
1073  *
1074  * SCATTER_REVERSE set data to field entities form V vector.
1075  *
1076  */
1078  set_global_ghost_vector(const Problem *problem_ptr, RowColData rc, Vec V,
1079  InsertMode mode, ScatterMode scatter_mode) const;
1080 
1081  /** \deprecated use VecManager
1082  * \brief set values of vector from/to mesh database (collective)
1083  * \ingroup mofem_vectors
1084 
1085  collective - need tu be run on all processors in communicator
1086 
1087  * \param name of the problem
1088  * \param RowColData for row or column (i.e. Row,Col)
1089  * \param V vector
1090  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1091  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1092  are: SCATTER_FORWARD or SCATTER_REVERSE)
1093  *
1094  * SCATTER_REVERSE set data to field entities form V vector.
1095  *
1096  */
1098  set_global_ghost_vector(const std::string &name, RowColData rc, Vec V,
1099  InsertMode mode, ScatterMode scatter_mode) const;
1100 
1101  /** \deprecated use VecManager
1102  * \brief Copy vector to field which is not part of the problem
1103  * \ingroup mofem_vectors
1104  *
1105  * \param pointer to poroblem multi_index
1106  * \param field_name field name used for indexing petsc vectors used in the
1107  * problem \param cpy_field field name where data from vector are stored
1108  * \param RowColData for row or column
1109  * \param V vector
1110  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1111  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1112  * are: SCATTER_FORWARD or SCATTER_REVERSE)
1113  *
1114  * SCATTER_REVERSE set data to field entities form V vector.
1115  *
1116  */
1118  const Problem *problem_ptr, const std::string &fiel_name,
1119  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
1120  ScatterMode scatter_mode, int verb = -1);
1121 
1122  /** \deprecated use VecManager
1123  * \brief Copy vector to field which is not part of the problem
1124  * \ingroup mofem_vectors
1125  *
1126  * \param name problem name
1127  * \param field_name field name used for indexing petsc vectors used in the
1128  * problem \param cpy_field field name where data from vector are stored
1129  * \param RowColData for row or column
1130  * \param V vector
1131  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1132  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1133  * are: SCATTER_FORWARD or SCATTER_REVERSE)
1134  *
1135  * SCATTER_REVERSE set data to field entities form V vector.
1136  *
1137  */
1139  const std::string &name, const std::string &field_name,
1140  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
1141  ScatterMode scatter_mode, int verb = -1);
1142 
1143  /** \deprecated use VecManager
1144  * \brief Copy vector to field which is not part of the problem (collective)
1145  * \ingroup mofem_vectors
1146 
1147  collective - need tu be run on all processors in communicator
1148 
1149  * \param problem_ptr pointer to problem
1150  * \param field_name field name used for indexing petsc vectors used in the
1151  problem
1152  * \param cpy_field field name where data from vector are stored
1153  * \param RowColData for row or column
1154  * \param V vector
1155  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1156  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1157  are: SCATTER_FORWARD or SCATTER_REVERSE)
1158  *
1159  * SCATTER_REVERSE set data to field entities form V vector.
1160  *
1161  */
1163  const Problem *problem_ptr, const std::string &field_name,
1164  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
1165  ScatterMode scatter_mode, int verb = -1);
1166 
1167  /** \deprecated use VecManager
1168  * \brief Copy vector to field which is not part of the problem (collective)
1169  * \ingroup mofem_vectors
1170 
1171  collective - need tu be run on all processors in communicator
1172 
1173  * \param name problem name
1174  * \param field_name field name used for indexing petsc vectors used in the
1175  problem
1176  * \param cpy_field field name where data from vector are stored
1177  * \param RowColData for row or column
1178  * \param V vector
1179  * \param mode see petsc manual for VecSetValue (ADD_VALUES or INSERT_VALUES)
1180  * \param scatter_mode see petsc manual for ScatterMode (The available modes
1181  are: SCATTER_FORWARD or SCATTER_REVERSE)
1182  *
1183  * SCATTER_REVERSE set data to field entities form V vector.
1184  *
1185  */
1187  const std::string &name, const std::string &field_name,
1188  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
1189  ScatterMode scatter_mode, int verb = -1);
1190 
1191  /**@}*/
1192 
1193  /** \name Field algebra */
1194 
1195  /**@{*/
1196 
1197  /** \deprecated use FieldBlas
1198  * \brief axpy fields
1199  * \ingroup mofem_field_algebra
1200  * \todo should be moved to independent interface, i.e. FieldAlgebra
1201  *
1202  * field_y = field_y + alpha*field_x
1203  *
1204  * \param alpha
1205  * \param field_name_x name of field_x
1206  * \param field_name_y name of field_y
1207  * \param error_if_missing throw error if entity/dof exist in field_x but not
1208  * on field_y \param create_if_missing creat dof in field_y from fiedl_x if it
1209  * is not database
1210  *
1211  */
1212  DEPRECATED MoFEMErrorCode field_axpy(const double alpha,
1213  const std::string &fiel_name_x,
1214  const std::string &field_name_y,
1215  bool error_if_missing = false,
1216  bool creat_if_missing = false);
1217 
1218  /** \deprecated use FieldBlas
1219  * \brief scale field
1220  * \ingroup mofem_field_algebra
1221  * \todo should be moved to independent interface, i.e. FieldAlgebra
1222  *
1223  * \param alpha is a scaling factor
1224  * \field_name is a field name
1225  *
1226  */
1227  DEPRECATED MoFEMErrorCode field_scale(const double alpha,
1228  const std::string &field_name);
1229 
1230  /** \brief use FieldBlas
1231  * \brief set field
1232  * \ingroup mofem_field_algebra
1233  * \todo should be moved to independent interface, i.e. FieldAlgebra
1234  *
1235  * field_y = val
1236  *
1237  * \param val
1238  * \param entity type
1239  * \param field_name
1240  *
1241  */
1242  DEPRECATED MoFEMErrorCode set_field(const double val, const EntityType type,
1243  const std::string &field_name);
1244 
1245  /** \deprecated use FieldBlas
1246  * \brief set field
1247  * \ingroup mofem_field_algebra
1248  * \todo should be moved to independent interface, i.e. FieldAlgebra
1249  *
1250  * field_y = val
1251  *
1252  * \param val
1253  * \param entity type
1254  * \param on enties
1255  * \param field_name
1256  *
1257  */
1258  DEPRECATED MoFEMErrorCode set_field(const double val, const EntityType type,
1259  const Range &ents,
1260  const std::string &field_name);
1261 
1262  /**@}*/
1263 
1264  /** \name Get adjacencies */
1265 
1266  /**@{*/
1267 
1268  /** \brief Get the adjacencies associated with a entity to entities of a
1269  * specified dimension. \ingroup mofem_ref_ents \todo Should be outsourced to
1270  * separate interface, i.e. BitLevelManager
1271  *
1272  * bit ref level of adjacent entities is equal to bit ref level of adjacent
1273  * entities
1274  */
1276  get_adjacencies_equality(const EntityHandle from_entiti,
1277  const int to_dimension, Range &adj_entities) const;
1278 
1279  /** \brief Get the adjacencies associated with a entity to entities of a
1280  * specified dimension. \ingroup mofem_ref_ents
1281  *
1282  * bit ref level of adjacent entities is any of bit ref level of adjacent
1283  * entities
1284  */
1286  const int to_dimension,
1287  Range &adj_entities) const;
1288 
1289  /** \brief Get the adjacencies associated with a entity to entities of a
1290  * specified dimension. \ingroup mofem_ref_ents \todo Should be outsourced to
1291  * separate interface, i.e. BitLevelManage
1292  *
1293  * bit ref level of adjacent entities is equal to bit ref level of adjacent
1294  * entities
1295  */
1297  const Problem *problem_ptr, const EntityHandle *from_entities,
1298  const int num_netities, const int to_dimension, Range &adj_entities,
1299  const int operation_type = moab::Interface::INTERSECT,
1300  const int verb = 0) const;
1301 
1302  /** \brief Get the adjacencies associated with a entity to entities of a
1303  * specified dimension. \ingroup mofem_ref_ents \todo Should be outsourced to
1304  * separate interface, i.e. BitLevelManage
1305  *
1306  * bit ref level of adjacent entities is equal to bit ref level of adjacent
1307  * entities
1308  */
1310  const BitRefLevel &bit, const EntityHandle *from_entities,
1311  const int num_netities, const int to_dimension, Range &adj_entities,
1312  const int operation_type = moab::Interface::INTERSECT,
1313  const int verb = 0) const;
1314 
1315  /**@}*/
1316 
1317  /**@}*/
1318 
1319  /** \name Clear and remove */
1320 
1321  /**@{*/
1322 
1323  /** \deprecated Clear dofs by bit level
1324  */
1326  const BitRefLevel &mask,
1327  int verb = -1);
1328 
1329  /** \deprecated use clear_ents_fields_by_bit_ref
1330  */
1332  const BitRefLevel &mask,
1333  int verb = -1);
1334 
1335  /** \deprecated use clear_finite_elements_by_bit_ref
1336  */
1338  const BitRefLevel &mask,
1339  int verb = -1);
1340 
1341  /**@}*/
1342 
1343  /**@}*/
1344 
1345  /** \name Clear and remove */
1346 
1347  /**@{*/
1348 
1349  /**
1350  * \brief set field entities on vertices
1351  * \ingroup mofem_field
1352  *
1353  * The lower dimension entities are added depending on the space type
1354  * \param nodes contains set vertices
1355  * \param name of the field
1356  */
1358  const Range &nodes, const std::string &name, int verb = -1);
1359 
1360  /**
1361  * \brief set field entities on vertices
1362  * \ingroup mofem_field
1363  *
1364  * The lower dimension entities are added depending on the space type
1365  * \param meshset contains set vertices
1366  * \param name of the field
1367  */
1369  const EntityHandle meshset, const std::string &name, int verb = -1);
1370 
1371  /**
1372  * \brief set field entities form adjacencies of edges
1373  * \ingroup mofem_field
1374  *
1375  * The lower dimension entities are added depending on the space type
1376  * \param range contains set edges
1377  * \param name of the field
1378  */
1380  const std::string &name,
1381  int verb = -1);
1382 
1383  /**
1384  * \brief set field entities form adjacencies of edges
1385  * \ingroup mofem_field
1386  *
1387  * The lower dimension entities are added depending on the space type
1388  * \param meshset contains set edges
1389  * \param name of the field
1390  */
1392  const EntityHandle meshset, const std::string &name, int verb = -1);
1393 
1394  /**
1395  * \brief set field entities form adjacencies of triangles
1396  * \ingroup mofem_field
1397  *
1398  * The lower dimension entities are added depending on the space type
1399  * \param meshset contains set triangles
1400  * \param name of the field
1401  */
1403  const EntityHandle meshset, const std::string &name, int verb = -1);
1404 
1405  /**
1406  * \brief set field entities form adjacencies of triangles
1407  * \ingroup mofem_field
1408  *
1409  * The lower dimension entities are added depending on the space type
1410  * \param range triangles
1411  * \param name of the field
1412  */
1414  const std::string &name,
1415  int verb = -1);
1416 
1417  /**
1418  * \brief set field entities from adjacencies of tetrahedron
1419  * \ingroup mofem_field
1420  *
1421  * The lower dimension entities are added depending on the space type
1422  * \param meshset contains set tetrahedron
1423  * \param name of the field
1424  */
1426  const EntityHandle meshset, const std::string &name, int verb = -1);
1427 
1428  /**
1429  * \brief set field entities from adjacencies of tetrahedron
1430  * \ingroup mofem_field
1431  *
1432  * The lower dimension entities are added depending on the space type
1433  * \param range contains set tetrahedron
1434  * \param name of the field
1435  */
1437  const std::string &name,
1438  int verb = -1);
1439 
1440  /**
1441  * \deprecated use add_ents_to_field_by_type
1442  * \brief set field entities from adjacencies of quads
1443  * \ingroup mofem_field
1444  *
1445  * The lower dimension entities are added depending on the space type
1446  * \param quads range contains set quads
1447  * \param name of the field
1448  */
1450  const std::string &name,
1451  int verb = -1);
1452 
1453  /**
1454  * \deprecated use add_ents_to_field_by_type
1455  * \brief set field entities from adjacencies of quads
1456  * \ingroup mofem_field
1457  *
1458  * The lower dimension entities are added depending on the space type
1459  * \param meshset contains set quads
1460  * \param name of the field
1461  */
1463  const std::string &name,
1464  int verb = -1);
1465 
1466  /**
1467  * \deprecated use add_ents_to_field_by_type
1468  * \brief set field entities from adjacencies of prisms
1469  * \ingroup mofem_field
1470  *
1471  * The lower dimension entities are added depending on the space type
1472  * \param prisms range contains set prisms
1473  * \param name of the field
1474  */
1476  const std::string &name,
1477  int verb = -1);
1478 
1479  /**
1480  * \deprecated use add_ents_to_field_by_type
1481  * \brief set field entities from adjacencies of prisms
1482  * \ingroup mofem_field
1483  *
1484  * The lower dimension entities are added depending on the space type
1485  * \param meshset contains set prisms
1486  * \param name of the field
1487  */
1489  const std::string &name,
1490  int verb = -1);
1491 
1492  /**@}*/
1493 
1494  /** \name Create matrices (will be moved to independent interface) */
1495 
1496  /**@{*/
1497 
1498  /**
1499  * @deprecated Use MatrixInterface
1500  *
1501  * \code
1502  * CHKERR m_field.getInterface<MatrixManager>()
1503  * ->createMPIAIJWithArrays<PetscGlobalIdx_mi_tag>(name, Aij, verb);
1504  * \endcode
1505  */
1507  const std::string &name, Mat *Aij, int verb = DEFAULT_VERBOSITY);
1508 
1509  /**
1510  * @deprecated Use MatrixInterface
1511  *
1512  * \code
1513  * CHKERR m_field.getInterface<MatrixManager>()
1514  * ->createMPIAIJWithArrays<PetscGlobalIdx_mi_tag>(name, Aij, verb);
1515  * \endcode
1516  */
1518  const std::string &name, Mat *Adj, int verb = DEFAULT_VERBOSITY);
1519 
1520  /**
1521  * @deprecated Use MatrixInterface
1522  *
1523  * \code
1524  * CHKERR m_field.getInterface<MatrixManager>()
1525  * ->createSeqAIJWithArrays<PetscLocalIdx_mi_tag>(name, Adj, verb);
1526  * \endcode
1527  *
1528  */
1530  const std::string &name, Mat *Aij, PetscInt **i, PetscInt **j,
1531  PetscScalar **v, int verb = DEFAULT_VERBOSITY);
1532 
1533  /**@}*/
1534 
1535  /** \name Making loops on elements and entities */
1536 
1537  /**@{*/
1538 
1540 
1541  /**
1542  * @deprecated Use version from core interface
1543  */
1545  const std::string &fe_name,
1546  FEMethod &method,
1547  int lower_rank, int upper_rank,
1548  MoFEMTypes bh,
1549  int verb = DEFAULT_VERBOSITY);
1550 
1551  /**
1552  * @deprecated Use version from core interface
1553  */
1554  DEPRECATED MoFEMErrorCode loop_finite_elements(const std::string &problem_name,
1555  const std::string &fe_name,
1556  FEMethod &method, int lower_rank,
1557  int upper_rank, MoFEMTypes bh,
1558  int verb = DEFAULT_VERBOSITY);
1559 
1560  /**
1561  * @deprecated Use version from core interface
1562  */
1563  DEPRECATED MoFEMErrorCode loop_finite_elements(const std::string &problem_name,
1564  const std::string &fe_name,
1565  FEMethod &method,
1566  MoFEMTypes bh,
1567  int verb = DEFAULT_VERBOSITY);
1568 
1569  /**@}*/
1570 };
1571 
1572 } // namespace MoFEM
1573 
1574 #endif // __INTERFACE_DEPRECATED_HPP__
Generic bc data structure.
Definition: BCData.hpp:30
DEPRECATED MoFEMErrorCode update_meshset_by_entities_children(const EntityHandle parent, const BitRefLevel &child_bit, const EntityHandle child, EntityType child_type, const bool recursive=false, int verb=-1)
Get child entities form meshset containing parent entities.
structure for User Loop Methods on finite elementsIt can be used to calculate stiffness matrices,...
DEPRECATED MoFEMErrorCode MatCreateMPIAdj_with_Idx_mi_tag(const std::string &name, Mat *Adj, int verb=DEFAULT_VERBOSITY)
DEPRECATED bool check_msId_meshset(const int msId, const CubitBCType cubit_bc_type)
check for CUBIT Id and CUBIT type
Deprecated interface functions.
DEPRECATED MoFEMErrorCode partition_mesh(const Range &ents, const int dim, const int adj_dim, const int n_parts, int verb=-1)
Set partition tag to each finite element in the problem.
DEPRECATED MoFEMErrorCode print_cubit_force_set() const
DEPRECATED MoFEMErrorCode set_global_ghost_vector(const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const
set values of vector from/to mesh database (collective)collective - need tu be run on all processors ...
DEPRECATED MoFEMErrorCode get_entities_by_ref_level(const BitRefLevel &bit, const BitRefLevel &mask, const EntityHandle meshset)
add all ents from ref level given by bit to meshset
DEPRECATED MoFEMErrorCode build_sub_problem(const std::string &out_name, const std::vector< std::string > &fields_row, const std::vector< std::string > &fields_col, const std::string &main_problem, const bool square_matrix=true, int verb=-1)
build sub problem
DEPRECATED MoFEMErrorCode seed_finite_elements(const EntityHandle meshset, int verb=-1)
DEPRECATED MoFEMErrorCode get_cubit_meshsets(const unsigned int cubit_bc_type, Range &meshsets)
get all CUBIT meshsets by CUBIT type
DEPRECATED MoFEMErrorCode ISCreateProblemFieldAndRank(const std::string &problem, RowColData rc, const std::string &field, int min_coeff_idx, int max_coeff_idx, IS *is, int verb=-1) const
create IS for given problem, field and rank range (collective)
DEPRECATED MoFEMErrorCode partition_simple_problem(const std::string &name, int verb=-1)
partition problem dofs
DEPRECATED MoFEMErrorCode shift_right_bit_ref(const int shift, int verb=-1)
right shift bit ref level
virtual DEPRECATED MoFEMErrorCode seed_ref_level_2D(const EntityHandle meshset, const BitRefLevel &bit, int verb=-1)
seed 2D entities (Triangles entities only) in the meshset and their adjacencies (only TRIs adjacencie...
DEPRECATED MoFEMErrorCode clear_finite_elements(const BitRefLevel &bit, const BitRefLevel &mask, int verb=-1)
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
DEPRECATED MoFEMErrorCode ISCreateFromProblemFieldToOtherProblemField(const std::string &x_problem, const std::string &x_field_name, RowColData x_rc, const std::string &y_problem, const std::string &y_field_name, RowColData y_rc, std::vector< int > &idx, std::vector< int > &idy, int verb=-1) const
create IS for give two problems and field
virtual DEPRECATED MoFEMErrorCode build_problems(int verb=-1)=0
build problem data structures
DEPRECATED MoFEMErrorCode get_adjacencies(const Problem *problem_ptr, const EntityHandle *from_entities, const int num_netities, const int to_dimension, Range &adj_entities, const int operation_type=moab::Interface::INTERSECT, const int verb=0) const
Get the adjacencies associated with a entity to entities of a specified dimension....
DEPRECATED MoFEMErrorCode query_interface(IFace *&ptr) const
virtual DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_EDGEs(const Range &edge, const std::string &name)=0
add EDGES entities from range to finite element database given by name
DEPRECATED MoFEMErrorCode set_cubit_msId_attribites(const CubitBCType cubit_bc_type, const int ms_id, const std::vector< double > &attributes, const std::string name="")
set attributes to cubit meshset
virtual DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_TRIs(const Range &tris, const std::string &name)=0
add TRI entities from range to finite element database given by name
IFACE getInterface() const
Get interface pointer to pointer of interface.
DEPRECATED MoFEMErrorCode set_local_ghost_vector(const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode) const
set values of vector from/to meshdatabase
this struct keeps basic methods for moab meshset about material and boundary conditions
DEPRECATED MoFEMErrorCode clear_ents_fields(const BitRefLevel &bit, const BitRefLevel &mask, int verb=-1)
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
virtual MoFEMErrorCode loop_finite_elements(const std::string &problem_name, const std::string &fe_name, FEMethod &method, boost::shared_ptr< NumeredEntFiniteElement_multiIndex > fe_ptr=nullptr, MoFEMTypes bh=MF_EXIST, int verb=DEFAULT_VERBOSITY)=0
Make a loop over finite elements.
DEPRECATED MoFEMErrorCode add_ents_to_field_by_PRISMs(const Range &prisms, const std::string &name, int verb=-1)
set field entities from adjacencies of prismsThe lower dimension entities are added depending on the ...
DEPRECATED MoFEMErrorCode get_adjacencies_equality(const EntityHandle from_entiti, const int to_dimension, Range &adj_entities) const
Get the adjacencies associated with a entity to entities of a specified dimension....
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
DEPRECATED MoFEMErrorCode get_adjacencies_any(const EntityHandle from_entiti, const int to_dimension, Range &adj_entities) const
Get the adjacencies associated with a entity to entities of a specified dimension....
keeps basic data about problemThis is low level structure with information about problem,...
virtual DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_PRISMs(const Range &prims, const std::string &name)=0
add PRISM entities from meshset to finite element database given by name
RowColData
RowColData.
Definition: definitions.h:185
DEPRECATED MoFEMErrorCode add_ents_to_field_by_EDGEs(const Range &edges, const std::string &name, int verb=-1)
set field entities form adjacencies of edgesThe lower dimension entities are added depending on the s...
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:21
DEPRECATED MoFEMErrorCode add_cubit_msId(const CubitBCType cubit_bc_tyep, const int msId, const std::string name="")
add cubit meshset
virtual DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_VERTICEs(const Range &vert, const std::string &name)=0
add VERTICES entities from range to finite element database given by name
DEPRECATED MoFEMErrorCode build_problem_on_distributed_mesh(const std::string &name, const bool square_matrix=true, int verb=-1)
build problem data structures, assuming that mesh is distributed (collective)
DEPRECATED MoFEMErrorCode set_other_global_ghost_vector(const Problem *problem_ptr, const std::string &field_name, const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode, int verb=-1)
Copy vector to field which is not part of the problem (collective)collective - need tu be run on all ...
DEPRECATED MoFEMErrorCode seed_ref_level(const Range &ents, const BitRefLevel &bit, const bool only_tets=true, int verb=-1)
seed entities in the range and their adjacencies in a particular BitRefLevel
DEPRECATED MoFEMErrorCode field_scale(const double alpha, const std::string &field_name)
scale field
DEPRECATED MoFEMErrorCode get_problem_elements_layout(const std::string &name, const std::string &fe_name, PetscLayout *layout, int verb=-1)
Get layout of elements in the problemIn layout is stored information how many elements is on each pro...
DEPRECATED MoFEMErrorCode partition_finite_elements(const std::string &name, bool part_from_moab=false, int low_proc=-1, int hi_proc=-1, int verb=-1)
partition finite elements
DEPRECATED MoFEMErrorCode add_ents_to_field_by_TRIs(const EntityHandle meshset, const std::string &name, int verb=-1)
set field entities form adjacencies of trianglesThe lower dimension entities are added depending on t...
DEPRECATED MoFEMErrorCode add_ents_to_field_by_VERTICEs(const Range &nodes, const std::string &name, int verb=-1)
set field entities on verticesThe lower dimension entities are added depending on the space type
DEPRECATED MoFEMErrorCode clear_dofs_fields(const BitRefLevel &bit, const BitRefLevel &mask, int verb=-1)
DEPRECATED MoFEMErrorCode set_cubit_msId_bc_data_structure(const CubitBCType cubit_bc_type, const int ms_id, const GenericCubitBcData &data)
set boundary data structure to meshset
DEPRECATED MoFEMErrorCode set_other_local_ghost_vector(const Problem *problem_ptr, const std::string &fiel_name, const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode, ScatterMode scatter_mode, int verb=-1)
Copy vector to field which is not part of the problem.
DEPRECATED MoFEMErrorCode get_cubit_msId(const int msId, const CubitBCType cubit_bc_type, const CubitMeshSets **cubit_meshset_ptr)
get cubit meshset
DEPRECATED MoFEMErrorCode MatCreateSeqAIJWithArrays(const std::string &name, Mat *Aij, PetscInt **i, PetscInt **j, PetscScalar **v, int verb=DEFAULT_VERBOSITY)
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:66
InterfaceThis interface is used by user to:
Definition: Interface.hpp:42
DEPRECATED MoFEMErrorCode build_problem(const std::string &name, const bool square_matrix, int verb=-1)
build problem data structures
DEPRECATED MoFEMErrorCode partition_compose_problem(const std::string &name, const std::string &problem_for_rows, const bool copy_rows, const std::string &problem_for_cols, const bool copy_cols, int verb=-1)
build indexing and partition problem inheriting indexing and partitioning from two other problems
DEPRECATED MoFEMErrorCode print_cubit_pressure_set() const
DEPRECATED MoFEMErrorCode partition_problem(const std::string &name, int verb=-1)
partition problem dofs (collective)
DEPRECATED MoFEMErrorCode set_field(const double val, const EntityType type, const std::string &field_name)
use FieldBlas
DEPRECATED MoFEMErrorCode VecCreateGhost(const std::string &name, RowColData rc, Vec *V) const
create ghost vector for problem (collective)collective - need to be run on all processors in communic...
DEPRECATED MoFEMErrorCode VecScatterCreate(Vec xin, const std::string &x_problem, const std::string &x_field_name, RowColData x_rc, Vec yin, const std::string &y_problem, const std::string &y_field_name, RowColData y_rc, VecScatter *newctx, int verb=-1) const
create scatter for vectors form one to another problem (collective)User specify what name of field on...
DEPRECATED MoFEMErrorCode set_cubit_msId_attribites_data_structure(const CubitBCType cubit_bc_type, const int ms_id, const GenericAttributeData &data, const std::string name="")
set (material) data structure to cubit meshset
Generic attribute data structure.
virtual DEPRECATED MoFEMErrorCode add_ents_to_finite_element_EntType_by_bit_ref(const BitRefLevel &bit, const std::string &name, EntityType type, int verb=-1)=0
add TET elements from given refinement level to finite element database given by name
DEPRECATED MoFEMErrorCode get_cubit_msId_entities_by_dimension(const int ms_id, const CubitBCType cubit_bc_type, const int dimension, Range &entities, const bool recursive=false)
virtual DEPRECATED MoFEMErrorCode add_ents_to_finite_element_by_TETs(const Range &tets, const std::string &name)=0
add TET entities from range to finite element database given by name
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:51
DEPRECATED MoFEMErrorCode partition_ghost_dofs(const std::string &name, int verb=-1)
determine ghost nodes
DEPRECATED MoFEMErrorCode delete_cubit_msId(const CubitBCType cubit_bc_type, const int msId)
delete cubit meshset
#define DEPRECATED
Definition: definitions.h:29
DEPRECATED MoFEMErrorCode get_cubit_msId_meshset(const int msId, const unsigned int cubit_bc_type, EntityHandle &meshset)
get meshset from CUBIT Id and CUBIT type
DEPRECATED MoFEMErrorCode seed_ref_level_MESHSET(const EntityHandle meshset, const BitRefLevel &bit, int verb=-1)
std::bitset< 32 > CubitBCType
Definition: Types.hpp:63
DEPRECATED MoFEMErrorCode print_cubit_displacement_set() const
DEPRECATED MoFEMErrorCode VecCreateSeq(const std::string &name, RowColData rc, Vec *V) const
create local vector for problem
DEPRECATED MoFEMErrorCode ISCreateProblemOrder(const std::string &problem, RowColData rc, int min_order, int max_order, IS *is, int verb=-1) const
create IS for given order range (collective)
DEPRECATED MoFEMErrorCode MatCreateMPIAIJWithArrays(const std::string &name, Mat *Aij, int verb=DEFAULT_VERBOSITY)
DEPRECATED MoFEMErrorCode seed_ref_level_3D(const EntityHandle meshset, const BitRefLevel &bit, int verb=-1)
seed 2D entities in the meshset and their adjacencies (only TETs adjacencies) in a particular BitRefL...
DEPRECATED MoFEMErrorCode add_ents_to_field_by_TETs(const EntityHandle meshset, const std::string &name, int verb=-1)
set field entities from adjacencies of tetrahedronThe lower dimension entities are added depending on...
DEPRECATED MoFEMErrorCode add_ents_to_field_by_QUADs(const Range &quads, const std::string &name, int verb=-1)
set field entities from adjacencies of quadsThe lower dimension entities are added depending on the s...
DEPRECATED MoFEMErrorCode update_finite_element_meshset_by_entities_children(const std::string name, const BitRefLevel &child_bit, const EntityType fe_ent_type, int verb=-1)
update finite element mesheset by child entities
DEPRECATED MoFEMErrorCode get_entities_by_type_and_ref_level(const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type, const EntityHandle meshset, int verb=-1)
add all ents from ref level given by bit to meshset
DEPRECATED MoFEMErrorCode update_field_meshset_by_entities_children(const BitRefLevel &child_bit, int verb=-1)
update fields meshesets by child entities
DEPRECATED IFace * query_interface() const
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
Definition: definitions.h:182
DEPRECATED MoFEMErrorCode loop_finite_elements(const Problem *problem_ptr, const std::string &fe_name, FEMethod &method, int lower_rank, int upper_rank, MoFEMTypes bh, int verb=DEFAULT_VERBOSITY)
DEPRECATED MoFEMErrorCode field_axpy(const double alpha, const std::string &fiel_name_x, const std::string &field_name_y, bool error_if_missing=false, bool creat_if_missing=false)
axpy fields
DEPRECATED MoFEMErrorCode print_cubit_materials_set() const