v0.14.0
TsCtx.hpp
Go to the documentation of this file.
1 /** \file TsCtx.hpp
2  * \brief Context for PETSc Time Stepping
3  */
4 
5 #ifndef __TSCTX_HPP__
6 #define __TSCTX_HPP__
7 
8 #include <petsc/private/tsimpl.h>
9 
10 #define TSADAPTMOFEM "TSMoFEMAdapt"
11 
12 namespace MoFEM {
13 
14 /** \brief Interface for Time Stepping (TS) solver
15  * \ingroup mofem_petsc_solvers
16  */
17 struct TsCtx {
18 
21 
22  std::string problemName;
23  MoFEMTypes bH; ///< If set to MF_EXIST check if element exist
24 
28 
44 
45  bool zeroMatrix;
46 
47  TsCtx(MoFEM::Interface &m_field, const std::string &problem_name);
48 
49  virtual ~TsCtx() = default;
50 
51  /**
52  * @brief Get the loops to do IFunction object
53  *
54  * It is sequence of finite elements used to evaluate the right hand side of
55  * implicit time solver.
56  *
57  * @return FEMethodsSequence&
58  */
60 
61  /**
62  * @brief Get the loops to do RHSFunction object
63  *
64  * It is sequence of finite elements used to evaluate the right hand side of
65  * implicit time solver.
66  *
67  * @return FEMethodsSequence&
68  */
70 
71  /**
72  * @brief Get the loops to do IJacobian object
73  *
74  * It is sequence of finite elements used to evalite the left hand sie of
75  * implicit time solver.
76  *
77  * @return FEMethodsSequence&
78  */
80 
81  /**
82  * @brief Get the loops to do RHSJacobian object
83  *
84  * It is sequence of finite elements used to evalite the left hand sie of
85  * implicit time solver.
86  *
87  * @return FEMethodsSequence&
88  */
90 
91  /**
92  * @brief Get the loops to do Monitor object
93  *
94  * It is sequence used to monitor solution of time solver.
95  *
96  * @return FEMethodsSequence&
97  */
99 
100  /**
101  * @brief Get the preProcess to do IFunction object
102  *
103  * @return BasicMethodsSequence&
104  */
106 
107  /**
108  * @brief Get the postProcess to do IFunction object
109  *
110  * @return BasicMethodsSequence&
111  */
113  return postProcessIFunction;
114  }
115 
116  /**
117  * @brief Get the preProcess to do IJacobian object
118  *
119  * @return BasicMethodsSequence&
120  */
122 
123  /**
124  * @brief Get the postProcess to do IJacobian object
125  *
126  * @return BasicMethodsSequence&
127  */
129  return postProcessIJacobian;
130  }
131 
132  /**
133  * @brief Get the preProcess to do Monitor object
134  *
135  * @return BasicMethodsSequence&
136  */
138 
139  /**
140  * @brief Get the postProcess to do Monitor object
141  *
142  * @return BasicMethodsSequence&
143  */
145 
146  /**
147  * @brief Get the preProcess to do RHSJacobian object
148  *
149  * @return BasicMethodsSequence&
150  */
152  return preProcessRHSJacobian;
153  }
154 
155  /**
156  * @brief Get the postProcess to do RHSJacobian object
157  *
158  * @return BasicMethodsSequence&
159  */
161  return postProcessRHSJacobian;
162  }
163 
164  /**
165  * @brief Get the preProcess to do RHSFunction object
166  *
167  * @return BasicMethodsSequence&
168  */
170  return preProcessRHSFunction;
171  }
172 
173  /**
174  * @brief Get the postProcess to do RHSFunction object
175  *
176  * @return BasicMethodsSequence&
177  */
179  return postProcessRHSFunction;
180  }
181 
182  /**
183  * @brief Clear loops
184  *
185  * @return MoFEMErrorCode
186  */
188 
189  friend PetscErrorCode TsSetIFunction(TS ts, PetscReal t, Vec u, Vec u_t,
190  Vec F, void *ctx);
191  friend PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec U_t,
192  PetscReal a, Mat A, Mat B, void *ctx);
193  friend PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u,
194  void *ctx);
195  friend PetscErrorCode TsSetRHSFunction(TS ts, PetscReal t, Vec u, Vec F,
196  void *ctx);
197  friend PetscErrorCode TsSetRHSJacobian(TS ts, PetscReal t, Vec u, Mat A,
198  Mat B, void *ctx);
199 
200  friend PetscErrorCode TsSetI2Function(TS ts, PetscReal t, Vec U, Vec U_t,
201  Vec U_tt, Vec F, void *ctx);
202 
203  friend PetscErrorCode TsSetI2Jacobian(TS ts, PetscReal t, Vec U, Vec U_t,
204  Vec U_tt, PetscReal v, PetscReal a,
205  Mat J, Mat P, void *ctx);
206 
207 private:
215 
216  boost::movelib::unique_ptr<bool> vecAssembleSwitch;
217  boost::movelib::unique_ptr<bool> matAssembleSwitch;
218 };
219 
220 /**
221  * @brief Set IFunction for TS solver
222  *
223  * <a
224  * href=https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetIFunction.html>See
225  * petsc for details</a>
226  *
227  * @param ts
228  * @param t
229  * @param u
230  * @param u_t
231  * @param F
232  * @param ctx
233  * @return PetscErrorCode
234  */
235 PetscErrorCode TsSetIFunction(TS ts, PetscReal t, Vec u, Vec u_t, Vec F,
236  void *ctx);
237 
238 /**
239  * @brief Set function evaluating jacobian in TS solver
240  *
241  * <a
242  * href=https://www.mcs.anl.gov/petsc/petsc-3.1/docs/manualpages/TS/TSSetIJacobian.html>See
243  * PETSc for details</a>
244  *
245  * @param ts
246  * @param t
247  * @param u
248  * @param u_t
249  * @param a
250  * @param A
251  * @param B
252  * @param ctx
253  * @return PetscErrorCode
254  */
255 PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a,
256  Mat A, Mat B, void *ctx);
257 
258 /**
259  * @brief Set monitor for TS solver
260  *
261  * <a
262  * href=https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSMonitorSet.html>See
263  * PETSc for details</a>
264  *
265  * @param ts
266  * @param step
267  * @param t
268  * @param u
269  * @param ctx
270  * @return PetscErrorCode
271  */
272 PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u,
273  void *ctx);
274 
275 /**
276  * @brief TS solver function
277  *
278  * <a
279  * href=https://www.mcs.anl.gov/petsc/petsc-3.11/docs/manualpages/TS/TSSetRHSFunction.html#TSSetRHSFunction>See
280  * PETSc for details</a>
281  *
282  * @param ts
283  * @param t
284  * @param u
285  * @param F
286  * @param ctx
287  * @return PetscErrorCode
288  */
289 PetscErrorCode TsSetRHSFunction(TS ts, PetscReal t, Vec u, Vec F, void *ctx);
290 
291 /**
292  * @brief TS solver function
293  *
294  * <a
295  * href=https://www.mcs.anl.gov/petsc/petsc-3.11/docs/manualpages/TS/TSSetRHSJacobian.html#TSSetRHSJacobian>See
296  * PETSc for details</a>
297  *
298  * @param ts
299  * @param t
300  * @param u
301  * @param A
302  * @param B
303  * @param ctx
304  * @return PetscErrorCode
305  */
306 PetscErrorCode TsSetRHSJacobian(TS ts, PetscReal t, Vec u, Mat A, Mat B,
307  void *ctx);
308 
309 /**
310  * @brief Calculation Jacobian for second order PDE in time
311  *
312  * <a
313  * href=https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetI2Jacobian.html>See
314  * PETSc for details</a>
315  *
316  * @param ts
317  * @param t time at step/stage being solved
318  * @param u state vectora
319  * @param u_t time derivative of state vector
320  * @param u_tt second time derivative of state vector
321  * @param a shift for u_t
322  * @param aa shift for u_tt
323  * @param A Jacobian of G(U) = F(t,U,W+v*U,W'+a*U), equivalent to dF/dU +
324  * v*dF/dU_t + a*dF/dU_tt
325  * @param B preconditioning matrix for J, may be same as J
326  * @param ctx TsCtx context for matrix evaluation routine
327  * @return PetscErrorCode
328  */
329 PetscErrorCode TsSetI2Jacobian(TS ts, PetscReal t, Vec u, Vec u_t, Vec u_tt,
330  PetscReal a, PetscReal aa, Mat A, Mat B,
331  void *ctx);
332 
333 /**
334  * @brief Calculation the right hand side for second order PDE in time
335  *
336  * <a
337  * href=https://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/TS/TSSetI2Function.html>PETSc
338  * for details</a>
339  *
340  * @param ts
341  * @param t
342  * @param u
343  * @param u_t
344  * @param u_tt
345  * @param F
346  * @param ctx
347  * @return PetscErrorCode
348  */
349 PetscErrorCode TsSetI2Function(TS ts, PetscReal t, Vec u, Vec u_t, Vec u_tt,
350  Vec F, void *ctx);
351 
352 /** \brief Custom TSAdaptivity in MoFEM
353  *
354  * \code
355  * CHKERR TSAdaptRegister(TSADAPTMOFEM, TSAdaptCreateMoFEM);
356  * TSAdapt adapt;
357  * CHKERR TSGetAdapt(solver, &adapt);
358  * CHKERR TSAdaptSetType(adapt, TSADAPTMOFEM);
359  * \endcode
360  *
361  */
362 struct TSAdaptMoFEM {
363 
364  TSAdaptMoFEM();
365 
366  double alpha; //< step reduction if divergence
367  double gamma; //< adaptivity exponent
368  int desiredIt; //< desired number of iterations
369  PetscBool offApat; //< off adaptivity
370 };
371 
372 static PetscErrorCode TSAdaptChooseMoFEM(TSAdapt adapt, TS ts, PetscReal h,
373  PetscInt *next_sc, PetscReal *next_h,
374  PetscBool *accept, PetscReal *wlte,
375  PetscReal *wltea, PetscReal *wlter);
376 static PetscErrorCode TSAdaptResetMoFEM(TSAdapt adapt);
377 
378 static PetscErrorCode TSAdaptDestroyMoFEM(TSAdapt adapt);
379 
380 /**
381  * @brief Craete MOFEM adapt
382  *
383  * \code
384  * CHKERR TSAdaptRegister(TSADAPTMOFEM, TSAdaptCreateMoFEM);
385  * TSAdapt adapt;
386  * CHKERR TSGetAdapt(solver, &adapt);
387  * CHKERR TSAdaptSetType(adapt, TSADAPTMOFEM);
388  * \endcode
389  *
390  * @param adapt
391  * @return PetscErrorCode
392  */
393 PetscErrorCode TSAdaptCreateMoFEM(TSAdapt adapt);
394 
395 } // namespace MoFEM
396 
397 #endif // __TSCTX_HPP__
MoFEM::TsCtx::preProcessRHSJacobian
BasicMethodsSequence preProcessRHSJacobian
Definition: TsCtx.hpp:40
MoFEM::TsCtx::TsSetRHSFunction
friend PetscErrorCode TsSetRHSFunction(TS ts, PetscReal t, Vec u, Vec F, void *ctx)
TS solver function.
Definition: TsCtx.cpp:323
MoFEM::TsCtx::getLoopsRHSFunction
FEMethodsSequence & getLoopsRHSFunction()
Get the loops to do RHSFunction object.
Definition: TsCtx.hpp:69
MoFEM::TsCtx::clearLoops
MoFEMErrorCode clearLoops()
Clear loops.
Definition: TsCtx.cpp:36
MoFEM::TsCtx::getLoopsRHSJacobian
FEMethodsSequence & getLoopsRHSJacobian()
Get the loops to do RHSJacobian object.
Definition: TsCtx.hpp:89
MoFEM::TsSetIFunction
PetscErrorCode TsSetIFunction(TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
Set IFunction for TS solver.
Definition: TsCtx.cpp:56
MoFEM::TsCtx::MOFEM_EVENT_TsCtxIJacobian
PetscLogEvent MOFEM_EVENT_TsCtxIJacobian
Definition: TsCtx.hpp:211
MoFEM::TSAdaptDestroyMoFEM
PetscErrorCode TSAdaptDestroyMoFEM(TSAdapt adapt)
Definition: TsCtx.cpp:791
MoFEM::TsCtx::getLoopsMonitor
FEMethodsSequence & getLoopsMonitor()
Get the loops to do Monitor object.
Definition: TsCtx.hpp:98
MoFEM::TsCtx::moab
moab::Interface & moab
Definition: TsCtx.hpp:20
MoFEM::TsCtx::getPostProcessMonitor
BasicMethodsSequence & getPostProcessMonitor()
Get the postProcess to do Monitor object.
Definition: TsCtx.hpp:144
MoFEM::TsCtx::MOFEM_EVENT_TsCtxI2Function
PetscLogEvent MOFEM_EVENT_TsCtxI2Function
Definition: TsCtx.hpp:213
MoFEM::TsCtx::getLoopsIFunction
FEMethodsSequence & getLoopsIFunction()
Get the loops to do IFunction object.
Definition: TsCtx.hpp:59
MoFEM::TsCtx::MOFEM_EVENT_TsCtxIFunction
PetscLogEvent MOFEM_EVENT_TsCtxIFunction
Definition: TsCtx.hpp:210
MoFEM::Exceptions::MoFEMErrorCode
PetscErrorCode MoFEMErrorCode
MoFEM/PETSc error code.
Definition: Exceptions.hpp:56
MoFEM::TSAdaptMoFEM::alpha
double alpha
Definition: TsCtx.hpp:366
MoFEM::FEMethodsSequence
std::deque< PairNameFEMethodPtr > FEMethodsSequence
Definition: AuxPETSc.hpp:56
MoFEM::TsCtx::MOFEM_EVENT_TsCtxMonitor
PetscLogEvent MOFEM_EVENT_TsCtxMonitor
Definition: TsCtx.hpp:212
MoFEM::TsCtx::getPostProcessRHSFunction
BasicMethodsSequence & getPostProcessRHSFunction()
Get the postProcess to do RHSFunction object.
Definition: TsCtx.hpp:178
A
constexpr AssemblyType A
Definition: operators_tests.cpp:30
MoFEM::TsCtx::getPostProcessIJacobian
BasicMethodsSequence & getPostProcessIJacobian()
Get the postProcess to do IJacobian object.
Definition: TsCtx.hpp:128
MoFEM::TsSetI2Jacobian
PetscErrorCode TsSetI2Jacobian(TS ts, PetscReal t, Vec u, Vec u_t, Vec u_tt, PetscReal a, PetscReal aa, Mat A, Mat B, void *ctx)
Calculation Jacobian for second order PDE in time.
Definition: TsCtx.cpp:511
MoFEM::TsCtx::vecAssembleSwitch
boost::movelib::unique_ptr< bool > vecAssembleSwitch
Definition: TsCtx.hpp:216
J
FTensor::Index< 'J', DIM1 > J
Definition: level_set.cpp:30
MoFEM::TsCtx::FEMethodsSequence
MoFEM::FEMethodsSequence FEMethodsSequence
Definition: TsCtx.hpp:26
MoFEM::TSAdaptMoFEM
Custom TSAdaptivity in MoFEM.
Definition: TsCtx.hpp:362
MoFEM::TsCtx::loopsIJacobian
FEMethodsSequence loopsIJacobian
Definition: TsCtx.hpp:29
MoFEM::TSAdaptMoFEM::offApat
PetscBool offApat
Definition: TsCtx.hpp:369
MoFEM::DeprecatedCoreInterface
Deprecated interface functions.
Definition: DeprecatedCoreInterface.hpp:16
MoFEM::TsCtx::bH
MoFEMTypes bH
If set to MF_EXIST check if element exist.
Definition: TsCtx.hpp:23
MoFEM::TsCtx::problemName
std::string problemName
Definition: TsCtx.hpp:22
MoFEM::TsCtx::loopsRHSJacobian
FEMethodsSequence loopsRHSJacobian
Definition: TsCtx.hpp:32
MoFEM::Interface
DeprecatedCoreInterface Interface
Definition: Interface.hpp:1975
MoFEM::TsMonitorSet
PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
Set monitor for TS solver.
Definition: TsCtx.cpp:259
MoFEM::TSAdaptResetMoFEM
PetscErrorCode TSAdaptResetMoFEM(TSAdapt adapt)
Definition: TsCtx.cpp:786
MoFEM::TsCtx::TsSetRHSJacobian
friend PetscErrorCode TsSetRHSJacobian(TS ts, PetscReal t, Vec u, Mat A, Mat B, void *ctx)
TS solver function.
Definition: TsCtx.cpp:422
MoFEM::TsCtx::postProcessIJacobian
BasicMethodsSequence postProcessIJacobian
Definition: TsCtx.hpp:35
MoFEM::TsCtx::getPostProcessRHSJacobian
BasicMethodsSequence & getPostProcessRHSJacobian()
Get the postProcess to do RHSJacobian object.
Definition: TsCtx.hpp:160
MoFEM
implementation of Data Operators for Forces and Sources
Definition: Common.hpp:10
MoFEM::TsCtx::TsSetIFunction
friend PetscErrorCode TsSetIFunction(TS ts, PetscReal t, Vec u, Vec u_t, Vec F, void *ctx)
Set IFunction for TS solver.
Definition: TsCtx.cpp:56
a
constexpr double a
Definition: approx_sphere.cpp:30
MoFEM::TsCtx::mField
MoFEM::Interface & mField
Definition: TsCtx.hpp:19
MoFEM::TsCtx::getPreProcessIJacobian
BasicMethodsSequence & getPreProcessIJacobian()
Get the preProcess to do IJacobian object.
Definition: TsCtx.hpp:121
MoFEM::TSAdaptMoFEM::gamma
double gamma
Definition: TsCtx.hpp:367
MoFEM::TsCtx::BasicMethodsSequence
MoFEM::BasicMethodsSequence BasicMethodsSequence
Definition: TsCtx.hpp:27
MoFEM::TsCtx::postProcessMonitor
BasicMethodsSequence postProcessMonitor
Definition: TsCtx.hpp:39
MoFEM::TsCtx::TsMonitorSet
friend PetscErrorCode TsMonitorSet(TS ts, PetscInt step, PetscReal t, Vec u, void *ctx)
Set monitor for TS solver.
Definition: TsCtx.cpp:259
MoFEM::TsCtx::~TsCtx
virtual ~TsCtx()=default
MoFEM::TsCtx::loopsMonitor
FEMethodsSequence loopsMonitor
Definition: TsCtx.hpp:31
MoFEM::BasicMethodsSequence
std::deque< BasicMethodPtr > BasicMethodsSequence
Definition: AuxPETSc.hpp:57
MoFEM::PairNameFEMethodPtr
Definition: AuxPETSc.hpp:12
EshelbianPlasticity::P
@ P
Definition: EshelbianContact.cpp:193
h
double h
Definition: photon_diffusion.cpp:60
MoFEM::TsCtx::zeroMatrix
bool zeroMatrix
Definition: TsCtx.hpp:45
MoFEM::TsCtx::getPreProcessMonitor
BasicMethodsSequence & getPreProcessMonitor()
Get the preProcess to do Monitor object.
Definition: TsCtx.hpp:137
MoFEM::TsCtx
Interface for Time Stepping (TS) solver.
Definition: TsCtx.hpp:17
MoFEM::TsCtx::getPostProcessIFunction
BasicMethodsSequence & getPostProcessIFunction()
Get the postProcess to do IFunction object.
Definition: TsCtx.hpp:112
MoFEM::TsCtx::matAssembleSwitch
boost::movelib::unique_ptr< bool > matAssembleSwitch
Definition: TsCtx.hpp:217
MoFEM::TsCtx::preProcessMonitor
BasicMethodsSequence preProcessMonitor
Definition: TsCtx.hpp:38
MoFEM::TsCtx::postProcessIFunction
BasicMethodsSequence postProcessIFunction
Definition: TsCtx.hpp:37
MoFEM::TsCtx::MOFEM_EVENT_TsCtxRHSFunction
PetscLogEvent MOFEM_EVENT_TsCtxRHSFunction
Definition: TsCtx.hpp:208
MoFEM::TsCtx::getPreProcessRHSJacobian
BasicMethodsSequence & getPreProcessRHSJacobian()
Get the preProcess to do RHSJacobian object.
Definition: TsCtx.hpp:151
MoFEM::TsCtx::preProcessIFunction
BasicMethodsSequence preProcessIFunction
Definition: TsCtx.hpp:36
MoFEM::TsCtx::loopsIFunction
FEMethodsSequence loopsIFunction
Definition: TsCtx.hpp:30
MoFEM::TsSetIJacobian
PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec u_t, PetscReal a, Mat A, Mat B, void *ctx)
Set function evaluating jacobian in TS solver.
Definition: TsCtx.cpp:165
MoFEM::TsCtx::preProcessIJacobian
BasicMethodsSequence preProcessIJacobian
Definition: TsCtx.hpp:34
MoFEM::TSAdaptMoFEM::TSAdaptMoFEM
TSAdaptMoFEM()
Definition: TsCtx.cpp:724
MoFEM::TsCtx::PairNameFEMethodPtr
MoFEM::PairNameFEMethodPtr PairNameFEMethodPtr
Definition: TsCtx.hpp:25
t
constexpr double t
plate stiffness
Definition: plate.cpp:59
MoFEM::TsCtx::loopsRHSFunction
FEMethodsSequence loopsRHSFunction
Definition: TsCtx.hpp:33
MoFEM::TsCtx::MOFEM_EVENT_TsCtxRHSJacobian
PetscLogEvent MOFEM_EVENT_TsCtxRHSJacobian
Definition: TsCtx.hpp:209
MoFEM::TsCtx::getLoopsIJacobian
FEMethodsSequence & getLoopsIJacobian()
Get the loops to do IJacobian object.
Definition: TsCtx.hpp:79
MoFEM::TSAdaptChooseMoFEM
PetscErrorCode TSAdaptChooseMoFEM(TSAdapt adapt, TS ts, PetscReal h, PetscInt *next_sc, PetscReal *next_h, PetscBool *accept, PetscReal *wlte, PetscReal *wltea, PetscReal *wlter)
Definition: TsCtx.cpp:737
MoFEM::TsCtx::TsSetIJacobian
friend PetscErrorCode TsSetIJacobian(TS ts, PetscReal t, Vec u, Vec U_t, PetscReal a, Mat A, Mat B, void *ctx)
Set function evaluating jacobian in TS solver.
Definition: TsCtx.cpp:165
MoFEM::TsCtx::getPreProcessIFunction
BasicMethodsSequence & getPreProcessIFunction()
Get the preProcess to do IFunction object.
Definition: TsCtx.hpp:105
MoFEM::TsCtx::TsSetI2Jacobian
friend PetscErrorCode TsSetI2Jacobian(TS ts, PetscReal t, Vec U, Vec U_t, Vec U_tt, PetscReal v, PetscReal a, Mat J, Mat P, void *ctx)
Calculation Jacobian for second order PDE in time.
Definition: TsCtx.cpp:511
MoFEM::TsCtx::postProcessRHSFunction
BasicMethodsSequence postProcessRHSFunction
Definition: TsCtx.hpp:43
v
const double v
phase velocity of light in medium (cm/ns)
Definition: initial_diffusion.cpp:40
MoFEM::TsCtx::MOFEM_EVENT_TsCtxI2Jacobian
PetscLogEvent MOFEM_EVENT_TsCtxI2Jacobian
Definition: TsCtx.hpp:214
EigenMatrix::Vec
const FTensor::Tensor2< T, Dim, Dim > Vec
Definition: MatrixFunction.hpp:66
MoFEM::TSAdaptMoFEM::desiredIt
int desiredIt
Definition: TsCtx.hpp:368
MoFEMTypes
MoFEMTypes
Those types control how functions respond on arguments, f.e. error handling.
Definition: definitions.h:97
MoFEM::TsCtx::postProcessRHSJacobian
BasicMethodsSequence postProcessRHSJacobian
Definition: TsCtx.hpp:42
MoFEM::TsSetRHSJacobian
PetscErrorCode TsSetRHSJacobian(TS ts, PetscReal t, Vec u, Mat A, Mat B, void *ctx)
TS solver function.
Definition: TsCtx.cpp:422
MoFEM::TsCtx::TsSetI2Function
friend PetscErrorCode TsSetI2Function(TS ts, PetscReal t, Vec U, Vec U_t, Vec U_tt, Vec F, void *ctx)
Calculation the right hand side for second order PDE in time.
Definition: TsCtx.cpp:612
MoFEM::TsSetRHSFunction
PetscErrorCode TsSetRHSFunction(TS ts, PetscReal t, Vec u, Vec F, void *ctx)
TS solver function.
Definition: TsCtx.cpp:323
MoFEM::TsSetI2Function
PetscErrorCode TsSetI2Function(TS ts, PetscReal t, Vec u, Vec u_t, Vec u_tt, Vec F, void *ctx)
Calculation the right hand side for second order PDE in time.
Definition: TsCtx.cpp:612
MoFEM::TsCtx::TsCtx
TsCtx(MoFEM::Interface &m_field, const std::string &problem_name)
Definition: TsCtx.cpp:5
MoFEM::TsCtx::getPreProcessRHSFunction
BasicMethodsSequence & getPreProcessRHSFunction()
Get the preProcess to do RHSFunction object.
Definition: TsCtx.hpp:169
MoFEM::TsCtx::preProcessRHSFunction
BasicMethodsSequence preProcessRHSFunction
Definition: TsCtx.hpp:41
EshelbianPlasticity::U
@ U
Definition: EshelbianContact.cpp:193
F
@ F
Definition: free_surface.cpp:394
MoFEM::TSAdaptCreateMoFEM
PetscErrorCode TSAdaptCreateMoFEM(TSAdapt adapt)
Craete MOFEM adapt.
Definition: TsCtx.cpp:797