v0.9.2
Static Public Member Functions | List of all members
MoFEM::BuildFiniteElements< I > Struct Template Reference

Static Public Member Functions

template<typename T1 , typename T2 >
static void addToData (T1 &range_dit, T2 &fe_vec)
 
template<typename T >
static void emplaceHint (T &fe_vec)
 

Detailed Description

template<int I>
struct MoFEM::BuildFiniteElements< I >

Definition at line 515 of file FECore.cpp.

Member Function Documentation

◆ addToData()

template<int I>
template<typename T1 , typename T2 >
static void MoFEM::BuildFiniteElements< I >::addToData ( T1 &  range_dit,
T2 &  fe_vec 
)
static

Definition at line 518 of file FECore.cpp.

518  {
519  static_assert(I == DATA, "t should be set to DATA");
520 
521  for (auto dit = range_dit.first; dit != range_dit.second; ++dit) {
522  const EntityHandle dof_ent = dit->get()->getEnt();
523  // Fill array
524  for (auto fe_it : fe_vec) {
525  if (auto fe_ptr = fe_it.lock()) {
526  // Add FEDofEntity, first create dofs, one by one, note that memory
527  // is already reserved. Then create shared pointers and finally add
528  // th_FEName to element multi-index
529  // There are data dofs on this element
530  auto &side_number_ptr = fe_ptr->getSideNumberPtr(dof_ent);
531  fe_ptr->getDofsSequence().lock()->emplace_back(side_number_ptr, *dit);
532  }
533  }
534  }
535  }
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:70

◆ emplaceHint()

template<int I>
template<typename T >
static void MoFEM::BuildFiniteElements< I >::emplaceHint ( T fe_vec)
static

Definition at line 537 of file FECore.cpp.

537  {
538  static_assert(I == DATA, "t should be set to DATA");
539 
540  // Add to data in FE
541  for (auto fe_it : fe_vec) {
542  if (auto fe_ptr = fe_it.lock()) {
543  // It is a but unsafe, since if one mess up something in
544  // buildFiniteElements, weak_ptr will not give pointer
545  auto data_dofs_array_vec = fe_ptr->getDofsSequence().lock();
546  // Create shared pointers vector
547  auto hint = fe_ptr->data_dofs->end();
548  for (auto &vit : *data_dofs_array_vec)
549  hint =
550  fe_ptr->data_dofs->emplace_hint(hint, data_dofs_array_vec, &vit);
551  }
552  }
553  }
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:70

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