OGS
ComponentTransportProcess.h
Go to the documentation of this file.
1
11#pragma once
12
17#include "ProcessLib/Process.h"
18
19namespace ChemistryLib
20{
21class ChemicalSolverInterface;
22}
23
24namespace ProcessLib
25{
26struct SurfaceFluxData;
27
28namespace ComponentTransport
29{
96{
97public:
99 std::string name,
100 MeshLib::Mesh& mesh,
101 std::unique_ptr<ProcessLib::AbstractJacobianAssembler>&&
102 jacobian_assembler,
103 std::vector<std::unique_ptr<ParameterLib::ParameterBase>> const&
104 parameters,
105 unsigned const integration_order,
106 std::vector<std::vector<std::reference_wrapper<ProcessVariable>>>&&
107 process_variables,
108 ComponentTransportProcessData&& process_data,
109 SecondaryVariableCollection&& secondary_variables,
110 bool const use_monolithic_scheme,
111 std::unique_ptr<ProcessLib::SurfaceFluxData>&& surfaceflux,
112 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>&&
113 chemical_solver_interface,
114 bool const is_linear,
115 bool const ls_compute_only_upon_timestep_change);
116
119
120 bool isLinear() const override { return _asm_mat_cache.isLinear(); }
122
123 Eigen::Vector3d getFlux(std::size_t const element_id,
124 MathLib::Point3d const& p, double const t,
125 std::vector<GlobalVector*> const& x) const override;
126
127 void solveReactionEquation(std::vector<GlobalVector*>& x,
128 std::vector<GlobalVector*> const& x_prev,
129 double const t, double const dt,
130 NumLib::EquationSystem& ode_sys,
131 int const process_id) override;
132
133 void computeSecondaryVariableConcrete(double const /*t*/,
134 double const /*dt*/,
135 std::vector<GlobalVector*> const& x,
136 GlobalVector const& /*x_prev*/,
137 int const /*process_id*/) override;
138
139 void postTimestepConcreteProcess(std::vector<GlobalVector*> const& x,
140 std::vector<GlobalVector*> const& x_prev,
141 const double t,
142 const double dt,
143 int const process_id) override;
144
149
150private:
152 NumLib::LocalToGlobalIndexMap const& dof_table,
153 MeshLib::Mesh const& mesh,
154 unsigned const integration_order) override;
155
156 void setInitialConditionsConcreteProcess(std::vector<GlobalVector*>& x,
157 double const t,
158 int const process_id) override;
159
160 void assembleConcreteProcess(const double t, double const dt,
161 std::vector<GlobalVector*> const& x,
162 std::vector<GlobalVector*> const& x_prev,
163 int const process_id, GlobalMatrix& M,
164 GlobalMatrix& K, GlobalVector& b) override;
165
167 const double t, double const dt, std::vector<GlobalVector*> const& x,
168 std::vector<GlobalVector*> const& x_prev, int const process_id,
169 GlobalVector& b, GlobalMatrix& Jac) override;
170
171 void preOutputConcreteProcess(const double t, double const dt,
172 std::vector<GlobalVector*> const& x,
173 std::vector<GlobalVector*> const& x_prev,
174 int const process_id) override;
175
177
178 std::vector<std::unique_ptr<ComponentTransportLocalAssemblerInterface>>
180
181 std::unique_ptr<ProcessLib::SurfaceFluxData> _surfaceflux;
182
183 std::unique_ptr<ChemistryLib::ChemicalSolverInterface>
185
186 std::vector<MeshLib::PropertyVector<double>*> _residua;
187
189
191};
192
193} // namespace ComponentTransport
194} // namespace ProcessLib
Global vector based on Eigen vector.
Definition EigenVector.h:25
void setInitialConditionsConcreteProcess(std::vector< GlobalVector * > &x, double const t, int const process_id) override
void preOutputConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id) override
void assembleConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalMatrix &M, GlobalMatrix &K, GlobalVector &b) override
void initializeConcreteProcess(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh, unsigned const integration_order) override
Process specific initialization called by initialize().
std::unique_ptr< ChemistryLib::ChemicalSolverInterface > _chemical_solver_interface
std::vector< MeshLib::PropertyVector< double > * > _residua
void computeSecondaryVariableConcrete(double const, double const, std::vector< GlobalVector * > const &x, GlobalVector const &, int const) override
void solveReactionEquation(std::vector< GlobalVector * > &x, std::vector< GlobalVector * > const &x_prev, double const t, double const dt, NumLib::EquationSystem &ode_sys, int const process_id) override
void assembleWithJacobianConcreteProcess(const double t, double const dt, std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, int const process_id, GlobalVector &b, GlobalMatrix &Jac) override
void postTimestepConcreteProcess(std::vector< GlobalVector * > const &x, std::vector< GlobalVector * > const &x_prev, const double t, const double dt, int const process_id) override
std::vector< std::unique_ptr< ComponentTransportLocalAssemblerInterface > > _local_assemblers
std::unique_ptr< ProcessLib::SurfaceFluxData > _surfaceflux
ComponentTransportProcess(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, ComponentTransportProcessData &&process_data, SecondaryVariableCollection &&secondary_variables, bool const use_monolithic_scheme, std::unique_ptr< ProcessLib::SurfaceFluxData > &&surfaceflux, std::unique_ptr< ChemistryLib::ChemicalSolverInterface > &&chemical_solver_interface, bool const is_linear, bool const ls_compute_only_upon_timestep_change)
Eigen::Vector3d getFlux(std::size_t const element_id, MathLib::Point3d const &p, double const t, std::vector< GlobalVector * > const &x) const override
std::string const name
Definition Process.h:362
Handles configuration of several secondary variables from the project file.