v0.9.0
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 539 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 542 of file FECore.cpp.

542  {
543  static_assert(I == DATA, "t should be set to DATA");
544 
545  for (auto dit = range_dit.first; dit != range_dit.second; ++dit) {
546  const EntityHandle dof_ent = dit->get()->getEnt();
547  // Fill array
548  for (auto fe_it : fe_vec) {
549  if (auto fe_ptr = fe_it.lock()) {
550  // Add FEDofEntity, first create dofs, one by one, note that memory
551  // is already reserved. Then create shared pointers and finally add
552  // th_FEName to element multi-index
553  // There are data dofs on this element
554  auto &side_number_ptr = fe_ptr->getSideNumberPtr(dof_ent);
555  fe_ptr->getDofsSequence().lock()->emplace_back(side_number_ptr, *dit);
556  }
557  }
558  }
559  }

◆ emplaceHint()

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

Definition at line 561 of file FECore.cpp.

561  {
562  static_assert(I == DATA, "t should be set to DATA");
563 
564  // Add to data in FE
565  for (auto fe_it : fe_vec) {
566  if (auto fe_ptr = fe_it.lock()) {
567  // It is a but unsafe, since if one mess up something in
568  // buildFiniteElements, weak_ptr will not give pointer
569  auto data_dofs_array_vec = fe_ptr->getDofsSequence().lock();
570  // Create shared pointers vector
571  auto hint = fe_ptr->data_dofs->end();
572  for (auto &vit : *data_dofs_array_vec)
573  hint =
574  fe_ptr->data_dofs->emplace_hint(hint, data_dofs_array_vec, &vit);
575  }
576  }
577  }

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