v0.8.23
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
MoFEM::BitLevelCoupler Struct Reference

Interface set parent for vertices, edges, triangles and tetrahedrons.FIXME: Not tested, slow, bugs. More...

#include <src/interfaces/BitLevelCoupler.hpp>

Inheritance diagram for MoFEM::BitLevelCoupler:
[legend]
Collaboration diagram for MoFEM::BitLevelCoupler:
[legend]

Public Member Functions

MoFEMErrorCode query_interface (const MOFEMuuid &uuid, UnknownInterface **iface) const
 
 BitLevelCoupler (const MoFEM::Core &core)
 
MoFEMErrorCode buildTree (const BitRefLevel &parent_level, int verb=0)
 build adaptive kd-tree More...
 
MoFEMErrorCode resetTree (const BitRefLevel &parent_level, int verb=0)
 reset adaptive kd-tree More...
 
MoFEMErrorCode getParent (const double *coords, EntityHandle &parent, bool tet_only=false, const double iter_tol=1.0e-10, const double inside_tol=1.0e-6, int verb=0)
 get parent entity More...
 
MoFEMErrorCode buildAdjacenciesVerticesOnTets (const BitRefLevel &parent_level, Range &children, bool vertex_elements=false, const double iter_tol=1.0e-10, const double inside_tol=1.0e-6, bool throw_error=true, int verb=0)
 finding parents for vertices More...
 
MoFEMErrorCode buildAdjacenciesEdgesFacesVolumes (const BitRefLevel &parent_level, Range &children, bool elements=true, int verb=0)
 finding parents for edegs, faces and tets More...
 
MoFEMErrorCode resetParents (Range &children, bool elements=true, int verb=0)
 reset parent entities More...
 
MoFEMErrorCode copyFieldDataFromParentToChildren (const std::vector< EntityHandle > &parents, const std::vector< EntityHandle > &children, const bool verify=true)
 copy data from parents More...
 
MoFEMErrorCode copyFieldDataFromParentToChildren (const BitRefLevel bit, const BitRefLevel mask, const bool verify=true)
 copy data from parents More...
 
- Public Member Functions inherited from MoFEM::UnknownInterface
template<class IFACE >
MoFEMErrorCode registerInterface (const MOFEMuuid &uuid, bool error_if_registration_failed=true)
 Register interface. More...
 
template<class IFACE , bool VERIFY = false>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, IFACE *&iface) const
 Get interface by uuid and return reference to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface refernce to pointer of interface. More...
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface. More...
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface. More...
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface. More...
 
virtual ~UnknownInterface ()
 
virtual MoFEMErrorCode getLibVersion (Version &version) const
 Get library version. More...
 
virtual const MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version) const
 Get database major version. More...
 
virtual MoFEMErrorCode getInterfaceVersion (Version &version) const
 Get database major version. More...
 
template<>
MoFEMErrorCode getInterface (const MOFEMuuid &uuid, UnknownInterface *&iface) const
 

Public Attributes

MoFEM::CorecOre
 
bool vErify
 by default is switched off, with it on to verify if existing parent is equal to parent set by interface More...
 

Private Member Functions

MoFEMErrorCode chanegParent (RefEntity_multiIndex::iterator it, EntityHandle parent)
 
MoFEMErrorCode verifyParent (RefEntity_multiIndex::iterator it, EntityHandle parent)
 
MoFEMErrorCode getLocCoordsOnTet (EntityHandle tet, const double *glob_coords, int verb=0)
 

Private Attributes

double cOords [12+3]
 
double diffN [12]
 
double N [4]
 
double locCoords [3]
 
const EntityHandlecOnn
 
boost::scoped_ptr< AdaptiveKDTree > treePtr
 

Additional Inherited Members

- Protected Member Functions inherited from MoFEM::UnknownInterface
boost::typeindex::type_index getClassIdx (const MOFEMuuid &uid) const
 Get type name for interface Id. More...
 
MOFEMuuid getUId (const boost::typeindex::type_index &class_idx) const
 Get interface Id for class name. More...
 

Detailed Description

Interface set parent for vertices, edges, triangles and tetrahedrons.

FIXME: Not tested, slow, bugs.

Definition at line 32 of file BitLevelCoupler.hpp.

Constructor & Destructor Documentation

◆ BitLevelCoupler()

MoFEM::BitLevelCoupler::BitLevelCoupler ( const MoFEM::Core core)

Definition at line 39 of file BitLevelCoupler.hpp.

39  :
40  cOre(const_cast<MoFEM::Core&>(core)),
41  vErify(false) {}
bool vErify
by default is switched off, with it on to verify if existing parent is equal to parent set by interfa...

Member Function Documentation

◆ buildAdjacenciesEdgesFacesVolumes()

MoFEMErrorCode MoFEM::BitLevelCoupler::buildAdjacenciesEdgesFacesVolumes ( const BitRefLevel parent_level,
Range &  children,
bool  elements = true,
int  verb = 0 
)

finding parents for edegs, faces and tets

It assumes that parents for vertices are known. Run buildAdjacenciesVerticesOnTets if parents for vertices are not set.

Parameters
parent_levelbit level of parents
childrenlist of entities for which parents are being set
vertex_elementsif true algorithm assumes that vertices elements are used. IF NOT SET AND SUCH ELEMENTS EXIST IT WILL RESULT IN UNPREDICTABLE BEHAVIOR.
iter_toltolerance for convergence of point search
inside_toltolerance for inside element calculation
throw_errorif parent can not be found
verboselevel

Definition at line 285 of file BitLevelCoupler.cpp.

286  {
288 
289  if (verb > 2)
290  std::cout << children << std::endl;
291 
292  Interface &m_field = cOre;
293 
294  // access to ref dofs multi-index
295  const RefEntity_multiIndex *refined_ptr;
296  ierr = m_field.get_ref_ents(&refined_ptr);
297  CHKERRG(ierr);
298 
299  std::vector<EntityHandle> conn_parents;
300 
301  Range::iterator eit, hi_eit;
302  eit = children.begin();
303  hi_eit = children.end();
304  for (; eit != hi_eit; eit++) {
305 
306  // check entity type
307  EntityType type;
308  type = m_field.get_moab().type_from_handle(*eit);
309  switch (type) {
310  case MBEDGE:
311  case MBTRI:
312  case MBTET:
313  break;
314  default:
315  continue;
316  }
317 
318  // get ref entity iterator
319  RefEntity_multiIndex::index<Ent_mi_tag>::type::iterator it;
320  it = refined_ptr->get<Ent_mi_tag>().find(*eit);
321  // that entity is on parent bit level, no need to process
322  if (((*it)->getBitRefLevel() & parent_level).any()) {
323  continue;
324  }
325 
326  if (verb > 1) {
327  std::cout << "before: " << **it << std::endl;
328  }
329 
330  // check if entity has a parent and parent is on parent bit level
331  EntityHandle parent_ent;
332  parent_ent = (*it)->getParentEnt();
333  const RefEntity ref_parent_ent(m_field.get_basic_entity_data_ptr(),
334  parent_ent);
335  if ((ref_parent_ent.getBitRefLevel() & parent_level).any()) {
336  if (!vErify)
337  continue;
338  }
339 
340  // connectivity
341  int max_dim = m_field.get_moab().dimension_from_handle(*eit);
342  const EntityHandle *conn;
343  int num_nodes;
344  ierr = m_field.get_moab().get_connectivity(*eit, conn, num_nodes);
345  CHKERRG(ierr);
346  conn_parents.resize(num_nodes);
347  for (int nn = 0; nn < num_nodes; nn++) {
348  const RefEntity ent(m_field.get_basic_entity_data_ptr(), conn[nn]);
349  conn_parents[nn] = ent.getParentEnt();
350  RefEntity_multiIndex::index<Ent_mi_tag>::type::iterator cit;
351  cit = refined_ptr->get<Ent_mi_tag>().find(conn_parents[nn]);
352  if (cit == refined_ptr->end()) {
353  conn_parents[nn] = conn[nn];
354  cit = refined_ptr->get<Ent_mi_tag>().find(conn_parents[nn]);
355  }
356  if (((*cit)->getBitRefLevel() & parent_level).none()) {
357  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
358  "parent of vertex is not on parent bit level");
359  }
360  int ent_dim = m_field.get_moab().dimension_from_handle(conn_parents[nn]);
361  max_dim = ent_dim > max_dim ? ent_dim : max_dim;
362  }
363 
364  if (verb > 1)
365  std::cout << "max_dim " << max_dim << std::endl;
366 
367  if (max_dim > 0) {
368 
369  for (; max_dim <= 3; max_dim++) {
370  Range parent_ents;
371  rval = m_field.get_moab().get_adjacencies(
372  &*conn_parents.begin(), num_nodes, max_dim, false, parent_ents);
374  parent_ents.erase((*it)->getRefEnt());
375  if (!parent_ents.empty()) {
376  ierr = chanegParent(refined_ptr->project<0>(it), *parent_ents.begin());
377  CHKERRG(ierr);
378  if (verb > 1) {
379  std::cout << "after: " << **it << std::endl << std::endl;
380  }
381  break;
382  }
383  }
384 
385  if (!vErify && max_dim > 3) {
386  ierr = chanegParent(refined_ptr->project<0>(it), 0);
387  CHKERRG(ierr);
388  if (verb > 1) {
389  std::cout << "parent not found\n";
390  }
391  }
392  }
393  }
394 
396 }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
bool vErify
by default is switched off, with it on to verify if existing parent is equal to parent set by interfa...
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, member< RefEntity::BasicEntity, EntityHandle, &RefEntity::ent > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType > >, ordered_non_unique< tag< ParentEntType_mi_tag >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
MoFEMErrorCode chanegParent(RefEntity_multiIndex::iterator it, EntityHandle parent)

◆ buildAdjacenciesVerticesOnTets()

MoFEMErrorCode MoFEM::BitLevelCoupler::buildAdjacenciesVerticesOnTets ( const BitRefLevel parent_level,
Range &  children,
bool  vertex_elements = false,
const double  iter_tol = 1.0e-10,
const double  inside_tol = 1.0e-6,
bool  throw_error = true,
int  verb = 0 
)

finding parents for vertices

Use kd-tree to find tetrahedral or other volume element.

Parameters
parent_levelbit level of parents
childrenlist of vertices for which parents are being set
vertex_elementsif true algorithm assumes that vertices elements are used. IF NOT SET AND SUCH ELEMENTS EXIST IT WILL RESULT IN UNPREDICTABLE BEHAVIOUR.
iter_toltolerance for convergence of point search
inside_toltolerance for inside element calculation
throw_errorif parent can not be found
verboselevel

Definition at line 213 of file BitLevelCoupler.cpp.

216  {
218  Interface &m_field = cOre;
219  // build Tree
220  bool init_tree = false;
221 
222  // find parents of all nodes, if node has no parent then tetrahedral
223  // containing that node is searched node on tetrahedra my by part of face or
224  // edge on that tetrahedral, this need to be verified
225  const RefEntity_multiIndex *refined_ptr;
226  ierr = m_field.get_ref_ents(&refined_ptr);
227  CHKERRG(ierr);
228  RefEntity_multiIndex::index<EntType_mi_tag>::type::iterator it, hi_it;
229  it = refined_ptr->get<EntType_mi_tag>().lower_bound(MBVERTEX);
230  hi_it = refined_ptr->get<EntType_mi_tag>().upper_bound(MBVERTEX);
231 
232  for (; it != hi_it; it++) {
233 
234  // entity on parent level, can be parent to yourself
235  if (((*it)->getBitRefLevel() & parent_level).any())
236  continue;
237 
238  if (verb > 1) {
239  std::cout << *it << " " << (*it)->getBitRefLevel() << std::endl;
240  }
241 
242  // that vertex is on parent bit level, no need to process
243  // check if vertex has a parent and parent is on parent bit level
244  EntityHandle parent_ent;
245  parent_ent = (*it)->getParentEnt();
246  const RefEntity ref_parent_ent(m_field.get_basic_entity_data_ptr(),
247  parent_ent);
248  if ((ref_parent_ent.getBitRefLevel() & parent_level).any()) {
249  continue;
250  }
251 
252  // check if vertex is on child entities set
253  EntityHandle node = (*it)->getRefEnt();
254  if (children.find(node) == children.end()) {
255  continue;
256  }
257 
258  // build a boundary volume Tree
259  // if(!treePtr) {
260  ierr = buildTree(parent_level, verb);
261  CHKERRG(ierr);
262  init_tree = true;
263  //}
264 
265  double coords[3];
266  rval = m_field.get_moab().get_coords(&node, 1, coords);
268  EntityHandle parent = 0;
269  ierr = getParent(coords, parent, false, iter_tol, inside_tol, verb);
270  CHKERRG(ierr);
271  ierr = chanegParent(refined_ptr->project<0>(it), parent);
272  CHKERRG(ierr);
273  if (throw_error && parent == 0) {
274  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
275  "tets or any other entity for node not found");
276  }
277  }
278 
279  if (init_tree) {
280  treePtr->reset_tree();
281  }
283 }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
boost::scoped_ptr< AdaptiveKDTree > treePtr
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
MoFEMErrorCode buildTree(const BitRefLevel &parent_level, int verb=0)
build adaptive kd-tree
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
MoFEMErrorCode getParent(const double *coords, EntityHandle &parent, bool tet_only=false, const double iter_tol=1.0e-10, const double inside_tol=1.0e-6, int verb=0)
get parent entity
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, member< RefEntity::BasicEntity, EntityHandle, &RefEntity::ent > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType > >, ordered_non_unique< tag< ParentEntType_mi_tag >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
MoFEMErrorCode chanegParent(RefEntity_multiIndex::iterator it, EntityHandle parent)

◆ buildTree()

MoFEMErrorCode MoFEM::BitLevelCoupler::buildTree ( const BitRefLevel parent_level,
int  verb = 0 
)

build adaptive kd-tree

Definition at line 29 of file BitLevelCoupler.cpp.

30  {
32  Interface &m_field = cOre;
33  treePtr.reset(new AdaptiveKDTree(&m_field.get_moab()));
34  Range tets;
35  ierr = m_field.getInterface<BitRefManager>()->getEntitiesByTypeAndRefLevel(
36  parent_level, BitRefLevel().set(), MBTET, tets);
37  CHKERRG(ierr);
38  rval = treePtr->build_tree(tets);
40  if (verb > 2) {
41  rval = treePtr->print();
43  }
45 }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
boost::scoped_ptr< AdaptiveKDTree > treePtr
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition: Types.hpp:51

◆ chanegParent()

MoFEMErrorCode MoFEM::BitLevelCoupler::chanegParent ( RefEntity_multiIndex::iterator  it,
EntityHandle  parent 
)
private

Definition at line 398 of file BitLevelCoupler.cpp.

399  {
401 
402  Interface &m_field = cOre;
403  const RefEntity_multiIndex *refined_ptr;
404  ierr = m_field.get_ref_ents(&refined_ptr);
405  CHKERRG(ierr);
406 
407  if (vErify) {
408  ierr = verifyParent(it, parent);
409  CHKERRG(ierr);
410  }
411 
412  RefEntity_change_parent modifier(parent);
413  bool success =
414  const_cast<RefEntity_multiIndex *>(refined_ptr)->modify(it, modifier);
415  if (!success) {
416  SETERRQ(PETSC_COMM_SELF, MOFEM_OPERATION_UNSUCCESSFUL,
417  "unsuccessful operation");
418  }
419 
421 }
MoFEMErrorCode verifyParent(RefEntity_multiIndex::iterator it, EntityHandle parent)
bool vErify
by default is switched off, with it on to verify if existing parent is equal to parent set by interfa...
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, member< RefEntity::BasicEntity, EntityHandle, &RefEntity::ent > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType > >, ordered_non_unique< tag< ParentEntType_mi_tag >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex

◆ copyFieldDataFromParentToChildren() [1/2]

MoFEMErrorCode MoFEM::BitLevelCoupler::copyFieldDataFromParentToChildren ( const std::vector< EntityHandle > &  parents,
const std::vector< EntityHandle > &  children,
const bool  verify = true 
)

copy data from parents

This not approximate date from, simply copy DOFs values from one mesh to another. This is useful for special case of refinement, e.g. insertion of interface, where entities on the interface are doubled to create displacement jump. In general case use this function could lead to wrong results.

Note
Move data only if type of child and parent is the same.
Parameters
parentpointer to array of parent entities
childrenpointer to array of children entities
verifyif true verifi consistency with database
Returns
error code

Definition at line 502 of file BitLevelCoupler.cpp.

504  {
505  Interface &m_field = cOre;
506  moab::Interface &moab = m_field.get_moab();
508 
509  if (parents.size() != children.size()) {
510  SETERRQ2(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
511  "parents adn children vectors has to have the same size %d != %d",
512  parents.size(), children.size());
513  }
514 
515  const int nb_elems = parents.size();
516  std::vector<double *> data(nb_elems);
517  std::vector<int> data_size(nb_elems);
518 
519  const Field_multiIndex *fields_ptr;
520  CHKERR m_field.get_fields(&fields_ptr);
521  for (auto fit = fields_ptr->begin(); fit != fields_ptr->end(); fit++) {
522 
523  // Verify consistency with database
524  if (verify) {
525  // Get pointer to multi-index with field entities
526  const FieldEntity_multiIndex *field_ents;
527  CHKERR m_field.get_field_ents(&field_ents);
528 
529  auto get_ents_max_order = [&](const std::vector<EntityHandle> &ents) {
530  boost::shared_ptr<std::vector<const void *>> ents_max_order(
531  new std::vector<const void *>());
532  ents_max_order->resize(ents.size());
533  CHKERR moab.tag_get_by_ptr((*fit)->th_AppOrder, &*ents.begin(),
534  ents.size(), &*ents_max_order->begin());
535  return ents_max_order;
536  };
537 
538  auto max_order_parents = get_ents_max_order(parents);
539  auto max_order_children = get_ents_max_order(children);
540 
541  auto pit = parents.begin();
542  auto cit = children.begin();
543  auto vit_parent_max_order = max_order_parents->begin();
544  auto vit_child_max_order = max_order_children->begin();
545 
546  for (; pit != parents.end();
547  ++pit, ++cit, ++vit_parent_max_order, ++vit_child_max_order) {
548  // verify entity type
549  if (moab.type_from_handle(*pit) != moab.type_from_handle(*cit)) {
550  SETERRQ(m_field.get_comm(), MOFEM_DATA_INCONSISTENCY,
551  "inconsistent type");
552  }
553  // ref ent pointers
554  auto ref_parent_ptr = boost::make_shared<RefEntity>(
555  m_field.get_basic_entity_data_ptr(), *pit);
556  auto ref_child_ptr = boost::make_shared<RefEntity>(
557  m_field.get_basic_entity_data_ptr(), *cit);
558  // create mofem entity objects
559  boost::shared_ptr<FieldEntity> mofem_ent_parent(new FieldEntity(
560  *fit, ref_parent_ptr,
561  FieldEntity::makeSharedFieldDataAdaptorPtr(*fit, ref_parent_ptr),
562  boost::shared_ptr<const int>(
563  max_order_parents,
564  static_cast<const int *>(*vit_parent_max_order))));
565  boost::shared_ptr<FieldEntity> mofem_ent_child(new FieldEntity(
566  *fit, ref_child_ptr,
567  FieldEntity::makeSharedFieldDataAdaptorPtr(*fit, ref_child_ptr),
568  boost::shared_ptr<const int>(
569  max_order_children,
570  static_cast<const int *>(*vit_child_max_order))));
571  // check approximation order
572  if (mofem_ent_parent->getMaxOrder() == mofem_ent_child->getMaxOrder()) {
573  // approximation order is equal, simply copy data
574  for (unsigned int dd = 0;
575  dd != mofem_ent_child->getEntFieldData().size(); dd++) {
576  mofem_ent_child->getEntFieldData()[dd] =
577  mofem_ent_parent->getEntFieldData()[dd];
578  }
579  } else {
580  // approximation orders is different
581  FieldEntity_multiIndex::iterator fcit =
582  field_ents->find(mofem_ent_child->getGlobalUniqueId());
583  if (fcit == field_ents->end()) {
584  // entity not in database, set order and copy data
585  (FieldEntity_change_order(mofem_ent_parent->getMaxOrder()))(
586  mofem_ent_child);
587  for (unsigned int dd = 0;
588  dd != mofem_ent_child->getEntFieldData().size(); dd++) {
589  mofem_ent_child->getEntFieldData()[dd] =
590  mofem_ent_parent->getEntFieldData()[dd];
591  }
592  } else {
593  int parent_nb_dofs = mofem_ent_parent->getEntFieldData().size();
594  int child_nb_dofs = mofem_ent_child->getEntFieldData().size();
595  for (int dd = 0; dd != child_nb_dofs; dd++) {
596  if (dd < parent_nb_dofs) {
597  mofem_ent_child->getEntFieldData()[dd] =
598  mofem_ent_parent->getEntFieldData()[dd];
599  } else {
600  mofem_ent_child->getEntFieldData()[dd] = 0;
601  }
602  }
603  }
604  }
605  }
606  } else {
607 
608  auto copy_tag_data = [this, &moab, &data, &data_size](auto th, auto &p,
609  auto &c) {
611  // Get pointer and size of field values tag
612  CHKERR moab.tag_get_by_ptr(th, p, (const void **)&data.front(),
613  &data_size.front());
614  // Set data
615  CHKERR moab.tag_set_by_ptr(th, c, (void *const *)&data.front(),
616  &data_size.front());
618  };
619 
620  Range p, c;
621  p.insert_list(parents.begin(), parents.end());
622  c.insert_list(children.begin(), children.end());
623 
624  Range parents_verts = p.subset_by_type(MBTET);
625  Range children_verts = c.subset_by_type(MBTET);
626  Range parents_without_verts = subtract(p, parents_verts);
627  Range children_without_verts = subtract(c, children_verts);
628 
629  CHKERR copy_tag_data(fit->get()->th_FieldDataVerts, parents_verts,
630  children_verts);
631  CHKERR copy_tag_data(fit->get()->th_FieldData, parents_verts,
632  children_verts);
633 
634  }
635  }
636 
638 }
moab::Interface & get_moab()
Definition: Core.hpp:266
static boost::shared_ptr< FieldData *const > makeSharedFieldDataAdaptorPtr(const boost::shared_ptr< Field > &field_ptr, const boost::shared_ptr< RefEntity > &ref_ent_ptr)
Return shared pointer to entity field data vector adaptor.
multi_index_container< boost::shared_ptr< FieldEntity >, indexed_by< ordered_unique< tag< Unique_mi_tag >, member< FieldEntity, UId, &FieldEntity::globalUId > >, ordered_non_unique< tag< FieldName_mi_tag >, const_mem_fun< FieldEntity::interface_type_Field, boost::string_ref, &FieldEntity::getNameRef > >, ordered_non_unique< tag< Ent_mi_tag >, const_mem_fun< FieldEntity, EntityHandle, &FieldEntity::getEnt > >, ordered_non_unique< tag< Composite_Name_And_Ent_mi_tag >, composite_key< FieldEntity, const_mem_fun< FieldEntity::interface_type_Field, boost::string_ref, &FieldEntity::getNameRef >, const_mem_fun< FieldEntity, EntityHandle, &FieldEntity::getEnt > > > > > FieldEntity_multiIndex
MultiIndex container keeps FieldEntity.
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:476
multi_index_container< boost::shared_ptr< Field >, indexed_by< hashed_unique< tag< BitFieldId_mi_tag >, const_mem_fun< Field, const BitFieldId &, &Field::getId >, HashBit< BitFieldId >, EqBit< BitFieldId > >, ordered_unique< tag< Meshset_mi_tag >, member< Field, EntityHandle, &Field::meshSet > >, ordered_unique< tag< FieldName_mi_tag >, const_mem_fun< Field, boost::string_ref, &Field::getNameRef > >, ordered_non_unique< tag< BitFieldId_space_mi_tag >, const_mem_fun< Field, FieldSpace, &Field::getSpace > > > > Field_multiIndex
Field_multiIndex for Field.
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
#define CHKERR
Inline error check.
Definition: definitions.h:595
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:406

◆ copyFieldDataFromParentToChildren() [2/2]

MoFEMErrorCode MoFEM::BitLevelCoupler::copyFieldDataFromParentToChildren ( const BitRefLevel  bit,
const BitRefLevel  mask,
const bool  verify = true 
)

copy data from parents

This not approximate date from, simply copy DOFs values from one mesh to another. This is useful for special case of refinement, e.g. insertion of interface, where entities on the interface are doubled to create displacement jump.

In general case use this function could lead to wrong results.

Note
Move data only if type of child and parent is the same.
Parameters
bitbit ref level
verifyif true verifi consistency with database
Returns
error code

Definition at line 640 of file BitLevelCoupler.cpp.

641  {
642  Interface &m_field = cOre;
643  // moab::Interface& moab = m_field.get_moab();
645  Range ents;
646  ierr = m_field.getInterface<BitRefManager>()->getEntitiesByRefLevel(bit, mask,
647  ents);
648  CHKERRG(ierr);
649  std::vector<EntityHandle> parents;
650  std::vector<EntityHandle> children;
651  for (Range::iterator eit = ents.begin(); eit != ents.end(); eit++) {
652  RefEntity ref_ent(m_field.get_basic_entity_data_ptr(), *eit);
653  if (ref_ent.getParentEntType() == ref_ent.getEntType()) {
654  children.push_back(*eit);
655  parents.push_back(ref_ent.getParentEnt());
656  }
657  }
658  ierr = copyFieldDataFromParentToChildren(parents, children, verify);
659  CHKERRG(ierr);
661 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
MoFEMErrorCode copyFieldDataFromParentToChildren(const std::vector< EntityHandle > &parents, const std::vector< EntityHandle > &children, const bool verify=true)
copy data from parents

◆ getLocCoordsOnTet()

MoFEMErrorCode MoFEM::BitLevelCoupler::getLocCoordsOnTet ( EntityHandle  tet,
const double glob_coords,
int  verb = 0 
)
private

Definition at line 464 of file BitLevelCoupler.cpp.

466  {
467  Interface &m_field = cOre;
469 
470  int num_nodes;
471  rval = m_field.get_moab().get_connectivity(tet, cOnn, num_nodes, true);
473  rval = m_field.get_moab().get_coords(cOnn, num_nodes, cOords);
475  double shifted_glob_coors[3];
476  cblas_dcopy(3, glob_coords, 1, shifted_glob_coors, 1);
477  for (int nn = 1; nn < 4; nn++) {
478  cblas_daxpy(3, -1, cOords, 1, &cOords[nn * 3], 1);
479  }
480  cblas_daxpy(3, -1, cOords, 1, shifted_glob_coors, 1);
481  for (int dd = 0; dd < 3; dd++) {
482  cOords[dd] = 0;
483  }
485  CHKERRG(ierr);
486  locCoords[0] = locCoords[1] = locCoords[2] = 0;
487  ierr = ShapeMBTET(N, &locCoords[0], &locCoords[1], &locCoords[2], 1);
488  CHKERRG(ierr);
489  ierr = ShapeMBTET_inverse(N, diffN, cOords, shifted_glob_coors, locCoords);
490  CHKERRG(ierr);
491  ierr = ShapeMBTET(N, &locCoords[0], &locCoords[1], &locCoords[2], 1);
492  CHKERRG(ierr);
493 
494  if (verb > 1) {
495  std::cout << "N " << N[0] << " " << N[1] << " " << N[2] << " " << N[3]
496  << std::endl;
497  }
498 
500 }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
PetscErrorCode ShapeMBTET(double *N, const double *G_X, const double *G_Y, const double *G_Z, int DIM)
calculate shape functions
Definition: fem_tools.c:318
void cblas_daxpy(const int N, const double alpha, const double *X, const int incX, double *Y, const int incY)
Definition: cblas_daxpy.c:11
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
void cblas_dcopy(const int N, const double *X, const int incX, double *Y, const int incY)
Definition: cblas_dcopy.c:11
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
PetscErrorCode ShapeMBTET_inverse(double *N, double *diffN, const double *elem_coords, const double *glob_coords, double *loc_coords)
calculate local coordinates for given global coordinates
Definition: fem_tools.c:347
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84
PetscErrorCode ShapeDiffMBTET(double *diffN)
calculate derivatives of shape functions
Definition: fem_tools.c:331
const Tensor2_symmetric_Expr< const ddTensor0< T, Dim, i, j >, typename promote< T, double >::V, Dim, i, j > dd(const Tensor0< T * > &a, const Index< i, Dim > index1, const Index< j, Dim > index2, const Tensor1< int, Dim > &d_ijk, const Tensor1< double, Dim > &d_xyz)
Definition: ddTensor0.hpp:33
const EntityHandle * cOnn

◆ getParent()

MoFEMErrorCode MoFEM::BitLevelCoupler::getParent ( const double coords,
EntityHandle parent,
bool  tet_only = false,
const double  iter_tol = 1.0e-10,
const double  inside_tol = 1.0e-6,
int  verb = 0 
)

get parent entity

Use kd-tree to find tetrahedral or other volume element.

Parameters
coordinate
parentreturned parent entity
iter_toltolerance for convergence of point search
inside_toltolerance for inside element calculation
throw_errorif parent can not be found
verboselevel

Definition at line 55 of file BitLevelCoupler.cpp.

58  {
60  Interface &m_field = cOre;
61  EntityHandle leaf_out;
62  rval = treePtr->point_search(coords, leaf_out, iter_tol, inside_tol);
64  bool is_in;
65  Range tets;
66  ierr = m_field.get_moab().get_entities_by_type(leaf_out, MBTET, tets);
67  CHKERRG(ierr);
68  Range::iterator tit = tets.begin();
69  for (; tit != tets.end(); tit++) {
70  ierr = getLocCoordsOnTet(*tit, coords, verb);
71  CHKERRG(ierr);
72  is_in = true;
73  for (int nn = 0; nn < 4; nn++) {
74  if (N[nn] < -inside_tol || N[nn] > 1 + inside_tol) {
75  is_in = false;
76  break;
77  }
78  if (!is_in)
79  break;
80  }
81  parent = 0;
82  if (is_in) {
83  if (!tet_only) {
84  // vertices
85  if (fabs(N[0] - 1) < inside_tol && fabs(N[1]) < inside_tol &&
86  fabs(N[2]) < inside_tol && fabs(N[3]) < inside_tol) {
87  if (verb > 1)
88  std::cout << "node 0 found " << std::endl;
89  rval = m_field.get_moab().side_element(*tit, 0, 0, parent);
92  }
93  if (fabs(N[0]) < inside_tol && fabs(N[1] - 1) < inside_tol &&
94  fabs(N[2]) < inside_tol && fabs(N[3]) < inside_tol) {
95  if (verb > 1)
96  std::cout << "node 1 found " << std::endl;
97  rval = m_field.get_moab().side_element(*tit, 0, 1, parent);
100  }
101  if (fabs(N[0]) < inside_tol && fabs(N[1]) < inside_tol &&
102  fabs(N[2] - 2) < inside_tol && fabs(N[3]) < inside_tol) {
103  if (verb > 1)
104  std::cout << "node 2 found " << std::endl;
105  rval = m_field.get_moab().side_element(*tit, 0, 2, parent);
108  }
109  if (fabs(N[0]) < inside_tol && fabs(N[1]) < inside_tol &&
110  fabs(N[2]) < inside_tol && fabs(N[3] - 1) < inside_tol) {
111  if (verb > 1)
112  std::cout << "node 3 found " << std::endl;
113  rval = m_field.get_moab().side_element(*tit, 0, 3, parent);
116  }
117  // edges
118  if (fabs(N[0]) > inside_tol && fabs(N[1]) > inside_tol &&
119  fabs(N[2]) < inside_tol && fabs(N[3]) < inside_tol) {
120  if (verb > 1)
121  std::cout << "edge 0 found " << std::endl;
122  rval = m_field.get_moab().side_element(*tit, 1, 0, parent);
125  }
126  if (fabs(N[0]) < inside_tol && fabs(N[1]) > inside_tol &&
127  fabs(N[2]) > inside_tol && fabs(N[3]) < inside_tol) {
128  if (verb > 1)
129  std::cout << "edge 1 found " << std::endl;
130  rval = m_field.get_moab().side_element(*tit, 1, 1, parent);
133  }
134  if (fabs(N[0]) > inside_tol && fabs(N[1]) < inside_tol &&
135  fabs(N[2]) > inside_tol && fabs(N[3]) < inside_tol) {
136  if (verb > 1)
137  std::cout << "edge 2 found " << std::endl;
138  rval = m_field.get_moab().side_element(*tit, 1, 2, parent);
141  }
142  if (fabs(N[0]) > inside_tol && fabs(N[1]) < inside_tol &&
143  fabs(N[2]) < inside_tol && fabs(N[3]) > inside_tol) {
144  if (verb > 1)
145  std::cout << "edge 3 found " << std::endl;
146  rval = m_field.get_moab().side_element(*tit, 1, 3, parent);
149  }
150  if (fabs(N[0]) < inside_tol && fabs(N[1]) > inside_tol &&
151  fabs(N[2]) < inside_tol && fabs(N[3]) > inside_tol) {
152  if (verb > 1)
153  std::cout << "edge 4 found " << std::endl;
154  rval = m_field.get_moab().side_element(*tit, 1, 4, parent);
157  }
158  if (fabs(N[0]) < inside_tol && fabs(N[1]) < inside_tol &&
159  fabs(N[2]) > inside_tol && fabs(N[3]) > inside_tol) {
160  if (verb > 1)
161  std::cout << "edge 5 found " << std::endl;
162  rval = m_field.get_moab().side_element(*tit, 1, 5, parent);
165  }
166  // faces
167  if (fabs(N[0]) > inside_tol && fabs(N[1]) > inside_tol &&
168  fabs(N[2]) < inside_tol && fabs(N[3]) > inside_tol) {
169  if (verb > 1)
170  std::cout << "face 0 found " << std::endl;
171  rval = m_field.get_moab().side_element(*tit, 2, 0, parent);
174  }
175  if (fabs(N[0]) < inside_tol && fabs(N[1]) > inside_tol &&
176  fabs(N[2]) > inside_tol && fabs(N[3]) > inside_tol) {
177  if (verb > 1)
178  std::cout << "face 1 found " << std::endl;
179  rval = m_field.get_moab().side_element(*tit, 2, 1, parent);
182  }
183  if (fabs(N[0]) > inside_tol && fabs(N[1]) < inside_tol &&
184  fabs(N[2]) > inside_tol && fabs(N[3]) > inside_tol) {
185  if (verb > 1)
186  std::cout << "face 2 found " << std::endl;
187  rval = m_field.get_moab().side_element(*tit, 2, 2, parent);
190  }
191  if (fabs(N[0]) > inside_tol && fabs(N[1]) > inside_tol &&
192  fabs(N[2]) > inside_tol && fabs(N[3]) < inside_tol) {
193  if (verb > 1)
194  std::cout << "face 3 found " << std::endl;
195  rval = m_field.get_moab().side_element(*tit, 2, 2, parent);
198  }
199  // set parent
200  if (parent != 0) {
201  break;
202  }
203  }
204  if (verb > 1)
205  std::cout << "tet found " << std::endl;
206  parent = *tit;
207  break;
208  }
209  }
211 }
#define CHKERRQ_MOAB(a)
check error code of MoAB function
Definition: definitions.h:514
boost::scoped_ptr< AdaptiveKDTree > treePtr
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
MoFEMErrorCode getLocCoordsOnTet(EntityHandle tet, const double *glob_coords, int verb=0)
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
static MoFEMErrorCodeGeneric< moab::ErrorCode > rval
Definition: Exceptions.hpp:84

◆ query_interface()

MoFEMErrorCode MoFEM::BitLevelCoupler::query_interface ( const MOFEMuuid uuid,
UnknownInterface **  iface 
) const
virtual

Implements MoFEM::UnknownInterface.

Definition at line 17 of file BitLevelCoupler.cpp.

18  {
20  *iface = NULL;
21  if (uuid == IDD_MOFEMBitLevelCoupler) {
22  *iface = const_cast<BitLevelCoupler *>(this);
24  }
25  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY, "unknown interface");
27 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
static const MOFEMuuid IDD_MOFEMBitLevelCoupler

◆ resetParents()

MoFEMErrorCode MoFEM::BitLevelCoupler::resetParents ( Range &  children,
bool  elements = true,
int  verb = 0 
)

reset parent entities

This is needed for testing.

Definition at line 423 of file BitLevelCoupler.cpp.

424  {
426 
427  Interface &m_field = cOre;
428 
429  // access to ref dofs multi-index
430  const RefEntity_multiIndex *refined_ptr;
431  ierr = m_field.get_ref_ents(&refined_ptr);
432  CHKERRG(ierr);
433 
434  Range::iterator eit, hi_eit;
435  eit = children.begin();
436  hi_eit = children.end();
437  for (; eit != hi_eit; eit++) {
438 
439  // get ref entity iterator
440  RefEntity_multiIndex::index<Ent_mi_tag>::type::iterator it;
441  it = refined_ptr->get<Ent_mi_tag>().find(*eit);
442 
443  // resent entity parent
444  ierr = chanegParent(refined_ptr->project<0>(it), 0);
445  CHKERRG(ierr);
446  }
447 
449 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define CHKERRG(n)
Check error code of MoFEM/MOAB/PETSc function.
Definition: definitions.h:543
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507
multi_index_container< boost::shared_ptr< RefEntity >, indexed_by< ordered_unique< tag< Ent_mi_tag >, member< RefEntity::BasicEntity, EntityHandle, &RefEntity::ent > >, ordered_non_unique< tag< Ent_Ent_mi_tag >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > >, ordered_non_unique< tag< EntType_mi_tag >, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType > >, ordered_non_unique< tag< ParentEntType_mi_tag >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > >, ordered_non_unique< tag< Composite_EntType_and_ParentEntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityType, &RefEntity::getParentEntType > > >, ordered_non_unique< tag< Composite_ParentEnt_And_EntType_mi_tag >, composite_key< RefEntity, const_mem_fun< RefEntity::BasicEntity, EntityType, &RefEntity::getEntType >, const_mem_fun< RefEntity, EntityHandle, &RefEntity::getParentEnt > > > > > RefEntity_multiIndex
MoFEMErrorCode chanegParent(RefEntity_multiIndex::iterator it, EntityHandle parent)

◆ resetTree()

MoFEMErrorCode MoFEM::BitLevelCoupler::resetTree ( const BitRefLevel parent_level,
int  verb = 0 
)

reset adaptive kd-tree

Definition at line 47 of file BitLevelCoupler.cpp.

48  {
50  treePtr->reset_tree();
51  treePtr.reset();
53 }
boost::scoped_ptr< AdaptiveKDTree > treePtr
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

◆ verifyParent()

MoFEMErrorCode MoFEM::BitLevelCoupler::verifyParent ( RefEntity_multiIndex::iterator  it,
EntityHandle  parent 
)
private

Definition at line 451 of file BitLevelCoupler.cpp.

452  {
454 
455  if (parent != (*it)->getParentEnt()) {
456  SETERRQ3(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
457  "data inconsistency %lu != %lu for ent %lu", parent,
458  (*it)->getParentEnt(), (*it)->getRefEnt());
459  }
460 
462 }
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:500
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:507

Member Data Documentation

◆ cOnn

const EntityHandle* MoFEM::BitLevelCoupler::cOnn
private

Definition at line 190 of file BitLevelCoupler.hpp.

◆ cOords

double MoFEM::BitLevelCoupler::cOords[12+3]
private

Definition at line 187 of file BitLevelCoupler.hpp.

◆ cOre

MoFEM::Core& MoFEM::BitLevelCoupler::cOre

Definition at line 36 of file BitLevelCoupler.hpp.

◆ diffN

double MoFEM::BitLevelCoupler::diffN[12]
private

Definition at line 188 of file BitLevelCoupler.hpp.

◆ locCoords

double MoFEM::BitLevelCoupler::locCoords[3]
private

Definition at line 189 of file BitLevelCoupler.hpp.

◆ N

double MoFEM::BitLevelCoupler::N[4]
private

Definition at line 188 of file BitLevelCoupler.hpp.

◆ treePtr

boost::scoped_ptr<AdaptiveKDTree> MoFEM::BitLevelCoupler::treePtr
private

Definition at line 194 of file BitLevelCoupler.hpp.

◆ vErify

bool MoFEM::BitLevelCoupler::vErify

by default is switched off, with it on to verify if existing parent is equal to parent set by interface

Definition at line 37 of file BitLevelCoupler.hpp.


The documentation for this struct was generated from the following files: