From e4d4a2151334a7306b252ed29bf96d0e2702268c Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Mon, 8 Jan 2018 09:52:40 +0100 Subject: [PATCH] [test][navierstokes] Improve output of fluxes * make output more clear --- test/freeflow/navierstokes/test_channel.cc | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/test/freeflow/navierstokes/test_channel.cc b/test/freeflow/navierstokes/test_channel.cc index ec1804236c..b67cb331b1 100644 --- a/test/freeflow/navierstokes/test_channel.cc +++ b/test/freeflow/navierstokes/test_channel.cc @@ -244,13 +244,21 @@ int main(int argc, char** argv) try // calculate and print mass fluxes over the planes flux.calculateMassOrMoleFluxes(); - std::cout << "mass flux at middle is: " << flux.netFlux("middle") << std::endl; - std::cout << "mass flux at outlet is: " << flux.netFlux("outlet") << std::endl; + if(GET_PROP_VALUE(TypeTag, EnableEnergyBalance)) + { + std::cout << "mass / energy flux at middle is: " << flux.netFlux("middle") << std::endl; + std::cout << "mass / energy flux at outlet is: " << flux.netFlux("outlet") << std::endl; + } + else + { + std::cout << "mass flux at middle is: " << flux.netFlux("middle") << std::endl; + std::cout << "mass flux at outlet is: " << flux.netFlux("outlet") << std::endl; + } // calculate and print volume fluxes over the planes flux.calculateVolumeFluxes(); - std::cout << "volume flux at middle is: " << flux.netFlux("middle") << std::endl; - std::cout << "volume flux at outlet is: " << flux.netFlux("outlet") << std::endl; + std::cout << "volume flux at middle is: " << flux.netFlux("middle")[0] << std::endl; + std::cout << "volume flux at outlet is: " << flux.netFlux("outlet")[0] << std::endl; // report statistics of this time step timeLoop->reportTimeStep(); -- GitLab