v0.13.2
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 382 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 384 of file VecManager.cpp.

386 {
388 for (; miit != hi_miit; miit++) {
389 if (miit->get()->getHasLocalIndex()) {
390 const auto uid = DofEntity::getUniqueIdCalculate(
391 (*miit)->getEntDofIdx(), FieldEntity::getLocalUniqueIdCalculate(
392 cpy_bit_number, (*miit)->getEnt()));
393 auto diiiit = dofs_ptr->template get<Unique_mi_tag>().find(uid);
394 if (diiiit == dofs_ptr->template get<Unique_mi_tag>().end()) {
396 MOFEM_LOG_ATTRIBUTES("VECSELF",
398 MOFEM_LOG("VECSELF", Sev::error)
399 << "Problem finding DOFs in the copy field";
400 MOFEM_LOG("VECSELF", Sev::error) << "Field DOF: " << (**miit);
401 MOFEM_LOG("VECSELF", Sev::error)
402 << "Copy field name: " << cpy_field_name;
403 SETERRQ(PETSC_COMM_SELF, MOFEM_NOT_IMPLEMENTED,
404 "Automatic creation of entity and dof not implemented");
405 }
406 if constexpr (MODE == INSERT_VALUES)
407 (*diiiit)->getFieldData() = array[(*miit)->getPetscLocalDofIdx()];
408 else if constexpr (MODE == ADD_VALUES)
409 (*diiiit)->getFieldData() += array[(*miit)->getPetscLocalDofIdx()];
410 }
411 }
413 }
#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: