v0.14.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>;
29
30 static MoFEMErrorCode add(
31
32 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
33 MoFEM::Interface &m_field, std::string field_name, double scale, Sev sev
34
35 ) {
37 CHKERR T::template AddFluxToPipeline<OpForce>::add(
38 pipeline, m_field, field_name, {}, "FORCE", sev);
39 auto u_ptr = boost::make_shared<MatrixDouble>();
40 pipeline.push_back(
41 new OpCalculateVectorFieldValues<SPACE_DIM>(field_name, u_ptr));
42 CHKERR T::template AddFluxToPipeline<OpSpringRhs>::add(
43 pipeline, m_field, field_name, u_ptr, scale, "SPRING", sev);
45 }
46};
47
49 typename OpBase>
50struct AddFluxToLhsPipelineImpl<
51
52 OpFluxLhsImpl<BoundaryBCs, BASE_DIM, FIELD_DIM, A, I, OpBase>, A, I, OpBase
53
54 > {
55
57
58 using T = typename NaturalBC<OpBase>::template Assembly<
59 A>::template BiLinearForm<I>;
60
64
65 static MoFEMErrorCode add(
66
67 boost::ptr_deque<ForcesAndSourcesCore::UserDataOperator> &pipeline,
68 MoFEM::Interface &m_field, std::string field_name, Sev sev
69
70 ) {
72 CHKERR T::template AddFluxToPipeline<OpSpringLhs>::add(
73 pipeline, m_field, field_name, field_name, "SPRING", sev);
75 }
76};
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
IntegrationType
Form integrator integration types.
AssemblyType
[Storage and set boundary conditions]
constexpr IntegrationType I
constexpr AssemblyType A
double scale
Definition: plastic.cpp:166
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 NaturalBC< OpBase >::template Assembly< A >::template BiLinearForm< I > T
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
Deprecated interface functions.