-
Notifications
You must be signed in to change notification settings - Fork 96
/
NeumannTimeDependent.i
146 lines (122 loc) · 5.61 KB
/
NeumannTimeDependent.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
// =================================================================================================
// This code is part of PyLith, developed through the Computational Infrastructure
// for Geodynamics (https://github.com/geodynamics/pylith).
//
// Copyright (c) 2010-2024, University of California, Davis and the PyLith Development Team.
// All rights reserved.
//
// See https://mit-license.org/ and LICENSE.md and for license information.
// =================================================================================================
/** @file modulesrc/bc/NeumannTimeDependent.i
*
* @brief Python interface to C++ NeumannTimeDependent object.
*/
namespace pylith {
namespace bc {
class NeumannTimeDependent: public pylith::bc::BoundaryCondition {
// PUBLIC METHODS //////////////////////////////////////////////////////////////////////////////////////////
public:
/// Default constructor.
NeumannTimeDependent(void);
/// Destructor.
~NeumannTimeDependent(void);
/// Deallocate PETSc and local data structures.
void deallocate(void);
/** Set time history database.
*
* @param[in] db Time history database.
*/
void setTimeHistoryDB(spatialdata::spatialdb::TimeHistory* th);
/** Get time history database.
*
* @preturns Time history database.
*/
const spatialdata::spatialdb::TimeHistory* getTimeHistoryDB(void);
/** Use initial value term in time history expression.
*
* @param[in] value True if using initial value term in expression.
*/
void useInitial(const bool value);
/** Get flag associated with using initial value term in time history expression.
*
* @returns True if using initial value term in expression, false otherwise.
*/
bool useInitial(void) const;
/** Use rate value term in time history expression.
*
* @param[in] value True if using rate value term in expression.
*/
void useRate(const bool value);
/** Get flag associated with using rate value term in time history expression.
*
* @returns True if using rate value term in expression, false otherwise.
*/
bool useRate(void) const;
/** Use time history term in time history expression.
*
* @param[in] value True if using time history term in expression.
*/
void useTimeHistory(const bool value);
/** Get flag associated with using time history term in time history expression.
*
* @returns True if using time history term in expression, false otherwise.
*/
bool useTimeHistory(void) const;
/** Set name of scale associated with Neumann boundary
* condition (e.g., 'pressure' for elasticity).
*
* A Neumann boundary condition constrains the gradient in
* a solution subfield. In some cases the constraint is
* actually on a scaled version of the gradient as is the
* case of a Neumann boundary condition for elasticity
* that constrains boundary tractions.
*
* @param value Name of scale for nondimensionalizing Neumann boundary condition.
*/
void setScaleName(const char* value);
/** Create integrator and set kernels.
*
* @param[in] solution Solution field.
* @returns Integrator if applicable, otherwise NULL.
*/
pylith::feassemble::Integrator* createIntegrator(const pylith::topology::Field& solution);
/** Create constraint and set kernels.
*
* @param[in] solution Solution field.
* @returns Constraint if applicable, otherwise NULL.
*/
std::vector < pylith::feassemble::Constraint*> createConstraints(const pylith::topology::Field& solution);
/** Create auxiliary field.
*
* @param[in] solution Solution field.
* @param[in\ domainMesh Finite-element mesh associated with integration domain.
*
* @returns Auxiliary field if applicable, otherwise NULL.
*/
pylith::topology::Field* createAuxiliaryField(const pylith::topology::Field& solution,
const pylith::topology::Mesh& domainMesh);
/** Update auxiliary subfields at beginning of time step.
*
* @param[out] auxiliaryField Auxiliary field.
* @param[in] t Current time.
*/
void updateAuxiliaryField(pylith::topology::Field* auxiliaryField,
const double t);
// PROTECTED METHODS
// ///////////////////////////////////////////////////////////////////////////////////////////////
protected:
/** Get auxiliary factory associated with physics.
*
* @return Auxiliary factory for physics object.
*/
pylith::feassemble::AuxiliaryFactory* _getAuxiliaryFactory(void);
/** Update kernel constants.
*
* @param[in] dt Current time step.
*/
void _updateKernelConstants(const PylithReal dt);
};
// NeumannTimeDependent
} // bc
} // pylith
// End of file