11 #ifndef _ESSENTIAL_HEATFLUXCUBITBCDATA_HPP_
12 #define _ESSENTIAL_HEATFLUXCUBITBCDATA_HPP_
16 template <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);
35 template <AssemblyType A,
typename OpBase>
42 template <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) {
60 template <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;
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
139 A>::template LinearForm<I>::template OpBaseTimesVector<
BASE_DIM,
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()));
223 #endif //_ESSENTIAL_HEATFLUXCUBITBCDATA_HPP_