v0.15.0
Loading...
Searching...
No Matches
NaturalBoundaryBC.hpp
Go to the documentation of this file.
1/**
2 * @file NaturalBoundaryBC.hpp
3 * @brief Implementation of natural boundary conditions
4 * @version 0.13.2
5 * @date 2022-09-22
6 *
7 * @copyright Copyright (c) 2022
8 *
9 */
10
12 typename OpBase>
13struct AddFluxToRhsPipelineImpl<
14
15 OpFluxRhsImpl<BoundaryBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>, A, I, OpBase
16
17 > {
18
20
21 using T =
22 typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<I>;
23
24 using OpForce =
28 SPACE_DIM>;
31 SPACE_DIM>;
32
33 static MoFEMErrorCode add(
34
35 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
36 MoFEM::Interface &m_field, std::string field_name, double scale, Sev sev
37
38 ) {
40 CHKERR T::template AddFluxToPipeline<OpForce>::add(
41 pipeline, m_field, field_name, {}, "FORCE", sev);
42 CHKERR T::template AddFluxToPipeline<OpFluidLevelRhs>::add(
43 pipeline, m_field, field_name, {}, scale, "FLUID_PRESSURE", sev);
44 auto u_ptr = boost::make_shared<MatrixDouble>();
45 pipeline.push_back(
46 new OpCalculateVectorFieldValues<SPACE_DIM>(field_name, u_ptr));
47 CHKERR T::template AddFluxToPipeline<OpSpringRhs>::add(
48 pipeline, m_field, field_name, u_ptr, scale, "SPRING", sev);
49
51 }
52};
53
55 typename OpBase>
56struct AddFluxToLhsPipelineImpl<
57
58 OpFluxLhsImpl<BoundaryBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>, A, I, OpBase
59
60 > {
61
63
64 using T = typename NaturalBC<OpBase>::template Assembly<
65 A>::template BiLinearForm<I>;
66
70
71 static MoFEMErrorCode add(
72
73 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
74 MoFEM::Interface &m_field, std::string field_name, Sev sev
75
76 ) {
78 CHKERR T::template AddFluxToPipeline<OpSpringLhs>::add(
79 pipeline, m_field, field_name, field_name, "SPRING", sev);
81 }
82};
constexpr int SPACE_DIM
constexpr int FIELD_DIM
#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.
constexpr int BASE_DIM
IntegrationType
Form integrator integration types.
AssemblyType
[Storage and set boundary conditions]
constexpr IntegrationType I
constexpr AssemblyType A
double scale
Definition plastic.cpp:123
constexpr auto field_name
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, std::string field_name, Sev sev)
typename NaturalBC< OpBase >::template Assembly< A >::template BiLinearForm< I > T
typename T::template OpFlux< ElasticExample::SpringBcType< BLOCKSET >, BASE_DIM, FIELD_DIM > OpSpringLhs
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, std::string field_name, double scale, Sev sev)
typename T::template OpFlux< ElasticExample::SpringBcType< BLOCKSET >, 1, SPACE_DIM > OpSpringRhs
typename NaturalBC< OpBase >::template Assembly< A >::template LinearForm< I > T
typename T::template OpFlux< ElasticExample::FluidLevelType< BLOCKSET >, 1, SPACE_DIM > OpFluidLevelRhs
Deprecated interface functions.