Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
73c9aa1
[Test] Add regression test using C++ flamespeed sample
speth Jun 20, 2020
773f669
[Input] Set initial composition in air.yaml to match air.cti
speth Jun 23, 2020
0a0c8a1
[Test] Add regression test using C++ combustor example
speth Jun 23, 2020
e6ea996
[Samples] Fix use of 'air' object in combustor sample
speth Jun 23, 2020
b90dbec
[Test]: Add regression test of c++ 'kinetics1' sample program
speth Jun 24, 2020
eb8842d
[Transport] Deprecate unused 'ndim' parameter of newTransportMgr
speth Jun 26, 2020
1f4b80a
[Test] Allow generation of CSV files without a "title" row
speth Jun 26, 2020
dec2fe1
[Test] Make cxx_ex transport tests into a (tested) c++ sample program
speth Jun 26, 2020
ba1b3e8
[Test] Remove remaining cxx_ex sub-tests
speth Jun 26, 2020
e9b5d19
[SCons/Test] Enable comparisons of profile data in regression tests
speth Jun 27, 2020
f97362f
[Test] Add regression test using C++ Blasius BVP sample
speth Jun 27, 2020
dcfeacf
[Test] Use rankine C++ sample for regression test
speth Jun 27, 2020
453af47
[Samples] Remove non-functional NASA_coeffs C++ sample
speth Jun 27, 2020
0b53727
[Input] Allow use of subdirectories within Cantera data directories
speth Jun 27, 2020
1dc2258
[Test] Add regression test of C++ LiC6_electrode sample
speth Jun 27, 2020
9f297fa
[Test] Add regression test based on C++ openmp_ignition sample
speth Jun 27, 2020
d0fc123
Fix erroneous deprecation warnings caused by including onedim.h
speth Jun 27, 2020
359f6ab
[Test] Improve formatting of values in regression test error messages
speth Jun 29, 2020
fe66e6d
[CI] Remove separate step to build samples
speth Jul 3, 2020
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
13 changes: 0 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ jobs:
run: python3 `which scons` build -j2
- name: Test Cantera
run: python3 `which scons` test
- name: Build Samples
run: python3 `which scons` samples

macos-multiple-pythons:
name: macOS with Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -72,8 +70,6 @@ jobs:
run: python3 `which scons` build -j2
- name: Test Cantera
run: python3 `which scons` test
- name: Build Samples
run: python3 `which scons` samples

# Coverage is its own job because macOS builds of the samples
# use Homebrew gfortran which is not compatible for coverage
Expand Down Expand Up @@ -176,8 +172,6 @@ jobs:
run: scons build python_cmd=/usr/bin/python3 blas_lapack_libs=lapack,blas -j2
- name: Test Cantera
run: scons test
- name: Build Samples
run: scons samples

multiple-sundials:
name: Sundials ${{ matrix.sundials-ver }}
Expand Down Expand Up @@ -212,9 +206,6 @@ jobs:
- name: Test Cantera
run: scons test
shell: bash -l {0}
- name: Build Samples
run: scons samples
shell: bash -l {0}

cython-latest:
name: Test pre-release version of Cython
Expand All @@ -241,8 +232,6 @@ jobs:
run: python3 `which scons` build blas_lapack_libs=lapack,blas python_package='full' -j2
- name: Test Cantera
run: python3 `which scons` test
- name: Build Samples
run: python3 `which scons` samples

windows:
name: ${{ matrix.os }}, MSVC ${{ matrix.vs-toolset }}, Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -289,5 +278,3 @@ jobs:
shell: cmd
- name: Test Cantera
run: scons test
- name: Build Samples
run: scons samples
14 changes: 12 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ if 'clean' in COMMAND_LINE_TARGETS:
removeDirectory('interfaces/cython/Cantera.egg-info')
removeDirectory('interfaces/python_minimal/Cantera_minimal.egg-info')
for name in os.listdir('interfaces/cython/cantera/data/'):
if name != '__init__.py':
if os.path.isdir('interfaces/cython/cantera/data/' + name):
removeDirectory('interfaces/cython/cantera/data/' + name)
elif name != '__init__.py':
removeFile('interfaces/cython/cantera/data/' + name)
removeDirectory('interfaces/cython/cantera/test/data/test_subdir')
for name in os.listdir('interfaces/cython/cantera/test/data/'):
Expand Down Expand Up @@ -1614,14 +1616,22 @@ for xml in mglob(env, 'data/inputs', 'xml'):
for yaml in mglob(env, "data", "yaml"):
dest = pjoin("build", "data", yaml.name)
build(env.Command(dest, yaml.path, Copy("$TARGET", "$SOURCE")))
for subdir in os.listdir('data'):
if os.path.isdir(pjoin('data', subdir)):
for yaml in mglob(env, pjoin("data", subdir), "yaml"):
dest = pjoin("build", "data", subdir, yaml.name)
if not os.path.exists(pjoin("build", "data", subdir)):
os.makedirs(pjoin("build", "data", subdir))
build(env.Command(dest, yaml.path, Copy("$TARGET", "$SOURCE")))


if addInstallActions:
# Put headers in place
headerBase = 'include/cantera'
install(env.RecursiveInstall, '$inst_incdir', 'include/cantera')

# Data files
install('$inst_datadir', mglob(env, 'build/data', 'cti', 'xml', 'yaml'))
install(env.RecursiveInstall, '$inst_datadir', 'build/data')


### List of libraries needed to link to Cantera ###
Expand Down
2 changes: 1 addition & 1 deletion data/air.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ phases:
species: [O, O2, N, NO, NO2, N2O, N2, AR]
kinetics: gas
transport: mixture-averaged
state: {T: 300.0, P: 1 atm}
state: {T: 300.0, P: 1 atm, X: {O2: 0.21, N2: 0.78, AR: 0.01}}

species:
- name: O
Expand Down
15 changes: 15 additions & 0 deletions include/cantera/oneD/Boundary1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,21 @@ class Boundary1D : public Domain1D
};


/*!
* Renamed base class for boundaries between one-dimensional spatial domains.
* @deprecated To be removed after Cantera 2.5.
*/
class Bdry1D : public Boundary1D
{
public:
Bdry1D() : Boundary1D() {
warn_deprecated("Bdry1D::Bdry1D()",
"To be removed after Cantera 2.5. "
"Class renamed to Boundary1D.");
}
};


/**
* An inlet.
* @ingroup onedim
Expand Down
19 changes: 0 additions & 19 deletions include/cantera/oneD/Inlet1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,4 @@

#include "Boundary1D.h"

namespace Cantera
{

/*!
* Renamed base class for boundaries between one-dimensional spatial domains.
* @deprecated To be removed after Cantera 2.5.
*/
class Bdry1D : public Boundary1D
{
public:
Bdry1D() : Boundary1D() {
warn_deprecated("Bdry1D::Bdry1D()",
"To be removed after Cantera 2.5. "
"Class renamed to Boundary1D.");
}
};

}

#endif
1 change: 0 additions & 1 deletion include/cantera/onedim.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "oneD/Sim1D.h"
#include "oneD/Domain1D.h"
#include "oneD/Boundary1D.h"
#include "oneD/Inlet1D.h"
#include "oneD/StFlow.h"

#endif
8 changes: 6 additions & 2 deletions include/cantera/transport/TransportFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ class TransportFactory : public Factory<Transport>
* @param thermo ThermoPhase object
* @param log_level log level
* @param ndim Number of dimensions for fluxes
*
* @deprecated The `ndim` parameter is unused and will be removed after
* Cantera 2.5.
*/
virtual Transport* newTransport(const std::string& model, thermo_t* thermo, int log_level=0, int ndim=1);
virtual Transport* newTransport(const std::string& model, thermo_t* thermo, int log_level=0, int ndim=-99);

//! Build a new transport manager using the default transport manager
//! in the phase description and return a base class pointer to it
Expand Down Expand Up @@ -93,8 +96,9 @@ class TransportFactory : public Factory<Transport>
std::map<std::string, bool> m_CK_mode;
};

//! @copydoc TransportFactory::newTransport(const std::string&, thermo_t*, int, int)
Transport* newTransportMgr(const std::string& transportModel = "",
thermo_t* thermo = 0, int loglevel = 0, int ndim=1);
thermo_t* thermo = 0, int loglevel = 0, int ndim=-99);

//! Create a new transport manager instance.
/*!
Expand Down
14 changes: 2 additions & 12 deletions interfaces/cython/.gitignore
Original file line number Diff line number Diff line change
@@ -1,17 +1,7 @@
cantera/*.cpp
cantera/*.c
cantera/data/*.cti
cantera/data/*.xml
cantera/data/*.yaml
cantera/data/*.yml
cantera/test/data/*.cti
cantera/test/data/*.xml
cantera/test/data/*.inp
cantera/test/data/*.dat
cantera/test/data/*.csv
cantera/test/data/*.yaml
cantera/test/data/*.yml
cantera/test/data/test_subdir
cantera/data
cantera/test/data
setup.py
scripts/ctml_writer.py
scripts/ctml_writer
Expand Down
2 changes: 1 addition & 1 deletion interfaces/cython/setup.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ setup(
'Topic :: Scientific/Engineering :: Chemistry',
],
package_data = {
'cantera.data': ['*.*'],
'cantera.data': ['*.*', '*/*.*'],
'cantera.test.data': ['*.*', '*/*.*'],
'cantera.examples': ['*/*.*'],
'cantera': ["@py_extension@", '*.pxd'],
Expand Down
8 changes: 4 additions & 4 deletions samples/cxx/LiC6_electrode/LiC6_electrode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ void calc_potentials()
suppress_deprecation_warnings();
double Tk = 273.15 + 25.0;

std::string filename = "LiC6_electrodebulk.yaml";
std::string filename = "sample-data/LiC6_electrodebulk.yaml";
std::string phasename = "LiC6_and_Vacancies";
std::unique_ptr<ThermoPhase> electrodebulk(newPhase(filename,phasename));
std::string intercalatingSpeciesName("Li(C6)");
size_t intercalatingSpeciesIdx = electrodebulk->speciesIndex(intercalatingSpeciesName);
size_t nsp_tot = electrodebulk->nSpecies();

std::ofstream fout("potentials_output.dat", std::ofstream::out);
fout << "x[LiC6] ChemPotential[LiC6] ChemPotential[C6] Uref ActCoeff[LiC6] ActCoeff[C6] dlnActCoeffdx[LiC6] dlnActCoeffdx[C6]" << std::endl;
std::ofstream fout("LiC6_electrode_output.csv", std::ofstream::out);
fout << "x[LiC6], ChemPotential[LiC6], ChemPotential[C6], Uref ActCoeff[LiC6], ActCoeff[C6], dlnActCoeffdx[LiC6], dlnActCoeffdx[C6]" << std::endl;

vector_fp spvals(nsp_tot);
vector_fp actCoeff(nsp_tot);
Expand Down Expand Up @@ -54,7 +54,7 @@ void calc_potentials()
electrodebulk->getdlnActCoeffdlnX_diag(dlnActCoeffdlnX_diag.data());
electrodebulk->getActivityCoefficients(actCoeff.data());

fout << fmt::format("{} {} {} {} {} {} {} {}\n",
fout << fmt::format("{}, {}, {}, {}, {}, {}, {}, {}\n",
xv[0], spvals[0], spvals[1], Uref, actCoeff[0],
actCoeff[1], dlnActCoeffdlnX_diag[0], dlnActCoeffdlnX_diag[1]);
}
Expand Down
10 changes: 0 additions & 10 deletions samples/cxx/LiC6_electrode/potentials_blessed.dat

This file was deleted.

81 changes: 0 additions & 81 deletions samples/cxx/NASA_coeffs/NASA_coeffs.cpp

This file was deleted.

Loading