From 6f95d77e2da91485b17b9fdabbffc96c825eab76 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Thu, 22 Sep 2016 15:42:04 +0200 Subject: [PATCH] [2p][test] Clean-up sequential tests *Get rid of lowerLeftX, etc --- .../2p/sequential/test_3d2p.cc | 8 +-- .../2p/sequential/test_mpfa2p.input | 22 +++----- .../2p/sequential/test_mpfa2pspatialparams.hh | 55 ++++++------------- 3 files changed, 28 insertions(+), 57 deletions(-) diff --git a/test/porousmediumflow/2p/sequential/test_3d2p.cc b/test/porousmediumflow/2p/sequential/test_3d2p.cc index f50a599851..404d1f82d7 100644 --- a/test/porousmediumflow/2p/sequential/test_3d2p.cc +++ b/test/porousmediumflow/2p/sequential/test_3d2p.cc @@ -43,12 +43,8 @@ void usage(const char *progName, const std::string &errorMsg) "\t-TEnd The end of the simulation. [s] \n" "\t-DtInitial The initial timestep size. [s] \n" #if STRUCTUREDGRID - "\t-Grid.NumberOfCellsX Resolution in x-direction [-]\n" - "\t-Grid.NumberOfCellsY Resolution in y-direction [-]\n" - "\t-Grid.NumberOfCellsZ Resolution in y-direction [-]\n" - "\t-Grid.UpperRightX Dimension of the grid [m]\n" - "\t-Grid.UpperRightY Dimension of the grid [m]\n" - "\t-Grid.UpperRightZ Dimension of the grid [m]\n"; + "\t-Grid.Cells Number of cells in respective coordinate directions\n" + "\t-Grid.UpperRight Upper right corner coordinates\n"; #else "\t-Grid.File Name of the grid file (*.dgf)"; #endif diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2p.input b/test/porousmediumflow/2p/sequential/test_mpfa2p.input index 29f0746c81..bf2ed325e0 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2p.input +++ b/test/porousmediumflow/2p/sequential/test_mpfa2p.input @@ -34,20 +34,14 @@ LensPermeabilityXY = 0 LensPermeabilityYX = 0 LensPermeabilityYY = 1e-14 -LensOneLowerLeftX = 7 -LensOneLowerLeftY = 6 -LensOneUpperRightX = 13 -LensOneUpperRightY = 7 - -LensTwoLowerLeftX = 2 -LensTwoLowerLeftY = 4 -LensTwoUpperRightX = 8 -LensTwoUpperRightY = 5 - -LensThreeLowerLeftX = 10 -LensThreeLowerLeftY = 2 -LensThreeUpperRightX = 18 -LensThreeUpperRightY = 3 +LensOneLowerLeft = 7 6 +LensOneUpperRight = 13 7 + +LensTwoLowerLeft = 2 4 +LensTwoUpperRight = 8 5 + +LensThreeLowerLeft = 10 2 +LensThreeUpperRight = 18 3 BackgroundEntryPressure = 500 LenseEntryPressure = 5000 diff --git a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh index 04ebce35c8..bb06311da2 100644 --- a/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh +++ b/test/porousmediumflow/2p/sequential/test_mpfa2pspatialparams.hh @@ -235,59 +235,40 @@ public: permLenses_[1][1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensPermeabilityYY); } - if (ParameterTree::tree().hasKey("SpatialParams.LensOneLowerLeftX")) + if (ParameterTree::tree().hasKey("SpatialParams.LensOneLowerLeft")) { - lensOneLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensOneLowerLeftX); + lensOneLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneLowerLeft)[0]; + lensOneLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneLowerLeft)[1]; } - if (ParameterTree::tree().hasKey("SpatialParams.LensOneUpperRightX")) + if (ParameterTree::tree().hasKey("SpatialParams.LensOneUpperRight")) { - lensOneUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensOneUpperRightX); + lensOneUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneUpperRight)[0]; + lensOneUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensOneUpperRight)[1]; } - if (ParameterTree::tree().hasKey("SpatialParams.LensTwoLowerLeftX")) + if (ParameterTree::tree().hasKey("SpatialParams.LensTwoLowerLeft")) { - lensTwoLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensTwoLowerLeftX); - } - if (ParameterTree::tree().hasKey("SpatialParams.LensTwoUpperRightX")) - { - lensTwoUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensTwoUpperRightX); + lensTwoLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoLowerLeft)[0]; + lensTwoLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoLowerLeft)[1]; } - if (ParameterTree::tree().hasKey("SpatialParams.LensThreeLowerLeftX")) - { - lensThreeLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensThreeLowerLeftX); - } - if (ParameterTree::tree().hasKey("SpatialParams.LensThreeUpperRightX")) + if (ParameterTree::tree().hasKey("SpatialParams.LensTwoUpperRight")) { - lensThreeUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensThreeUpperRightX); + lensTwoUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoUpperRight)[0]; + lensTwoUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensTwoUpperRight)[1]; } - if (ParameterTree::tree().hasKey("SpatialParams.LensOneLowerLeftY")) + if (ParameterTree::tree().hasKey("SpatialParams.LensThreeLowerLeft")) { - lensOneLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensOneLowerLeftY); - } - if (ParameterTree::tree().hasKey("SpatialParams.LensOneUpperRightY")) - { - lensOneUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensOneUpperRightY); + lensThreeLowerLeft_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeLowerLeft)[0]; + lensThreeLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeLowerLeft)[1]; } - if (ParameterTree::tree().hasKey("SpatialParams.LensTwoLowerLeftY")) - { - lensTwoLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensTwoLowerLeftY); - } - if (ParameterTree::tree().hasKey("SpatialParams.LensTwoUpperRightY")) - { - lensTwoUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensTwoUpperRightY); - } - - if (ParameterTree::tree().hasKey("SpatialParams.LensThreeLowerLeftY")) - { - lensThreeLowerLeft_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensThreeLowerLeftY); - } - if (ParameterTree::tree().hasKey("SpatialParams.LensThreeUpperRightY")) + if (ParameterTree::tree().hasKey("SpatialParams.LensThreeUpperRight")) { - lensThreeUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, Scalar, SpatialParams, LensThreeUpperRightY); + lensThreeUpperRight_[0] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeUpperRight)[0]; + lensThreeUpperRight_[1] = GET_RUNTIME_PARAM_FROM_GROUP(TypeTag, GlobalPosition, SpatialParams, LensThreeUpperRight)[1]; } #endif } -- GitLab