Skip to content

Commit

Permalink
Add regression test using custom.cpp example
Browse files Browse the repository at this point in the history
  • Loading branch information
paulblum committed Sep 2, 2020
1 parent fa1f4df commit a8535ad
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 2 deletions.
4 changes: 2 additions & 2 deletions samples/cxx/custom/custom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ int main() {
// simulation results will be outputted to a .csv file as complete state vectors
// for each simulation time point.
// create the csv file, overwriting any existing ones with the same name.
std::ofstream outputFile("output.csv");
std::ofstream outputFile("custom_cxx.csv");

// for convenience, a title for each of the state vector's components is written to
// the first line of the csv file.
Expand Down Expand Up @@ -177,7 +177,7 @@ int main() {
double *solution = integrator->solution();

// output the current absolute time and solution state vector to the csv file. you can view
// these results by opening the "output.csv" file that appears in this program's directory
// these results by opening the "custom_cxx.csv" file that appears in this program's directory
// after compiling and running.
outputFile << tnow << ", ";
for (int i = 0; i < odes.neq(); i++)
Expand Down
1 change: 1 addition & 0 deletions test_problems/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ cxx_samples/kin1.dat
cxx_samples/kin1.csv
cxx_samples/flamespeed.csv
cxx_samples/combustor_cxx.csv
cxx_samples/custom_cxx.csv
cxx_samples/transport_mix.csv
cxx_samples/transport_multi.csv
diamondSurf/diamond.xml
Expand Down
2 changes: 2 additions & 0 deletions test_problems/SConscript
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ Test('cxx-bvp', 'cxx_samples', '#build/samples/cxx/bvp/blasius', None,
Test('cxx-combustor', 'cxx_samples', '#build/samples/cxx/combustor/combustor', None,
comparisons=[('combustor_cxx_blessed.csv', 'combustor_cxx.csv')],
threshold=1e-10, tolerance=2e-4)
Test('cxx-custom', 'cxx_samples', '#build/samples/cxx/custom/custom', None,
comparisons=[('custom_cxx_blessed.csv', 'custom_cxx.csv')])
Test('cxx-flamespeed', 'cxx_samples', '#build/samples/cxx/flamespeed/flamespeed',
'cxx_flamespeed_blessed.txt',
comparisons=[('flamespeed_blessed.csv', 'flamespeed.csv')],
Expand Down
Loading

0 comments on commit a8535ad

Please sign in to comment.