v0.16.3
Loading...
Searching...
No Matches
TSElasticPreAndPostStep.hpp
Go to the documentation of this file.
1/** @file TSElasticPreAndPostStep.hpp
2 * @brief Elastic TS pre/post-step registration and H1 transfer lifecycle.
3 */
4
5#ifndef ESHELBIAN_TS_ELASTIC_PRE_AND_POST_STEP_HPP
6#define ESHELBIAN_TS_ELASTIC_PRE_AND_POST_STEP_HPP
7
8namespace EshelbianPlasticity {
9
11
12 /** Register coefficient reset before solves, with optional H1 bookkeeping. */
13 static MoFEMErrorCode setPreStep(EshelbianCore *ep_ptr, TS ts,
14 bool h1_update = false);
15
16 /** Own projection resources for one solve; also clean up on early exits. */
18 explicit ProjectionScope(EshelbianCore *ep_ptr);
22 MoFEMErrorCode close();
23
24 private:
25 MPI_Comm comm;
26 bool active = false;
27 };
28
29 static MoFEMErrorCode preStepFun(TS ts);
30 static MoFEMErrorCode postStepFun(TS ts);
31
32private:
33 static MoFEMErrorCode postStepInitialise(EshelbianCore *ep_ptr);
34 static MoFEMErrorCode postStepDestroy();
35
36 static inline SmartPetscObj<KSP> prjKsp;
37 static inline SmartPetscObj<Vec> prjD;
38 static inline SmartPetscObj<Vec> prjF;
39 static inline SmartPetscObj<DM> dmPrjSpatial;
40 static inline EshelbianCore *epPtr;
41};
42} // namespace EshelbianPlasticity
43
44#endif // ESHELBIAN_TS_ELASTIC_PRE_AND_POST_STEP_HPP
ProjectionScope & operator=(const ProjectionScope &)=delete
static MoFEMErrorCode setPreStep(EshelbianCore *ep_ptr, TS ts, bool h1_update=false)
static MoFEMErrorCode postStepInitialise(EshelbianCore *ep_ptr)