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

#include <src/boundary_conditions/NaturalMeshsetType.hpp>

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

Public Types

using Parent = OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, 1, A, I, OpBase >
 
- Public Types inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, 1, A, I, OpBase >
using OpSource = typename FormsIntegrators< OpBase >::template Assembly< A >::template LinearForm< I >::template OpSource< 1, 1 >
 

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, 1, A, I, OpBase >
 OpFluxRhsImpl (const std::string field_name, double value, 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)
 
- Protected Member Functions inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, 1, A, I, OpBase >
 OpFluxRhsImpl (const std::string field_name, std::vector< boost::shared_ptr< ScalingMethod >> smv, ScalarFun user_fun=[](double, double, double) { return 1;})
 
MoFEMErrorCode getMeshsetData (MoFEM::Interface &m_field, int ms_id)
 

Additional Inherited Members

- Protected Attributes inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, 1, A, I, OpBase >
double scalarValue = 0
 
ScalarFun userFun
 
VecOfTimeScalingMethods vecOfTimeScalingMethods
 

Detailed Description

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

Definition at line 149 of file NaturalMeshsetType.hpp.

Member Typedef Documentation

◆ Parent

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

Definition at line 153 of file NaturalMeshsetType.hpp.

Constructor & Destructor Documentation

◆ OpFluxRhsImpl()

template<AssemblyType A, IntegrationType I, typename OpBase >
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< BLOCKSET >, 1, 1, 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 494 of file NaturalMeshsetType.hpp.

497  : OpFluxRhsImpl<NaturalMeshsetType<UNKNOWNSET>, 1, 1, A, I, OpBase>(
498  field_name, smv, user_fun) {
499  CHK_THROW_MESSAGE(getMeshsetData(m_field, ms_id), "Get meshset data");
500 }

Member Function Documentation

◆ getMeshsetData()

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

Definition at line 504 of file NaturalMeshsetType.hpp.

505  {
507 
508  auto cubit_meshset_ptr =
509  m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
510  BLOCKSET);
511  std::vector<double> block_data;
512  CHKERR cubit_meshset_ptr->getAttributes(block_data);
513  if (block_data.size() != 1) {
514  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
515  "Expected that block has one attribute, e.g. heat flux value");
516  }
517  this->scalarValue = block_data[0];
518 
519  this->entsPtr = boost::make_shared<Range>();
520  CHKERR m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
521  *(this->entsPtr), true);
522 
523  MOFEM_LOG("WORLD", Sev::inform)
524  << "Flux blockset " << cubit_meshset_ptr->getName();
525  MOFEM_LOG("WORLD", Sev::inform)
526  << "Scalar attribute value: " << this->scalarValue;
527 
529 }

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
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< BLOCKSET >, 1, 1, A, I, OpBase >::getMeshsetData
MoFEMErrorCode getMeshsetData(MoFEM::Interface &m_field, int ms_id)
Definition: NaturalMeshsetType.hpp:504
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
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
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
MoFEM::OpFluxRhsImpl< NaturalMeshsetType< UNKNOWNSET >, 1, 1, A, I, OpBase >::scalarValue
double scalarValue
Definition: NaturalMeshsetType.hpp:142
BLOCKSET
@ BLOCKSET
Definition: definitions.h:148
MOFEM_DATA_INCONSISTENCY
@ MOFEM_DATA_INCONSISTENCY
Definition: definitions.h:31
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