OGS
ChemicalSolverInterface.h
Go to the documentation of this file.
1 
11 #pragma once
12 
15 
17 {
18 class Medium;
19 }
20 
21 namespace ParameterLib
22 {
23 class SpatialPosition;
24 }
25 
26 namespace ChemistryLib
27 {
29 {
30 public:
32  : linear_solver(linear_solver_)
33  {
34  }
35 
36  virtual void initialize() {}
37 
39  std::vector<double> const& /*concentrations*/,
40  GlobalIndexType const& /*chemical_system_id*/,
41  MaterialPropertyLib::Medium const& /*medium*/,
42  ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/)
43  {
44  }
45 
47  std::vector<double> const& /*concentrations*/,
48  GlobalIndexType const& /*chemical_system_id*/,
49  MaterialPropertyLib::Medium const* /*medium*/,
50  MaterialPropertyLib::VariableArray const& /*vars*/,
51  ParameterLib::SpatialPosition const& /*pos*/, double const /*t*/,
52  double const /*dt*/)
53  {
54  }
55 
57 
58  virtual void executeSpeciationCalculation(double const dt) = 0;
59 
60  virtual std::vector<GlobalVector*> getIntPtProcessSolutions() const = 0;
61 
62  virtual double getConcentration(
63  int const /*component_id*/,
64  GlobalIndexType const /*chemical_system_id*/) const
65  {
66  return std::numeric_limits<double>::quiet_NaN();
67  }
68 
69  virtual std::vector<std::string> const getComponentList() const
70  {
71  return {};
72  }
73 
75  GlobalIndexType const& /*chemical_system_id*/,
76  MaterialPropertyLib::Medium const& /*medium*/,
77  ParameterLib::SpatialPosition const& /*pos*/, double const /*porosity*/,
78  double const /*t*/, double const /*dt*/)
79  {
80  }
81 
83  GlobalIndexType const& /*chemical_system_id*/,
84  MaterialPropertyLib::Medium const& /*medium*/,
85  double& /*porosity*/)
86  {
87  }
88 
90  std::size_t const /*ele_id*/,
91  std::vector<GlobalIndexType> const& /*chemical_system_indices*/)
92  {
93  }
94 
95  virtual ~ChemicalSolverInterface() = default;
96 
97 public:
98  std::vector<GlobalIndexType> chemical_system_index_map;
102 };
103 } // namespace ChemistryLib
GlobalMatrix::IndexType GlobalIndexType
virtual void updatePorosityPostReaction(GlobalIndexType const &, MaterialPropertyLib::Medium const &, double &)
virtual void computeSecondaryVariable(std::size_t const, std::vector< GlobalIndexType > const &)
virtual void setChemicalSystemConcrete(std::vector< double > const &, GlobalIndexType const &, MaterialPropertyLib::Medium const *, MaterialPropertyLib::VariableArray const &, ParameterLib::SpatialPosition const &, double const, double const)
virtual void updateVolumeFractionPostReaction(GlobalIndexType const &, MaterialPropertyLib::Medium const &, ParameterLib::SpatialPosition const &, double const, double const, double const)
virtual std::vector< GlobalVector * > getIntPtProcessSolutions() const =0
virtual void executeSpeciationCalculation(double const dt)=0
std::vector< GlobalIndexType > chemical_system_index_map
virtual ~ChemicalSolverInterface()=default
ChemicalSolverInterface(GlobalLinearSolver &linear_solver_)
virtual double getConcentration(int const, GlobalIndexType const) const
virtual void initializeChemicalSystemConcrete(std::vector< double > const &, GlobalIndexType const &, MaterialPropertyLib::Medium const &, ParameterLib::SpatialPosition const &, double const)
virtual std::vector< std::string > const getComponentList() const
std::array< VariableType, static_cast< int >(Variable::number_of_variables)> VariableArray
Definition: VariableType.h:108