v0.9.1
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 527 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 530 of file FECore.cpp.

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

◆ emplaceHint()

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

Definition at line 549 of file FECore.cpp.

549  {
550  static_assert(I == DATA, "t should be set to DATA");
551 
552  // Add to data in FE
553  for (auto fe_it : fe_vec) {
554  if (auto fe_ptr = fe_it.lock()) {
555  // It is a but unsafe, since if one mess up something in
556  // buildFiniteElements, weak_ptr will not give pointer
557  auto data_dofs_array_vec = fe_ptr->getDofsSequence().lock();
558  // Create shared pointers vector
559  auto hint = fe_ptr->data_dofs->end();
560  for (auto &vit : *data_dofs_array_vec)
561  hint =
562  fe_ptr->data_dofs->emplace_hint(hint, data_dofs_array_vec, &vit);
563  }
564  }
565  }
FTensor::Index< 'I', 3 > I
Definition: PlasticOps.hpp:35

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