From 0dfb8f57086062ceb417c07cbfbe47f3cc87c624 Mon Sep 17 00:00:00 2001 From: Timo Koch <timo.koch@iws.uni-stuttgart.de> Date: Wed, 20 Dec 2017 15:53:55 +0100 Subject: [PATCH] [doc] Improve documentation in folder common --- dumux/common/balanceequationopts.hh | 12 +- dumux/common/boundaryconditions.hh | 26 +-- dumux/common/boundaryflag.hh | 12 +- dumux/common/boundarytypes.hh | 3 +- dumux/common/defaultusagemessage.hh | 7 +- dumux/common/dimensionlessnumbers.hh | 32 +-- dumux/common/dumuxmessage.hh | 7 +- dumux/common/eigenvalues.hh | 9 +- dumux/common/entitymap.hh | 2 + dumux/common/exceptions.hh | 7 +- dumux/common/fixedlengthspline_.hh | 8 +- dumux/common/fvproblem.hh | 212 +++--------------- dumux/common/geometry/boundingboxtree.hh | 26 ++- .../geometry/boundingboxtreeintersection.hh | 2 + dumux/common/geometry/geometricentityset.hh | 7 + dumux/common/geometry/geometryintersection.hh | 2 + dumux/common/geometry/intersectingentities.hh | 24 +- .../geometry/intersectspointgeometry.hh | 16 +- .../common/geometry/intersectspointsimplex.hh | 31 ++- dumux/common/intersectionmapper.hh | 14 +- dumux/common/intrange.hh | 5 +- dumux/common/loggingparametertree.hh | 6 +- dumux/common/math.hh | 31 ++- dumux/common/optional.hh | 9 +- dumux/common/parameters.hh | 53 +++-- dumux/common/pointsource.hh | 1 + dumux/common/properties.hh | 9 +- dumux/common/properties/grid.hh | 9 +- dumux/common/properties/model.hh | 13 +- dumux/common/properties/propertysystem.hh | 2 +- dumux/common/quad.hh | 2 +- dumux/common/reorderingdofmapper.hh | 6 + dumux/common/spline.hh | 3 +- dumux/common/splinecommon_.hh | 6 +- dumux/common/staggeredfvproblem.hh | 5 +- dumux/common/start.hh | 3 +- dumux/common/tabulated2dfunction.hh | 6 +- dumux/common/timeloop.hh | 19 +- dumux/common/timemanager.hh | 12 +- dumux/common/timesteppingscheme.hh | 3 + dumux/common/valgrind.hh | 3 +- dumux/common/variablelengthspline_.hh | 9 +- 42 files changed, 320 insertions(+), 354 deletions(-) diff --git a/dumux/common/balanceequationopts.hh b/dumux/common/balanceequationopts.hh index ad401689f2..7a96e74474 100644 --- a/dumux/common/balanceequationopts.hh +++ b/dumux/common/balanceequationopts.hh @@ -18,7 +18,8 @@ *****************************************************************************/ /*! * \file - * \brief Class to set options used by the local residual when + * \ingroup Common + * \brief Traits class to set options used by the local residual when * when evaluating the balance equations. */ #ifndef BALANCE_EQUATION_OPTIONS_HH @@ -28,8 +29,11 @@ namespace Dumux { /*! - * \ingroup BC - * \brief Class to specify the type of a boundary. + * \ingroup Common + * \brief Traits class to set options used by the local residual when + * when evaluating the balance equations. + * \todo include useMoles here + * \todo include replaceCompIdx here */ template <class TypeTag> class BalanceEquationOptions @@ -44,6 +48,6 @@ public: { return true; } }; -} +} // end namespace Dumux #endif diff --git a/dumux/common/boundaryconditions.hh b/dumux/common/boundaryconditions.hh index de8e0f0d26..5b6759ef01 100644 --- a/dumux/common/boundaryconditions.hh +++ b/dumux/common/boundaryconditions.hh @@ -16,21 +16,21 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ +/*! + * \file + * \ingroup Common + * \brief Definition of boundary condition types, extend if necessary + * \todo can this be removed for the sake of boundarytypes.hh? + */ #ifndef DUMUX_BOUNDARYCONDITIONS_HH #define DUMUX_BOUNDARYCONDITIONS_HH -/** -* @file -* @brief Definition of boundary condition types, extend if necessary -*/ -namespace Dumux -{ -/** - * \ingroup BC - * @brief Define a class containing boundary condition flags - */ +namespace Dumux { -//! base Class that defines boundary condition flags +/*! + * \ingroup Common + * \brief Define a class containing boundary condition flags + */ struct BoundaryConditions { /** \brief These values are ordered according to precedence */ @@ -42,6 +42,6 @@ struct BoundaryConditions }; }; -/** @} */ -} +} // end namespace Dumux + #endif diff --git a/dumux/common/boundaryflag.hh b/dumux/common/boundaryflag.hh index 29dae7b445..dec09f7778 100644 --- a/dumux/common/boundaryflag.hh +++ b/dumux/common/boundaryflag.hh @@ -18,7 +18,7 @@ *****************************************************************************/ /*! * \file - * + * \ingroup Common * \brief Boundary flag to store e.g. in sub control volume faces */ #ifndef DUMUX_BOUNDARY_FLAG_HH @@ -29,10 +29,14 @@ #include <dune/alugrid/grid.hh> #endif -namespace Dumux -{ +namespace Dumux { -//! a boundary flag class specialized on the grid type +/*! + * \file + * \ingroup Common + * \brief Boundary flag to store e.g. in sub control volume faces + * \tparam Grid the type of the gri + */ template<class Grid> class BoundaryFlag { diff --git a/dumux/common/boundarytypes.hh b/dumux/common/boundarytypes.hh index 46c68d431e..3ac652e3a3 100644 --- a/dumux/common/boundarytypes.hh +++ b/dumux/common/boundarytypes.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Class to specify the type of a boundary. */ #ifndef DUMUX_BOUNDARY_TYPES_HH @@ -27,7 +28,7 @@ namespace Dumux { /*! - * \ingroup BC + * \ingroup Common * \brief Class to specify the type of a boundary. */ template <int numEq> diff --git a/dumux/common/defaultusagemessage.hh b/dumux/common/defaultusagemessage.hh index c2b7ba4bfe..7991724e4f 100644 --- a/dumux/common/defaultusagemessage.hh +++ b/dumux/common/defaultusagemessage.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Function printing a default usage message */ #ifndef DUMUX_DEFAULT_USAGE_MESSAGE_HH @@ -25,12 +26,10 @@ #include <string> -namespace Dumux -{ +namespace Dumux { /*! - * \ingroup Start - * + * \ingroup Common * \brief Provides a general text block, that is part of error/ help messages. * * \return The string that is the help / error message. diff --git a/dumux/common/dimensionlessnumbers.hh b/dumux/common/dimensionlessnumbers.hh index 2934f884d6..8efc0366da 100644 --- a/dumux/common/dimensionlessnumbers.hh +++ b/dumux/common/dimensionlessnumbers.hh @@ -17,12 +17,12 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \file dimensionlessnumbers.hh - * + * \file + * \ingroup Common * \brief Collection of functions, calculating dimensionless numbers. * - * All the input to the dimensionless numbers has to be provided as function arguments. - * Rendering this collection generic in the sense that it can be used by any model. + * All the input to the dimensionless numbers has to be provided as function arguments. + * Rendering this collection generic in the sense that it can be used by any model. */ #ifndef DIMENSIONLESS_NUMBERS_HH #define DIMENSIONLESS_NUMBERS_HH @@ -31,14 +31,14 @@ #include <dune/common/exceptions.hh> -namespace Dumux -{ +namespace Dumux { + /*! * \brief Collection of functions which calculate dimensionless numbers. - * - * Each number has it's own function. - * All the parameters for the calculation have to be handed over. - * Rendering this collection generic in the sense that it can be used by any model. + * \ingroup Common + * Each number has it's own function. + * All the parameters for the calculation have to be handed over. + * Rendering this collection generic in the sense that it can be used by any model. */ template <class Scalar> class DimensionlessNumbers @@ -48,11 +48,11 @@ public: /*! * \brief Calculate the Reynolds Number [-] (Re). * - * The Reynolds number is a measure for the relation of inertial to viscous forces. - * The bigger the value, the more important inertial (as compared to viscous) effects become. - * According to Bear [Dynamics of fluids in porous media (1972)] Darcy's law is valid for Re<1. + * The Reynolds number is a measure for the relation of inertial to viscous forces. + * The bigger the value, the more important inertial (as compared to viscous) effects become. + * According to Bear [Dynamics of fluids in porous media (1972)] Darcy's law is valid for Re<1. * - * source for Reynolds number definition: http://en.wikipedia.org/wiki/Reynolds_number + * Source for Reynolds number definition: http://en.wikipedia.org/wiki/Reynolds_number * * \param darcyMagVelocity The absolute value of the darcy velocity. In the context of box models this * leads to a problem: the velocities are defined on the faces while other things (storage, sources, output) @@ -296,7 +296,9 @@ static Scalar thermalDiffusivity(const Scalar & thermalConductivity , { return thermalConductivity / (phaseDensity * heatCapacity); } -}; // end class + +}; // end class DimensionlessNumbers + } // end namespace Dumux #endif // DIMENSIONLESS_NUMBERS_HH diff --git a/dumux/common/dumuxmessage.hh b/dumux/common/dumuxmessage.hh index 7102b83129..7176d2519f 100644 --- a/dumux/common/dumuxmessage.hh +++ b/dumux/common/dumuxmessage.hh @@ -18,7 +18,8 @@ *****************************************************************************/ /*! * \file - * \brief Provides the class creating the famous dumux start and end messages + * \ingroup Common + * \brief Provides the class creating the famous DuMu<sup>x</sup> start and end messages */ #ifndef DUMUX_MESSAGE_HH #define DUMUX_MESSAGE_HH @@ -31,8 +32,8 @@ namespace Dumux { /*! - * \ingroup Start - * \brief Dumux start and end message. + * \ingroup Common + * \brief DuMu<sup>x</sup> start and end message. */ class DumuxMessage { diff --git a/dumux/common/eigenvalues.hh b/dumux/common/eigenvalues.hh index 6746502049..11f4de1806 100644 --- a/dumux/common/eigenvalues.hh +++ b/dumux/common/eigenvalues.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Defines a functions to calculate eigenvalues and eigenvectors of n x n matrices. For n > 2 a cyclic jacobi method is used. * This implementation is not efficient for larg matrices! */ @@ -29,8 +30,7 @@ #include "math.hh" -namespace Dumux -{ +namespace Dumux { template<int dim, class Matrix> void identityMatrix(Matrix& matrix) @@ -56,7 +56,7 @@ double calcOffDiagonalNorm(Matrix& matrix) } /*! - * \briefFunction to calculate eigenvalues of n x n matrices + * \brief Function to calculate eigenvalues of n x n matrices * * \param eigVel Vector for storing the eigenvalues * \param matrix n x n matrices for which eigenvalues have to be calculated @@ -214,7 +214,6 @@ bool calculateEigenValues(EVVectorType &eigVel, MatrixType& eigVec, MatrixType& return true; } - -} +} // end namespace Dumux #endif diff --git a/dumux/common/entitymap.hh b/dumux/common/entitymap.hh index de4a42b773..365655aea2 100644 --- a/dumux/common/entitymap.hh +++ b/dumux/common/entitymap.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief A map from indices to entities using grid entity seeds */ #ifndef DUMUX_ENTITY_INDEX_MAP_HH @@ -26,6 +27,7 @@ namespace Dumux { /*! + * \ingroup Common * \brief A map from indices to entities using grid entity seeds */ template <class GridView, int codim = 0> diff --git a/dumux/common/exceptions.hh b/dumux/common/exceptions.hh index 4f6d620e01..7a5f6fe94b 100644 --- a/dumux/common/exceptions.hh +++ b/dumux/common/exceptions.hh @@ -18,7 +18,8 @@ *****************************************************************************/ /*! * \file - * \brief Some exceptions thrown in DUMUX + * \ingroup Common + * \brief Some exceptions thrown in DuMu<sup>x</sup> */ #ifndef DUMUX_EXCEPTIONS_HH #define DUMUX_EXCEPTIONS_HH @@ -29,7 +30,7 @@ namespace Dumux { /*! - * \ingroup Exception + * \ingroup Common * \brief Exception thrown if a fixable numerical problem occurs. * * (e.g. time step too big, etc.) @@ -52,7 +53,7 @@ public: }; /*! - * \ingroup Exception + * \ingroup Common * \brief Exception thrown if a run-time parameter is not specified correctly. */ class ParameterException : public Dune::Exception diff --git a/dumux/common/fixedlengthspline_.hh b/dumux/common/fixedlengthspline_.hh index 0341b22252..575e897940 100644 --- a/dumux/common/fixedlengthspline_.hh +++ b/dumux/common/fixedlengthspline_.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Implements a spline with a fixed number of sampling points */ #ifndef DUMUX_FIXED_LENGTH_SPLINE_HH @@ -29,9 +30,10 @@ #include "splinecommon_.hh" -namespace Dumux -{ +namespace Dumux { + /*! + * \ingroup Common * \brief The common code for all 3rd order polynomial splines with * more than two sampling points. */ @@ -407,6 +409,6 @@ protected: BlockVector m_; }; -} +} // end namespace Dumux #endif diff --git a/dumux/common/fvproblem.hh b/dumux/common/fvproblem.hh index 15819a5eaa..807f4741c2 100644 --- a/dumux/common/fvproblem.hh +++ b/dumux/common/fvproblem.hh @@ -18,7 +18,8 @@ *****************************************************************************/ /*! * \file - * \brief Base class for all problems + * \ingroup Common + * \brief Base class for all finite volume problems */ #ifndef DUMUX_FV_PROBLEM_HH #define DUMUX_FV_PROBLEM_HH @@ -33,12 +34,10 @@ #include <dumux/common/parameters.hh> #include <dumux/discretization/methods.hh> -//#include <dumux/io/restart.hh> +namespace Dumux { -namespace Dumux -{ /*! - * \ingroup Problems + * \ingroup Common * \brief Base class for all finite-volume problems * * \note All quantities (regarding the units) are specified assuming a @@ -81,8 +80,7 @@ class FVProblem public: /*! * \brief Constructor - * - * \param gridView The simulation's idea about physical space + * \param fvGridGeometry The finite volume grid geometry */ FVProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) : fvGridGeometry_(fvGridGeometry) @@ -178,10 +176,11 @@ public: /*! * \brief Evaluate the boundary conditions for a dirichlet - * control volume. + * control volume face. * * \param element The finite element * \param scvf the sub control volume face + * \note used for cell-centered discretization schemes * * The method returns the boundary types information. */ @@ -196,6 +195,16 @@ public: return asImp_().dirichletAtPos(scvf.ipGlobal()); } + /*! + * \brief Evaluate the boundary conditions for a dirichlet + * control volume. + * + * \param element The finite element + * \param scv the sub control volume + * \note used for cell-centered discretization schemes + * + * The method returns the boundary types information. + */ PrimaryVariables dirichlet(const Element &element, const SubControlVolume &scv) const { // forward it to the method which only takes the global coordinate @@ -214,8 +223,6 @@ public: * \param globalPos The position of the center of the finite volume * for which the dirichlet condition ought to be * set in global coordinates - * - * For this method, the \a values parameter stores primary variables. */ PrimaryVariables dirichletAtPos(const GlobalPosition &globalPos) const { @@ -232,23 +239,19 @@ public: * boundary segment. * * This is the method for the case where the Neumann condition is - * potentially solution dependent and requires some quantities that - * are specific to the fully-implicit method. + * potentially solution dependent * - * \param values The neumann values for the conservation equations in units of - * \f$ [ \textnormal{unit of conserved quantity} / (m^2 \cdot s )] \f$ * \param element The finite element * \param fvGeometry The finite-volume geometry * \param elemVolVars All volume variables for the element * \param scvf The sub control volume face * - * For this method, the \a values parameter stores the flux - * in normal direction of each phase. Negative values mean influx. + * Negative values mean influx. * E.g. for the mass balance that would the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$. */ ResidualVector neumann(const Element& element, const FVElementGeometry& fvGeometry, - const ElementVolumeVariables& elemVolvars, + const ElementVolumeVariables& elemVolVars, const SubControlVolumeFace& scvf) const { // forward it to the interface with only the global position @@ -261,8 +264,7 @@ public: * * \param globalPos The position of the boundary face's integration point in global coordinates * - * For this method, the \a values parameter stores the flux - * in normal direction of each phase. Negative values mean influx. + * Negative values mean influx. * E.g. for the mass balance that would be the mass flux in \f$ [ kg / (m^2 \cdot s)] \f$. */ ResidualVector neumannAtPos(const GlobalPosition &globalPos) const @@ -285,7 +287,7 @@ public: * \param elemVolVars All volume variables for the element * \param scv The sub control volume * - * For this method, the \a values parameter stores the conserved quantity rate + * For this method, the return parameter stores the conserved quantity rate * generated or annihilate per volume unit. Positive values mean * that the conserved quantity is created, negative ones mean that it vanishes. * E.g. for the mass balance that would be a mass rate in \f$ [ kg / (m^3 \cdot s)] \f$. @@ -307,7 +309,7 @@ public: * for which the source term ought to be * specified in global coordinates * - * For this method, the \a values parameter stores the conserved quantity rate + * For this method, the values parameter stores the conserved quantity rate * generated or annihilate per volume unit. Positive values mean * that the conserved quantity is created, negative ones mean that it vanishes. * E.g. for the mass balance that would be a mass rate in \f$ [ kg / (m^3 \cdot s)] \f$. @@ -326,7 +328,7 @@ public: * \param pointSources A vector of PointSource s that contain source values for all phases and space positions. * - * For this method, the \a values method of the point source + * For this method, the values method of the point source * has to return the absolute rate values in units * \f$ [ \textnormal{unit of conserved quantity} / s ] \f$. * Positive values mean that the conserved quantity is created, negative ones mean that it vanishes. @@ -339,8 +341,7 @@ public: * for all phases within a given sub-control-volume. * * This is the method for the case where the point source is - * solution dependent and requires some quantities that - * are specific to the fully-implicit method. + * solution dependent * * \param source A single point source * \param element The finite element @@ -348,7 +349,7 @@ public: * \param elemVolVars All volume variables for the element * \param scv The sub control volume * - * For this method, the \a values() method of the point sources returns + * For this method, the values() method of the point sources returns * the absolute conserved quantity rate generated or annihilate in * units \f$ [ \textnormal{unit of conserved quantity} / s ] \f$. * Positive values mean that the conserved quantity is created, negative ones mean that it vanishes. @@ -453,7 +454,7 @@ public: /*! * \brief Applies the initial solution for all degrees of freedom of the grid. - * + * \param sol the initial solution vector */ void applyInitialSolution(SolutionVector& sol) const { @@ -524,165 +525,6 @@ public: // \} - /*! - * \name Simulation steering - */ - // \{ - - /*! - * \brief TODO serialization - */ - // void timeIntegration() - // { - // // if the simulation run is about to abort, write restart files for the current and previous time steps: - // // write restart file for the current time step - // serialize(); - - // //write restart file for the previous time step: - // //set the time manager and the solution vector to the previous time step - // const Scalar time = timeManager().time(); - // timeManager().setTime(time - timeManager().previousTimeStepSize()); - // const auto curSol = model_.curSol(); - // model_.curSol() = model_.prevSol(); - // //write restart file - // serialize(); - // //reset time manager and solution vector - // model_.curSol() = curSol; - // timeManager().setTime(time); - // } - - // TODO could be move to the episode manager that is user implemented? - // /*! - // * \brief Called when the end of an simulation episode is reached. - // * - // * Typically a new episode should be started in this method. - // */ - // void episodeEnd() - // { - // std::cerr << "The end of an episode is reached, but the problem " - // << "does not override the episodeEnd() method. " - // << "Doing nothing!\n"; - // } - // \} - - /*! - * \name TODO: Restart mechanism - */ - // \{ - - /*! - * \brief This method writes the complete state of the simulation - * to the harddisk. - * - * The file will start with the prefix returned by the name() - * method, has the current time of the simulation clock in it's - * name and uses the extension <tt>.drs</tt>. (Dumux ReStart - * file.) See Restart for details. - */ - // void serialize() - // { - // using Restarter = Restart; - // Restarter res; - // res.serializeBegin(asImp_()); - // if (gridView().comm().rank() == 0) - // std::cout << "Serialize to file '" << res.fileName() << "'\n"; - - // timeManager().serialize(res); - // asImp_().serialize(res); - // res.serializeEnd(); - // } - - /*! - * \brief This method writes the complete state of the problem - * to the harddisk. - * - * The file will start with the prefix returned by the name() - * method, has the current time of the simulation clock in it's - * name and uses the extension <tt>.drs</tt>. (Dumux ReStart - * file.) See Restart for details. - * - * \tparam Restarter The serializer type - * - * \param res The serializer object - */ - // template <class Restarter> - // void serialize(Restarter &res) - // { - // vtkOutputModule_->serialize(res); - // model().serialize(res); - // } - - /*! - * \brief Load a previously saved state of the whole simulation - * from disk. - * - * \param tRestart The simulation time on which the program was - * written to disk. - */ - // void restart(const Scalar tRestart) - // { - // using Restarter = Restart; - - // Restarter res; - - // res.deserializeBegin(asImp_(), tRestart); - // if (gridView().comm().rank() == 0) - // std::cout << "Deserialize from file '" << res.fileName() << "'\n"; - // timeManager().deserialize(res); - // asImp_().deserialize(res); - // res.deserializeEnd(); - // } - - /*! - * \brief This method restores the complete state of the problem - * from disk. - * - * It is the inverse of the serialize() method. - * - * \tparam Restarter The deserializer type - * - * \param res The deserializer object - */ - // template <class Restarter> - // void deserialize(Restarter &res) - // { - // vtkOutputModule_->deserialize(res); - // model().deserialize(res); - // } - - // \} - - // TODO this can probably be a setter function for the assembler - /*! - * \brief Function to add additional DOF dependencies, i.e. the residual of DOF globalIdx depends - * on additional DOFs not included in the discretization schemes' occupation pattern - * - * \param globalIdx The index of the DOF that depends on additional DOFs - * \return A vector of the additional DOFs the DOF with index globalIdx depends on - * - * \note This will lead to additional matrix entries and derivative computations automatically - * This function is used when creating the matrix and when computing entries of the jacobian matrix - * Per default we don't have additional DOFs - */ - // std::vector<IndexType> getAdditionalDofDependencies(IndexType globalIdx) const - // { return std::vector<IndexType>(); } - - // TODO is this necessary or can it just be meshed? - /*! - * \brief Function to set intersections as interior boundaries. This functionality is only - * available for models using cell-centered schemes. The corresponding boundary - * types and conditions are obtained from the standard methods. - * - * \param element The finite element - * \param intersection The intersection within the element - * \return boolean to mark an intersection as an interior boundary - * - * Per default we don't have interior boundaries - */ - // template<class T = TypeTag> - // bool isInteriorBoundary(const Element& element, const Intersection& intersection) const - // { return false; } - //! The finite volume grid geometry const FVGridGeometry& fvGridGeometry() const { return *fvGridGeometry_; } diff --git a/dumux/common/geometry/boundingboxtree.hh b/dumux/common/geometry/boundingboxtree.hh index e3aec399d1..5c5a0f6647 100644 --- a/dumux/common/geometry/boundingboxtree.hh +++ b/dumux/common/geometry/boundingboxtree.hh @@ -16,6 +16,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief An axis-aligned bounding box volume hierarchy for dune grids * * Dumux implementation of an AABB tree @@ -42,6 +43,7 @@ namespace Dumux { /*! + * \ingroup Common * \brief An axis-aligned bounding box volume tree implementation * * The class constructs a hierarchical structure of bounding box volumes around @@ -293,7 +295,7 @@ private: }; /*! - * \brief Check whether a point is intersectin a bounding box + * \brief Check whether a point is intersectin a bounding box (dimworld == 3) * \param point The point * \param b Pointer to bounding box coordinates */ @@ -309,6 +311,11 @@ inline bool intersectsPointBoundingBox(const Dune::FieldVector<ctype, dimworld>& b[2] - eps2 <= point[2] && point[2] <= b[5] + eps2); } +/*! + * \brief Check whether a point is intersectin a bounding box (dimworld == 2) + * \param point The point + * \param b Pointer to bounding box coordinates + */ template<class ctype, int dimworld, typename std::enable_if_t<dimworld == 2, int> = 0> inline bool intersectsPointBoundingBox(const Dune::FieldVector<ctype, dimworld>& point, const ctype* b) { @@ -319,6 +326,11 @@ inline bool intersectsPointBoundingBox(const Dune::FieldVector<ctype, dimworld>& b[1] - eps1 <= point[1] && point[1] <= b[3] + eps1); } +/*! + * \brief Check whether a point is intersectin a bounding box (dimworld == 1) + * \param point The point + * \param b Pointer to bounding box coordinates + */ template<class ctype, int dimworld, typename std::enable_if_t<dimworld == 1, int> = 0> inline bool intersectsPointBoundingBox(const Dune::FieldVector<ctype, dimworld>& point, const ctype* b) { @@ -328,7 +340,7 @@ inline bool intersectsPointBoundingBox(const Dune::FieldVector<ctype, dimworld>& } /*! - * \brief Check whether a bounding box is intersecting another bounding box + * \brief Check whether a bounding box is intersecting another bounding box (dimworld == 3) * \param a Pointer to first bounding box coordinates * \param b Pointer to second bounding box coordinates */ @@ -346,6 +358,11 @@ inline bool intersectsBoundingBoxBoundingBox(const ctypea* a, const ctypeb* b) } +/*! + * \brief Check whether a bounding box is intersecting another bounding box (dimworld == 2) + * \param a Pointer to first bounding box coordinates + * \param b Pointer to second bounding box coordinates + */ template<int dimworld, class ctypea, class ctypeb, typename std::enable_if_t<dimworld == 2, int> = 0> inline bool intersectsBoundingBoxBoundingBox(const ctypea* a, const ctypeb* b) { @@ -357,6 +374,11 @@ inline bool intersectsBoundingBoxBoundingBox(const ctypea* a, const ctypeb* b) b[1] - eps1 <= a[3] && a[1] <= b[3] + eps1); } +/*! + * \brief Check whether a bounding box is intersecting another bounding box (dimworld == 1) + * \param a Pointer to first bounding box coordinates + * \param b Pointer to second bounding box coordinates + */ template<int dimworld, class ctypea, class ctypeb, typename std::enable_if_t<dimworld == 1, int> = 0> inline bool intersectsBoundingBoxBoundingBox(const ctypea* a, const ctypeb* b) { diff --git a/dumux/common/geometry/boundingboxtreeintersection.hh b/dumux/common/geometry/boundingboxtreeintersection.hh index d80b906c45..d3f32aa2be 100644 --- a/dumux/common/geometry/boundingboxtreeintersection.hh +++ b/dumux/common/geometry/boundingboxtreeintersection.hh @@ -16,6 +16,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief A class storing intersections from intersecting two bounding box trees */ #ifndef DUMUX_BOUNDING_BOX_TREE_INTERSECTION_HH @@ -28,6 +29,7 @@ namespace Dumux { /*! + * \ingroup Common * \brief An intersection object resulting from the intersection of two bounding box tree primitives * * After is has been found that two leaf bounding boxes intersect a primitive test has to be diff --git a/dumux/common/geometry/geometricentityset.hh b/dumux/common/geometry/geometricentityset.hh index e298cb14d0..50a921eeb3 100644 --- a/dumux/common/geometry/geometricentityset.hh +++ b/dumux/common/geometry/geometricentityset.hh @@ -16,6 +16,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief An interface for a set of geometric entities * \note This can be used e.g. to contruct a bounding box volume hierarchy of a grid * It defines the minimum requirement for such a set @@ -29,6 +30,12 @@ namespace Dumux { +/*! + * \ingroup Common + * \brief An interface for a set of geometric entities + * \note This can be used e.g. to contruct a bounding box volume hierarchy of a grid + * It defines the minimum requirement for such a set + */ template <class GridView, int codim = 0> class GridViewGeometricEntitySet { diff --git a/dumux/common/geometry/geometryintersection.hh b/dumux/common/geometry/geometryintersection.hh index 8095a07bb3..f541a17758 100644 --- a/dumux/common/geometry/geometryintersection.hh +++ b/dumux/common/geometry/geometryintersection.hh @@ -16,6 +16,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief A class for collision detection of two geometries * and computation of intersection corners */ @@ -32,6 +33,7 @@ namespace Dumux { /*! + * \ingroup Common * \brief A class for geometry collision detection and intersection calculation * The class can be specialized for combinations of dimworld, dim1, dim2, where * dimworld is the world dimension embedding a grid of dim1 and a grid of dim2. diff --git a/dumux/common/geometry/intersectingentities.hh b/dumux/common/geometry/intersectingentities.hh index 0673c61ea5..132e61f3b4 100644 --- a/dumux/common/geometry/intersectingentities.hh +++ b/dumux/common/geometry/intersectingentities.hh @@ -16,6 +16,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Algorithms that finds which geometric entites intersect */ #ifndef DUMUX_INTERSECTING_ENTITIES_HH @@ -30,10 +31,12 @@ #include <dumux/common/geometry/geometryintersection.hh> #include <dumux/common/geometry/boundingboxtreeintersection.hh> -namespace Dumux -{ +namespace Dumux { -//! Compute all intersections between entities and a point +/*! + * \ingroup Common + * \brief Compute all intersections between entities and a point + */ template<class EntitySet, class ctype, int dimworld> inline std::vector<std::size_t> intersectingEntities(const Dune::FieldVector<ctype, dimworld>& point, @@ -45,7 +48,10 @@ intersectingEntities(const Dune::FieldVector<ctype, dimworld>& point, return entities; } -//! Compute collisions with point for a node of the bounding box tree +/*! + * \ingroup Common + * \brief Compute intersections with point for all nodes of the bounding box tree recursively + */ template<class EntitySet, class ctype, int dimworld> void intersectingEntities(const Dune::FieldVector<ctype, dimworld>& point, const BoundingBoxTree<EntitySet>& tree, @@ -77,7 +83,10 @@ void intersectingEntities(const Dune::FieldVector<ctype, dimworld>& point, } } -//! Compute all intersections between two bounding box trees +/*! + * \ingroup Common + * \brief Compute all intersections between two bounding box trees + */ template<class EntitySet0, class EntitySet1> inline std::vector<BoundingBoxTreeIntersection<EntitySet0, EntitySet1>> intersectingEntities(const BoundingBoxTree<EntitySet0>& treeA, @@ -99,7 +108,10 @@ intersectingEntities(const BoundingBoxTree<EntitySet0>& treeA, return intersections; } -//! Compute all intersections between two bounding box tree nodes recursively +/*! + * \ingroup Common + * \brief Compute all intersections between two all bounding box tree nodes recursively + */ template<class EntitySet0, class EntitySet1> void intersectingEntities(const BoundingBoxTree<EntitySet0>& treeA, const BoundingBoxTree<EntitySet1>& treeB, diff --git a/dumux/common/geometry/intersectspointgeometry.hh b/dumux/common/geometry/intersectspointgeometry.hh index 4b13fd0359..cf944fc2f1 100644 --- a/dumux/common/geometry/intersectspointgeometry.hh +++ b/dumux/common/geometry/intersectspointgeometry.hh @@ -16,6 +16,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Detect if a point intersects a geometry */ #ifndef DUMUX_INTERSECTS_POINT_GEOMETRY_HH @@ -29,7 +30,10 @@ namespace Dumux { -//! Find out whether a point is inside a three-dimensional geometry +/*! + * \ingroup Common + * \brief Find out whether a point is inside a three-dimensional geometry + */ template <class ctype, int dimworld, class Geometry, typename std::enable_if_t<(Geometry::mydimension == 3), int> = 0> bool intersectsPointGeometry(const Dune::FieldVector<ctype, dimworld>& point, const Geometry& g) { @@ -74,7 +78,10 @@ bool intersectsPointGeometry(const Dune::FieldVector<ctype, dimworld>& point, co << type << " in " << dimworld << "-dimensional world."); } -//! Find out whether a point is inside a two-dimensional geometry +/*! + * \ingroup Common + * \brief Find out whether a point is inside a two-dimensional geometry + */ template <class ctype, int dimworld, class Geometry, typename std::enable_if_t<(Geometry::mydimension == 2), int> = 0> bool intersectsPointGeometry(const Dune::FieldVector<ctype, dimworld>& point, const Geometry& g) { @@ -99,7 +106,10 @@ bool intersectsPointGeometry(const Dune::FieldVector<ctype, dimworld>& point, co << type << " in " << dimworld << "-dimensional world."); } -//! Find out whether a point is inside a one-dimensional geometry +/*! + * \ingroup Common + * \brief Find out whether a point is inside a one-dimensional geometry + */ template <class ctype, int dimworld, class Geometry, typename std::enable_if_t<(Geometry::mydimension == 1), int> = 0> bool intersectsPointGeometry(const Dune::FieldVector<ctype, dimworld>& point, const Geometry& g) { diff --git a/dumux/common/geometry/intersectspointsimplex.hh b/dumux/common/geometry/intersectspointsimplex.hh index 601f189057..603eb7bc61 100644 --- a/dumux/common/geometry/intersectspointsimplex.hh +++ b/dumux/common/geometry/intersectspointsimplex.hh @@ -16,6 +16,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Detect if a point intersects a simplex (including boundary) */ #ifndef DUMUX_INTERSECTS_POINT_SIMPLEX_HH @@ -27,7 +28,10 @@ namespace Dumux { -//! Find out whether a point is inside a tetrahedron (p0, p1, p2, p3) (dimworld is 3) +/*! + * \ingroup Common + * \brief Find out whether a point is inside a tetrahedron (p0, p1, p2, p3) (dimworld is 3) + */ template<class ctype, int dimworld, typename std::enable_if_t<(dimworld == 3), int> = 0> bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, const Dune::FieldVector<ctype, dimworld>& p0, @@ -66,7 +70,10 @@ bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, return true; } -//! Find out whether a point is inside a triangle (p0, p1, p2) (dimworld is 3) +/*! + * \ingroup Common + * \brief Find out whether a point is inside a triangle (p0, p1, p2, p3) (dimworld is 3) + */ template<class ctype, int dimworld, typename std::enable_if_t<(dimworld == 3), int> = 0> bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, const Dune::FieldVector<ctype, dimworld>& p0, @@ -112,7 +119,10 @@ bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, return true; } -//! Find out whether a point is inside a triangle (p0, p1, p2) (dimworld is 2) +/*! + * \ingroup Common + * \brief Find out whether a point is inside a triangle (p0, p1, p2, p3) (dimworld is 2) + */ template<class ctype, int dimworld, typename std::enable_if_t<(dimworld == 2), int> = 0> bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, const Dune::FieldVector<ctype, dimworld>& p0, @@ -136,7 +146,10 @@ bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, && (s + t) < 2*A*sign + eps); } -//! Find out whether a point is inside an interval (p0, p1) (dimworld is 3) +/*! + * \ingroup Common + * \brief Find out whether a point is inside a interval (p0, p1, p2, p3) (dimworld is 3) + */ template<class ctype, int dimworld, typename std::enable_if_t<(dimworld == 3), int> = 0> bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, const Dune::FieldVector<ctype, dimworld>& p0, @@ -173,7 +186,10 @@ bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, return (v1.dot(v2) > 0.0 && v2norm < v1norm*(1 + eps_)); } -//! Find out whether a point is inside an interval (p0, p1) (dimworld is 2) +/*! + * \ingroup Common + * \brief Find out whether a point is inside a interval (p0, p1, p2, p3) (dimworld is 2) + */ template<class ctype, int dimworld, typename std::enable_if_t<(dimworld == 2), int> = 0> bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, const Dune::FieldVector<ctype, dimworld>& p0, @@ -211,7 +227,10 @@ bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, return (v1.dot(v2) > 0.0 && v2norm < v1norm*(1 + eps_)); } -//! Find out whether a point is inside an interval (p0, p1) (dimworld is 1) +/*! + * \ingroup Common + * \brief Find out whether a point is inside a interval (p0, p1, p2, p3) (dimworld is 1) + */ template<class ctype, int dimworld, typename std::enable_if_t<(dimworld == 1), int> = 0> bool intersectsPointSimplex(const Dune::FieldVector<ctype, dimworld>& point, const Dune::FieldVector<ctype, dimworld>& p0, diff --git a/dumux/common/intersectionmapper.hh b/dumux/common/intersectionmapper.hh index d69b376e79..558b310117 100644 --- a/dumux/common/intersectionmapper.hh +++ b/dumux/common/intersectionmapper.hh @@ -15,6 +15,11 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ +/*! + * \file + * \ingroup Common + * \brief defines intersection mappers. + */ #ifndef DUMUX_INTERSECTIONITERATOR_HH #define DUMUX_INTERSECTIONITERATOR_HH @@ -26,15 +31,12 @@ #include <dune/common/version.hh> -/*! - * \file - * \brief defines intersection mappers. - */ namespace Dumux { /*! + * \ingroup Common * \brief defines a standard intersection mapper for mapping of global DOFs assigned * to faces. It only works for conforming grids, without hanging nodes. */ @@ -79,6 +81,7 @@ private: }; /*! + * \ingroup Common * \brief defines an intersection mapper for mapping of global DOFs assigned * to faces which also works for non-conforming grids and corner-point grids. */ @@ -177,6 +180,7 @@ private: }; /*! + * \ingroup Common * \brief defines an intersection mapper for mapping of global DOFs assigned * to faces which also works for adaptive grids. */ @@ -391,6 +395,6 @@ protected: std::unordered_map<int, int> standardLocalIdxMap_; }; -} +} // end namespace Dumux #endif diff --git a/dumux/common/intrange.hh b/dumux/common/intrange.hh index 82dbef661d..ef9ad36f16 100644 --- a/dumux/common/intrange.hh +++ b/dumux/common/intrange.hh @@ -18,15 +18,16 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief A class to create an iterable integer range */ #ifndef DUMUX_INTEGER_RANGE_HH #define DUMUX_INTEGER_RANGE_HH -namespace Dumux -{ +namespace Dumux { /*! + * \ingroup Common * \brief This class generates a IntRange [a,b) which can be used in a for loop, e.g. * for(auto i : IntRange(3) { ... i = 0, 1, 2 } or * for(auto i : IntRange(5, 8) { ... i = 5, 6, 7 } diff --git a/dumux/common/loggingparametertree.hh b/dumux/common/loggingparametertree.hh index 19d4b9c746..4a55800e4b 100644 --- a/dumux/common/loggingparametertree.hh +++ b/dumux/common/loggingparametertree.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief A parameter tree that logs which parameters have been used */ #ifndef DUMUX_LOGGING_PARAMETER_TREE_HH @@ -28,9 +29,7 @@ #include <string> #include <dune/common/parametertree.hh> - #include <dumux/common/exceptions.hh> -#include <dumux/common/parameters.hh> namespace Dumux { @@ -76,7 +75,6 @@ public: * Prints all entries with given prefix. * * \param stream Stream to print to - * \param prefix for key and substructure names */ void reportAll(std::ostream& stream = std::cout) const { @@ -415,7 +413,7 @@ public: /** \brief Find the keys that haven't been used yet * - * \retuns unusedParams Container storing unused keys + * \return unusedParams Container storing unused keys * \note Useful for debugging purposes */ std::vector<std::string> getUnusedKeys() const diff --git a/dumux/common/math.hh b/dumux/common/math.hh index c1224fd0c7..c6777d5f8d 100644 --- a/dumux/common/math.hh +++ b/dumux/common/math.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Define some often used mathematical functions */ #ifndef DUMUX_MATH_HH @@ -34,7 +35,7 @@ namespace Dumux { /*! - * \ingroup Math + * \ingroup Common * \brief Calculate the harmonic mean of two scalar values. * * \param x The first input value @@ -49,7 +50,7 @@ Scalar harmonicMean(Scalar x, Scalar y) } /*! - * \ingroup Math + * \ingroup Common * \brief Calculate the geometric mean of two scalar values. * * \param x The first input value @@ -65,7 +66,7 @@ Scalar geometricMean(Scalar x, Scalar y) } /*! - * \ingroup Math + * \ingroup Common * \brief Calculate the harmonic mean of a fixed-size matrix. * * This is done by calculating the harmonic mean for each entry @@ -94,7 +95,7 @@ void harmonicMeanMatrix(Dune::FieldMatrix<Scalar, m, n> &K, } /*! - * \ingroup Math + * \ingroup Common * \brief Invert a linear polynomial analytically * * The polynomial is defined as @@ -120,7 +121,7 @@ int invertLinearPolynomial(SolContainer &sol, } /*! - * \ingroup Math + * \ingroup Common * \brief Invert a quadratic polynomial analytically * * The polynomial is defined as @@ -193,7 +194,7 @@ void invertCubicPolynomialPostProcess_(SolContainer &sol, //! \endcond /*! - * \ingroup Math + * \ingroup Common * \brief Invert a cubic polynomial analytically * * The polynomial is defined as @@ -382,7 +383,7 @@ int invertCubicPolynomial(SolContainer *sol, } /*! - * \ingroup Math + * \ingroup Common * \brief Comparison of two position vectors * * Compares an current position vector with a reference vector, and returns true @@ -408,7 +409,7 @@ bool isLarger(const Dune::FieldVector<Scalar, dim> &pos, } /*! - * \ingroup Math + * \ingroup Common * \brief Comparison of two position vectors * * Compares an current position vector with a reference vector, and returns true @@ -434,7 +435,7 @@ bool isSmaller(const Dune::FieldVector<Scalar, dim> &pos, } /*! - * \ingroup Math + * \ingroup Common * \brief Comparison of three position vectors * * Compares an current position vector with two reference vector, and returns true @@ -464,7 +465,7 @@ bool isBetween(const Dune::FieldVector<Scalar, dim> &pos, /*! - * \ingroup Math + * \ingroup Common * \brief Evaluates the Antoine equation used to calculate the vapour * pressure of various liquids. * @@ -487,6 +488,7 @@ Scalar antoine(Scalar temperature, } /*! + * \ingroup Common * \brief Sign or signum function. * * Returns 1 for a positive argument. @@ -500,6 +502,7 @@ int sign(const ValueType& value) } /*! + * \ingroup Common * \brief Cross product of two vectors in three-dimensional Euclidean space * * \param vec1 The first vector @@ -515,6 +518,7 @@ Dune::FieldVector<Scalar, 3> crossProduct(const Dune::FieldVector<Scalar, 3> &ve } /*! + * \ingroup Common * \brief Cross product of two vectors in two-dimensional Euclidean space retuning scalar * * \param vec1 The first vector @@ -526,6 +530,7 @@ Scalar crossProduct(const Dune::FieldVector<Scalar, 2> &vec1, { return vec1[0]*vec2[1]-vec1[1]*vec2[0]; } /*! + * \ingroup Common * \brief Triple product of three vectors in three-dimensional Euclidean space retuning scalar * * \param vec1 The first vector @@ -539,6 +544,7 @@ Scalar tripleProduct(const Dune::FieldVector<Scalar, 3> &vec1, { return crossProduct<Scalar>(vec1, vec2)*vec3; } /*! + * \ingroup Common * \brief Transpose a FieldMatrix * * \param M The matrix to be transposed @@ -555,6 +561,7 @@ Dune::FieldMatrix<Scalar, n, m> getTransposed(const Dune::FieldMatrix<Scalar, m, } /*! + * \ingroup Common * \brief Transpose a DynamicMatrix * * \param M The matrix to be transposed @@ -575,6 +582,7 @@ Dune::DynamicMatrix<Scalar> getTransposed(const Dune::DynamicMatrix<Scalar>& M) } /*! + * \ingroup Common * \brief Multiply two dynamic matrices * * \param M1 The first dynamic matrix @@ -600,6 +608,7 @@ Dune::DynamicMatrix<Scalar> multiplyMatrices(const Dune::DynamicMatrix<Scalar> & } /*! + * \ingroup Common * \brief Trace of dynamic matrix * * \param M The dynamic matrix @@ -620,6 +629,7 @@ Scalar trace(const Dune::DynamicMatrix<Scalar>& M) } /*! + * \ingroup Common * \brief Evaluates the scalar product of a vector v2, projected by * a matrix M, with a vector v1. * @@ -644,6 +654,7 @@ vtmv(const Dune::DenseVector<V1>& v1, } /*! + * \ingroup Common * \brief Evaluates the scalar product of a vector v2, scaled by * a scalar m, with a vector v1. * diff --git a/dumux/common/optional.hh b/dumux/common/optional.hh index 0207724e75..9f2b8aae36 100644 --- a/dumux/common/optional.hh +++ b/dumux/common/optional.hh @@ -18,9 +18,10 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief A wrapper that can either contain an object of T or be empty. * This might be used as a workaround for non-default constructible classes. - * \note This was adopted from dune-functions. + * \note Replace this with std::optional when C++17 is available */ #ifndef DUMUX_COMMON_OPTIONAL_HH #define DUMUX_COMMON_OPTIONAL_HH @@ -31,11 +32,9 @@ namespace Dumux { -/** +/*! + * \ingroup Common * \brief A wrapper that can either contain an object of T or be empty - * - * \ingroup Utility - * * \tparam T Type of wrapped objects */ template<class T> diff --git a/dumux/common/parameters.hh b/dumux/common/parameters.hh index 97d6173c93..d81b5fd1b2 100644 --- a/dumux/common/parameters.hh +++ b/dumux/common/parameters.hh @@ -17,9 +17,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \ingroup Parameter * \file - * + * \ingroup Common * \brief The infrastructure to retrieve run-time parameters from * Dune::ParameterTrees with the defaul value taken from the * property system. @@ -42,8 +41,9 @@ #include <dumux/common/defaultusagemessage.hh> #include <dumux/common/loggingparametertree.hh> +#ifndef DOXYGEN // hide deprecated macros from doxygen /*! - * \ingroup Parameter + * \ingroup Common * \brief Retrieve a runtime parameter which _does_ have a default value taken from * the Dumux property system. * @@ -59,7 +59,7 @@ // ::Dumux::template getParam_UsingDeprecatedMacro<ParamType>(std::string(#ParamName), GET_PROP_VALUE(TypeTag, ParamName)) /*! - * \ingroup Parameter + * \ingroup Common * \brief Retrieve a runtime parameter which _does_ have a default value taken from * the Dumux property system. * @@ -79,7 +79,7 @@ /*! - * \ingroup Parameter + * \ingroup Common * \brief Retrieve a runtime parameter which _does not_ have a default value taken from * the Dumux property system. * @@ -94,7 +94,7 @@ ::Dumux::template getParam_UsingDeprecatedMacro<ParamType>(std::string(#ParamName)) /*! - * \ingroup Parameter + * \ingroup Common * \brief Retrieve a runtime parameter which _does not_ have a default value taken from * the Dumux property system. * @@ -123,7 +123,7 @@ ::Dumux::template getParam_UsingDeprecatedMacro<ParamType>(std::string(ParamName)) /*! - * \ingroup Parameter + * \ingroup Common * \brief Retrieve a runtime parameter which _does not_ have a default value taken from * the Dumux property system. * @@ -141,7 +141,7 @@ ::Dumux::template getParam_UsingDeprecatedMacro<ParamType>(std::string(#GroupName) + "." + std::string(#ParamName)) /*! - * \ingroup Parameter + * \ingroup Common * \brief Retrieve a runtime parameter which _does not_ have a default value taken from * the Dumux property system. * @@ -171,10 +171,15 @@ #define GET_RUNTIME_PARAM_FROM_GROUP_CSTRING(TypeTag, ParamType, GroupName, ParamName) \ ::Dumux::template getParam_UsingDeprecatedMacro<ParamType>(std::string(GroupName) + "." + std::string(#ParamName)) -namespace Dumux -{ +#endif // DOXYGEN -//! The runtime parameter managing class +namespace Dumux { + +/*! + * \ingroup Common + * \brief Parameter class managing runtime input parameters + * \todo Doc me! + */ class Parameters { using DefaultParams = std::function<void (Dune::ParameterTree&)>; @@ -399,8 +404,11 @@ void setParam(Dune::ParameterTree& params, params[group + "." + key] = value; } -// a free function to get a parameter from the parameter tree singleton -// e.g. auto endTime = getParam<double>("TimeManager.TEnd"); +/*! + * \ingroup Common + * \brief A free function to get a parameter from the parameter tree singleton + * \note \code auto endTime = getParam<double>("TimeManager.TEnd"); \endcode + */ template<typename T, typename... Args> T getParam(Args&&... args) { @@ -408,8 +416,11 @@ T getParam(Args&&... args) return p.template get<T>(std::forward<Args>(args)... ); } -// a free function to get a parameter from the parameter tree singleton -// e.g. auto endTime = getParam<double>("TimeManager.TEnd"); +/*! + * \ingroup Common + * \brief A free function to get a parameter from the parameter tree singleton with a model group + * \note \code auto endTime = getParamFromGroup<double>("FreeFlow", "TimeManager.TEnd"); \endcode + */ template<typename T, typename... Args> T getParamFromGroup(Args&&... args) { @@ -417,14 +428,20 @@ T getParamFromGroup(Args&&... args) return p.template getFromGroup<T>(std::forward<Args>(args)... ); } -// a free function to check whether a key exists +/*! + * \ingroup Common + * \brief Check whether a key exists in the parameter tree + */ bool haveParam(const std::string& param) { const auto& p = Parameters::getTree(); return p.hasKey(param); } -// a free function to check whether a key exists +/*! + * \ingroup Common + * \brief Check whether a key exists in the parameter tree with a model group prefix + */ template<typename... Args> bool haveParamInGroup(const std::string& paramGroup, const std::string& param) { @@ -435,6 +452,7 @@ bool haveParamInGroup(const std::string& paramGroup, const std::string& param) return p.hasKey(paramGroup + "." + param); } +#ifndef DOXYGEN template<typename T, typename... Args> DUNE_DEPRECATED_MSG("Using preprocessor MACROS for getting parameters is deprecated on next. Please use the new getParam method.") T getParam_UsingDeprecatedMacro(Args&&... args) @@ -442,6 +460,7 @@ T getParam_UsingDeprecatedMacro(Args&&... args) const auto& p = Parameters::getTree(); return p.template get<T>(std::forward<Args>(args)... ); } +#endif } // namespace Dumux diff --git a/dumux/common/pointsource.hh b/dumux/common/pointsource.hh index b2ed400a45..4fdbfcbc4e 100644 --- a/dumux/common/pointsource.hh +++ b/dumux/common/pointsource.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief A point source class, * i.e. sources located at a single point in space */ diff --git a/dumux/common/properties.hh b/dumux/common/properties.hh index 95dbf79f5a..ad0a554530 100644 --- a/dumux/common/properties.hh +++ b/dumux/common/properties.hh @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \ingroup Properties + * \ingroup Common * \file * * \brief _Declares_ all properties used in Dumux. @@ -31,10 +31,9 @@ #include <dumux/common/properties/propertysystem.hh> #endif -namespace Dumux -{ -namespace Properties -{ +namespace Dumux { +namespace Properties { + /////////////////////////////////////// // Basic properties of numeric models: /////////////////////////////////////// diff --git a/dumux/common/properties/grid.hh b/dumux/common/properties/grid.hh index eae670a9f1..2c0c581bc5 100644 --- a/dumux/common/properties/grid.hh +++ b/dumux/common/properties/grid.hh @@ -17,23 +17,20 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \ingroup Properties * \file - * + * \ingroup Properties * \brief Defines a type tags and some fundamental grid-related properties */ #ifndef DUMUX_GRID_PROPERTIES_HH #define DUMUX_GRID_PROPERTIES_HH -#include <dumux/common/properties.hh> - +#include <dune/common/version.hh> #include <dune/grid/common/mcmgmapper.hh> +#include <dumux/common/properties.hh> #include <dumux/common/pointsource.hh> #include <dumux/io/gridcreator.hh> -#include <dune/common/version.hh> - namespace Dumux { namespace Properties diff --git a/dumux/common/properties/model.hh b/dumux/common/properties/model.hh index cb787a87d4..94ab4fb277 100644 --- a/dumux/common/properties/model.hh +++ b/dumux/common/properties/model.hh @@ -17,11 +17,9 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! - * \ingroup Properties * \file - * - * \brief Defines a type tags and some fundamental properties for - * all models + * \ingroup Properties + * \brief Defines a type tags and some fundamental properties for all models */ #ifndef DUMUX_MODEL_PROPERTIES_HH #define DUMUX_MODEL_PROPERTIES_HH @@ -35,10 +33,9 @@ // Forward declaration namespace Dune { class ParameterTree; } -namespace Dumux -{ -namespace Properties -{ +namespace Dumux { +namespace Properties { + //! Type tag for numeric models. NEW_TYPE_TAG(ModelProperties); diff --git a/dumux/common/properties/propertysystem.hh b/dumux/common/properties/propertysystem.hh index 85b1725ded..e5adf3cddc 100644 --- a/dumux/common/properties/propertysystem.hh +++ b/dumux/common/properties/propertysystem.hh @@ -19,8 +19,8 @@ /*! * \file * \brief Provides the magic behind the DuMuX property system. - * * \ingroup Properties + * * Properties allow to associate arbitrary data types to * identifiers. A property is always defined on a pair (TypeTag, * PropertyTag) where TypeTag is the identifier for the object the diff --git a/dumux/common/quad.hh b/dumux/common/quad.hh index 7ff9842975..f0a50fc500 100644 --- a/dumux/common/quad.hh +++ b/dumux/common/quad.hh @@ -18,7 +18,7 @@ *****************************************************************************/ /*! * \file - * + * \ingroup Common * \brief This file provides the infrastructure to use quad-precision * floating point values in the numerical models. */ diff --git a/dumux/common/reorderingdofmapper.hh b/dumux/common/reorderingdofmapper.hh index e15fc11391..56ed39360e 100644 --- a/dumux/common/reorderingdofmapper.hh +++ b/dumux/common/reorderingdofmapper.hh @@ -19,6 +19,7 @@ /*! * \file + * \ingroup Common * \brief An SCSG element mapper that sorts the indices in order to optimize the matrix sparsity pattern * \note The reordering needs the SCOTCH library */ @@ -33,6 +34,11 @@ namespace Dumux { +/*! + * \ingroup Common + * \brief An SCSG element mapper that sorts the indices in order to optimize the matrix sparsity pattern + * \note The reordering needs the SCOTCH library + */ template<class GridView, int codimension> class ReorderingDofMapper : public Dune::Mapper<typename GridView::Grid, ReorderingDofMapper<GridView, codimension>, typename GridView::IndexSet::IndexType> diff --git a/dumux/common/spline.hh b/dumux/common/spline.hh index de3758578f..edcb038eef 100644 --- a/dumux/common/spline.hh +++ b/dumux/common/spline.hh @@ -17,6 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * *****************************************************************************/ /*! + * \ingroup Common * \file * \brief Provides 3rd order polynomial splines. */ @@ -30,7 +31,7 @@ namespace Dumux { /*! - * \ingroup Spline + * \ingroup Common * \brief A 3rd order polynomial spline. * This class implements a spline \f$s(x)\f$ for which, given \f$n\f$ sampling diff --git a/dumux/common/splinecommon_.hh b/dumux/common/splinecommon_.hh index 194d1a420f..fd9a8ff038 100644 --- a/dumux/common/splinecommon_.hh +++ b/dumux/common/splinecommon_.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief The common code for all 3rd order polynomial splines. */ #ifndef DUMUX_SPLINE_COMMON__HH @@ -33,9 +34,10 @@ #include "math.hh" #include "valgrind.hh" -namespace Dumux -{ +namespace Dumux { + /*! + * \ingroup Common * \brief The common code for all 3rd order polynomial splines. */ template<class ScalarT, class ImplementationT> diff --git a/dumux/common/staggeredfvproblem.hh b/dumux/common/staggeredfvproblem.hh index a311c1e5dc..89d1e90fcd 100644 --- a/dumux/common/staggeredfvproblem.hh +++ b/dumux/common/staggeredfvproblem.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Base class for all problems */ #ifndef DUMUX_STAGGERD_FV_PROBLEM_HH @@ -30,6 +31,7 @@ namespace Dumux { /*! * \ingroup Problems + * \ingroup Common * \brief Base class for all finite-volume problems * * \note All quantities (regarding the units) are specified assuming a @@ -67,8 +69,7 @@ class StaggeredFVProblem : public FVProblem<TypeTag> public: /*! * \brief Constructor - * - * \param gridView The simulation's idea about physical space + * \param fvGridGeometry The finite volume grid geometry */ StaggeredFVProblem(std::shared_ptr<const FVGridGeometry> fvGridGeometry) : ParentType(fvGridGeometry) diff --git a/dumux/common/start.hh b/dumux/common/start.hh index 62dd1fd384..f8583ec925 100644 --- a/dumux/common/start.hh +++ b/dumux/common/start.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Provides a few default main functions for convenience. */ #ifndef DUMUX_START_HH @@ -45,7 +46,7 @@ NEW_PROP_TAG(TimeManager); } /*! - * \ingroup Start + * \ingroup Common * * \brief Provides a main function which reads in parameters from the * command line and a parameter file. diff --git a/dumux/common/tabulated2dfunction.hh b/dumux/common/tabulated2dfunction.hh index 81bcbcb383..b1dc7b7f56 100644 --- a/dumux/common/tabulated2dfunction.hh +++ b/dumux/common/tabulated2dfunction.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Implements tabulation for a two-dimensional function. */ #ifndef DUMUX_TABULATED_2D_FUNCTION_HH @@ -26,9 +27,10 @@ #include <vector> #include <cassert> -namespace Dumux -{ +namespace Dumux { + /*! + * \ingroup Common * \brief Implements tabulation for a two-dimensional function. * * This class can be used to tabulate a two dimensional function diff --git a/dumux/common/timeloop.hh b/dumux/common/timeloop.hh index 8fc7f64fd4..d9e25ffe10 100644 --- a/dumux/common/timeloop.hh +++ b/dumux/common/timeloop.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Manages the handling of time dependent problems */ #ifndef DUMUX_TIME_LOOP_HH @@ -35,7 +36,7 @@ namespace Dumux { /*! - * \ingroup SimControl + * \ingroup Common * \brief Manages the handling of time dependent problems. * * This class facilitates the time management of the simulation. @@ -54,14 +55,6 @@ namespace Dumux * the (simulation) time it starts, its length and a consecutive * index starting at 0. */ - -//! The abstract base class -//! only contains the methods needed during the assembly -//////////////////////////////////////////////////////////////////// -//! TODO this might not be necessary if t and dt are actually passed into -//! a time stepping method that forwards it everywhere nedded -//! Then the time loop always stays contained in the main file -//////////////////////////////////////////////////////////////////// template<class Scalar> class TimeLoopBase { @@ -196,7 +189,7 @@ public: /*! * \brief Set the maximum time step size to a given value. * - * \param dt The new value for the maximum time step size \f$\mathrm{[s]}\f$ + * \param maxDt The new value for the maximum time step size \f$\mathrm{[s]}\f$ */ void setMaxTimeStepSize(Scalar maxDt) { maxTimeStepSize_ = maxDt; } @@ -402,9 +395,9 @@ public: } /*! - * \brief Set the maximum time step size to a given value. - * - * \param dt The new value for the maximum time step size \f$\mathrm{[s]}\f$ + * \brief Set a periodic check point + * \note You can query if we are at a time check point with isCheckPoint() + * \param interval Set a periodic checkout every [interal] seconds */ void setPeriodicCheckPoint(Scalar interval) { diff --git a/dumux/common/timemanager.hh b/dumux/common/timemanager.hh index 5dbbd2905a..df85af76f9 100644 --- a/dumux/common/timemanager.hh +++ b/dumux/common/timemanager.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Manages the handling of time dependent problems */ #ifndef DUMUX_TIME_MANAGER_HH @@ -34,16 +35,11 @@ #include "properties.hh" #include "parameters.hh" -namespace Dumux -{ -namespace Properties -{ -NEW_PROP_TAG(Scalar); -NEW_PROP_TAG(Problem); -} +namespace Dumux { /*! - * \ingroup SimControl + * \ingroup Common + * \deprecated * \brief Manages the handling of time dependent problems. * * This class facilitates the time management of the simulation. diff --git a/dumux/common/timesteppingscheme.hh b/dumux/common/timesteppingscheme.hh index a093729736..e6e033e4e3 100644 --- a/dumux/common/timesteppingscheme.hh +++ b/dumux/common/timesteppingscheme.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Manages the handling of time dependent problems */ #ifndef DUMUX_TIME_STEPPING_SCHEME_HH @@ -29,6 +30,7 @@ namespace Dumux { /*! + * \ingroup Common * \brief The abstract time stepping parameter interface */ template <class Scalar> @@ -59,6 +61,7 @@ public: }; /*! + * \ingroup Common * \brief The time stepping scheme class */ template <class Scalar> diff --git a/dumux/common/valgrind.hh b/dumux/common/valgrind.hh index b055d2ee09..e53098aab4 100644 --- a/dumux/common/valgrind.hh +++ b/dumux/common/valgrind.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Some templates to wrap the valgrind macros */ #ifndef DUMUX_VALGRIND_HH @@ -42,7 +43,7 @@ void voidBlubb() { } namespace Valgrind { /*! - * \ingroup Valgrind + * \ingroup Common * \brief Returns whether the program is running under Valgrind or not. */ inline bool Running() diff --git a/dumux/common/variablelengthspline_.hh b/dumux/common/variablelengthspline_.hh index 21ba8d52a1..c02ea486a4 100644 --- a/dumux/common/variablelengthspline_.hh +++ b/dumux/common/variablelengthspline_.hh @@ -18,6 +18,7 @@ *****************************************************************************/ /*! * \file + * \ingroup Common * \brief Implements a spline with a variable number of sampling points */ #ifndef DUMUX_VARIABLE_LENGTH_SPLINE_HH @@ -30,9 +31,10 @@ #include "splinecommon_.hh" -namespace Dumux -{ +namespace Dumux { + /*! + * \ingroup Common * \brief The common code for all 3rd order polynomial splines with * where the number of sampling points only known at run-time. */ @@ -424,6 +426,7 @@ protected: Vector yPos_; Vector m_; }; -} + +} // end namespace Dumux #endif -- GitLab