11#ifndef _ESSENTIAL_HEATFLUXCUBITBCDATA_HPP_
12#define _ESSENTIAL_HEATFLUXCUBITBCDATA_HPP_
16template <AssemblyType A,
typename OpBase>
23 boost::shared_ptr<HeatFluxCubitBcData> bc_data,
24 boost::shared_ptr<Range> ents_ptr,
25 std::vector<boost::shared_ptr<ScalingMethod>> smv);
35template <AssemblyType A,
typename OpBase>
39 OpBase>::OpEssentialRhsImpl;
42template <AssemblyType A,
typename OpBase>
45 boost::shared_ptr<HeatFluxCubitBcData> bc_data,
46 boost::shared_ptr<Range> ents_ptr,
47 std::vector<boost::shared_ptr<ScalingMethod>> smv)
49 vecOfTimeScalingMethods(smv) {
50 heatFlux = -bc_data->data.value1;
51 this->timeScalingFun = [
this](
const double t) {
53 for (
auto &o : vecOfTimeScalingMethods) {
60template <AssemblyType A,
typename OpBase>
69 const double vol = OP::getMeasure();
71 auto t_w = OP::getFTensor0IntegrationWeight();
75 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
78 for (
int gg = 0; gg != OP::nbIntegrationPts; gg++) {
80 const double alpha = t_w;
83 t_unit_normal(
i) = t_normal(
i) / t_normal.
l2();
87 for (; rr != OP::nbRows; ++rr) {
88 OP::locF[rr] += alpha * (t_row_base(
i) * t_unit_normal(
i));
91 for (; rr < OP::nbRowBaseFunctions; ++rr)
97 OP::locF *= vol * heatFlux;
109 OpBase>::OpEssentialLhsImpl;
126 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
127 const std::string problem_name, std::string
field_name,
128 boost::shared_ptr<MatrixDouble> field_mat_ptr,
129 std::vector<boost::shared_ptr<ScalingMethod>> smv
142 auto add_op = [&](
auto &bcs) {
144 for (
auto &
m : bcs) {
145 if (
auto bc =
m.second->heatFluxBcPtr) {
146 auto &bc_id =
m.first;
148 (boost::format(
"%s_%s_(.*)") % problem_name %
field_name).str();
149 if (std::regex_match(bc_id, std::regex(regex_str))) {
155 pipeline.push_back(
new OpInternal(
157 [](
double,
double,
double)
constexpr {
return 1.; },
158 m.second->getBcEntsPtr()));
187 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
188 const std::string problem_name, std::string
field_name) {
195 auto add_op = [&](
auto &bcs) {
197 for (
auto &
m : bcs) {
198 if (
auto bc =
m.second->heatFluxBcPtr) {
199 auto &bc_id =
m.first;
201 (boost::format(
"%s_%s_(.*)") % problem_name %
field_name).str();
202 if (std::regex_match(bc_id, std::regex(regex_str))) {
206 pipeline.push_back(
new OP(
field_name,
m.second->getBcEntsPtr()));
#define MOFEM_TAG_AND_LOG(channel, severity, tag)
Tag and log in channel.
#define FTENSOR_INDEX(DIM, I)
#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 ...
#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
constexpr double t
plate stiffness
constexpr auto field_name
FTensor::Index< 'm', 3 > m
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.
Data on single entity (This is passed as argument to DataOperator::doWork)
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
Essential boundary conditions.
Definition of the heat flux bc data structure.
Enforce essential constrains on lhs.
VecOfTimeScalingMethods vecOfTimeScalingMethods
Enforce essential constrains on rhs.
Set indices on entities on finite element.
MoFEMErrorCode getInterface(IFACE *&iface) const
Get interface reference to pointer of interface.