v0.9.0
DeprecatedCoreInterface.cpp
Go to the documentation of this file.
1 /** \file DeprecatedCoreInterface.cpp
2  * \brief implementation of deprecated functions
3  */
4 
5 /* MoFEM is free software: you can redistribute it and/or modify it under
6  * the terms of the GNU Lesser General Public License as published by the
7  * Free Software Foundation, either version 3 of the License, or (at your
8  * option) any later version.
9  *
10  * MoFEM is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
13  * License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with MoFEM. If not, see <http://www.gnu.org/licenses/>
17  */
18 
19 namespace MoFEM {
20 
23  const BitRefLevel &bit, int verb) {
24  return getInterface<BitRefManager>()->setBitRefLevelByDim(meshset, 2, bit,
25  verb);
26 }
27 
30  const BitRefLevel &bit, int verb) {
31  return getInterface<BitRefManager>()->setBitRefLevelByDim(meshset, 3, bit,
32  verb);
33 }
34 
36  const BitRefLevel &bit,
37  const bool only_tets,
38  int verb) {
39  return getInterface<BitRefManager>()->setBitRefLevel(ents, bit, only_tets,
40  verb);
41 }
42 
44  const EntityHandle meshset, const BitRefLevel &bit, int verb) {
45  return getInterface<BitRefManager>()->setBitLevelToMeshset(meshset, bit,
46  verb);
47 }
48 
51  int verb) {
52 
54  Range entities;
55  CHKERR getInterface<CoreInterface>()->get_moab().get_entities_by_handle(
56  meshset, entities, true);
57  CHKERR getInterface<BitRefManager>()->setElementsBitRefLevel(
58  entities, BitRefLevel(), verb);
60 }
61 
63 DeprecatedCoreInterface::seed_finite_elements(const Range &entities, int verb) {
64  return getInterface<BitRefManager>()->setElementsBitRefLevel(
65  entities, BitRefLevel(), verb);
66 }
67 
69  const double alpha, const std::string &field_name_x,
70  const std::string &field_name_y, bool error_if_missing,
71  bool creat_if_missing) {
72  return getInterface<FieldBlas>()->fieldAxpy(
73  alpha, field_name_x, field_name_y, error_if_missing, creat_if_missing);
74 }
76 DeprecatedCoreInterface::set_field(const double val, const EntityType type,
77  const std::string &field_name) {
78  return getInterface<FieldBlas>()->setField(val, type, field_name);
79 }
81 DeprecatedCoreInterface::set_field(const double val, const EntityType type,
82  const Range &ents,
83  const std::string &field_name) {
84  return getInterface<FieldBlas>()->setField(val, type, ents, field_name);
85 }
88  const std::string &field_name) {
89  return getInterface<FieldBlas>()->fieldScale(alpha, field_name);
90 }
91 
93  const EntityHandle from_entiti, const int to_dimension,
94  Range &adj_entities) const {
95  return getInterface<BitRefManager>()->getAdjacenciesEquality(
96  from_entiti, to_dimension, adj_entities);
97 }
98 
101  const int to_dimension,
102  Range &adj_entities) const {
103  return getInterface<BitRefManager>()->getAdjacenciesAny(
104  from_entiti, to_dimension, adj_entities);
105 }
106 
108  const Problem *problem_ptr, const EntityHandle *from_entities,
109  const int num_netities, const int to_dimension, Range &adj_entities,
110  const int operation_type, const int verb) const {
111  return getInterface<BitRefManager>()->getAdjacencies(
112  problem_ptr, from_entities, num_netities, to_dimension, adj_entities,
113  operation_type, verb);
114 }
115 
117  const BitRefLevel &bit, const EntityHandle *from_entities,
118  const int num_netities, const int to_dimension, Range &adj_entities,
119  const int operation_type, const int verb) const {
120  return getInterface<BitRefManager>()->getAdjacencies(
121  bit, from_entities, num_netities, to_dimension, adj_entities,
122  operation_type, verb);
123 }
124 
126  RowColData rc,
127  Vec *V) const {
128  return getInterface<VecManager>()->vecCreateSeq(name, rc, V);
129 }
131  RowColData rc,
132  Vec *V) const {
133  return getInterface<VecManager>()->vecCreateGhost(name, rc, V);
134 }
136  const std::string &problem, RowColData rc, int min_order, int max_order,
137  IS *is, int verb) const {
138  return getInterface<ISManager>()->isCreateProblemOrder(problem, rc, min_order,
139  max_order, is);
140 }
142  const std::string &problem, RowColData rc, const std::string &field,
143  int min_coeff_idx, int max_coeff_idx, IS *is, int verb) const {
144  return getInterface<ISManager>()->isCreateProblemFieldAndRank(
145  problem, rc, field, min_coeff_idx, max_coeff_idx, is);
146 }
149  const std::string &x_problem, const std::string &x_field_name,
150  RowColData x_rc, const std::string &y_problem,
151  const std::string &y_field_name, RowColData y_rc, std::vector<int> &idx,
152  std::vector<int> &idy, int verb) const {
153  return getInterface<ISManager>()->isCreateFromProblemFieldToOtherProblemField(
154  x_problem, x_field_name, x_rc, y_problem, y_field_name, y_rc, idx, idy);
155 }
156 
159  const std::string &x_problem, const std::string &x_field_name,
160  RowColData x_rc, const std::string &y_problem,
161  const std::string &y_field_name, RowColData y_rc, IS *ix, IS *iy,
162  int verb) const {
163  return getInterface<ISManager>()->isCreateFromProblemFieldToOtherProblemField(
164  x_problem, x_field_name, x_rc, y_problem, y_field_name, y_rc, ix, iy);
165 }
167  Vec xin, const std::string &x_problem, const std::string &x_field_name,
168  RowColData x_rc, Vec yin, const std::string &y_problem,
169  const std::string &y_field_name, RowColData y_rc, VecScatter *newctx,
170  int verb) const {
171  return getInterface<VecManager>()->vecScatterCreate(
172  xin, x_problem, x_field_name, x_rc, yin, y_problem, y_field_name, y_rc,
173  newctx);
174 }
176  Vec xin, const std::string &x_problem, RowColData x_rc, Vec yin,
177  const std::string &y_problem, RowColData y_rc, VecScatter *newctx,
178  int verb) const {
179  return getInterface<VecManager>()->vecScatterCreate(xin, x_problem, x_rc, yin,
180  y_problem, y_rc, newctx);
181 }
183  const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode,
184  ScatterMode scatter_mode) const {
185  return getInterface<VecManager>()->setLocalGhostVector(problem_ptr, rc, V,
186  mode, scatter_mode);
187 }
189  const std::string &name, RowColData rc, Vec V, InsertMode mode,
190  ScatterMode scatter_mode) const {
191  return getInterface<VecManager>()->setLocalGhostVector(name, rc, V, mode,
192  scatter_mode);
193 }
195  const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode,
196  ScatterMode scatter_mode) const {
197  return getInterface<VecManager>()->setGlobalGhostVector(problem_ptr, rc, V,
198  mode, scatter_mode);
199 }
201  const std::string &name, RowColData rc, Vec V, InsertMode mode,
202  ScatterMode scatter_mode) const {
203  return getInterface<VecManager>()->setGlobalGhostVector(name, rc, V, mode,
204  scatter_mode);
205 }
207  const Problem *problem_ptr, const std::string &field_name,
208  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
209  ScatterMode scatter_mode, int verb) {
210  return getInterface<VecManager>()->setOtherLocalGhostVector(
211  problem_ptr, field_name, cpy_field_name, rc, V, mode, scatter_mode);
212 }
214  const std::string &name, const std::string &field_name,
215  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
216  ScatterMode scatter_mode, int verb) {
217  return getInterface<VecManager>()->setOtherLocalGhostVector(
218  name, field_name, cpy_field_name, rc, V, mode, scatter_mode);
219 }
221  const Problem *problem_ptr, const std::string &field_name,
222  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
223  ScatterMode scatter_mode, int verb) {
224  return getInterface<VecManager>()->setOtherGlobalGhostVector(
225  problem_ptr, field_name, cpy_field_name, rc, V, mode, scatter_mode);
226 }
228  const std::string &name, const std::string &field_name,
229  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
230  ScatterMode scatter_mode, int verb) {
231  return getInterface<VecManager>()->setOtherGlobalGhostVector(
232  name, field_name, cpy_field_name, rc, V, mode, scatter_mode);
233 }
234 
236  int verb) {
237  return getInterface<BitRefManager>()->shiftRightBitRef(
238  shift, BitRefLevel().set(), verb);
239 }
240 
242  const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type,
243  const EntityHandle meshset, int verb) {
244  return getInterface<BitRefManager>()->getEntitiesByTypeAndRefLevel(
245  bit, mask, type, meshset, verb);
246 }
247 
249  const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type,
250  Range &ents, int verb) {
251  return getInterface<BitRefManager>()->getEntitiesByTypeAndRefLevel(
252  bit, mask, type, ents, verb);
253 }
254 
257  const BitRefLevel &mask,
258  const EntityHandle meshset) {
259  return getInterface<BitRefManager>()->getEntitiesByRefLevel(bit, mask,
260  meshset);
261 }
262 
264  const BitRefLevel &bit, const BitRefLevel &mask, Range &ents) {
265  return getInterface<BitRefManager>()->getEntitiesByRefLevel(bit, mask, ents);
266 }
267 
269  const EntityHandle parent, const BitRefLevel &child_bit,
270  const EntityHandle child, EntityType child_type, const bool recursive,
271  int verb) {
272  return getInterface<BitRefManager>()->updateMeshsetByEntitiesChildren(
273  parent, child_bit, child, child_type, recursive, verb);
274 }
275 
278  const BitRefLevel &child_bit, int verb) {
279  return getInterface<BitRefManager>()->updateFieldMeshsetByEntitiesChildren(
280  child_bit, verb);
281 }
282 
285  const std::string name, const BitRefLevel &child_bit, int verb) {
286  return getInterface<BitRefManager>()->updateFieldMeshsetByEntitiesChildren(
287  name, child_bit, verb);
288 }
289 
292  const std::string name, const BitRefLevel &child_bit,
293  const EntityType fe_ent_type, int verb) {
294  return getInterface<BitRefManager>()
295  ->updateFiniteElementMeshsetByEntitiesChildren(name, child_bit,
296  fe_ent_type, verb);
297 }
298 
300  return getInterface<MeshsetsManager>()->printDisplacementSet();
302 }
303 
305  return getInterface<MeshsetsManager>()->printPressureSet();
306 }
307 
309  return getInterface<MeshsetsManager>()->printForceSet();
310 }
311 
313  return getInterface<MeshsetsManager>()->printMaterialsSet();
314 }
315 
317  const int ms_id, const CubitBCType cubit_bc_type) {
318  return getInterface<MeshsetsManager>()->checkMeshset(ms_id, cubit_bc_type);
319 }
320 
322  const CubitBCType cubit_bc_type, const int ms_id, const std::string name) {
323  return getInterface<MeshsetsManager>()->addMeshset(cubit_bc_type, ms_id,
324  name);
325 }
326 
328  const CubitBCType cubit_bc_type, const int ms_id,
329  const std::vector<double> &attributes, const std::string name) {
330  return getInterface<MeshsetsManager>()->setAtributes(cubit_bc_type, ms_id,
331  attributes, name);
332 }
335  const CubitBCType cubit_bc_type, const int ms_id,
336  const GenericAttributeData &data, const std::string name) {
337  return getInterface<MeshsetsManager>()->setAtributesByDataStructure(
338  cubit_bc_type, ms_id, data, name);
339 }
341  const CubitBCType cubit_bc_type, const int ms_id,
342  const GenericCubitBcData &data) {
343  return getInterface<MeshsetsManager>()->setBcData(cubit_bc_type, ms_id, data);
344 }
347  const int ms_id) {
348  return getInterface<MeshsetsManager>()->deleteMeshset(cubit_bc_type, ms_id);
349 }
351  const int ms_id, const CubitBCType cubit_bc_type,
352  const CubitMeshSets **cubit_meshset_ptr) {
353  return getInterface<MeshsetsManager>()->getCubitMeshsetPtr(
354  ms_id, cubit_bc_type, cubit_meshset_ptr);
355 }
357  const int ms_id, const CubitBCType cubit_bc_type, const int dimension,
358  Range &entities, const bool recursive) {
359  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
360  ms_id, cubit_bc_type.to_ulong(), dimension, entities, recursive);
361 }
363  const int ms_id, const CubitBCType cubit_bc_type, Range &entities,
364  const bool recursive) {
365  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
366  ms_id, cubit_bc_type.to_ulong(), entities, recursive);
367 }
369  const int ms_id, const unsigned int cubit_bc_type, const int dimension,
370  Range &entities, const bool recursive) {
371  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
372  ms_id, cubit_bc_type, dimension, entities, recursive);
373 }
375  const int ms_id, const unsigned int cubit_bc_type, Range &entities,
376  const bool recursive) {
377  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
378  ms_id, cubit_bc_type, entities, recursive);
379 }
381  const int ms_id, const unsigned int cubit_bc_type, EntityHandle &meshset) {
382  return getInterface<MeshsetsManager>()->getMeshset(ms_id, cubit_bc_type,
383  meshset);
384 }
385 
387 DeprecatedCoreInterface::get_cubit_meshsets(const unsigned int cubit_bc_type,
388  Range &meshsets) {
389  return getInterface<MeshsetsManager>()->getMeshsetsByType(cubit_bc_type,
390  meshsets);
391 }
392 
394  const std::string &name, const bool square_matrix, int verb) {
395  return getInterface<ProblemsManager>()->buildProblemOnDistributedMesh(
396  name, square_matrix, verb);
397 }
399  Problem *problem_ptr, const bool square_matrix, int verb) {
400  return getInterface<ProblemsManager>()->buildProblemOnDistributedMesh(
401  problem_ptr, square_matrix, verb);
402 }
403 
405  const bool square_matrix,
406  int verb) {
407  return getInterface<ProblemsManager>()->buildProblem(problem_ptr,
408  square_matrix, verb);
409 }
410 
412 DeprecatedCoreInterface::build_problem(const std::string &problem_name,
413  const bool square_matrix, int verb) {
414  return getInterface<ProblemsManager>()->buildProblem(problem_name,
415  square_matrix, verb);
416 }
417 
420  int verb) {
421  return getInterface<ProblemsManager>()->partitionSimpleProblem(name, verb);
422 }
423 
425  const std::string &name, const std::string &problem_for_rows,
426  bool copy_rows, const std::string &problem_for_cols, bool copy_cols,
427  int verb) {
428  return getInterface<ProblemsManager>()->inheritPartition(
429  name, problem_for_rows, copy_rows, problem_for_cols, copy_cols, verb);
430 }
431 
433  const std::string &out_name, const std::vector<std::string> &fields_row,
434  const std::vector<std::string> &fields_col, const std::string &main_problem,
435  const bool square_matrix, int verb) {
436  return getInterface<ProblemsManager>()->buildSubProblem(
437  out_name, fields_row, fields_col, main_problem, square_matrix, nullptr,
438  nullptr, verb);
439 }
440 
442 DeprecatedCoreInterface::partition_problem(const std::string &name, int verb) {
443  return getInterface<ProblemsManager>()->partitionProblem(name, verb);
444 }
445 
447  const std::string &name, bool part_from_moab, int low_proc, int hi_proc,
448  int verb) {
449  return getInterface<ProblemsManager>()->partitionFiniteElements(
450  name, part_from_moab, low_proc, hi_proc, verb);
452 }
453 
456  int verb) {
457  return getInterface<ProblemsManager>()->partitionGhostDofs(name, verb);
458 }
459 
461  const std::string &name, const std::string &fe_name, PetscLayout *layout,
462  int verb) {
463  return getInterface<ProblemsManager>()->getProblemElementsLayout(
464  name, fe_name, layout);
465 }
466 
468  const int dim,
469  const int adj_dim,
470  const int n_parts,
471  int verb) {
472  return getInterface<ProblemsManager>()->partitionMesh(
473  ents, dim, adj_dim, n_parts, NULL, NULL, NULL, verb);
474 }
475 
478  const BitRefLevel &mask, int verb) {
479  return clear_dofs_fields_by_bit_ref(bit, mask, verb);
480 }
481 
484  const BitRefLevel &mask, int verb) {
485  return clear_ents_fields_by_bit_ref(bit, mask, verb);
486 }
487 
489  const BitRefLevel &bit, const BitRefLevel &mask, int verb) {
490  return clear_finite_elements_by_bit_ref(bit, mask, verb);
491 }
492 
494  const Range &edges, const std::string &name, int verb) {
495  return add_ents_to_field_by_type(edges, MBEDGE, name, verb);
496 }
497 
499  const EntityHandle meshset, const std::string &name, int verb) {
500  return add_ents_to_field_by_type(meshset, MBEDGE, name, true, verb);
501 }
502 
504  const EntityHandle meshset, const std::string &name, int verb) {
505  return add_ents_to_field_by_type(meshset, MBTRI, name, true, verb);
506 }
507 
509  const Range &tris, const std::string &name, int verb) {
510  return add_ents_to_field_by_type(tris, MBTRI, name, verb);
511 }
512 
514  const Range &nodes, const std::string &name, int verb) {
515  return add_ents_to_field_by_type(nodes, MBVERTEX, name, verb);
516 }
517 
519  const EntityHandle meshset, const std::string &name, int verb) {
520  return add_ents_to_field_by_type(meshset, MBVERTEX, name, true, verb);
521 }
522 
524  const Range &tets, const std::string &name, int verb) {
525  return add_ents_to_field_by_type(tets, MBTET, name, verb);
526 }
527 
529  const EntityHandle meshset, const std::string &name, int verb) {
530  return add_ents_to_field_by_type(meshset, MBTET, name, true, verb);
531 }
532 
534  const Range &quads, const std::string &name, int verb) {
535  return add_ents_to_field_by_type(quads, MBQUAD, name, verb);
536 }
537 
539  EntityHandle meshset, const std::string &name, int verb) {
540  return add_ents_to_field_by_type(meshset, MBQUAD, name, true, verb);
541 }
542 
544  const Range &prisms, const std::string &name, int verb) {
545  return add_ents_to_field_by_type(prisms, MBPRISM, name, verb);
546 }
547 
549  EntityHandle meshset, const std::string &name, int verb) {
550  return add_ents_to_field_by_type(meshset, MBPRISM, name, true, verb);
551 }
552 
555  Mat *Aij, int verb) {
556  return getInterface<MatrixManager>()
557  ->createMPIAIJWithArrays<PetscGlobalIdx_mi_tag>(name, Aij, verb);
558 }
559 
561  const std::string &name, Mat *Adj, int verb) {
562  return getInterface<MatrixManager>()->createMPIAdjWithArrays<Idx_mi_tag>(
563  name, Adj, verb);
564 }
565 
567  const std::string &name, Mat *Aij, PetscInt **i, PetscInt **j,
568  PetscScalar **v, int verb) {
570  if (i || j || v)
571  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "Not implemented");
572  CHKERR getInterface<MatrixManager>()
573  ->createSeqAIJWithArrays<PetscLocalIdx_mi_tag>(name, Aij, verb);
575 }
576 
578  const Problem *problem_ptr, const std::string &fe_name, FEMethod &method,
579  int lower_rank, int upper_rank, MoFEMTypes bh, int verb) {
580  return getInterface<CoreInterface>()->loop_finite_elements(
581  problem_ptr, fe_name, method, lower_rank, upper_rank, nullptr, bh, verb);
582 }
583 
585  const std::string &problem_name, const std::string &fe_name,
586  FEMethod &method, int lower_rank, int upper_rank, MoFEMTypes bh, int verb) {
587  return getInterface<CoreInterface>()->loop_finite_elements(
588  problem_name, fe_name, method, lower_rank, upper_rank, nullptr, bh, verb);
589 }
590 
592  const std::string &problem_name, const std::string &fe_name,
593  FEMethod &method, MoFEMTypes bh, int verb) {
594  return getInterface<CoreInterface>()->loop_finite_elements(
595  problem_name, fe_name, method, get_comm_rank(), get_comm_rank(), nullptr,
596  bh, verb);
597 }
598 
600  const Problem *problem_ptr, const std::string &fe_name, int verb) {
601  return getInterface<CommInterface>()->resolveSharedFiniteElements(
602  problem_ptr, fe_name, verb);
603 }
604 
606  const std::string &name, const std::string &fe_name, int verb) {
607  return getInterface<CommInterface>()->resolveSharedFiniteElements(
608  name, fe_name, verb);
609 }
610 
612  const Problem *problem_ptr, const std::string &fe_name, int verb) {
613  return getInterface<CommInterface>()->resolveSharedFiniteElements(
614  problem_ptr, fe_name, verb);
615 }
616 
618  const std::string &name, const std::string &fe_name, int verb) {
619  return getInterface<CommInterface>()->resolveSharedFiniteElements(
620  name, fe_name, verb);
621 }
622 
624  const EntityHandle *entities, const int num_entities, const int my_proc,
625  int verb) {
626  return getInterface<CommInterface>()->makeEntitiesMultishared(
627  entities, num_entities, my_proc, verb);
628 }
629 
631  Range &entities, const int my_proc, int verb) {
632  return getInterface<CommInterface>()->makeEntitiesMultishared(entities,
633  my_proc, verb);
634 }
635 
637  const std::string field_name, const int owner_proc, int verb) {
638  return getInterface<CommInterface>()->makeFieldEntitiesMultishared(
639  field_name, owner_proc, verb);
640 }
641 
643 DeprecatedCoreInterface::exchange_field_data(const std::string field_name,
644  int verb) {
645  return getInterface<CommInterface>()->exchangeFieldData(field_name, verb);
646 }
647 
649  int verb) {
650  return getInterface<CommInterface>()->synchroniseEntities(ent, verb);
651 }
652 
655  int verb) {
656  return getInterface<CommInterface>()->synchroniseFieldEntities(name, verb);
657 }
658 
659 } // namespace MoFEM
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 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
DEPRECATED MoFEMErrorCode resolve_shared_finite_elements(const Problem *problem_ptr, const std::string &fe_name, int verb=DEFAULT_VERBOSITY)
resolve shared entities for finite elements in the problem
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 make_field_entities_multishared(const std::string field_name, const int owner_proc=0, int verb=DEFAULT_VERBOSITY)
make field entities multi shared
DEPRECATED MoFEMErrorCode clear_finite_elements(const BitRefLevel &bit, const BitRefLevel &mask, int verb=-1)
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
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 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
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:477
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)
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:508
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,...
RowColData
RowColData.
Definition: definitions.h:186
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
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 synchronise_entities(Range &ent, int verb=DEFAULT_VERBOSITY)
virtual MoFEMErrorCode clear_dofs_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
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...
virtual int get_comm_rank() const =0
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)
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.
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:66
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.
#define CHKERR
Inline error check.
Definition: definitions.h:596
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 MoFEMErrorCode clear_finite_elements_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
virtual MoFEMErrorCode clear_ents_fields_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
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
DEPRECATED MoFEMErrorCode make_entities_multishared(const EntityHandle *entities, const int num_entities, const int my_proc=0, int verb=DEFAULT_VERBOSITY)
make entities from proc 0 shared on all proc
DEPRECATED MoFEMErrorCode exchange_field_data(const std::string field_name, int verb=DEFAULT_VERBOSITY)
Exchange field data.
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
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:407
DEPRECATED MoFEMErrorCode synchronise_field_entities(const std::string &name, int verb=DEFAULT_VERBOSITY)
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
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
Definition: definitions.h:183
DEPRECATED MoFEMErrorCode resolve_shared_ents(const Problem *problem_ptr, const std::string &fe_name, int verb=DEFAULT_VERBOSITY)
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