v0.14.0
NaturalForceMeshsets.hpp
Go to the documentation of this file.
1 /**
2  * @file NaturalForceMeshsets.hpp
3  * @brief Specialization for NaturalForceMeshsets
4  * @version 0.13.2
5  * @date 2022-09-18
6  *
7  * @copyright Copyright (c) 2022
8  *
9  */
10 
11 #ifndef _NATURAL_FORCE_MESHSETS_HPP_
12 #define _NATURAL_FORCE_MESHSETS_HPP_
13 
14 namespace MoFEM {
15 
16 /**
17  * @brief Type generating specialisation for force meshsets
18  *
19  */
21 
22 template <int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase>
24 
25 template <int BASE_DIM, int FIELD_DIM, AssemblyType A, IntegrationType I,
26  typename OpBase>
28 
30  I, OpBase
31 
32  > {
33 
34  AddFluxToRhsPipelineImpl() = delete;
35 
37 
38  boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
39  MoFEM::Interface &m_field, const std::string field_name,
40  std::vector<boost::shared_ptr<ScalingMethod>> smv,
41  const std::string block_name, Sev sev
42 
43  ) {
45 
46  using OpFluxForceset =
47  typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
49  FIELD_DIM>;
50  using OpFluxPressureset =
51  typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
53  FIELD_DIM>;
54  using OpFluxBlockset =
55  typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
57  FIELD_DIM>;
58 
59  CHKERR
60  NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
61  I>::template AddFluxToPipeline<OpFluxForceset>::add(pipeline, m_field,
62  field_name, smv,
63  block_name, sev);
64  CHKERR
65  NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
66  I>::template AddFluxToPipeline<OpFluxPressureset>::add(pipeline,
67  m_field,
68  field_name, smv,
69  block_name, sev);
70  CHKERR
71  NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
72  I>::template AddFluxToPipeline<OpFluxBlockset>::add(pipeline, m_field,
73  field_name, smv,
74  block_name, sev);
75 
77  }
78 };
79 
80 /**
81  * @brief Type generating specialisation for force meshsets
82  *
83  */
85 
86 template <int FIELD_DIM, AssemblyType A, IntegrationType I, typename OpBase>
88  A, I, OpBase>;
89 
90 template <int BASE_DIM, int FIELD_DIM, AssemblyType A, IntegrationType I,
91  typename OpBase>
93 
95  FIELD_DIM, A, I, OpBase>,
96  A, I, OpBase
97 
98  > {
99 
100  AddFluxToRhsPipelineImpl() = delete;
101 
103 
104  boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
105  MoFEM::Interface &m_field, const std::string field_name,
106  std::vector<boost::shared_ptr<ScalingMethod>> smv,
107  const std::string block_name, Sev sev
108 
109  ) {
110  return add(pipeline, m_field, field_name, smv, block_name, sev);
111  }
112 
114 
115  boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
116  MoFEM::Interface &m_field, const std::string field_name,
117  std::vector<boost::shared_ptr<ScalingMethod>> smv,
118  std::vector<boost::shared_ptr<TimeScaleVector<FIELD_DIM>>> vsmv,
119  const std::string block_name, Sev sev
120 
121  ) {
123 
124  using OpFluxForceset =
125  typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
127  FIELD_DIM>;
128  using OpFluxPressureset =
129  typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
131  FIELD_DIM>;
132  using OpFluxBlockset =
133  typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
135  FIELD_DIM>;
136 
137  using OpFluxBlocksetVectorScaling =
138  typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
141 
142  CHKERR
143  NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
144  I>::template AddFluxToPipeline<OpFluxForceset>::add(pipeline, m_field,
145  field_name, smv,
146  block_name, sev);
147  CHKERR
148  NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
149  I>::template AddFluxToPipeline<OpFluxPressureset>::add(pipeline,
150  m_field,
151  field_name, smv,
152  block_name, sev);
153  CHKERR
154  NaturalBC<OpBase>::template Assembly<A>::template LinearForm<
155  I>::template AddFluxToPipeline<OpFluxBlockset>::add(pipeline, m_field,
156  field_name, smv,
157  block_name, sev);
158  CHKERR
159  NaturalBC<OpBase>::template Assembly<A>::template LinearForm<I>::
160  template AddFluxToPipeline<OpFluxBlocksetVectorScaling>::add(
161  pipeline, m_field, field_name, vsmv, block_name, sev);
162 
164  }
165 };
166 
167 } // namespace MoFEM
168 
169 #endif //_NATURAL_FORCE_MESHSETS_HPP_
MoFEM::NaturalForceMeshsetsScalarAndVectorScaling
Type generating specialisation for force meshsets.
Definition: NaturalForceMeshsets.hpp:84
MoFEM::OpFluxRhsImpl
Definition: Natural.hpp:39
MoFEM::NaturalBC
Natural boundary conditions.
Definition: Natural.hpp:57
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::AddFluxToRhsPipelineImpl< OpFluxRhsImpl< NaturalForceMeshsets, BASE_DIM, FIELD_DIM, A, I, OpBase >, A, I, OpBase >::add
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, const std::string field_name, std::vector< boost::shared_ptr< ScalingMethod >> smv, const std::string block_name, Sev sev)
Definition: NaturalForceMeshsets.hpp:36
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
BASE_DIM
constexpr int BASE_DIM
Definition: dg_projection.cpp:15
MoFEM::AddFluxToRhsPipelineImpl< OpFluxRhsImpl< NaturalForceMeshsetsScalarAndVectorScaling, BASE_DIM, FIELD_DIM, A, I, OpBase >, A, I, OpBase >::add
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, const std::string field_name, std::vector< boost::shared_ptr< ScalingMethod >> smv, const std::string block_name, Sev sev)
Definition: NaturalForceMeshsets.hpp:102
MoFEM::NaturalForceMeshsets
Type generating specialisation for force meshsets.
Definition: NaturalForceMeshsets.hpp:20
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
FIELD_DIM
constexpr int FIELD_DIM
Definition: child_and_parent.cpp:15
I
constexpr IntegrationType I
Definition: operators_tests.cpp:31
MoFEM::AddFluxToRhsPipelineImpl< OpFluxRhsImpl< NaturalForceMeshsetsScalarAndVectorScaling, BASE_DIM, FIELD_DIM, A, I, OpBase >, A, I, OpBase >::add
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, const std::string field_name, std::vector< boost::shared_ptr< ScalingMethod >> smv, std::vector< boost::shared_ptr< TimeScaleVector< FIELD_DIM >>> vsmv, const std::string block_name, Sev sev)
Definition: NaturalForceMeshsets.hpp:113
MoFEM::OpBaseImpl
Definition: FormsIntegrators.hpp:178
CHKERR
#define CHKERR
Inline error check.
Definition: definitions.h:548
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
OpFlux
Definition: hcurl_divergence_operator_2d.cpp:56
MoFEM::LogManager::SeverityLevel
SeverityLevel
Severity levels.
Definition: LogManager.hpp:33
MoFEM::AddFluxToRhsPipelineImpl
Definition: Natural.hpp:46
MoFEM::TimeScaleVector
Force scale operator for reading four columns (time and vector)
Definition: ScalingMethod.hpp:97
field_name
constexpr auto field_name
Definition: poisson_2d_homogeneous.cpp:13
MoFEM::IntegrationType
IntegrationType
Form integrator integration types.
Definition: FormsIntegrators.hpp:136
MoFEM::AssemblyType
AssemblyType
[Storage and set boundary conditions]
Definition: FormsIntegrators.hpp:104
MoFEMFunctionReturn
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:429
MoFEMFunctionBegin
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
Definition: definitions.h:359