OGS
PhaseFieldProcess.h
Go to the documentation of this file.
1 
11 #pragma once
12 
14 #include "PhaseFieldProcessData.h"
15 #include "ProcessLib/Process.h"
16 
17 namespace ProcessLib
18 {
19 namespace PhaseField
20 {
21 template <int DisplacementDim>
22 class PhaseFieldProcess final : public Process
23 {
24 public:
26  std::string name,
27  MeshLib::Mesh& mesh,
28  std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&&
29  jacobian_assembler,
30  std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
31  parameters,
32  unsigned const integration_order,
33  std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
34  process_variables,
36  SecondaryVariableCollection&& secondary_variables,
37  bool const use_monolithic_scheme);
38 
41  bool isLinear() const override;
43 
45  const int process_id) const override;
46 
48  const int process_id) const override;
49 
50 private:
52 
53  void constructDofTable() override;
54 
55  void initializeBoundaryConditions() override;
56 
58  NumLib::LocalToGlobalIndexMap const& dof_table,
59  MeshLib::Mesh const& mesh,
60  unsigned const integration_order) override;
61 
62  void assembleConcreteProcess(const double t, double const dt,
63  std::vector<GlobalVector*> const& x,
64  std::vector<GlobalVector*> const& xdot,
65  int const process_id, GlobalMatrix& M,
66  GlobalMatrix& K, GlobalVector& b) override;
67 
69  const double t, double const dt, std::vector<GlobalVector*> const& x,
70  std::vector<GlobalVector*> const& xdot, int const process_id,
72  GlobalMatrix& Jac) override;
73 
74  void preTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
75  double const t, double const dt,
76  const int process_id) override;
77 
78  void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
79  const double t, const double delta_t,
80  int const process_id) override;
81 
83  GlobalVector const& xdot,
84  const double t, double const dt,
85  int const process_id) override;
86 
87  void updateConstraints(GlobalVector& lower, GlobalVector& upper,
88  int const process_id) override;
89 
90 private:
92 
93  std::vector<std::unique_ptr<LocalAssemblerInterface>> _local_assemblers;
94 
95  std::unique_ptr<NumLib::LocalToGlobalIndexMap>
97 
99 
103 
104  std::unique_ptr<GlobalVector> _x_previous_timestep;
105 
109  bool isPhaseFieldProcess(int const process_id) const;
110 };
111 
112 extern template class PhaseFieldProcess<2>;
113 extern template class PhaseFieldProcess<3>;
114 
115 } // namespace PhaseField
116 } // namespace ProcessLib
MathLib::SparsityPattern< GlobalIndexType > GlobalSparsityPattern
Global vector based on Eigen vector.
Definition: EigenVector.h:28
bool isPhaseFieldProcess(int const process_id) const
NumLib::LocalToGlobalIndexMap const & getDOFTable(const int process_id) const override
void updateConstraints(GlobalVector &lower, GlobalVector &upper, int const process_id) override
std::unique_ptr< GlobalVector > _x_previous_timestep
MathLib::MatrixSpecifications getMatrixSpecifications(const int process_id) const override
MeshLib::PropertyVector< double > * _nodal_forces
std::unique_ptr< NumLib::LocalToGlobalIndexMap > _local_to_global_index_map_single_component
void postTimestepConcreteProcess(std::vector< GlobalVector * > const &x, const double t, const double delta_t, int const process_id) override
GlobalSparsityPattern _sparsity_pattern_with_single_component
void assembleConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) override
void assembleWithJacobianConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &xdot, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b, GlobalMatrix &Jac) override
void preTimestepConcreteProcess(std::vector< GlobalVector * > const &x, double const t, double const dt, const int process_id) override
std::vector< std::unique_ptr< LocalAssemblerInterface > > _local_assemblers
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
PhaseFieldProcessData< DisplacementDim > _process_data
void postNonLinearSolverConcreteProcess(GlobalVector const &x, GlobalVector const &xdot, const double t, double const dt, int const process_id) override
PhaseFieldProcess(std::string name, MeshLib::Mesh &mesh, std::unique_ptr< ProcessLib::AbstractJacobianAssembler > &&jacobian_assembler, std::vector< std::unique_ptr< ParameterLib::ParameterBase >> const &parameters, unsigned const integration_order, std::vector< std::vector< std::reference_wrapper< ProcessVariable >>> &&process_variables, PhaseFieldProcessData< DisplacementDim > &&process_data, SecondaryVariableCollection &&secondary_variables, bool const use_monolithic_scheme)
std::string const name
Definition: Process.h:327
Handles configuration of several secondary variables from the project file.
static const double t