www.mooseframework.org
PorousFlowDictator.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 #include "GeneralUserObject.h"
13 #include "Coupleable.h"
14 
67 {
68 public:
70 
72 
73  virtual void initialize() override{};
74  virtual void execute() override{};
75  virtual void finalize() override{};
76 
82  unsigned int numVariables() const;
83 
85  unsigned int numPhases() const;
86 
88  unsigned int numComponents() const;
89 
91  unsigned int numAqueousEquilibrium() const;
92 
94  unsigned int numAqueousKinetic() const;
95 
97  unsigned int aqueousPhaseNumber() const;
98 
106  unsigned int porousFlowVariableNum(unsigned int moose_var_num) const;
107 
115  unsigned int mooseVariableNum(unsigned int porous_flow_var_num) const;
116 
124  bool isPorousFlowVariable(unsigned int moose_var_num) const;
125 
133  bool notPorousFlowVariable(unsigned int moose_var_num) const;
134 
139  bool consistentFEType() const;
140 
146  FEType feType() const;
147 
153  bool usePermDerivs() const { return _perm_derivs; };
154 
158  void usePermDerivs(bool flag) const { _perm_derivs = flag; };
159 
160 protected:
162  const unsigned int _num_variables;
163 
165  const unsigned int _num_phases;
166 
168  const unsigned int _num_components;
169 
171  const unsigned int _num_aqueous_equilibrium;
172 
174  const unsigned int _num_aqueous_kinetic;
175 
177  const unsigned int _aqueous_phase_number;
178 
180  mutable bool _perm_derivs;
181 
182 private:
185 
187  FEType _fe_type;
188 
190  std::vector<unsigned int> _moose_var_num;
191 
193  std::vector<unsigned int> _pf_var_num;
194 };
bool _perm_derivs
Indicates whether the simulation includes derivatives of permeability.
const unsigned int _num_aqueous_equilibrium
Number of aqueous-equilibrium secondary species.
FEType feType() const
The FEType of the first porous_flow_variable.
const unsigned int _num_aqueous_kinetic
Number of aqeuous-kinetic secondary species that are involved in mineralisation.
bool _consistent_fe_type
Whether the porous_flow_vars all have the same fe_type.
bool notPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is not a porous flow variabe.
const unsigned int _num_components
Number of fluid components.
virtual void finalize() override
const unsigned int _num_variables
Number of PorousFlow variables.
unsigned int numComponents() const
The number of fluid components.
unsigned int aqueousPhaseNumber() const
The aqueous phase number.
bool isPorousFlowVariable(unsigned int moose_var_num) const
Returns true if moose_var_num is a porous flow variable.
PorousFlowDictator(const InputParameters &parameters)
FEType _fe_type
FE type used by the PorousFlow variables.
std::vector< unsigned int > _pf_var_num
_pf_var_num[i] = the porous flow variable corresponding to moose variable i
const unsigned int _aqueous_phase_number
Aqueous phase number.
unsigned int mooseVariableNum(unsigned int porous_flow_var_num) const
The Moose variable number.
unsigned int numPhases() const
The number of fluid phases.
unsigned int numVariables() const
The number of PorousFlow variables.
unsigned int numAqueousKinetic() const
The number of aqueous kinetic secondary species.
static InputParameters validParams()
virtual void execute() override
This holds maps between the nonlinear variables used in a PorousFlow simulation and the variable numb...
bool usePermDerivs() const
Check if the simulation includes derivatives of permeability Note: when the permeability is constant...
std::vector< unsigned int > _moose_var_num
_moose_var_num[i] = the moose variable number corresponding to porous flow variable i ...
virtual void initialize() override
void usePermDerivs(bool flag) const
Set the _perm_derivs flag.
const InputParameters & parameters() const
unsigned int porousFlowVariableNum(unsigned int moose_var_num) const
The PorousFlow variable number.
unsigned int numAqueousEquilibrium() const
The number of aqueous equilibrium secondary species.
const unsigned int _num_phases
Number of fluid phases.
bool consistentFEType() const
Whether the porous_flow_vars all have the same FEType or if no porous_flow_vars were provided...