diff --git a/exercises/exercise-fluidsystem/exercise3.cc b/exercises/exercise-fluidsystem/exercise3.cc index acfc230b5ff53cb4de42a955a3bdba04799d5a1e..43bbffccaeccc39993e80143a6a40f5f6a5baa7d 100644 --- a/exercises/exercise-fluidsystem/exercise3.cc +++ b/exercises/exercise-fluidsystem/exercise3.cc @@ -18,8 +18,8 @@ *****************************************************************************/ /*! * \file - * - * \brief DOC ME! + * \brief The main file for exercise 3. This solves an instationary problem + * with an implicit time discretization. */ #include <config.h> @@ -52,35 +52,6 @@ #include <dumux/io/vtkoutputmodule.hh> #include <dumux/io/grid/gridmanager.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) //TODO check usage -{ - if (errorMsg.size() > 0) { - std::string errorMessageOut = "\nUsage: "; - errorMessageOut += progName; - errorMessageOut += " [options]\n"; - errorMessageOut += errorMsg; - errorMessageOut += "\n\nThe list of mandatory options 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.LensLowerLeft coordinates of the lower left corner of the lens [m] \n" - "\t-SpatialParams.LensUpperRight coordinates of the upper right corner of the lens [m] \n" - "\t-Problem.Name String for naming of the output files \n" - "\n"; - std::cout << errorMessageOut - << "\n"; - } -} - //////////////////////// // the main function //////////////////////// @@ -103,7 +74,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<typename GET_PROP_TYPE(TypeTag, Grid)> gridManager; @@ -157,7 +128,7 @@ int main(int argc, char** argv) try timeLoop->setMaxTimeStepSize(maxDt); // the assembler with time loop for instationary problem - using Assembler = FVAssembler<TypeTag, DiffMethod::numeric>; + using Assembler = FVAssembler<TypeTag, DiffMethod::numeric, /*implicit?*/true>; auto assembler = std::make_shared<Assembler>(problem, fvGridGeometry, gridVariables, timeLoop); // the linear solver @@ -195,11 +166,10 @@ int main(int argc, char** argv) try } while (!timeLoop->finished()); - timeLoop->finalize(leafGridView.comm()); - //////////////////////////////////////////////////////////// // finalize, print dumux message to say goodbye //////////////////////////////////////////////////////////// + timeLoop->finalize(leafGridView.comm()); // print dumux end message if (mpiHelper.rank() == 0)