Cantera
Install
User Guide
Examples
Reference
Develop
Community
4.0.0a2
Toggle main menu visibility
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
"
12
namespace
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
*/
24
class
VCS_COUNTERS
25
{
26
public
:
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
36
int
T_Basis_Opts
;
37
38
//! number of optimizations of the components basis set done
39
int
Basis_Opts
;
40
41
//! Current number of times the initial thermo equilibrium estimator has
42
//! been called
43
int
T_Calls_Inest
;
44
45
//! Current number of calls to vcs_TP
46
int
T_Calls_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
*/
54
double
vcs_l2norm
(span<const 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
*/
65
const
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
*/
76
bool
vcs_doubleEqual
(
double
d1,
double
d2);
77
}
78
79
#endif
Cantera::VCS_COUNTERS
Class to keep track of time and iterations.
Definition
vcs_internal.h:25
Cantera::VCS_COUNTERS::Its
int Its
Current number of iterations in the main loop of vcs_TP() to solve for thermo equilibrium.
Definition
vcs_internal.h:33
Cantera::VCS_COUNTERS::T_Calls_Inest
int T_Calls_Inest
Current number of times the initial thermo equilibrium estimator has been called.
Definition
vcs_internal.h:43
Cantera::VCS_COUNTERS::T_Basis_Opts
int T_Basis_Opts
Total number of optimizations of the components basis set done.
Definition
vcs_internal.h:36
Cantera::VCS_COUNTERS::Basis_Opts
int Basis_Opts
number of optimizations of the components basis set done
Definition
vcs_internal.h:39
Cantera::VCS_COUNTERS::T_Its
int T_Its
Total number of iterations in the main loop of vcs_TP() to solve for thermo equilibrium.
Definition
vcs_internal.h:29
Cantera::VCS_COUNTERS::T_Calls_vcs_TP
int T_Calls_vcs_TP
Current number of calls to vcs_TP.
Definition
vcs_internal.h:46
global.h
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
Cantera
Namespace for the Cantera kernel.
Definition
AnyMap.cpp:595
Cantera::vcs_speciesType_string
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
Cantera::vcs_doubleEqual
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
Cantera::vcs_l2norm
double vcs_l2norm(span< const double > vec)
determine the l2 norm of a vector of doubles
Definition
vcs_util.cpp:19
include
cantera
equil
vcs_internal.h
Generated by
1.17.0