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

#include <src/boundary_conditions/NaturalMeshsetType.hpp>

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

Public Types

using Parent = OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >
 
using EntData = EntitiesFieldData::EntData
 
- 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 >
 

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 iNtegrate (EntData &data)
 
MoFEMErrorCode getMeshsetData (MoFEM::Interface &m_field, int ms_id)
 
- 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;})
 

Protected Attributes

double surfacePressure
 
ScalarFun userFun
 
- 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< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >

Definition at line 60 of file NaturalMeshsetType.hpp.

Member Typedef Documentation

◆ EntData

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
using MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >::EntData = EntitiesFieldData::EntData

Definition at line 66 of file NaturalMeshsetType.hpp.

◆ Parent

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
using MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >::Parent = OpFluxRhsImpl<NaturalMeshsetType<UNKNOWNSET>, 1, FIELD_DIM, A, I, OpBase>

Definition at line 65 of file NaturalMeshsetType.hpp.

Constructor & Destructor Documentation

◆ OpFluxRhsImpl()

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 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 410 of file NaturalMeshsetType.hpp.

414  : OpFluxRhsImpl<NaturalMeshsetType<UNKNOWNSET>, 1, FIELD_DIM, A, I, OpBase>(
415  field_name, smv, user_fun) {
416  CHK_THROW_MESSAGE(getMeshsetData(m_field, ms_id), "Get meshset data");
417 }

Member Function Documentation

◆ getMeshsetData()

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

Definition at line 441 of file NaturalMeshsetType.hpp.

441  {
443 
444  auto cubit_meshset_ptr =
445  m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
446  SIDESET);
447 
448  PressureCubitBcData pressure_data;
449  CHKERR cubit_meshset_ptr->getBcDataStructure(pressure_data);
450  this->surfacePressure = pressure_data.data.value1;
451 
452  this->entsPtr = boost::make_shared<Range>();
453  CHKERR m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
454  *(this->entsPtr), true);
455 
457 }

◆ iNtegrate()

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
MoFEMErrorCode MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >::iNtegrate ( EntData data)
protected

Definition at line 421 of file NaturalMeshsetType.hpp.

421  {
423 
424  auto t_normal = this->getFTensor1Normal();
426 
427  this->sourceFun = [&](const double, const double, const double) {
428  this->tForce(i) = t_normal(i);
429  this->tForce.normalize();
430  this->tForce(i) *= this->surfacePressure;
431  return this->tForce;
432  };
433 
434  CHKERR Parent::iNtegrate(data);
436 }

Member Data Documentation

◆ surfacePressure

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
double MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >::surfacePressure
protected

Definition at line 76 of file NaturalMeshsetType.hpp.

◆ userFun

template<int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase >
ScalarFun MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >::userFun
protected

Definition at line 77 of file NaturalMeshsetType.hpp.


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
SIDESET
@ SIDESET
Definition: definitions.h:147
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
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
MoFEM::OpBaseImpl
Definition: FormsIntegrators.hpp:170
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:535
MoFEM::CoreInterface::get_moab
virtual moab::Interface & get_moab()=0
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >::surfacePressure
double surfacePressure
Definition: NaturalMeshsetType.hpp:76
double
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
FTensor::Index< 'i', FIELD_DIM >
FTensor::Tensor1::normalize
Tensor1< T, Tensor_Dim > normalize()
Definition: Tensor1_value.hpp:77
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< PRESSURESET >, 1, FIELD_DIM, A, I, OpBase >::getMeshsetData
MoFEMErrorCode getMeshsetData(MoFEM::Interface &m_field, int ms_id)
Definition: NaturalMeshsetType.hpp:441
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