Reaktoro  v2.1.1
A unified framework for modeling chemically reactive systems
EquationConstraintFn Struct Reference

Used to define the function that evaluates the residual of an equation constraint in a chemical equilibrium problem. More...

#include <EquilibriumSpecs.hpp>

Public Types

using Func1 = Fn< real(ChemicalProps const &props, VectorXrConstRef const &p, VectorXrConstRef const &w)>
 The main signature of functions that evaluate the residual of an equation constraint. More...
 
using Func2 = Fn< real(ChemicalProps const &props, VectorXrConstRef const &w)>
 An alternative signature of functions that evaluate the residual of an equation constraint. More...
 
using Func3 = Fn< real(ChemicalProps const &props)>
 An alternative signature of functions that evaluate the residual of an equation constraint. More...
 

Public Member Functions

 EquationConstraintFn ()=default
 Construct a default EquationConstraintFn object.
 
 EquationConstraintFn (Func1 const &f)
 Construct an EquationConstraintFn object with given equilibrium constraint function with signature Func1.
 
 EquationConstraintFn (Func2 const &f)
 Construct an EquationConstraintFn object with given equilibrium constraint function with signature Func2.
 
 EquationConstraintFn (Func3 const &f)
 Construct an EquationConstraintFn object with given equilibrium constraint function with signature Func3.
 
auto operator() (ChemicalProps const &props, VectorXrConstRef const &p, VectorXrConstRef const &w) const -> real
 Evaluate the residual of the equation constraint. More...
 
auto operator= (Func1 const &f)
 Assign an equilibrium constraint function with signature EquationConstraintFn::Func1 to this EquationConstraintFn object.
 
auto operator= (Func2 const &f)
 Assign an equilibrium constraint function with signature EquationConstraintFn::Func2 to this EquationConstraintFn object.
 
auto operator= (Func3 const &f)
 Assign an equilibrium constraint function with signature EquationConstraintFn::Func3 to this EquationConstraintFn object.
 
auto initialized () const
 Return true if this EquationConstraintFn object has been initialized with an equilibrium constraint function.
 
 operator bool () const
 Convert this EquationConstraintFn object to a boolean value.
 

Public Attributes

Func1 _fn
 The function that evaluates the residual of the equation constraint.
 

Detailed Description

Used to define the function that evaluates the residual of an equation constraint in a chemical equilibrium problem.

Member Typedef Documentation

◆ Func1

using Func1 = Fn<real(ChemicalProps const& props, VectorXrConstRef const& p, VectorXrConstRef const& w)>

The main signature of functions that evaluate the residual of an equation constraint.

Parameters
propsThe current chemical properties of the system in the equilibrium calculation.
pThe control variables p in the chemical equilibrium calculation.
wThe input variables w in the chemical equilibrium calculation.

◆ Func2

using Func2 = Fn<real(ChemicalProps const& props, VectorXrConstRef const& w)>

An alternative signature of functions that evaluate the residual of an equation constraint.

Parameters
propsThe current chemical properties of the system in the equilibrium calculation.
wThe input variables w in the chemical equilibrium calculation.

◆ Func3

using Func3 = Fn<real(ChemicalProps const& props)>

An alternative signature of functions that evaluate the residual of an equation constraint.

Parameters
propsThe current chemical properties of the system in the equilibrium calculation.

Member Function Documentation

◆ operator()()

auto operator() ( ChemicalProps const &  props,
VectorXrConstRef const &  p,
VectorXrConstRef const &  w 
) const -> real
inline

Evaluate the residual of the equation constraint.

Parameters
propsThe current chemical properties of the system in the equilibrium calculation.
pThe control variables p in the chemical equilibrium calculation.
wThe input variables w in the chemical equilibrium calculation.

The documentation for this struct was generated from the following file: