v0.14.0
Loading...
Searching...
No Matches
Public Member Functions | List of all members
MoFEM::SetOtherLocalGhostVector< MODE > Struct Template Reference

Public Member Functions

template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
MoFEMErrorCode operator() (A0 dofs_ptr, A1 array, A2 miit, A3 hi_miit, A4 &cpy_bit_number, const std::string cpy_field_name)
 

Detailed Description

template<int MODE>
struct MoFEM::SetOtherLocalGhostVector< MODE >

Definition at line 379 of file VecManager.cpp.

Member Function Documentation

◆ operator()()

template<int MODE>
template<typename A0 , typename A1 , typename A2 , typename A3 , typename A4 >
MoFEMErrorCode MoFEM::SetOtherLocalGhostVector< MODE >::operator() ( A0  dofs_ptr,
A1  array,
A2  miit,
A3  hi_miit,
A4 &  cpy_bit_number,
const std::string  cpy_field_name 
)
inline

Definition at line 381 of file VecManager.cpp.

383 {
385 for (; miit != hi_miit; miit++) {
386 if (miit->get()->getHasLocalIndex()) {
387 const auto uid = DofEntity::getUniqueIdCalculate(
388 (*miit)->getEntDofIdx(), FieldEntity::getLocalUniqueIdCalculate(
389 cpy_bit_number, (*miit)->getEnt()));
390 auto diiiit = dofs_ptr->template get<Unique_mi_tag>().find(uid);
391 if (diiiit == dofs_ptr->template get<Unique_mi_tag>().end()) {
393 MOFEM_LOG_ATTRIBUTES("VECSELF",
395 MOFEM_LOG("VECSELF", Sev::error)
396 << "Problem finding DOFs in the copy field";
397 MOFEM_LOG("VECSELF", Sev::error) << "Field DOF: " << (**miit);
398 MOFEM_LOG("VECSELF", Sev::error)
399 << "Copy field name: " << cpy_field_name;
400 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
401 "Automatic creation of entity and dof not implemented");
402 }
403 if constexpr (MODE == INSERT_VALUES)
404 (*diiiit)->getFieldData() = array[(*miit)->getPetscLocalDofIdx()];
405 else if constexpr (MODE == ADD_VALUES)
406 (*diiiit)->getFieldData() += array[(*miit)->getPetscLocalDofIdx()];
407 }
408 }
410 }
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346
@ MOFEM_NOT_IMPLEMENTED
Definition: definitions.h:32
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
#define MOFEM_LOG_ATTRIBUTES(channel, bit)
Add attributes to channel.
Definition: LogManager.hpp:296
#define MOFEM_LOG_FUNCTION()
Set scope.
Definition: LogManager.hpp:325
static UId getUniqueIdCalculate(const DofIdx dof, UId ent_uid)
UId getLocalUniqueIdCalculate()
Get the Local Unique Id Calculate object.

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