v0.14.0
Public Member Functions | Protected Member Functions | List of all members
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< FORCESET >, 1, FIELD_DIM, A, I, OpBase > Struct Template Reference

#include <src/boundary_conditions/NaturalMeshsetType.hpp>

Inheritance diagram for MoFEM::OpFluxRhsImpl< NaturalMeshsetType< FORCESET >, 1, FIELD_DIM, A, I, OpBase >:
[legend]
Collaboration diagram for MoFEM::OpFluxRhsImpl< NaturalMeshsetType< FORCESET >, 1, FIELD_DIM, A, I, OpBase >:
[legend]

Public Member Functions

 OpFluxRhsImpl (MoFEM::Interface &m_field, int ms_id, const std::string field_name, std::vector< boost::shared_ptr< ScalingMethod >> smv, ScalarFun user_fun=[](double, double, double) { return 1;})
 
- Public Member Functions inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >
 OpFluxRhsImpl (const std::string field_name, FTensor::Tensor1< double, FIELD_DIM > t_force, boost::shared_ptr< Range > ents_ptr, std::vector< boost::shared_ptr< ScalingMethod >> smv, ScalarFun user_fun=[](double, double, double) { return 1;})
 

Protected Member Functions

MoFEMErrorCode getMeshsetData (MoFEM::Interface &m_field, int ms_id)
 Extract information stored on meshset (BLOCKSET) More...
 
- Protected Member Functions inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >
 OpFluxRhsImpl (const std::string field_name, std::vector< boost::shared_ptr< ScalingMethod >> smv, ScalarFun user_fun=[](double, double, double) { return 1;})
 

Additional Inherited Members

- Public Types inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >
using OpSource = typename FormsIntegrators< OpBase >::template Assembly< A >::template LinearForm< I >::template OpSource< 1, FIELD_DIM >
 
- Protected Attributes inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >
FTensor::Tensor1< double, FIELD_DIMtForce
 
FTensor::Tensor1< double, FIELD_DIMtScaledForce
 
VecOfTimeScalingMethods vecOfTimeScalingMethods
 
ScalarFun userFun
 

Detailed Description

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase>
struct MoFEM::OpFluxRhsImpl< NaturalMeshsetType< FORCESET >, 1, FIELD_DIM, A, I, OpBase >

Evaluate boundary integral on the right hand side

Definition at line 25 of file NaturalMeshsetType.hpp.

Constructor & Destructor Documentation

◆ OpFluxRhsImpl()

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< FORCESET >, 1, FIELD_DIM, A, I, OpBase >::OpFluxRhsImpl ( MoFEM::Interface m_field,
int  ms_id,
const std::string  field_name,
std::vector< boost::shared_ptr< ScalingMethod >>  smv,
ScalarFun  user_fun = [](doubledoubledouble) { return 1; } 
)

Definition at line 316 of file NaturalMeshsetType.hpp.

320  : OpFluxRhsImpl<NaturalMeshsetType<UNKNOWNSET>, 1, FIELD_DIM, A, I, OpBase>(
321  field_name, smv, user_fun) {
322  CHK_THROW_MESSAGE(getMeshsetData(m_field, ms_id), "Get meshset data");
323 }

Member Function Documentation

◆ getMeshsetData()

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
MoFEMErrorCode MoFEM::OpFluxRhsImpl< NaturalMeshsetType< FORCESET >, 1, FIELD_DIM, A, I, OpBase >::getMeshsetData ( MoFEM::Interface m_field,
int  ms_id 
)
protected

Extract information stored on meshset (BLOCKSET)

Parameters
m_field
ms_id
Returns
MoFEMErrorCode

Definition at line 327 of file NaturalMeshsetType.hpp.

328  {
330 
331  auto cubit_meshset_ptr =
332  m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
333  NODESET);
334 
335  ForceCubitBcData bc_data;
336  CHKERR cubit_meshset_ptr->getBcDataStructure(bc_data);
337 
338  this->tForce(0) = bc_data.data.value3;
339  if constexpr (FIELD_DIM > 1)
340  this->tForce(1) = bc_data.data.value4;
341  if constexpr (FIELD_DIM > 2)
342  this->tForce(2) = bc_data.data.value5;
343 
344  FTensor::Index<'i', FIELD_DIM> i;
345  this->tForce(i) *= bc_data.data.value1;
346 
347  this->entsPtr = boost::make_shared<Range>();
348  CHKERR m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
349  *(this->entsPtr), true);
350 
352 }

The documentation for this struct was generated from the following file:
MoFEM::UnknownInterface::getInterface
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.
Definition: UnknownInterface.hpp:93
FTensor
JSON compatible output.
Definition: Christof_constructor.hpp:6
CHK_THROW_MESSAGE
#define CHK_THROW_MESSAGE(err, msg)
Check and throw MoFEM exception.
Definition: definitions.h:596
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< FORCESET >, 1, FIELD_DIM, A, I, OpBase >::getMeshsetData
MoFEMErrorCode getMeshsetData(MoFEM::Interface &m_field, int ms_id)
Extract information stored on meshset (BLOCKSET)
Definition: NaturalMeshsetType.hpp:327
Index
Definition: single.cpp:3
FIELD_DIM
constexpr int FIELD_DIM
Definition: child_and_parent.cpp:15
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >::tForce
FTensor::Tensor1< double, FIELD_DIM > tForce
Definition: NaturalMeshsetType.hpp:114
I
constexpr IntegrationType I
Definition: operators_tests.cpp:31
FTensor::Tensor1::data
T data[Tensor_Dim]
Definition: Tensor1_value.hpp:10
NODESET
@ NODESET
Definition: definitions.h:146
MoFEM::OpBaseImpl
Definition: FormsIntegrators.hpp:170
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
i
FTensor::Index< 'i', SPACE_DIM > i
Definition: hcurl_divergence_operator_2d.cpp:27
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
Range
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:346