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

#include <src/boundary_conditions/NaturalMeshsetType.hpp>

Inheritance diagram for MoFEM::OpFluxRhsImpl< NaturalMeshsetTypeVectorScaling< BLOCKSET >, 1, FIELD_DIM, A, I, OpBase >:
[legend]
Collaboration diagram for MoFEM::OpFluxRhsImpl< NaturalMeshsetTypeVectorScaling< BLOCKSET >, 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< TimeScaleVector< FIELD_DIM >>> smv, ScalarFun user_fun=[](double, double, double) { return 1;})
 
- Public Member Functions inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetTypeVectorScaling< 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< TimeScaleVector< FIELD_DIM >>> smv, ScalarFun user_fun=[](double, double, double) { return 1;})
 Function to push operators to rhs pipeline. This function user API. More...
 

Protected Member Functions

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

Additional Inherited Members

- Public Types inherited from MoFEM::OpFluxRhsImpl< NaturalMeshsetTypeVectorScaling< 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< NaturalMeshsetTypeVectorScaling< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >
FTensor::Tensor1< double, FIELD_DIMtForce
 
VecOfTimeVectorScalingMethods< FIELD_DIMvecOfTimeVectorScalingMethods
 
ScalarFun userFun
 

Detailed Description

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

Definition at line 233 of file NaturalMeshsetType.hpp.

Constructor & Destructor Documentation

◆ OpFluxRhsImpl()

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

Definition at line 711 of file NaturalMeshsetType.hpp.

715  : OpFluxRhsImpl<NaturalMeshsetTypeVectorScaling<UNKNOWNSET>, 1, FIELD_DIM,
716  A, I, OpBase>(field_name, smv, user_fun) {
717  CHK_THROW_MESSAGE(getMeshsetData(m_field, ms_id), "Get meshset data");
718 }

Member Function Documentation

◆ getMeshsetData()

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

Definition at line 723 of file NaturalMeshsetType.hpp.

723  {
725 
726  auto cubit_meshset_ptr =
727  m_field.getInterface<MeshsetsManager>()->getCubitMeshsetPtr(ms_id,
728  BLOCKSET);
729 
730  std::vector<double> block_data;
731  CHKERR cubit_meshset_ptr->getAttributes(block_data);
732  if (block_data.size() != FIELD_DIM) {
733  MOFEM_LOG("SELF", Sev::warning)
734  << "BLOCKSET is expected to have " << FIELD_DIM
735  << " attributes but has size " << block_data.size();
736  if (block_data.size() < FIELD_DIM) {
737 
738  SETERRQ(PETSC_COMM_SELF, MOFEM_DATA_INCONSISTENCY,
739  "Size of attribute in BLOCKSET is too small");
740  }
741  }
742 
743  for (unsigned int ii = 0; ii != FIELD_DIM; ++ii) {
744  this->tForce(ii) = block_data[ii];
745  }
746 
747  MOFEM_LOG("WORLD", Sev::inform)
748  << "Flux blockset " << cubit_meshset_ptr->getName();
749  MOFEM_LOG("WORLD", Sev::inform)
750  << "Number of attributes " << block_data.size();
751  MOFEM_LOG("WORLD", Sev::inform)
752  << "tForce vector initialised: " << this->tForce;
753 
754  this->entsPtr = boost::make_shared<Range>();
755  CHKERR m_field.get_moab().get_entities_by_handle(cubit_meshset_ptr->meshset,
756  *(this->entsPtr), true);
757 
759 }

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
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
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::OpFluxRhsImpl< NaturalMeshsetTypeVectorScaling< BLOCKSET >, 1, FIELD_DIM, A, I, OpBase >::getMeshsetData
MoFEMErrorCode getMeshsetData(MoFEM::Interface &m_field, int ms_id)
Definition: NaturalMeshsetType.hpp:723
MOFEM_LOG
#define MOFEM_LOG(channel, severity)
Log.
Definition: LogManager.hpp:308
BLOCKSET
@ BLOCKSET
Definition: definitions.h:148
MoFEM::OpFluxRhsImpl< NaturalMeshsetTypeVectorScaling< UNKNOWNSET >, 1, FIELD_DIM, A, I, OpBase >::tForce
FTensor::Tensor1< double, FIELD_DIM > tForce
Definition: NaturalMeshsetType.hpp:268
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