v0.8.23
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 521 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 524 of file FECore.cpp.

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

◆ emplaceHint()

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

Definition at line 543 of file FECore.cpp.

543  {
544  static_assert(I == DATA, "t should be set to DATA");
545 
546  // Add to data in FE
547  for (auto fe_it : fe_vec) {
548  if (auto fe_ptr = fe_it.lock()) {
549  // It is a but unsafe, since if one mess up something in
550  // buildFiniteElements, weak_ptr will not give pointer
551  auto data_dofs_array_vec = fe_ptr->getDofsSequence().lock();
552  // Create shared pointers vector
553  auto hint = fe_ptr->data_dofs->end();
554  for (auto &vit : *data_dofs_array_vec)
555  hint =
556  fe_ptr->data_dofs->emplace_hint(hint, data_dofs_array_vec, &vit);
557  }
558  }
559  }

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