v0.15.0
Loading...
Searching...
No Matches
EssentialTemperatureCubitBcData.hpp
Go to the documentation of this file.
1/**
2 * @file EssentialTemperatureCubitBcData.hpp
3 * @brief Specialization for essential b.c. with TemperatureCubitBcData
4 * @version 0.13.2
5 * @date 2022-09-18
6 *
7 * @copyright Copyright (c) 2022
8 *
9 */
10
11#ifndef _ESSENTIAL_TEMPERATURECUBITBCDATA_HPP_
12#define _ESSENTIAL_TEMPERATURECUBITBCDATA_HPP_
13
14namespace MoFEM {
15
16// FIXME: OpEssentialRhsImpl<TemperatureCubitBcData, 1, 1, A, I, OpBase> not
17// tested.
18
19template <AssemblyType A, IntegrationType I, typename OpBase>
21 : FormsIntegrators<OpBase>::template Assembly<A>::template LinearForm<
22 I>::template OpSource<1, 1> {
23
26
27 OpEssentialRhsImpl(const std::string field_name,
28 boost::shared_ptr<TemperatureCubitBcData> bc_data,
29 boost::shared_ptr<Range> ents_ptr,
30 std::vector<boost::shared_ptr<ScalingMethod>> smv);
31
32private:
34 double bcVal;
35};
36
37template <AssemblyType A, IntegrationType I, typename OpBase>
39 OpEssentialRhsImpl(const std::string field_name,
40 boost::shared_ptr<TemperatureCubitBcData> bc_data,
41 boost::shared_ptr<Range> ents_ptr,
42 std::vector<boost::shared_ptr<ScalingMethod>> smv)
43 : OpSource(
44 field_name, [this](double, double, double) { return bcVal; },
45 ents_ptr),
46 vecOfTimeScalingMethods(smv) {
47
48 bcVal = bc_data->data.value1;
49 this->timeScalingFun = [this](const double t) {
50 double s = 1;
51 for (auto &o : vecOfTimeScalingMethods) {
52 s *= o->getScale(t);
53 }
54 return s;
55 };
56
57}
58
59template <AssemblyType A, IntegrationType I, typename OpBase>
61 : FormsIntegrators<OpBase>::template Assembly<A>::template BiLinearForm<
62 I>::template OpMass<1, 1> {
63
64 using OpMass = typename FormsIntegrators<OpBase>::template Assembly<
66
67 OpEssentialLhsImpl(const std::string field_name,
68 boost::shared_ptr<Range> ents_ptr);
69};
70
71template <AssemblyType A, IntegrationType I, typename OpBase>
73 OpBase>::OpEssentialLhsImpl(const std::string field_name,
74 boost::shared_ptr<Range>
75 ents_ptr)
76 : OpMass(
78
79 [](double, double, double) constexpr { return 1; },
80
81 ents_ptr) {}
82
83/**
84 * @brief Specialization for TemperatureCubitBcData
85 *
86 * Specialization to enforce blocksets which TemperatureCubitBcData ptr. That is
87 * to enforce constrains on temperature. set
88 *
89 * @tparam
90 */
93 boost::shared_ptr<FEMethod> fe_ptr,
94 std::vector<boost::shared_ptr<ScalingMethod>> smv);
95
96 MoFEMErrorCode operator()();
97
98protected:
100 boost::weak_ptr<FEMethod> fePtr;
102};
103
104} // namespace MoFEM
105
106#endif //_ESSENTIAL_TEMPERATURECUBITBCDATA_HPP_
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
implementation of Data Operators for Forces and Sources
Definition Common.hpp:10
std::vector< boost::shared_ptr< ScalingMethod > > VecOfTimeScalingMethods
Vector of time scaling methods.
Definition Natural.hpp:20
constexpr IntegrationType I
constexpr AssemblyType A
constexpr double t
plate stiffness
Definition plate.cpp:58
constexpr auto field_name
Deprecated interface functions.
Class (Function) to enforce essential constrains.
Definition Essential.hpp:25
typename FormsIntegrators< OpBase >::template Assembly< A >::template BiLinearForm< I >::template OpMass< 1, 1 > OpMass
Enforce essential constrains on lhs.
Definition Essential.hpp:81
typename FormsIntegrators< OpBase >::template Assembly< A >::template LinearForm< I >::template OpSource< 1, 1 > OpSource
Enforce essential constrains on rhs.
Definition Essential.hpp:65
Definition of the temperature bc data structure.
Definition BCData.hpp:302