diff --git a/test/freeflow/navierstokes/angeli/main.cc b/test/freeflow/navierstokes/angeli/main.cc index 963ffa608001548957163e6fb175de24ba4d2ac6..d2676cfab7d07a6f51015a3edafdd9d67d9731f1 100644 --- a/test/freeflow/navierstokes/angeli/main.cc +++ b/test/freeflow/navierstokes/angeli/main.cc @@ -21,68 +21,29 @@ * * \brief Test for the instationary staggered grid Navier-Stokes model with analytical solution (Angeli et al., 2017) */ - #include +#include - #include - #include +#include +#include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include - -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - -#include - -#include -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -99,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -134,11 +95,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); auto xOld = x; diff --git a/test/freeflow/navierstokes/channel/1d/main.cc b/test/freeflow/navierstokes/channel/1d/main.cc index 8bdcf02e6e0cd89016c3c68420a4a2e6611ad10c..3eeb99923d06facea33a085ba221d70ef52c2e81 100644 --- a/test/freeflow/navierstokes/channel/1d/main.cc +++ b/test/freeflow/navierstokes/channel/1d/main.cc @@ -21,7 +21,6 @@ * * \brief Test for a 1-D staggered grid Navier-Stokes model */ - #include #include @@ -33,45 +32,19 @@ #include #include -#include +#include +#include #include -#include #include +#include #include - -#include -#include -#include -#include #include +#include #include #include #include "problem.hh" -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n"; - std::cout << errorMessageOut - << "\n"; - } -} - int main(int argc, char** argv) try { using namespace Dumux; @@ -87,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -111,11 +84,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); // the grid variables using GridVariables = GetPropType; diff --git a/test/freeflow/navierstokes/channel/2d/main.cc b/test/freeflow/navierstokes/channel/2d/main.cc index cb3fba4112329e003af8a86ce0cfdb1c680da8ca..c8dc1ed2876a9027e1161580e6f788125dd21490 100644 --- a/test/freeflow/navierstokes/channel/2d/main.cc +++ b/test/freeflow/navierstokes/channel/2d/main.cc @@ -21,70 +21,30 @@ * * \brief Channel flow test for the staggered grid (Navier-)Stokes model */ - #include +#include - #include - #include +#include +#include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include +#include #include #include -#include -#include - -#include - -#include -#include -#include - -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -101,7 +61,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -134,11 +94,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); auto xOld = x; diff --git a/test/freeflow/navierstokes/channel/3d/main.cc b/test/freeflow/navierstokes/channel/3d/main.cc index fadc9cdd2c6a3cb54c6638c3966fd17fce8c545e..0d456df2d822ef0a8bdd6b0e1e536902d2c416a3 100644 --- a/test/freeflow/navierstokes/channel/3d/main.cc +++ b/test/freeflow/navierstokes/channel/3d/main.cc @@ -16,67 +16,35 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see . * *****************************************************************************/ - #include + /*! + * \file + * + * \brief 3D Channel flow test for the staggered grid (Navier-)Stokes model + */ +#include + +#include +#include + +#include +#include +#include +#include +#include - #include - #include - - #include - #include - #include - #include - #include - - -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include +#include #include #include -#include -#include - -#include -#include -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -93,7 +61,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -117,13 +85,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - static constexpr auto cellCenterIdx = FVGridGeometry::cellCenterIdx(); - static constexpr auto faceIdx = FVGridGeometry::faceIdx(); - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[cellCenterIdx].resize(numDofsCellCenter); - x[faceIdx].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); // the grid variables using GridVariables = GetPropType; diff --git a/test/freeflow/navierstokes/closedsystem/main.cc b/test/freeflow/navierstokes/closedsystem/main.cc index 7a64cb184149ab18fb2a65d0e647ab88956b2a66..11c7ca554fd4b97a1eb0b5007374f033d27e4af0 100644 --- a/test/freeflow/navierstokes/closedsystem/main.cc +++ b/test/freeflow/navierstokes/closedsystem/main.cc @@ -21,67 +21,29 @@ * * \brief Test for the staggered grid Stokes model in a closed domain */ - #include +#include - #include - #include +#include +#include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - -#include - -#include -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -98,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -122,11 +84,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); auto xOld = x; diff --git a/test/freeflow/navierstokes/donea/main.cc b/test/freeflow/navierstokes/donea/main.cc index bb7bc985e08c468d8075cab5314c4d957f2edb25..9056ba53c274cc1fe7875252cbc84de8ca6ca537 100644 --- a/test/freeflow/navierstokes/donea/main.cc +++ b/test/freeflow/navierstokes/donea/main.cc @@ -21,69 +21,29 @@ * * \brief Test for the staggered grid Navier-Stokes model (Kovasznay 1947) */ +#include - #include +#include +#include - #include - #include +#include +#include +#include +#include +#include - #include - #include - #include - #include - #include - - -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - -#include -#include - -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -100,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) using GridManager = Dumux::GridManager>; @@ -125,11 +85,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); // the grid variables using GridVariables = GetPropType; diff --git a/test/freeflow/navierstokes/kovasznay/main.cc b/test/freeflow/navierstokes/kovasznay/main.cc index 2eba37c03163c9ec0453ffe663b1fddba18f8a04..b5bb572e8916355f99f545ab88ca986d56138a41 100644 --- a/test/freeflow/navierstokes/kovasznay/main.cc +++ b/test/freeflow/navierstokes/kovasznay/main.cc @@ -21,67 +21,29 @@ * * \brief Stationary test for the staggered grid Navier-Stokes model (Kovasznay 1947) */ - #include +#include - #include - #include +#include +#include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include - -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - - -#include -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -98,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -122,11 +84,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); // the grid variables using GridVariables = GetPropType; diff --git a/test/freeflow/navierstokesnc/channel/main.cc b/test/freeflow/navierstokesnc/channel/main.cc index 89eba79ac2d909fbb68cba3af1b27f082572da84..eca54a7574a87592dbf3dff7fb1792fd0c0ad11b 100644 --- a/test/freeflow/navierstokesnc/channel/main.cc +++ b/test/freeflow/navierstokesnc/channel/main.cc @@ -21,67 +21,29 @@ * * \brief Test for the staggered grid multi-component (Navier-)Stokes model */ - #include +#include - #include - #include +#include +#include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - -#include - -#include -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -98,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -133,11 +95,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); auto xOld = x; diff --git a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc index d6fe30094e9ec20a9c1c1df98cfa19b37bb1e3dc..9791e64f19020ca206f6a5126a2b5d1e97ae0834 100644 --- a/test/freeflow/navierstokesnc/densitydrivenflow/main.cc +++ b/test/freeflow/navierstokesnc/densitydrivenflow/main.cc @@ -21,67 +21,29 @@ * * \brief Test for the staggered grid multi-component (Navier-)Stokes model */ - #include +#include - #include - #include +#include +#include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - -#include - -#include -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -98,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -132,11 +94,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); auto xOld = x; diff --git a/test/freeflow/navierstokesnc/maxwellstefan/main.cc b/test/freeflow/navierstokesnc/maxwellstefan/main.cc index c72b94fa4dcbc3cdae081152baccebe6a987f565..468d6317a86139644763d5d56740f7f4c544ef9c 100644 --- a/test/freeflow/navierstokesnc/maxwellstefan/main.cc +++ b/test/freeflow/navierstokesnc/maxwellstefan/main.cc @@ -21,67 +21,29 @@ * * \brief Test for the staggered grid multi-component (Navier-)Stokes model */ - #include +#include - #include - #include +#include +#include - #include - #include - #include - #include - #include +#include +#include +#include +#include +#include -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - -#include - -#include -#include - -/*! - * \brief Provides an interface for customizing error messages associated with - * reading in parameters. - * - * \param progName The name of the program, that was tried to be started. - * \param errorMsg The error message that was issued by the start function. - * Comprises the thing that went wrong and a general help message. - */ -void usage(const char *progName, const std::string &errorMsg) -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory arguments for this program is:\n" - "\t-TimeManager.TEnd End of the simulation [s] \n" - "\t-TimeManager.DtInitial Initial timestep size [s] \n" - "\t-Grid.File Name of the file containing the grid \n" - "\t definition in DGF format\n" - "\t-SpatialParams.LensLowerLeftX x-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensLowerLeftY y-coordinate of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightX x-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRightY y-coordinate of the upper right corner of the lens [m] \n" - "\t-SpatialParams.Permeability Permeability of the domain [m^2] \n" - "\t-SpatialParams.PermeabilityLens Permeability of the lens [m^2] \n"; - - std::cout << errorMessageOut - << "\n"; - } -} +#include "problem.hh" int main(int argc, char** argv) try { @@ -98,7 +60,7 @@ int main(int argc, char** argv) try DumuxMessage::print(/*firstCall=*/true); // parse command line arguments and input file - Parameters::init(argc, argv, usage); + Parameters::init(argc, argv); // try to create a grid (from the given grid file or the input file) GridManager> gridManager; @@ -132,11 +94,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); auto xOld = x; diff --git a/test/freeflow/rans/main.cc b/test/freeflow/rans/main.cc index a2bb77a056d7f9aaea9ac9697c768bfd9bc37566..3fddb555d68acee19aa5c2bf75386383098e028b 100644 --- a/test/freeflow/rans/main.cc +++ b/test/freeflow/rans/main.cc @@ -35,25 +35,19 @@ #include #include -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include +#include #include #include -#include -#include - -#include - -#include -#include -#include +#include "problem.hh" /*! * \brief Provides an interface for customizing error messages associated with @@ -126,11 +120,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); problem->updateStaticWallProperties(); problem->updateDynamicWallProperties(x); diff --git a/test/freeflow/ransnc/main.cc b/test/freeflow/ransnc/main.cc index 3bf3ca410be4c579cfcee40d7d368e0db9855380..598d29d614354b5f6cba2b6e47f7525b03baf557 100644 --- a/test/freeflow/ransnc/main.cc +++ b/test/freeflow/ransnc/main.cc @@ -32,24 +32,18 @@ #include #include -#include "problem.hh" - -#include +#include +#include +#include #include +#include #include -#include -#include - +#include +#include #include #include -#include -#include - -#include - -#include -#include +#include "problem.hh" /*! * \brief Provides an interface for customizing error messages associated with @@ -122,11 +116,9 @@ int main(int argc, char** argv) try // the solution vector using SolutionVector = GetPropType; - const auto numDofsCellCenter = leafGridView.size(0); - const auto numDofsFace = leafGridView.size(1); SolutionVector x; - x[FVGridGeometry::cellCenterIdx()].resize(numDofsCellCenter); - x[FVGridGeometry::faceIdx()].resize(numDofsFace); + x[FVGridGeometry::cellCenterIdx()].resize(fvGridGeometry->numCellCenterDofs()); + x[FVGridGeometry::faceIdx()].resize(fvGridGeometry->numFaceDofs()); problem->applyInitialSolution(x); problem->updateStaticWallProperties(); problem->updateDynamicWallProperties(x); diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/CMakeLists.txt index 5c27a37406cd4439519af153286545bae57c56c1..ee8d570d6de2a2a003867d89737305c6c08212e8 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/diffusionlawcomparison/CMakeLists.txt @@ -1,7 +1,7 @@ add_input_file_links() dune_add_test(NAME test_md_boundary_darcy1p2c_stokes1p2c_maxwellstefan - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMPILE_DEFINITIONS DIFFUSIONTYPE=MaxwellStefansLaw @@ -15,7 +15,7 @@ dune_add_test(NAME test_md_boundary_darcy1p2c_stokes1p2c_maxwellstefan --command "${CMAKE_CURRENT_BINARY_DIR}/test_md_boundary_darcy1p2c_stokes1p2c_maxwellstefan params.input") dune_add_test(NAME test_md_boundary_darcy1p2c_stokes1p2c_fickslaw - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMPILE_DEFINITIONS DIFFUSIONTYPE=FicksLaw diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/CMakeLists.txt index 7f2a65be924a64e517d5f4585c0884afd8883c31..ef763e257c37e0ea7d0f784cfa07dff973cd1b2f 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/CMakeLists.txt @@ -1,7 +1,7 @@ add_input_file_links() dune_add_test(NAME test_md_boundary_darcy1p2c_stokes1p2c_horizontal - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/main.cc index e6cb12ca8f078df8059433006e4465dd8e7d0c96..156c1b88c1f938eabcdc129189935370d855e883 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/horizontalflow/main.cc @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/CMakeLists.txt index d25a242d95796540c5156cd4ff453f4cd1215285..1988ed7f9d957f42baa155743713f37993b23063 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/CMakeLists.txt @@ -3,7 +3,7 @@ add_input_file_links() add_executable(test_md_boundary_darcy1p2c_stokes1p2c_vertical EXCLUDE_FROM_ALL main.cc) dune_add_test(NAME test_md_boundary_darcy1p2c_stokes1p2c_vertical_diffusion - LABELS multidomain + LABELS multidomain freeflow TARGET test_md_boundary_darcy1p2c_stokes1p2c_vertical CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py @@ -17,7 +17,7 @@ dune_add_test(NAME test_md_boundary_darcy1p2c_stokes1p2c_vertical_diffusion -Vtk.OutputName test_md_boundary_darcy1p2c_stokes1p2c_vertical_diffusion") dune_add_test(NAME test_md_boundary_darcy1p2c_stokes1p2c_vertical_advection - LABELS multidomain + LABELS multidomain freeflow TARGET test_md_boundary_darcy1p2c_stokes1p2c_vertical CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/main.cc index 716bbdc7e85f64cbe4da6b4dcead8316abf90a0e..3b913a3ebb449ce077b967eadda4da894fb7092e 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_1p2c/verticalflow/main.cc @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/CMakeLists.txt index 0d0494e9e44099b7575f920ea273d82b457f8c50..0f308e877d3c2fb51fed28ba220ff66ae91b2364 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/CMakeLists.txt @@ -1,7 +1,7 @@ add_input_file_links() dune_add_test(NAME test_md_boundary_darcy2p2c_stokes1p2c_horizontal - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py @@ -15,7 +15,7 @@ dune_add_test(NAME test_md_boundary_darcy2p2c_stokes1p2c_horizontal -Vtk.OutputName test_md_boundary_darcy2p2c_stokes1p2c_horizontal") dune_add_test(NAME test_md_boundary_darcy2p2cni_stokes1p2cni_horizontal - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc COMPILE_DEFINITIONS NONISOTHERMAL=1 CMAKE_GUARD HAVE_UMFPACK diff --git a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc index 52674aa3c3387c65c3f9ddd63395a077c0d85625..c4b80552e9dd69f49956330bfc77a8e62a96ad92 100644 --- a/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p2c_2p2c/main.cc @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/CMakeLists.txt index 20d9ed243e53daf762c528df03ddaaedfd231fee..4afa37814f57094079d504160dde35eae6737f97 100644 --- a/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p3c_1p3c/CMakeLists.txt @@ -1,7 +1,7 @@ add_input_file_links() dune_add_test(NAME test_md_boundary_darcy1p3c_stokes1p3c_horizontal - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/CMakeLists.txt index c87e39cdcca9c0955667e883946846d0a6f7e65b..48bfbeca35f444048692ece8aeb5262ba88a946b 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/CMakeLists.txt @@ -1,7 +1,7 @@ add_input_file_links() dune_add_test(NAME test_md_boundary_darcy1p_stokes1p_horizontal - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/main.cc b/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/main.cc index b1173646948e921c4856ee48964dd0de6a89b174..f85c72ca833f4b483d7d19c7d7a748db3fac2aa6 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/horizontalflow/main.cc @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/CMakeLists.txt index 9aed1f2c74522666caddad1432d69f0ad8218267..3ad02d9bb5f230897086ab4c1ebe96544cf6358b 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/CMakeLists.txt @@ -1,7 +1,7 @@ add_input_file_links() dune_add_test(NAME test_md_boundary_darcy1p_stokes1p_vertical - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py diff --git a/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/main.cc b/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/main.cc index ef884a4254c7b5b3d7af64c3d12461d7f647b63a..f1bc479ced4c88dbefc5bdea268ef366a0815cbe 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_1p/verticalflow/main.cc @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include diff --git a/test/multidomain/boundary/stokesdarcy/1p_2p/CMakeLists.txt b/test/multidomain/boundary/stokesdarcy/1p_2p/CMakeLists.txt index 5955dec9cb6ab151a2216ee516a8b90ff9ab8d5c..5dc4a860913c887172fd4a5322da264f4b841604 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_2p/CMakeLists.txt +++ b/test/multidomain/boundary/stokesdarcy/1p_2p/CMakeLists.txt @@ -1,7 +1,7 @@ add_input_file_links() dune_add_test(NAME test_md_boundary_darcy2p_stokes1p_vertical - LABELS multidomain + LABELS multidomain freeflow SOURCES main.cc CMAKE_GUARD HAVE_UMFPACK COMMAND ${CMAKE_SOURCE_DIR}/bin/testing/runtest.py diff --git a/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc b/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc index 2d2698039c86eda6e41c1cd1513ee59d41c51a81..776b53804ca336132b4d53e15bcfb572c55bef56 100644 --- a/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc +++ b/test/multidomain/boundary/stokesdarcy/1p_2p/main.cc @@ -25,7 +25,6 @@ #include #include -#include #include #include @@ -34,7 +33,6 @@ #include #include #include -#include #include #include #include