|
teqp 0.23.1
|
#include <iteration.hpp>
Public Member Functions | |
| NRIterator (const AlphaModel &alphamodel, const std::vector< char > &vars, const Eigen::Array2d &vals, double T, double rho, const Eigen::Ref< const Eigen::ArrayXd > &z, const std::tuple< bool, bool > &relative_error, const std::vector< std::shared_ptr< StoppingCondition > > stopping_conditions) | |
| std::vector< char > | get_vars () const |
| Return the variables that are being used in the iteration. | |
| Eigen::Array2d | get_vals () const |
| Return the target values to be obtained. | |
| auto | get_T () const |
| Return the current temperature. | |
| auto | get_rho () const |
| Return the current molar density. | |
| Eigen::ArrayXd | get_molefrac () const |
| Return the current mole fractions. | |
| int | get_step_count () const |
| Return the current step counter. | |
| std::string | get_message () const |
| Return the current message relaying information about success or failure of the iteration. | |
| auto | get_nonconstant_indices () const |
| Get the indices of the nonconstant variables. | |
| void | reset (double T, double rho) |
| auto | calc_matrices (double T, double rho) const |
| auto | calc_step (double T, double rho) const |
| auto | calc_just_step (double T, double rho) const |
| auto | calc_vals (double T, double rho) const |
| auto | calc_r (double T, double rho) const |
| auto | calc_J (double T, double rho) const |
| auto | calc_maxabsr (double T, double rho) const |
| Calculate the maximum absolute value of the values in r. | |
| auto | get_maxabsr () const |
| Get the maximum absolute value of residual vector, using the cached value for r. | |
| auto | take_steps (int N, bool apply_stopping=true) |
| auto | take_steps_logrho (int N) |
| auto | path_integration (double T, double rho, std::size_t N) |
Public Attributes | |
| bool | verbose = false |
A class for doing Newton-Raphson steps to solve for two unknown thermodynamic variables
Definition at line 235 of file iteration.hpp.
|
inline |
Definition at line 254 of file iteration.hpp.
|
inline |
Definition at line 309 of file iteration.hpp.
|
inline |
Definition at line 296 of file iteration.hpp.
|
inline |
Do the calculations needed for the step and return the step and the other data In C++, the copy will be elided (the return value will be moved)
| T | Temperature |
| rho | Molar density |
Definition at line 288 of file iteration.hpp.
|
inline |
Calculate the maximum absolute value of the values in r.
Definition at line 316 of file iteration.hpp.
|
inline |
Definition at line 302 of file iteration.hpp.
|
inline |
Definition at line 292 of file iteration.hpp.
|
inline |
Definition at line 299 of file iteration.hpp.
|
inline |
Get the maximum absolute value of residual vector, using the cached value for r.
Definition at line 323 of file iteration.hpp.
|
inline |
Return the current message relaying information about success or failure of the iteration.
Definition at line 274 of file iteration.hpp.
|
inline |
Return the current mole fractions.
Definition at line 270 of file iteration.hpp.
|
inline |
Get the indices of the nonconstant variables.
Definition at line 276 of file iteration.hpp.
|
inline |
Return the current molar density.
Definition at line 268 of file iteration.hpp.
|
inline |
Return the current step counter.
Definition at line 272 of file iteration.hpp.
|
inline |
Return the current temperature.
Definition at line 266 of file iteration.hpp.
|
inline |
Return the target values to be obtained.
Definition at line 264 of file iteration.hpp.
|
inline |
Return the variables that are being used in the iteration.
Definition at line 262 of file iteration.hpp.
|
inline |
Definition at line 467 of file iteration.hpp.
|
inline |
Definition at line 278 of file iteration.hpp.
|
inline |
Take a given number of steps
| N | The number of steps to take |
| apply_stopping | True to apply the stopping conditions |
Special-case temperature-density inputs, which require only one step
Definition at line 331 of file iteration.hpp.
|
inline |
Take a given number of steps, with log(rho) as the density variable rather than rho, which helps when rho is VERY small to ensure that you can't have negative density
| N | The number of steps to take |
Definition at line 386 of file iteration.hpp.
| bool teqp::iteration::NRIterator::verbose = false |
Definition at line 259 of file iteration.hpp.