11#ifndef _ESSENTIAL_DISPLACEMENTCUBITBCDATA_HPP__
12#define _ESSENTIAL_DISPLACEMENTCUBITBCDATA_HPP__
26 boost::shared_ptr<FEMethod> fe_ptr,
27 std::vector<boost::shared_ptr<ScalingMethod>> smv,
28 bool get_coords =
false);
34 boost::weak_ptr<FEMethod>
fePtr;
39template <
int FIELD_DIM, AssemblyType A, IntegrationType I,
typename OpBase>
42 I>::template
OpSource<1, FIELD_DIM> {
48 boost::shared_ptr<DisplacementCubitBcData> bc_data,
49 boost::shared_ptr<Range> ents_ptr,
50 std::vector<boost::shared_ptr<ScalingMethod>> smv);
57template <
int FIELD_DIM, AssemblyType A, IntegrationType I,
typename OpBase>
60 boost::shared_ptr<DisplacementCubitBcData> bc_data,
61 boost::shared_ptr<Range> ents_ptr,
62 std::vector<boost::shared_ptr<ScalingMethod>> smv)
66 vecOfTimeScalingMethods(smv) {
67 static_assert(
FIELD_DIM > 1,
"Is not implemented for scalar field");
71 if (bc_data->data.flag1 == 1)
72 tVal(0) = -bc_data->data.value1;
73 if (bc_data->data.flag2 == 1 &&
FIELD_DIM > 1)
74 tVal(1) = -bc_data->data.value2;
75 if (bc_data->data.flag3 == 1 &&
FIELD_DIM > 2)
76 tVal(2) = -bc_data->data.value3;
78 this->timeScalingFun = [
this](
const double t) {
80 for (
auto &
o : vecOfTimeScalingMethods) {
92 I>::template
OpMass<BASE_DIM, FIELD_DIM> {
98 boost::shared_ptr<Range> ents_ptr);
105 boost::shared_ptr<Range>
129 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
130 const std::string problem_name, std::string
field_name,
131 boost::shared_ptr<MatrixDouble> field_mat_ptr,
132 std::vector<boost::shared_ptr<ScalingMethod>> smv
145 auto add_op = [&](
auto &bcs) {
147 for (
auto &
m : bcs) {
148 if (
auto bc =
m.second->dispBcPtr) {
149 auto &bc_id =
m.first;
151 (boost::format(
"%s_%s_(.*)") % problem_name %
field_name).str();
152 if (std::regex_match(bc_id, std::regex(regex_str))) {
158 pipeline.push_back(
new OpInternal(
160 [](
double,
double,
double)
constexpr {
return 1.; },
161 m.second->getBcEntsPtr()));
191 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
192 const std::string problem_name, std::string
field_name
201 auto add_op = [&](
auto &bcs) {
203 for (
auto &
m : bcs) {
204 if (
auto bc =
m.second->dispBcPtr) {
205 auto &bc_id =
m.first;
207 (boost::format(
"%s_%s_(.*)") % problem_name %
field_name).str();
208 if (std::regex_match(bc_id, std::regex(regex_str))) {
212 pipeline.push_back(
new OP(
field_name,
m.second->getBcEntsPtr()));
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
#define MoFEMFunctionBeginHot
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
FTensor::Index< 'm', SPACE_DIM > m
#define MOFEM_LOG_CHANNEL(channel)
Set and reset channel.
FTensor::Index< 'i', SPACE_DIM > i
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
std::vector< boost::shared_ptr< ScalingMethod > > VecOfTimeScalingMethods
Vector of time scaling methods.
constexpr IntegrationType I
EssentialBC< BoundaryEleOp >::Assembly< A >::BiLinearForm< GAUSS >::OpEssentialLhs< DisplacementCubitBcData, 1, SPACE_DIM > OpEssentialLhs
EssentialBC< BoundaryEleOp >::Assembly< A >::LinearForm< GAUSS >::OpEssentialRhs< DisplacementCubitBcData, 1, SPACE_DIM > OpEssentialRhs
constexpr double t
plate stiffness
constexpr auto field_name
static MoFEMErrorCode add(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, const std::string problem_name, std::string field_name)
AddEssentialToLhsPipelineImpl()=delete
Function (factory) for setting operators for lhs pipeline.
static MoFEMErrorCode add(MoFEM::Interface &m_field, boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, const std::string problem_name, std::string field_name, boost::shared_ptr< MatrixDouble > field_mat_ptr, std::vector< boost::shared_ptr< ScalingMethod > > smv)
AddEssentialToRhsPipelineImpl()=delete
Function (factory) for setting operators for rhs pipeline.
Simple interface for fast problem set-up.
BcMapByBlockName & getBcMapByBlockName()
Get the bc map.
Deprecated interface functions.
Definition of the displacement bc data structure.
Essential boundary conditions.
VecOfTimeScalingMethods vecOfTimeScalingMethods
boost::weak_ptr< FEMethod > fePtr
MoFEM::Interface & mField
Class (Function) to enforce essential constrains.
typename FormsIntegrators< OpBase >::template Assembly< A >::template BiLinearForm< I >::template OpMass< BASE_DIM, FIELD_DIM > OpMass
Enforce essential constrains on lhs.
VecOfTimeScalingMethods vecOfTimeScalingMethods
typename FormsIntegrators< OpBase >::template Assembly< A >::template LinearForm< I >::template OpSource< 1, FIELD_DIM > OpSource
FTensor::Tensor1< double, FIELD_DIM > tVal
Enforce essential constrains on rhs.
Set indices on entities on finite element.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface refernce to pointer of interface.