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
19 AddFluxToRhsPipelineImpl() = delete;
20
21 using T =
22 typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<I>;
23
24 using OpForce =
26 using OpSpringRhs =
27 typename T::template OpFlux<ElasticOps::SpringBcType<BLOCKSET>, 1,
28 SPACE_DIM>;
29 using OpFluidLevelRhs =
30 typename T::template OpFlux<ElasticOps::FluidLevelType<BLOCKSET>, 1,
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
62 AddFluxToLhsPipelineImpl() = delete;
63
64 using T = typename NaturalBC<OpBase>::template Assembly<
65 A>::template BiLinearForm<I>;
66
67 using OpSpringLhs =
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
[Define dimension]
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]
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
constexpr IntegrationType I
constexpr AssemblyType A
[Define dimension]
constexpr auto field_name
Boundary conditions marker.
Definition elastic.cpp:39
Deprecated interface functions.
double scale
Definition plastic.cpp:123
FormsIntegrators< BoundaryEleOp >::Assembly< AT >::LinearForm< IT >::OpBaseTimesVector< 1, SPACE_DIM, 1 > OpSpringRhs
Definition contact.cpp:73
FormsIntegrators< BoundaryEleOp >::Assembly< AT >::BiLinearForm< IT >::OpMass< 1, SPACE_DIM > OpSpringLhs
[Operators used for contact]
Definition contact.cpp:71
BoundaryNaturalBC::OpFlux< NaturalForceMeshsets, 1, SPACE_DIM > OpForce