Cantera  3.3.0a1
Loading...
Searching...
No Matches
vcs_internal.h
Go to the documentation of this file.
1/**
2 * @file vcs_internal.h Internal declarations for the VCSnonideal package
3 */
4
5// This file is part of Cantera. See License.txt in the top-level directory or
6// at https://cantera.org/license.txt for license and copyright information.
7
8#ifndef _VCS_INTERNAL_H
9#define _VCS_INTERNAL_H
10
11#include "cantera/base/global.h"
12namespace Cantera
13{
14//! define this %Cantera function to replace printf
15/*!
16 * We can replace this with printf easily
17 */
18#define plogf writelogf
19
20//! Class to keep track of time and iterations
21/*!
22 * class keeps all of the counters together.
23 */
25{
26public:
27 //! Total number of iterations in the main loop
28 //! of vcs_TP() to solve for thermo equilibrium
29 int T_Its;
30
31 //! Current number of iterations in the main loop
32 //! of vcs_TP() to solve for thermo equilibrium
33 int Its;
34
35 //! Total number of optimizations of the components basis set done
37
38 //! number of optimizations of the components basis set done
40
41 //! Current number of times the initial thermo equilibrium estimator has
42 //! been called
44
45 //! Current number of calls to vcs_TP
47};
48
49//! determine the l2 norm of a vector of doubles
50/*!
51 * @param vec vector of doubles
52 * @returns the l2 norm of the vector
53 */
54double vcs_l2norm(const vector<double>& vec);
55
56//! Returns a const char string representing the type of the species given by
57//! the first argument
58/*!
59 * @param speciesStatus Species status integer representing the type
60 * of the species.
61 * @param length Maximum length of the string to be returned.
62 * Shorter values will yield abbreviated strings.
63 * Defaults to a value of 100.
64 */
65const char* vcs_speciesType_string(int speciesStatus, int length = 100);
66
67//! Simple routine to check whether two doubles are equal up to roundoff error
68/*!
69 * Currently it's set to check for 10 digits of relative accuracy.
70 *
71 * @param d1 first double
72 * @param d2 second double
73 *
74 * @returns true if the doubles are "equal" and false otherwise
75 */
76bool vcs_doubleEqual(double d1, double d2);
77}
78
79#endif
Class to keep track of time and iterations.
int Its
Current number of iterations in the main loop of vcs_TP() to solve for thermo equilibrium.
int T_Calls_Inest
Current number of times the initial thermo equilibrium estimator has been called.
int T_Basis_Opts
Total number of optimizations of the components basis set done.
int Basis_Opts
number of optimizations of the components basis set done
int T_Its
Total number of iterations in the main loop of vcs_TP() to solve for thermo equilibrium.
int T_Calls_vcs_TP
Current number of calls to vcs_TP.
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595
const char * vcs_speciesType_string(int speciesStatus, int length)
Returns a const char string representing the type of the species given by the first argument.
Definition vcs_util.cpp:31
bool vcs_doubleEqual(double d1, double d2)
Simple routine to check whether two doubles are equal up to roundoff error.
Definition vcs_util.cpp:89
double vcs_l2norm(const vector< double > &vec)
determine the l2 norm of a vector of doubles
Definition vcs_util.cpp:19