v0.15.0
Loading...
Searching...
No Matches
ContactNaturalBC.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
11namespace ContactOps {
12struct BoundaryBCs;
13struct DomainBCs;
14} // namespace ContactOps
15
16#include <ElasticSpring.hpp>
17#include <FluidLevel.hpp>
18
20 typename OpBase>
21struct AddFluxToRhsPipelineImpl<
22
23 OpFluxRhsImpl<ContactOps::BoundaryBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>,
24 A, I, OpBase
25
26 > {
27
29
30 using T =
31 typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<I>;
32
33 using OpForce =
37 SPACE_DIM>;
40 SPACE_DIM>;
41
42 static MoFEMErrorCode add(
43
44 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
45 MoFEM::Interface &m_field, std::string field_name,
46 std::vector<boost::shared_ptr<ScalingMethod>> smv, Sev sev
47
48 ) {
50 CHKERR T::template AddFluxToPipeline<OpForce>::add(
51 pipeline, m_field, field_name, smv, "FORCE", sev);
52 CHKERR T::template AddFluxToPipeline<OpFluidLevelRhs>::add(
53 pipeline, m_field, field_name, smv, 1, "FLUID_PRESSURE", sev);
54 auto u_ptr = boost::make_shared<MatrixDouble>();
55 pipeline.push_back(
56 new OpCalculateVectorFieldValues<SPACE_DIM>(field_name, u_ptr));
57 CHKERR T::template AddFluxToPipeline<OpSpringRhs>::add(
58 pipeline, m_field, field_name, u_ptr, 1, "SPRING", sev);
60 }
61};
62
64 typename OpBase>
65struct AddFluxToLhsPipelineImpl<
66
67 OpFluxLhsImpl<ContactOps::BoundaryBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>,
68 A, I, OpBase
69
70 > {
71
73
74 using T = typename NaturalBC<OpBase>::template Assembly<
75 A>::template BiLinearForm<I>;
76
80
81 static MoFEMErrorCode add(
82
83 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
84 MoFEM::Interface &m_field, std::string field_name, Sev sev
85
86 ) {
88 CHKERR T::template AddFluxToPipeline<OpSpringLhs>::add(
89 pipeline, m_field, field_name, field_name, "SPRING", sev);
91 }
92};
93
95 typename OpBase>
96struct AddFluxToRhsPipelineImpl<
97
98 OpFluxRhsImpl<ContactOps::DomainBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>, A,
99 I, OpBase
100
101 > {
102
104
105 using T =
106 typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<I>;
109
110 static MoFEMErrorCode add(
111
112 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
113 MoFEM::Interface &m_field, std::string field_name,
114 std::vector<boost::shared_ptr<ScalingMethod>> smv, Sev sev
115
116 ) {
118 CHKERR T::template AddFluxToPipeline<OpBodyForce>::add(
119 pipeline, m_field, field_name, smv, "BODY_FORCE", sev);
121 }
122};
Implementation of elastic spring bc.
Natural boundary condition applying pressure from fluid.
constexpr int BASE_DIM
Definition adjoint.cpp:19
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
constexpr auto field_name
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, std::string field_name, Sev sev)
typename T::template OpFlux< ElasticExample::SpringBcType< BLOCKSET >, BASE_DIM, FIELD_DIM > OpSpringLhs
typename T::template OpFlux< ElasticExample::FluidLevelType< BLOCKSET >, 1, SPACE_DIM > OpFluidLevelRhs
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, std::string field_name, std::vector< boost::shared_ptr< ScalingMethod > > smv, Sev sev)
typename T::template OpFlux< ElasticExample::SpringBcType< BLOCKSET >, 1, SPACE_DIM > OpSpringRhs
typename T::template OpFlux< NaturalMeshsetType< BLOCKSET >, BASE_DIM, FIELD_DIM > OpBodyForce
static MoFEMErrorCode add(boost::ptr_deque< ForcesAndSourcesCore::UserDataOperator > &pipeline, MoFEM::Interface &m_field, std::string field_name, std::vector< boost::shared_ptr< ScalingMethod > > smv, Sev sev)
[Define entities]
Definition elastic.cpp:37
Deprecated interface functions.