v0.14.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
19 typename OpBase>
20struct AddFluxToRhsPipelineImpl<
21
22 OpFluxRhsImpl<ContactOps::BoundaryBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>,
23 A, I, OpBase
24
25 > {
26
28
29 using T =
30 typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<I>;
31
32 using OpForce =
36 SPACE_DIM>;
37
38 static MoFEMErrorCode add(
39
40 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
41 MoFEM::Interface &m_field, std::string field_name,
42 std::vector<boost::shared_ptr<ScalingMethod>> smv, Sev sev
43
44 ) {
46 CHKERR T::template AddFluxToPipeline<OpForce>::add(
47 pipeline, m_field, field_name, smv, "FORCE", sev);
48 auto u_ptr = boost::make_shared<MatrixDouble>();
49 pipeline.push_back(
50 new OpCalculateVectorFieldValues<SPACE_DIM>(field_name, u_ptr));
51 CHKERR T::template AddFluxToPipeline<OpSpringRhs>::add(
52 pipeline, m_field, field_name, u_ptr, 1, "SPRING", sev);
54 }
55};
56
58 typename OpBase>
59struct AddFluxToLhsPipelineImpl<
60
61 OpFluxLhsImpl<ContactOps::BoundaryBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>,
62 A, I, OpBase
63
64 > {
65
67
68 using T = typename NaturalBC<OpBase>::template Assembly<
69 A>::template BiLinearForm<I>;
70
74
75 static MoFEMErrorCode add(
76
77 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
78 MoFEM::Interface &m_field, std::string field_name, Sev sev
79
80 ) {
82 CHKERR T::template AddFluxToPipeline<OpSpringLhs>::add(
83 pipeline, m_field, field_name, field_name, "SPRING", sev);
85 }
86};
87
89 typename OpBase>
90struct AddFluxToRhsPipelineImpl<
91
92 OpFluxRhsImpl<ContactOps::DomainBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>, A,
93 I, OpBase
94
95 > {
96
98
99 using T =
100 typename NaturalBC<OpBase>::template Assembly<A>::template LinearForm<I>;
103
104 static MoFEMErrorCode add(
105
106 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
107 MoFEM::Interface &m_field, std::string field_name,
108 std::vector<boost::shared_ptr<ScalingMethod>> smv, Sev sev
109
110 ) {
112 CHKERR T::template AddFluxToPipeline<OpBodyForce>::add(
113 pipeline, m_field, field_name, smv, "BODY_FORCE", sev);
115 }
116};
Implementation of elastic spring bc.
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 ...
Definition: definitions.h:346
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
Definition: definitions.h:416
#define CHKERR
Inline error check.
Definition: definitions.h:535
constexpr int BASE_DIM
constexpr int BASE_DIM
Definition: elastic.cpp:15
IntegrationType
Form integrator integration types.
AssemblyType
[Storage and set boundary conditions]
constexpr IntegrationType I
constexpr AssemblyType A
constexpr auto field_name
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, Sev sev)
typename T::template OpFlux< ElasticExample::SpringBcType< BLOCKSET >, 1, SPACE_DIM > OpSpringRhs
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< 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)
[OpInternalForce]
Definition: elastic.cpp:45
Deprecated interface functions.