Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compiler warnings #1519

Merged
merged 19 commits into from
Jul 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ possible.
Development Site
================

The current development version is 3.0.0a5. The current stable version is
The current development version is 3.0.0b1. The current stable version is
2.6.0. The `latest Cantera source code <https://github.com/Cantera/cantera>`_,
the `issue tracker <https://github.com/Cantera/cantera/issues>`_ for bugs and
enhancement requests, `downloads of Cantera releases and binary installers
Expand Down
2 changes: 1 addition & 1 deletion SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -947,7 +947,7 @@ for arg in ARGUMENTS:
logger.error(f"Encountered unexpected command line option: {arg!r}")
sys.exit(1)

env["cantera_version"] = "3.0.0a5"
env["cantera_version"] = "3.0.0b1"
# For use where pre-release tags are not permitted (MSI, sonames)
env['cantera_pure_version'] = re.match(r'(\d+\.\d+\.\d+)', env['cantera_version']).group(0)
env['cantera_short_version'] = re.match(r'(\d+\.\d+)', env['cantera_version']).group(0)
Expand Down
2 changes: 1 addition & 1 deletion doc/doxygen/Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = Cantera
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = 3.0.0a5
PROJECT_NUMBER = 3.0.0b1

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
7 changes: 7 additions & 0 deletions ext/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ def prep_gmock(env):
return localenv


def prep_yamlcpp(env):
localenv = prep_default(env)
if env['CC'] == 'cl':
# "class ... needs to have dll-interface to be used by clients of class ..."
localenv.Append(CCFLAGS='/wd4251')
return localenv

ext_copies = []

if not env['system_fmt']:
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/base/clockWC.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class clockWC
* machines clock() returns type unsigned long (HP) and on others (SUN)
* it returns type long. An attempt to recover the actual time for clocks
* which have rolled over is made also. However, it only works if this
* function is called fairly regularily during the solution procedure.
* function is called fairly regularly during the solution procedure.
*/
double secondsWC();

Expand Down
6 changes: 6 additions & 0 deletions include/cantera/base/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ const U& getValue(const std::map<T, U>& m, const T& key, const U& default_val) {
return (iter == m.end()) ? default_val : iter->second;
}

//! Get the size of a container, cast to a signed integer type
template <class T, class U=int>
U len(const T& container) {
return static_cast<U>(container.size());
}

//! A macro for generating member function detectors, which can then be used in
//! combination with `if constexpr` to condition behavior on the availability of that
//! member function. See MultiRate for examples of use.
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/kinetics/InterfaceKinetics.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class InterfaceKinetics : public Kinetics
//! Gets the interface current for the ith phase
/*!
* @param iphase Phase Id
* @return The double specifying the interface current. The interface Current
* @return The double specifying the interface current. The interface current
* is useful when charge transfer reactions occur at an interface. It
* is defined here as the net positive charge entering the phase
* specified by the Phase Id. (Units: A/m^2 for a surface reaction,
Expand Down
10 changes: 5 additions & 5 deletions include/cantera/numerics/AdaptivePreconditioner.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace Cantera
//! AdaptivePreconditioner a preconditioner designed for use with large
//! mechanisms that leverages sparse solvers. It does this by pruning
//! the preconditioner by a threshold value. It also neglects pressure
//! dependence and thirdbody contributions in its formation and has a
//! dependence and third body contributions in its formation and has a
//! finite difference approximation for temperature.
class AdaptivePreconditioner : public PreconditionerBase
{
Expand Down Expand Up @@ -64,10 +64,10 @@ class AdaptivePreconditioner : public PreconditionerBase
//! Get the threshold value for setting elements
double threshold() { return m_threshold; }

//! Get ilut fill factor
//! Get ILUT fill factor
double ilutFillFactor() { return m_fill_factor; }

//! Get ilut drop tolerance
//! Get ILUT drop tolerance
double ilutDropTol() { return m_drop_tol; }

//! Set the threshold value to compare elements against
Expand Down Expand Up @@ -98,10 +98,10 @@ class AdaptivePreconditioner : public PreconditionerBase
void printJacobian();

protected:
//! ilut fill factor
//! ILUT fill factor
double m_fill_factor = 0;

//! ilut drop tolerance
//! ILUT drop tolerance
double m_drop_tol = 0;

//! Vector of triples representing the jacobian used in preconditioning
Expand Down
6 changes: 3 additions & 3 deletions include/cantera/numerics/funcs.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ doublereal linearInterp(doublereal x, const vector_fp& xpts,

//! Numerical integration of a function using the trapezoidal rule.
/*!
* Vector x contanins a monotonic sequence of grid points, and
* Vector x contains a monotonic sequence of grid points, and
* Vector f contains function values defined at these points.
* The size of x and f must be the same.
*
Expand All @@ -46,7 +46,7 @@ double trapezoidal(const Eigen::ArrayXd& f, const Eigen::ArrayXd& x);
//! For even number, Simpson's rule is used for the first
//! N-2 intervals with a trapezoidal rule on the last interval.
/*!
* Vector x contanins a monotonic sequence of grid points, and
* Vector x contains a monotonic sequence of grid points, and
* Vector f contains function values defined at these points.
* The size of x and f must be the same.
*
Expand All @@ -57,7 +57,7 @@ double simpson(const Eigen::ArrayXd& f, const Eigen::ArrayXd& x);

//! Numerical integration of a function.
/*!
* Vector x contanins a monotonic sequence of grid points, and
* Vector x contains a monotonic sequence of grid points, and
* Vector f contains function values defined at these points.
* The size of x and f must be the same.
*
Expand Down
4 changes: 2 additions & 2 deletions include/cantera/oneD/IonFlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ class IonFlow : public StFlow
* "Calculation and analysis of the mobility and diffusion coefficient
* of thermal electrons in methane/air premixed flames."
* Combustion and flame 159.12 (2012): 3518-3521.
* If in the future the class GasTranport is improved, this method may
* be discard. This method specifies this profile.
* If in the future the class GasTransport is improved, this method may
* be discarded. This method specifies this profile.
*/
void setElectronTransport(vector_fp& tfix,
vector_fp& diff_e,
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/ConstCpPoly.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ class ConstCpPoly: public SpeciesThermoInterpType
double m_t0 = 0.0;
//! Dimensionless value of the heat capacity
double m_cp0_R = 0.0;
//! dimensionless value of the enthaply at t0
//! dimensionless value of the enthalpy at t0
double m_h0_R = 0.0;
//! Dimensionless value of the entropy at t0
double m_s0_R = 0.0;
Expand Down
4 changes: 2 additions & 2 deletions include/cantera/thermo/CoverageDependentSurfPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,12 @@ class CoverageDependentSurfPhase : public SurfPhase
//! index of a species whose coverage affects enthalpy and entropy of
//! a target species
size_t j;
//! array of polynomial coefficients describing coverage-depdendent enthalpy
//! array of polynomial coefficients describing coverage-dependent enthalpy
//! [J/kmol] in order of 1st-order, 2nd-order, 3rd-order, and 4th-order
//! coefficients (\f$ c^{(1)}, c^{(2)}, c^{(3)}, \text{ and } c^{(4)} \f$
//! in the linear or the polynomial dependency model)
vector_fp enthalpy_coeffs;
//! array of polynomial coefficients describing coverage-depdendent entropy
//! array of polynomial coefficients describing coverage-dependent entropy
//! [J/kmol/K] in order of 1st-order, 2nd-order, 3rd-order, and 4th-order
//! coefficients (\f$ c^{(1)}, c^{(2)}, c^{(3)}, \text{ and } c^{(4)} \f$
//! in the linear or the polynomial dependency model)
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/GibbsExcessVPSSTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ namespace Cantera
* vector. That's one of its primary usages. In order to keep the mole fraction
* vector constant, all of the setState functions are redesigned at this layer.
*
* ### Activity Concentrations: Relationship of ThermoPhase to %Kinetics Expressions
* ### Activity Concentrations: Relationship of ThermoPhase to Kinetics Expressions
*
* As explained in a similar discussion in the ThermoPhase class, the actual
* units used in kinetics expressions must be specified in the ThermoPhase class
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/IdealGasPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ namespace Cantera
* \tilde{Cp}_k(T,P) = Cp^o_k(T,P) = Cp^{ref}_k(T)
* \f]
*
* ## %Application within Kinetics Managers
* ## Application within Kinetics Managers
*
* \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / C^s_k, \f$ where \f$
* C^s_k \f$ is a standard concentration defined below and \f$ a_k \f$ are
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/LatticePhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ namespace Cantera
* only has a weak dependence on the enthalpy, and doesn't effect the molar
* concentration.
*
* ## %Application within Kinetics Managers
* ## Application within Kinetics Managers
*
* \f$ C^a_k\f$ are defined such that \f$ C^a_k = a_k = X_k \f$. \f$ C^s_k \f$,
* the standard concentration, is defined to be equal to one. \f$ a_k \f$ are
Expand Down
4 changes: 2 additions & 2 deletions include/cantera/thermo/LatticeSolidPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ namespace Cantera
*
* where k is a species in the ith sublattice.
*
* The mole fraction vector is redefined witin the the LatticeSolidPhase object.
* The mole fraction vector is redefined within the the LatticeSolidPhase object.
* Each of the mole fractions sum to one on each of the sublattices. The
* routine getMoleFraction() and setMoleFraction() have been redefined to use
* this convention.
Expand Down Expand Up @@ -456,7 +456,7 @@ class LatticeSolidPhase : public ThermoPhase
//! Current value of the molar density
double m_molar_density = 0.0;

//! Vector of sublattic ThermoPhase objects
//! Vector of sublattice ThermoPhase objects
std::vector<shared_ptr<ThermoPhase>> m_lattice;

//! Vector of mole fractions
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/MargulesVPSSTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace Cantera
* - R T^2 \frac{d^2 \ln(\gamma_k) }{{dT}^2}
* \f]
*
* ## %Application within Kinetics Managers
* ## Application within Kinetics Managers
*
* \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / C^s_k, \f$ where
* \f$ C^s_k \f$ is a standard concentration defined below and \f$ a_k \f$ are
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/PDSS.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ namespace Cantera
* The PDSS objects may or may not utilize a SpeciesThermoInterpType reference
* state manager class to calculate the reference state thermodynamics functions
* in their own calculation. There are some classes, such as PDSS_IdealGas and
* PDSS+_ConstVol, which utilize the SpeciesThermoInterpType object because the
* PDSS_ConstVol, which utilize the SpeciesThermoInterpType object because the
* calculation is very similar to the reference state calculation, while there
* are other classes, PDSS_Water and PDSS_HKFT, which don't utilize the
* reference state calculation at all, because it wouldn't make sense to. For
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/PDSS_IonsFromNeutral.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class PDSS_IonsFromNeutral : public PDSS_Nondimensional
* \f]
*
* *m* is the neutral molecule species index. \f$ \alpha_{m , k} \f$ is the
* stoiciometric coefficient for the neutral molecule, *m*, that creates the
* stoichiometric coefficient for the neutral molecule, *m*, that creates the
* thermodynamics for the ionic species *k*. A factor \f$ 2.0 \ln{2.0} \f$
* is added to all ions except for the species ionic species, which in this
* case is the single anion species, with species index *sp*.
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/PureFluidPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @file PureFluidPhase.h
*
* Header for a ThermoPhase class for a pure fluid phase consisting of
* gas, liquid, mixed-gas-liquid and supercrit fluid (see \ref thermoprops
* gas, liquid, mixed-gas-liquid and supercritical fluid (see \ref thermoprops
* and class \link Cantera::PureFluidPhase PureFluidPhase\endlink).
*
* It inherits from ThermoPhase, but is built on top of the tpx package.
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/RedlichKisterVPSSTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ namespace Cantera
* - R T^2 \frac{d^2 \ln(\gamma_k) }{{dT}^2} = C^o_{p,k}(T,P)
* \f]
*
* ## %Application within Kinetics Managers
* ## Application within Kinetics Managers
*
* \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / C^s_k, \f$ where
* \f$ C^s_k \f$ is a standard concentration defined below and \f$ a_k \f$ are
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/SurfPhase.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ namespace Cantera
* s_k(T,P) = s^o_k(T) - R \log(\theta_k)
* \f]
*
* ## %Application within Kinetics Managers
* ## Application within Kinetics Managers
*
* The activity concentration,\f$ C^a_k \f$, used by the kinetics manager, is equal to
* the actual concentration, \f$ C^s_k \f$, and is given by the following
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/thermo/WaterSSTP.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class WaterProps;
*
* So(1bar) = S(P0) + RT ln(1bar/P0)
*
* ## %Application within Kinetics Managers
* ## Application within Kinetics Managers
*
* This is unimplemented.
*
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/tpx/Sub.h
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class Substance

virtual double Pp()=0;

//! Enthaply of a single-phase state
//! Enthalpy of a single-phase state
double hp() {
return up() + Pp()/Rho;
}
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/zeroD/FlowDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class FlowDevice
}

//! Update the mass flow rate at time 'time'. This must be overloaded in
//! subclassess to update m_mdot.
//! subclasses to update m_mdot.
virtual void updateMassFlowRate(double time) {}

//! Mass flow rate (kg/s) of outlet species k. Returns zero if this species
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/zeroD/FlowReactor.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ class FlowReactor : public IdealGasReactor
//! Density [kg/m^3]. First component of the state vector.
double m_rho = NAN;
//! Axial velocity [m/s]. Second component of the state vector.
double m_u = NAN;
double m_u = -1.0;
//! Pressure [Pa]. Third component of the state vector.
double m_P = NAN;
//! Temperature [K]. Fourth component of the state vector.
Expand Down
Loading
Loading