diff --git a/compareUpscaling.cmake b/compareUpscaling.cmake index ecf01e5..a467e42 100644 --- a/compareUpscaling.cmake +++ b/compareUpscaling.cmake @@ -109,6 +109,7 @@ macro (add_test_upscale_elasticity gridname method) ${abstol} ${reltol} TEST_ARGS output=${RESULT_PATH}/upscale_elasticity_${method}_${gridname}.txt gridfilename=${INPUT_DATA_PATH}/grids/${gridname}.grdecl + output_wave_speeds=true method=${method}) endmacro (add_test_upscale_elasticity gridname method rows) diff --git a/examples/upscale_elasticity.cpp b/examples/upscale_elasticity.cpp index ef64682..0f37da5 100644 --- a/examples/upscale_elasticity.cpp +++ b/examples/upscale_elasticity.cpp @@ -141,6 +141,8 @@ struct Params { int cellsz; //! \brief verbose output bool verbose; + //! \brief Output wave speeds as data. For reg-test comparison purposes. + bool outputSpeeds; //! \brief Run a inspection only, currently 'mesh, results, load' std::string inspect; //! \brief Result template filename (input/output) @@ -180,6 +182,7 @@ void parseCommandLine(int argc, char** argv, Params& p) p.resultfilename = param.getDefault("resultfilename",""); p.output = param.getDefault("output",""); p.verbose = param.getDefault("verbose",false); + p.outputSpeeds = param.getDefault("output_wave_speeds",false); p.inspect = param.getDefault("inspect",""); size_t i; if ((i=p.vtufile.find(".vtu")) != std::string::npos) @@ -269,7 +272,9 @@ void writeOutput(const Params& p, Opm::time::StopWatch& watch, int cells, f << "#" << std::endl << "######################################################################" << std::endl - << C << std::endl; + << C; + if (p.outputSpeeds && upscaledRho > 0) + f << upscaledRho << " " << speeds << std::endl; } //! \brief Main solution loop. Allows templating over the AMG type diff --git a/tests/input_data/grids/EightCells.grdecl b/tests/input_data/grids/EightCells.grdecl index 1f322ae..3fce8b3 100644 --- a/tests/input_data/grids/EightCells.grdecl +++ b/tests/input_data/grids/EightCells.grdecl @@ -50,3 +50,7 @@ PORO SATNUM 1 2 1 1 2 2 2 2 / + +RHO + 1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 +/ diff --git a/tests/input_data/reference_solutions/upscale_elasticity_mortar_EightCells.txt b/tests/input_data/reference_solutions/upscale_elasticity_mortar_EightCells.txt index 0982d5c..75ab993 100644 --- a/tests/input_data/reference_solutions/upscale_elasticity_mortar_EightCells.txt +++ b/tests/input_data/reference_solutions/upscale_elasticity_mortar_EightCells.txt @@ -31,4 +31,4 @@ 0.00886555 0.00488502 -0.00387763 3.01119 0.00586288 0 0.00916403 -0.0144548 0.00900469 0.00586288 3.07441 0 0 0 0 0 0 3.69018 - +3.5 2.73658 1.92098 1.75339 diff --git a/tests/input_data/reference_solutions/upscale_elasticity_mpc_EightCells.txt b/tests/input_data/reference_solutions/upscale_elasticity_mpc_EightCells.txt index 34f7606..b65e41a 100644 --- a/tests/input_data/reference_solutions/upscale_elasticity_mpc_EightCells.txt +++ b/tests/input_data/reference_solutions/upscale_elasticity_mpc_EightCells.txt @@ -31,4 +31,4 @@ 0 0 0 3.01461 0 0 0 0 0 0 3.08606 0 0 0 0 0 0 3.69018 - +3.5 2.73973 1.92098 1.75672