v0.10.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 #include <MoFEM.hpp>
20 
21 namespace MoFEM {
22 
25  const BitRefLevel &bit, int verb) {
26  return getInterface<BitRefManager>()->setBitRefLevelByDim(meshset, 2, bit,
27  verb);
28 }
29 
32  const BitRefLevel &bit, int verb) {
33  return getInterface<BitRefManager>()->setBitRefLevelByDim(meshset, 3, bit,
34  verb);
35 }
36 
38  const BitRefLevel &bit,
39  const bool only_tets,
40  int verb) {
41  return getInterface<BitRefManager>()->setBitRefLevel(ents, bit, only_tets,
42  verb);
43 }
44 
46  const EntityHandle meshset, const BitRefLevel &bit, int verb) {
47  return getInterface<BitRefManager>()->setBitLevelToMeshset(meshset, bit,
48  verb);
49 }
50 
53  int verb) {
54 
56  Range entities;
57  CHKERR getInterface<CoreInterface>()->get_moab().get_entities_by_handle(
58  meshset, entities, true);
59  CHKERR getInterface<BitRefManager>()->setElementsBitRefLevel(
60  entities, BitRefLevel(), verb);
62 }
63 
65 DeprecatedCoreInterface::seed_finite_elements(const Range &entities, int verb) {
66  return getInterface<BitRefManager>()->setElementsBitRefLevel(
67  entities, BitRefLevel(), verb);
68 }
69 
71  const double alpha, const std::string &field_name_x,
72  const std::string &field_name_y, bool error_if_missing,
73  bool creat_if_missing) {
74  return getInterface<FieldBlas>()->fieldAxpy(
75  alpha, field_name_x, field_name_y, error_if_missing, creat_if_missing);
76 }
78 DeprecatedCoreInterface::set_field(const double val, const EntityType type,
79  const std::string &field_name) {
80  return getInterface<FieldBlas>()->setField(val, type, field_name);
81 }
83 DeprecatedCoreInterface::set_field(const double val, const EntityType type,
84  const Range &ents,
85  const std::string &field_name) {
86  return getInterface<FieldBlas>()->setField(val, type, ents, field_name);
87 }
90  const std::string &field_name) {
91  return getInterface<FieldBlas>()->fieldScale(alpha, field_name);
92 }
93 
95  const EntityHandle from_entiti, const int to_dimension,
96  Range &adj_entities) const {
97  return getInterface<BitRefManager>()->getAdjacenciesEquality(
98  from_entiti, to_dimension, adj_entities);
99 }
100 
103  const int to_dimension,
104  Range &adj_entities) const {
105  return getInterface<BitRefManager>()->getAdjacenciesAny(
106  from_entiti, to_dimension, adj_entities);
107 }
108 
110  const Problem *problem_ptr, const EntityHandle *from_entities,
111  const int num_netities, const int to_dimension, Range &adj_entities,
112  const int operation_type, const int verb) const {
113  return getInterface<BitRefManager>()->getAdjacencies(
114  problem_ptr, from_entities, num_netities, to_dimension, adj_entities,
115  operation_type, verb);
116 }
117 
119  const BitRefLevel &bit, const EntityHandle *from_entities,
120  const int num_netities, const int to_dimension, Range &adj_entities,
121  const int operation_type, const int verb) const {
122  return getInterface<BitRefManager>()->getAdjacencies(
123  bit, from_entities, num_netities, to_dimension, adj_entities,
124  operation_type, verb);
125 }
126 
128  RowColData rc,
129  Vec *V) const {
130  return getInterface<VecManager>()->vecCreateSeq(name, rc, V);
131 }
133  RowColData rc,
134  Vec *V) const {
135  return getInterface<VecManager>()->vecCreateGhost(name, rc, V);
136 }
138  const std::string &problem, RowColData rc, int min_order, int max_order,
139  IS *is, int verb) const {
140  return getInterface<ISManager>()->isCreateProblemOrder(problem, rc, min_order,
141  max_order, is);
142 }
144  const std::string &problem, RowColData rc, const std::string &field,
145  int min_coeff_idx, int max_coeff_idx, IS *is, int verb) const {
146  return getInterface<ISManager>()->isCreateProblemFieldAndRank(
147  problem, rc, field, min_coeff_idx, max_coeff_idx, is);
148 }
151  const std::string &x_problem, const std::string &x_field_name,
152  RowColData x_rc, const std::string &y_problem,
153  const std::string &y_field_name, RowColData y_rc, std::vector<int> &idx,
154  std::vector<int> &idy, int verb) const {
155  return getInterface<ISManager>()->isCreateFromProblemFieldToOtherProblemField(
156  x_problem, x_field_name, x_rc, y_problem, y_field_name, y_rc, idx, idy);
157 }
158 
161  const std::string &x_problem, const std::string &x_field_name,
162  RowColData x_rc, const std::string &y_problem,
163  const std::string &y_field_name, RowColData y_rc, IS *ix, IS *iy,
164  int verb) const {
165  return getInterface<ISManager>()->isCreateFromProblemFieldToOtherProblemField(
166  x_problem, x_field_name, x_rc, y_problem, y_field_name, y_rc, ix, iy);
167 }
169  Vec xin, const std::string &x_problem, const std::string &x_field_name,
170  RowColData x_rc, Vec yin, const std::string &y_problem,
171  const std::string &y_field_name, RowColData y_rc, VecScatter *newctx,
172  int verb) const {
173  return getInterface<VecManager>()->vecScatterCreate(
174  xin, x_problem, x_field_name, x_rc, yin, y_problem, y_field_name, y_rc,
175  newctx);
176 }
178  Vec xin, const std::string &x_problem, RowColData x_rc, Vec yin,
179  const std::string &y_problem, RowColData y_rc, VecScatter *newctx,
180  int verb) const {
181  return getInterface<VecManager>()->vecScatterCreate(xin, x_problem, x_rc, yin,
182  y_problem, y_rc, newctx);
183 }
185  const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode,
186  ScatterMode scatter_mode) const {
187  return getInterface<VecManager>()->setLocalGhostVector(problem_ptr, rc, V,
188  mode, scatter_mode);
189 }
191  const std::string &name, RowColData rc, Vec V, InsertMode mode,
192  ScatterMode scatter_mode) const {
193  return getInterface<VecManager>()->setLocalGhostVector(name, rc, V, mode,
194  scatter_mode);
195 }
197  const Problem *problem_ptr, RowColData rc, Vec V, InsertMode mode,
198  ScatterMode scatter_mode) const {
199  return getInterface<VecManager>()->setGlobalGhostVector(problem_ptr, rc, V,
200  mode, scatter_mode);
201 }
203  const std::string &name, RowColData rc, Vec V, InsertMode mode,
204  ScatterMode scatter_mode) const {
205  return getInterface<VecManager>()->setGlobalGhostVector(name, rc, V, mode,
206  scatter_mode);
207 }
209  const Problem *problem_ptr, const std::string &field_name,
210  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
211  ScatterMode scatter_mode, int verb) {
212  return getInterface<VecManager>()->setOtherLocalGhostVector(
213  problem_ptr, field_name, cpy_field_name, rc, V, mode, scatter_mode);
214 }
216  const std::string &name, const std::string &field_name,
217  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
218  ScatterMode scatter_mode, int verb) {
219  return getInterface<VecManager>()->setOtherLocalGhostVector(
220  name, field_name, cpy_field_name, rc, V, mode, scatter_mode);
221 }
223  const Problem *problem_ptr, const std::string &field_name,
224  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
225  ScatterMode scatter_mode, int verb) {
226  return getInterface<VecManager>()->setOtherGlobalGhostVector(
227  problem_ptr, field_name, cpy_field_name, rc, V, mode, scatter_mode);
228 }
230  const std::string &name, const std::string &field_name,
231  const std::string &cpy_field_name, RowColData rc, Vec V, InsertMode mode,
232  ScatterMode scatter_mode, int verb) {
233  return getInterface<VecManager>()->setOtherGlobalGhostVector(
234  name, field_name, cpy_field_name, rc, V, mode, scatter_mode);
235 }
236 
238  int verb) {
239  return getInterface<BitRefManager>()->shiftRightBitRef(
240  shift, BitRefLevel().set(), verb);
241 }
242 
244  const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type,
245  const EntityHandle meshset, int verb) {
246  return getInterface<BitRefManager>()->getEntitiesByTypeAndRefLevel(
247  bit, mask, type, meshset, verb);
248 }
249 
251  const BitRefLevel &bit, const BitRefLevel &mask, const EntityType type,
252  Range &ents, int verb) {
253  return getInterface<BitRefManager>()->getEntitiesByTypeAndRefLevel(
254  bit, mask, type, ents, verb);
255 }
256 
259  const BitRefLevel &mask,
260  const EntityHandle meshset) {
261  return getInterface<BitRefManager>()->getEntitiesByRefLevel(bit, mask,
262  meshset);
263 }
264 
266  const BitRefLevel &bit, const BitRefLevel &mask, Range &ents) {
267  return getInterface<BitRefManager>()->getEntitiesByRefLevel(bit, mask, ents);
268 }
269 
271  const EntityHandle parent, const BitRefLevel &child_bit,
272  const EntityHandle child, EntityType child_type, const bool recursive,
273  int verb) {
274  return getInterface<BitRefManager>()->updateMeshsetByEntitiesChildren(
275  parent, child_bit, child, child_type, recursive, verb);
276 }
277 
280  const BitRefLevel &child_bit, int verb) {
281  return getInterface<BitRefManager>()->updateFieldMeshsetByEntitiesChildren(
282  child_bit, verb);
283 }
284 
287  const std::string name, const BitRefLevel &child_bit, int verb) {
288  return getInterface<BitRefManager>()->updateFieldMeshsetByEntitiesChildren(
289  name, child_bit, verb);
290 }
291 
294  const std::string name, const BitRefLevel &child_bit,
295  const EntityType fe_ent_type, int verb) {
296  return getInterface<BitRefManager>()
297  ->updateFiniteElementMeshsetByEntitiesChildren(name, child_bit,
298  fe_ent_type, verb);
299 }
300 
302  return getInterface<MeshsetsManager>()->printDisplacementSet();
304 }
305 
307  return getInterface<MeshsetsManager>()->printPressureSet();
308 }
309 
311  return getInterface<MeshsetsManager>()->printForceSet();
312 }
313 
315  return getInterface<MeshsetsManager>()->printMaterialsSet();
316 }
317 
319  const int ms_id, const CubitBCType cubit_bc_type) {
320  return getInterface<MeshsetsManager>()->checkMeshset(ms_id, cubit_bc_type);
321 }
322 
324  const CubitBCType cubit_bc_type, const int ms_id, const std::string name) {
325  return getInterface<MeshsetsManager>()->addMeshset(cubit_bc_type, ms_id,
326  name);
327 }
328 
330  const CubitBCType cubit_bc_type, const int ms_id,
331  const std::vector<double> &attributes, const std::string name) {
332  return getInterface<MeshsetsManager>()->setAtributes(cubit_bc_type, ms_id,
333  attributes, name);
334 }
337  const CubitBCType cubit_bc_type, const int ms_id,
338  const GenericAttributeData &data, const std::string name) {
339  return getInterface<MeshsetsManager>()->setAtributesByDataStructure(
340  cubit_bc_type, ms_id, data, name);
341 }
343  const CubitBCType cubit_bc_type, const int ms_id,
344  const GenericCubitBcData &data) {
345  return getInterface<MeshsetsManager>()->setBcData(cubit_bc_type, ms_id, data);
346 }
349  const int ms_id) {
350  return getInterface<MeshsetsManager>()->deleteMeshset(cubit_bc_type, ms_id);
351 }
353  const int ms_id, const CubitBCType cubit_bc_type,
354  const CubitMeshSets **cubit_meshset_ptr) {
355  return getInterface<MeshsetsManager>()->getCubitMeshsetPtr(
356  ms_id, cubit_bc_type, cubit_meshset_ptr);
357 }
359  const int ms_id, const CubitBCType cubit_bc_type, const int dimension,
360  Range &entities, const bool recursive) {
361  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
362  ms_id, cubit_bc_type.to_ulong(), dimension, entities, recursive);
363 }
365  const int ms_id, const CubitBCType cubit_bc_type, Range &entities,
366  const bool recursive) {
367  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
368  ms_id, cubit_bc_type.to_ulong(), entities, recursive);
369 }
371  const int ms_id, const unsigned int cubit_bc_type, const int dimension,
372  Range &entities, const bool recursive) {
373  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
374  ms_id, cubit_bc_type, dimension, entities, recursive);
375 }
377  const int ms_id, const unsigned int cubit_bc_type, Range &entities,
378  const bool recursive) {
379  return getInterface<MeshsetsManager>()->getEntitiesByDimension(
380  ms_id, cubit_bc_type, entities, recursive);
381 }
383  const int ms_id, const unsigned int cubit_bc_type, EntityHandle &meshset) {
384  return getInterface<MeshsetsManager>()->getMeshset(ms_id, cubit_bc_type,
385  meshset);
386 }
387 
389 DeprecatedCoreInterface::get_cubit_meshsets(const unsigned int cubit_bc_type,
390  Range &meshsets) {
391  return getInterface<MeshsetsManager>()->getMeshsetsByType(cubit_bc_type,
392  meshsets);
393 }
394 
396  const std::string &name, const bool square_matrix, int verb) {
397  return getInterface<ProblemsManager>()->buildProblemOnDistributedMesh(
398  name, square_matrix, verb);
399 }
401  Problem *problem_ptr, const bool square_matrix, int verb) {
402  return getInterface<ProblemsManager>()->buildProblemOnDistributedMesh(
403  problem_ptr, square_matrix, verb);
404 }
405 
407  const bool square_matrix,
408  int verb) {
409  return getInterface<ProblemsManager>()->buildProblem(problem_ptr,
410  square_matrix, verb);
411 }
412 
414 DeprecatedCoreInterface::build_problem(const std::string &problem_name,
415  const bool square_matrix, int verb) {
416  return getInterface<ProblemsManager>()->buildProblem(problem_name,
417  square_matrix, verb);
418 }
419 
422  int verb) {
423  return getInterface<ProblemsManager>()->partitionSimpleProblem(name, verb);
424 }
425 
427  const std::string &name, const std::string &problem_for_rows,
428  bool copy_rows, const std::string &problem_for_cols, bool copy_cols,
429  int verb) {
430  return getInterface<ProblemsManager>()->inheritPartition(
431  name, problem_for_rows, copy_rows, problem_for_cols, copy_cols, verb);
432 }
433 
435  const std::string &out_name, const std::vector<std::string> &fields_row,
436  const std::vector<std::string> &fields_col, const std::string &main_problem,
437  const bool square_matrix, int verb) {
438  return getInterface<ProblemsManager>()->buildSubProblem(
439  out_name, fields_row, fields_col, main_problem, square_matrix, nullptr,
440  nullptr, verb);
441 }
442 
444 DeprecatedCoreInterface::partition_problem(const std::string &name, int verb) {
445  return getInterface<ProblemsManager>()->partitionProblem(name, verb);
446 }
447 
449  const std::string &name, bool part_from_moab, int low_proc, int hi_proc,
450  int verb) {
451  return getInterface<ProblemsManager>()->partitionFiniteElements(
452  name, part_from_moab, low_proc, hi_proc, verb);
454 }
455 
458  int verb) {
459  return getInterface<ProblemsManager>()->partitionGhostDofs(name, verb);
460 }
461 
463  const std::string &name, const std::string &fe_name, PetscLayout *layout,
464  int verb) {
465  return getInterface<ProblemsManager>()->getProblemElementsLayout(
466  name, fe_name, layout);
467 }
468 
470  const int dim,
471  const int adj_dim,
472  const int n_parts,
473  int verb) {
474  return getInterface<ProblemsManager>()->partitionMesh(
475  ents, dim, adj_dim, n_parts, NULL, NULL, NULL, verb);
476 }
477 
480  const BitRefLevel &mask, int verb) {
481  return clear_dofs_fields_by_bit_ref(bit, mask, verb);
482 }
483 
486  const BitRefLevel &mask, int verb) {
487  return clear_ents_fields_by_bit_ref(bit, mask, verb);
488 }
489 
491  const BitRefLevel &bit, const BitRefLevel &mask, int verb) {
492  return clear_finite_elements_by_bit_ref(bit, mask, verb);
493 }
494 
496  const Range &edges, const std::string &name, int verb) {
497  return add_ents_to_field_by_type(edges, MBEDGE, name, verb);
498 }
499 
501  const EntityHandle meshset, const std::string &name, int verb) {
502  return add_ents_to_field_by_type(meshset, MBEDGE, name, true, verb);
503 }
504 
506  const EntityHandle meshset, const std::string &name, int verb) {
507  return add_ents_to_field_by_type(meshset, MBTRI, name, true, verb);
508 }
509 
511  const Range &tris, const std::string &name, int verb) {
512  return add_ents_to_field_by_type(tris, MBTRI, name, verb);
513 }
514 
516  const Range &nodes, const std::string &name, int verb) {
517  return add_ents_to_field_by_type(nodes, MBVERTEX, name, verb);
518 }
519 
521  const EntityHandle meshset, const std::string &name, int verb) {
522  return add_ents_to_field_by_type(meshset, MBVERTEX, name, true, verb);
523 }
524 
526  const Range &tets, const std::string &name, int verb) {
527  return add_ents_to_field_by_type(tets, MBTET, name, verb);
528 }
529 
531  const EntityHandle meshset, const std::string &name, int verb) {
532  return add_ents_to_field_by_type(meshset, MBTET, name, true, verb);
533 }
534 
536  const Range &quads, const std::string &name, int verb) {
537  return add_ents_to_field_by_type(quads, MBQUAD, name, verb);
538 }
539 
541  EntityHandle meshset, const std::string &name, int verb) {
542  return add_ents_to_field_by_type(meshset, MBQUAD, name, true, verb);
543 }
544 
546  const Range &prisms, const std::string &name, int verb) {
547  return add_ents_to_field_by_type(prisms, MBPRISM, name, verb);
548 }
549 
551  EntityHandle meshset, const std::string &name, int verb) {
552  return add_ents_to_field_by_type(meshset, MBPRISM, name, true, verb);
553 }
554 
557  Mat *Aij, int verb) {
558  return getInterface<MatrixManager>()
559  ->createMPIAIJWithArrays<PetscGlobalIdx_mi_tag>(name, Aij, verb);
560 }
561 
563  const std::string &name, Mat *Adj, int verb) {
564  return getInterface<MatrixManager>()->createMPIAdjWithArrays<Idx_mi_tag>(
565  name, Adj, verb);
566 }
567 
569  const std::string &name, Mat *Aij, PetscInt **i, PetscInt **j,
570  PetscScalar **v, int verb) {
572  if (i || j || v)
573  SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED, "Not implemented");
574  CHKERR getInterface<MatrixManager>()
575  ->createSeqAIJWithArrays<PetscLocalIdx_mi_tag>(name, Aij, verb);
577 }
578 
580  const Problem *problem_ptr, const std::string &fe_name, FEMethod &method,
581  int lower_rank, int upper_rank, MoFEMTypes bh, int verb) {
582  return getInterface<CoreInterface>()->loop_finite_elements(
583  problem_ptr, fe_name, method, lower_rank, upper_rank, nullptr, bh,
584  CacheTupleSharedPtr(), verb);
585 }
586 
588  const std::string &problem_name, const std::string &fe_name,
589  FEMethod &method, int lower_rank, int upper_rank, MoFEMTypes bh, int verb) {
590  return getInterface<CoreInterface>()->loop_finite_elements(
591  problem_name, fe_name, method, lower_rank, upper_rank, nullptr, bh,
592  CacheTupleSharedPtr(), verb);
593 }
594 
596  const std::string &problem_name, const std::string &fe_name,
597  FEMethod &method, MoFEMTypes bh, int verb) {
598  return getInterface<CoreInterface>()->loop_finite_elements(
599  problem_name, fe_name, method, get_comm_rank(), get_comm_rank(), nullptr,
600  bh, CacheTupleSharedPtr(), verb);
601 }
602 
604  const EntityHandle *entities, const int num_entities, const int my_proc,
605  int verb) {
606  return getInterface<CommInterface>()->makeEntitiesMultishared(
607  entities, num_entities, my_proc, verb);
608 }
609 
611  Range &entities, const int my_proc, int verb) {
612  return getInterface<CommInterface>()->makeEntitiesMultishared(entities,
613  my_proc, verb);
614 }
615 
617  const std::string field_name, const int owner_proc, int verb) {
618  return getInterface<CommInterface>()->makeFieldEntitiesMultishared(
619  field_name, owner_proc, verb);
620 }
621 
623 DeprecatedCoreInterface::exchange_field_data(const std::string field_name,
624  int verb) {
625  return getInterface<CommInterface>()->exchangeFieldData(field_name, verb);
626 }
627 
629  int verb) {
630  return getInterface<CommInterface>()->synchroniseEntities(ent, verb);
631 }
632 
635  int verb) {
636  return getInterface<CommInterface>()->synchroniseFieldEntities(name, verb);
637 }
638 
640  const BitRefLevel bit, const BitRefLevel mask, int verb) {
641  return remove_parents_by_bit_ref(bit, mask, verb);
642 }
643 
644 } // namespace MoFEM
Generic bc data structure.
Definition: BCData.hpp:31
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
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 remove_parents_by_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)
boost::shared_ptr< CacheTuple > CacheTupleSharedPtr
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:485
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)
virtual MoFEMErrorCode remove_parents_by_bit_ref(const BitRefLevel bit, const BitRefLevel mask, int verb=DEFAULT_VERBOSITY)=0
Remove parent from entities on bit level.
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:516
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:192
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
const int dim
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
static Index< 'i', 3 > i
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:67
static Index< 'j', 3 > j
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:604
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
#define DEPRECATED
Definition: definitions.h:29
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:415
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:189
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