From 3d07f80bf68c50e659a06a81011aa8b155d5caf0 Mon Sep 17 00:00:00 2001 From: Melanie Darcis <mdarcis@gmx.de> Date: Fri, 8 Oct 2010 13:41:03 +0000 Subject: [PATCH] doc git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@4407 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- dumux/boxmodels/2p2c/2p2cfluxvariables.hh | 9 ++++ dumux/boxmodels/2p2c/2p2cproblem.hh | 2 +- dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh | 9 ++++ dumux/boxmodels/2p2cni/2p2cniindices.hh | 3 ++ dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh | 14 +++++- .../2p2cni/2p2cninewtoncontroller.hh | 27 ++++++++--- dumux/boxmodels/2p2cni/2p2cniproblem.hh | 8 +++- .../boxmodels/2p2cni/2p2cnivolumevariables.hh | 45 ++++++++++++------- 8 files changed, 91 insertions(+), 26 deletions(-) diff --git a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh index a4e0bbe76d..41c0537643 100644 --- a/dumux/boxmodels/2p2c/2p2cfluxvariables.hh +++ b/dumux/boxmodels/2p2c/2p2cfluxvariables.hh @@ -79,6 +79,15 @@ class TwoPTwoCFluxVariables }; public: + /* + * \brief The constructor + * + * \param problem The problem + * \param element The finite element + * \param elemGeom The finite-volume geometry in the box scheme + * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param elemDat The volume variables of the current element + */ TwoPTwoCFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, diff --git a/dumux/boxmodels/2p2c/2p2cproblem.hh b/dumux/boxmodels/2p2c/2p2cproblem.hh index 91f0bb5dcc..8e2ffc3e57 100644 --- a/dumux/boxmodels/2p2c/2p2cproblem.hh +++ b/dumux/boxmodels/2p2c/2p2cproblem.hh @@ -56,7 +56,7 @@ public: /*! * \brief The constructor * - * \param timeManager The time mananager + * \param timeManager The time manager * \param gridView The grid view */ TwoPTwoCProblem(TimeManager &timeManager, const GridView &gridView) diff --git a/dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh b/dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh index acb68fe619..5c53465e36 100644 --- a/dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh +++ b/dumux/boxmodels/2p2cni/2p2cnifluxvariables.hh @@ -70,6 +70,15 @@ class TwoPTwoCNIFluxVariables : public TwoPTwoCFluxVariables<TypeTag> typedef Dune::FieldVector<CoordScalar, dimWorld> Vector; public: + /* + * \brief The constructor + * + * \param problem The problem + * \param element The finite element + * \param elemGeom The finite-volume geometry in the box scheme + * \param faceIdx The local index of the SCV (sub-control-volume) face + * \param elemDat The volume variables of the current element + */ TwoPTwoCNIFluxVariables(const Problem &problem, const Element &element, const FVElementGeometry &elemGeom, diff --git a/dumux/boxmodels/2p2cni/2p2cniindices.hh b/dumux/boxmodels/2p2cni/2p2cniindices.hh index 838420d7ef..a5934f1fec 100644 --- a/dumux/boxmodels/2p2cni/2p2cniindices.hh +++ b/dumux/boxmodels/2p2cni/2p2cniindices.hh @@ -35,6 +35,9 @@ namespace Dumux /*! * \brief Enumerations for the non-isothermal 2-phase 2-component model + * + * \tparam formulation The formulation, either pwSn or pnSw. + * \tparam PVOffset The first index in a primary variable vector. */ template <class TypeTag, int formulation, int PVOffset> class TwoPTwoCNIIndices : public TwoPTwoCIndices<TypeTag, formulation, PVOffset> diff --git a/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh b/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh index de8e8b2c24..6c89ac3fb5 100644 --- a/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh +++ b/dumux/boxmodels/2p2cni/2p2cnilocalresidual.hh @@ -81,11 +81,15 @@ class TwoPTwoCNILocalResidual : public TwoPTwoCLocalResidual<TypeTag> public: /*! - * \brief Evaluate the amount all conservation quantites + * \brief Evaluate the amount all conservation quantities * (e.g. phase mass) within a sub-control volume. * * The result should be averaged over the volume (e.g. phase mass * inside a sub control volume divided by the volume) + * + * \param result The storage of the conservation quantitiy (mass or energy) within the sub-control volume + * \param scvIdx The SCV (sub-control-volume) index + * \param usePrevSol Evaluate function with solution of current or previous time step */ void computeStorage(PrimaryVariables &result, int scvIdx, bool usePrevSol) const { @@ -120,6 +124,9 @@ public: * over a face of a subcontrol volume and writes the result in * the flux vector. * + * \param flux The advective flux over the SCV (sub-control-volume) face for each component + * \param faceIdx The index of the SCV face + * * This method is called by compute flux (base class) */ void computeAdvectiveFlux(PrimaryVariables &flux, @@ -152,6 +159,11 @@ public: /*! * \brief Adds the diffusive heat flux to the flux vector over * the face of a sub-control volume. + * + * \param flux The diffusive flux over the SCV (sub-control-volume) face for each conservation quantity (mass, energy) + * \param faceIdx The index of the SCV face + * + * This method is called by compute flux (base class) */ void computeDiffusiveFlux(PrimaryVariables &flux, const FluxVariables &fluxData) const diff --git a/dumux/boxmodels/2p2cni/2p2cninewtoncontroller.hh b/dumux/boxmodels/2p2cni/2p2cninewtoncontroller.hh index 0e0a176909..d8851687ef 100644 --- a/dumux/boxmodels/2p2cni/2p2cninewtoncontroller.hh +++ b/dumux/boxmodels/2p2cni/2p2cninewtoncontroller.hh @@ -56,8 +56,14 @@ public: this->setMaxSteps(18); }; - //! Suggest a new time stepsize based either on the number of newton - //! iterations required or on the variable switch + /*! + * \brief Suggest a new time step size based either on the number of newton + * iterations required or on the variable switch + * + * \param u The current global solution vector + * \param uOld The previous global solution vector + * + */ void newtonEndStep(SolutionFunction &u, SolutionFunction &uOld) { // call the method of the base class @@ -65,15 +71,26 @@ public: ParentType::newtonEndStep(u, uOld); } - //! Suggest a new time stepsize based either on the number of newton - //! iterations required or on the variable switch + /*! + * \brief Suggest a new time stepsize based on the old time step size. + * + * The default behaviour is to suggest the old time step size + * scaled by the ratio between the target iterations and the + * iterations required to actually solve the last time step. + * + * \param oldTimeStep The old time step size + */ Scalar suggestTimeStepSize(Scalar oldTimeStep) const { // use function of the newtoncontroller return ParentType::suggestTimeStepSize(oldTimeStep); } - //! Returns true if another iteration should be done. + /*! + * \brief Returns true if another iteration should be done. + * + *\param u The global solution + */ bool newtonProceed(SolutionFunction &u) { return ParentType::newtonProceed(u); diff --git a/dumux/boxmodels/2p2cni/2p2cniproblem.hh b/dumux/boxmodels/2p2cni/2p2cniproblem.hh index 1e58872b29..f7b841bfe4 100644 --- a/dumux/boxmodels/2p2cni/2p2cniproblem.hh +++ b/dumux/boxmodels/2p2cni/2p2cniproblem.hh @@ -30,8 +30,6 @@ namespace Dumux * \ingroup TwoPTwoCNIProblems * \brief Base class for all problems which use the non-isothermal * two-phase, two-component box model. - * - * \todo Please doc me more! */ template<class TypeTag> class TwoPTwoCNIProblem : public TwoPTwoCProblem<TypeTag> @@ -43,6 +41,12 @@ class TwoPTwoCNIProblem : public TwoPTwoCProblem<TypeTag> typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; public: + /*! + * \brief The constructor + * + * \param timeManager The time manager + * \param gridView The grid view + */ TwoPTwoCNIProblem(TimeManager &timeManager, const GridView &gridView) : ParentType(timeManager, gridView) { diff --git a/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh b/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh index 93018c2fbc..07ed08533b 100644 --- a/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh +++ b/dumux/boxmodels/2p2cni/2p2cnivolumevariables.hh @@ -68,6 +68,13 @@ class TwoPTwoCNIVolumeVariables : public TwoPTwoCVolumeVariables<TypeTag> public: /*! * \brief Update all quantities for a given control volume. + * + * \param priVars The primary variables + * \param problem The problem + * \param element The element + * \param elemGeom Evaluate function with solution of current or previous time step + * \param scvIdx The local index of the SCV (sub-control volume) + * \param isOldSol Evaluate function with solution of current or previous time step */ void update(const PrimaryVariables &sol, const Problem &problem, @@ -107,26 +114,11 @@ public: Valgrind::CheckDefined(enthalpy_); }; - // this method gets called by the parent class - void updateTemperature_(const PrimaryVariables &sol, - const Element &element, - const FVElementGeometry &elemGeom, - int scvIdx, - const Problem &problem) - { - // retrieve temperature from solution vector - this->temperature_ = sol[temperatureIdx]; - - heatCapacity_ = - problem.spatialParameters().heatCapacity(element, elemGeom, scvIdx); - - Valgrind::CheckDefined(this->temperature_); - Valgrind::CheckDefined(heatCapacity_); - } - /*! * \brief Returns the total internal energy of a phase in the * sub-control volume. + * + * \param phaseIdx The phase index */ Scalar internalEnergy(int phaseIdx) const { return internalEnergy_[phaseIdx]; }; @@ -134,6 +126,8 @@ public: /*! * \brief Returns the total enthalpy of a phase in the sub-control * volume. + * + * \param phaseIdx The phase index */ Scalar enthalpy(int phaseIdx) const { return enthalpy_[phaseIdx]; }; @@ -146,6 +140,23 @@ public: { return heatCapacity_; }; protected: + // this method gets called by the parent class + void updateTemperature_(const PrimaryVariables &sol, + const Element &element, + const FVElementGeometry &elemGeom, + int scvIdx, + const Problem &problem) + { + // retrieve temperature from solution vector + this->temperature_ = sol[temperatureIdx]; + + heatCapacity_ = + problem.spatialParameters().heatCapacity(element, elemGeom, scvIdx); + + Valgrind::CheckDefined(this->temperature_); + Valgrind::CheckDefined(heatCapacity_); + } + Scalar internalEnergy_[numPhases]; Scalar enthalpy_[numPhases]; Scalar heatCapacity_; -- GitLab