From 94e529ac38e0e8bba9c3845fec1a458ce958f243 Mon Sep 17 00:00:00 2001 From: Nicolas Marsic <nicolas.marsic@gmail.com> Date: Tue, 20 Nov 2012 15:04:20 +0000 Subject: [PATCH] Doc... --- FunctionSpace/Basis.h | 2 +- FunctionSpace/BasisScalar.h | 16 ++++++++- FunctionSpace/BasisVector.h | 14 ++++++++ FunctionSpace/FunctionSpace.h | 56 ++++++++++++++++++----------- FunctionSpace/FunctionSpaceScalar.h | 11 +++++- FunctionSpace/FunctionSpaceVector.h | 20 +++++++++-- FunctionSpace/LagrangeBasis.h | 8 ++--- FunctionSpace/LagrangeGenerator.h | 2 +- FunctionSpace/Polynomial.h | 37 +++++++++++++++++-- FunctionSpace/TriLagrangeBasis.h | 4 +-- 10 files changed, 134 insertions(+), 36 deletions(-) diff --git a/FunctionSpace/Basis.h b/FunctionSpace/Basis.h index 76b0a5f48e..73070a1927 100644 --- a/FunctionSpace/Basis.h +++ b/FunctionSpace/Basis.h @@ -63,7 +63,7 @@ class Basis{ int getType(void) const; //! @return Returns the @em dimension - //! (2D or 3D) of the Basis + //! (1D, 2D or 3D) of the Basis int getDim(void) const; //! @return Returns the number of @em Vertex diff --git a/FunctionSpace/BasisScalar.h b/FunctionSpace/BasisScalar.h index 9ecac8c316..9749704314 100644 --- a/FunctionSpace/BasisScalar.h +++ b/FunctionSpace/BasisScalar.h @@ -29,16 +29,30 @@ class BasisScalar: public Basis{ //! Deletes this BasisScalar //! virtual ~BasisScalar(void); - + + //! @param i A natural number + //! @return Returns the @c i%th @em Vertex Based + //! Basis Function const Polynomial& getNodeFunction(unsigned int i) const; + //! @param i A natural number + //! @param closure A natural number + //! @return Returns the @c i%th @em Edge Based + //! Basis Function, with the @c closure%th Closure const Polynomial& getEdgeFunction(unsigned int closure, unsigned int i) const; + //! @param i A natural number + //! @param closure A natural number + //! @return Returns the @c i%th @em Face Based + //! Basis Function, with the @c closure%th Closure const Polynomial& getFaceFunction(unsigned int closure, unsigned int i) const; + //! @param i A natural number + //! @return Returns the @c i%th @em Cell Based + //! Basis Function const Polynomial& getCellFunction(unsigned int i) const; diff --git a/FunctionSpace/BasisVector.h b/FunctionSpace/BasisVector.h index 69c46ec311..d36b0e30e2 100644 --- a/FunctionSpace/BasisVector.h +++ b/FunctionSpace/BasisVector.h @@ -30,15 +30,29 @@ class BasisVector: public Basis{ //! virtual ~BasisVector(void); + //! @param i A natural number + //! @return Returns the @c i%th @em Vertex Based + //! Basis Function const std::vector<Polynomial>& getNodeFunction(unsigned int i) const; + //! @param i A natural number + //! @param closure A natural number + //! @return Returns the @c i%th @em Edge Based + //! Basis Function, with the @c closure%th Closure const std::vector<Polynomial>& getEdgeFunction(unsigned int closure, unsigned int i) const; + //! @param i A natural number + //! @param closure A natural number + //! @return Returns the @c i%th @em Face Based + //! Basis Function, with the @c closure%th Closure const std::vector<Polynomial>& getFaceFunction(unsigned int closure, unsigned int i) const; + //! @param i A natural number + //! @return Returns the @c i%th @em Cell Based + //! Basis Function const std::vector<Polynomial>& getCellFunction(unsigned int i) const; diff --git a/FunctionSpace/FunctionSpace.h b/FunctionSpace/FunctionSpace.h index 712c4430e3..74ce8e90f6 100644 --- a/FunctionSpace/FunctionSpace.h +++ b/FunctionSpace/FunctionSpace.h @@ -33,6 +33,9 @@ Those MElement%s @em must belong to the @em same Mesh. + A FunctionSpace is also responsible for the generation of all + the Dof%s and GroupOfDof%s related to its geometrical @em Support. + @note A FunctionSpace is an @em interface, so it can't be instantiated. @@ -80,14 +83,14 @@ class FunctionSpace{ std::vector<Dof> getKeys(const MEdge& edge) const; std::vector<Dof> getKeys(const MFace& face) const; - unsigned int dofNumber(void) const; - unsigned int groupNumber(void) const; - const std::vector<const Dof*> getAllDofs(void) const; const std::vector<GroupOfDof*>& getAllGroups(void) const; const GroupOfDof& getGoDFromElement(const MElement& element) const; + unsigned int dofNumber(void) const; + unsigned int groupNumber(void) const; + std::string toString(void) const; protected: @@ -146,9 +149,9 @@ class FunctionSpace{ ** @fn FunctionSpace::isScalar - @return Return @c true if this - FunstionSpace is scalar, and - @c flase otherwise + @return Returns: + @li @c true, if this FunstionSpace is scalar + @li @c flase, otherwise @see Basis::isScalar() ** @@ -196,27 +199,38 @@ class FunctionSpace{ @return Returns all the Dof%s associated to the given MFace ** - @fn FunctionSpace::toString - @return Returns the FunctionSpace string + @fn FunctionSpace::getAllDofs + @return Returns all the @em Dof%s associated to every Element%s + of this FunctionSpace @em support ** - @internal - @fn FunctionSpace::build - @param goe The GroupOfElement defining the support - of this FunctionSpace - @param basisType The Type of the Basis to use to build - this FunctionSpace - @param order The order of this FunctionSpace + @fn FunctionSpace::getAllGroups + @return Returns all the @em GroupOfDof%s associated to every Element%s + of this FunctionSpace @em support + ** - Initializes a FunctionSpace with the given parameters - @endinternal + @fn FunctionSpace::getGoDFromElement + @param element An Element of the FunctionSpace Support + @return Returns the @em GroupOfDof%s associated to + the given @em Element + @note + If the given Element is not in the FunctionSpace Support, + an Exception is thrown + ** + + @fn FunctionSpace::dofNumber + @return Returns the number of Dof%s + given by FunctionSpace::getAllDofs() ** - @internal - @fn FunctionSpace::closure + @fn FunctionSpace::groupNumber + @return Returns the number of GroupOfDof%s + given by FunctionSpace::getAllGroups() + ** - Compute closure for Basis Functions - @endinternal + @fn FunctionSpace::toString + @return Returns the FunctionSpace string + ** */ diff --git a/FunctionSpace/FunctionSpaceScalar.h b/FunctionSpace/FunctionSpaceScalar.h index c51c27458b..b4323f5083 100644 --- a/FunctionSpace/FunctionSpaceScalar.h +++ b/FunctionSpace/FunctionSpaceScalar.h @@ -13,7 +13,9 @@ This is the @em common @em interface of all @em Scalar FunctionSpaces.@n - A FunctionSpaceScalar can be @em interpolated. + A FunctionSpaceScalar can be @em interpolated, + and can return a @em Local Basis associated + to an Element of the Support. @note A ScalarFunctionSpace is an @em interface, so it @@ -99,6 +101,13 @@ class FunctionSpaceScalar : public FunctionSpace{ @param element A MElement @return Returns the basis functions associated to the given element (with correct @em closure) + ** + + @fn FunctionSpaceScalar::getGradLocalFunctions + @param element A MElement + @return Returns the @em gradient + of the basis functions associated + to the given element (with correct @em closure) */ ////////////////////// diff --git a/FunctionSpace/FunctionSpaceVector.h b/FunctionSpace/FunctionSpaceVector.h index 7227f306b2..b84cfa0957 100644 --- a/FunctionSpace/FunctionSpaceVector.h +++ b/FunctionSpace/FunctionSpaceVector.h @@ -14,7 +14,9 @@ This is the @em common @em interface of all @em Vectorial FunctionSpaces.@n - A FunctionSpaceVector can be @em interpolated. + A FunctionSpaceVector can be @em interpolated, + and can return a @em Local Basis associated + to an Element of the Support. @note A VectorFunctionSpace is an @em interface, so it @@ -86,7 +88,7 @@ class FunctionSpaceVector : public FunctionSpace{ @fn FunctionSpaceVector::interpolateInRefSpace @param element The MElement to interpolate on @param coef The coefficients of the interpolation - @param xyz The coordinate + @param uvw The coordinate (of point @em inside the given @c element) of the interpolation in the @em Reference Space @@ -106,6 +108,20 @@ class FunctionSpaceVector : public FunctionSpace{ @param element A MElement @return Returns the basis functions associated to the given element (with correct @em closure) + ** + + @fn FunctionSpaceVector::getCurlLocalFunctions + @param element A MElement + @return Returns the @em curl + of the basis functions associated + to the given element (with correct @em closure) + ** + + @fn FunctionSpaceVector::getDivLocalFunctions + @param element A MElement + @return Returns the @em divergence + of the basis functions associated + to the given element (with correct @em closure) */ ////////////////////// diff --git a/FunctionSpace/LagrangeBasis.h b/FunctionSpace/LagrangeBasis.h index 7daa7f49fe..0d990a576f 100644 --- a/FunctionSpace/LagrangeBasis.h +++ b/FunctionSpace/LagrangeBasis.h @@ -12,7 +12,7 @@ /** @interface LagrangeBasis - @brief Interoface for Lagrange Basis + @brief Interface for Lagrange Basis This is an interface for Lagrange Basis.@n @@ -48,7 +48,7 @@ class LagrangeBasis: public BasisScalar{ //! to the given Element //! @param fSpace The (scalar) Function Space //! of the given Coefficients - //! @return Projects the given Coefficients in this LagrangeBasis@n + //! @return Projects the given Coefficients in this LagrangeBasis std::vector<double> project(const MElement& element, const std::vector<double>& coef, const FunctionSpaceScalar& fSpace); @@ -58,9 +58,7 @@ class LagrangeBasis: public BasisScalar{ //! to the given Element //! @param fSpace The (vectorial) Function Space //! of the given Coefficients - //! @return Projects the given Coefficients in this LagrangeBasis@n - //! @note Each Coefficients will be projected into a vector - //! with the same dimesion as the vectorial Polynomials + //! @return Projects the given Coefficients in this LagrangeBasis std::vector<fullVector<double> > project(const MElement& element, const std::vector<double>& coef, diff --git a/FunctionSpace/LagrangeGenerator.h b/FunctionSpace/LagrangeGenerator.h index dea9a27fef..233d3d76da 100644 --- a/FunctionSpace/LagrangeGenerator.h +++ b/FunctionSpace/LagrangeGenerator.h @@ -35,7 +35,7 @@ class LagrangeGenerator{ @fn LagrangeGenerator::generate @param elementType The type of the element, on which the requested LagrangeBasis will be created - @param order The order or the requested LagrangeBasis + @param lagrangeOrder The order or the requested LagrangeBasis This method will @em instanciate the requested LagrangeBasis diff --git a/FunctionSpace/Polynomial.h b/FunctionSpace/Polynomial.h index 1e30fabe2e..322f665fcd 100644 --- a/FunctionSpace/Polynomial.h +++ b/FunctionSpace/Polynomial.h @@ -124,11 +124,13 @@ class Polynomial{ parameters @note Note that Monomials are special case of Polynomial%s + ** @fn Polynomial::Polynomial(const Polynomial&) @param other A Polynomial @return Returns a new Polynomial, which is the @em copy of the given one + ** @fn Polynomial::Polynomial(void) @return Returns a new Polynomial, which is @@ -140,10 +142,12 @@ class Polynomial{ the @em zero @em Polynomial.@n Indeed, the @em zero @em Polynomial has one monomial, @em @c 0. + ** @fn Polynomial::~Polynomial @return Deletes this Polynomial - + ** + @fn Polynomial::derivative @param dim The dimention to use for the derivation @@ -154,10 +158,24 @@ class Polynomial{ @li @c 0 is for the @c x coordinate @li @c 1 is for the @c y coordinate @li @c 2 is for the @c z coordinate - + ** + @fn Polynomial::gradient @return Returns a Vector with the gradient of this Polynomial + ** + + @fn Polynomial::curl + @param p A vector of Polynomial%s + @return Returns the @em curl of the given + vector of Polynomial%s + ** + + @fn Polynomial::divergence + @param p A vector of Polynomial%s + @return Returns the @em divergence of the given + vector of Polynomial%s + ** @fn double Polynomial::operator()(const double, const double, const double) @param x A value @@ -165,6 +183,7 @@ class Polynomial{ @param z A value @return Returns the @em evaluation of this Polynomial at (@c x, @c y, @c z) + ** @fn double Polynomial::at(const double, const double, const double) const @param x A value @@ -172,6 +191,7 @@ class Polynomial{ @param z A value @return Returns the @em evaluation of this Polynomial at (@c x, @c y, @c z) + ** @fn fullVector<double> Polynomial::at(const std::vector<Polynomial>&, const double, const double, const double) @param P A vector of Polynomial%s @@ -180,26 +200,31 @@ class Polynomial{ @param z A value @return Returns a fullVector with the @em evaluation of the given vector of Polynomial%s at (@c x, @c y, @c z) + ** @fn Polynomial Polynomial::operator+(const Polynomial&) const @param other An other Polynomial @return Returns a @em new Polynomial, which is the @em sum of this Polynomial and the given one + ** @fn Polynomial Polynomial::operator-(const Polynomial&) const @param other An other Polynomial @return Returns a @em new Polynomial, which is the @em difference of this Polynomial and the given one + ** @fn Polynomial Polynomial::operator*(const Polynomial&) const @param other An other Polynomial @return Returns a @em new Polynomial, which is the @em product of this Polynomial and the given one + ** @fn Polynomial Polynomial::operator*(const double) const @param alpha A value @return Returns a @em new Polynomial, which is this Polynomial @em multiplied by @c alpha + ** @fn Polynomial::add @param other An other Polynomial @@ -208,6 +233,7 @@ class Polynomial{ @note The result of this operation is stored in this Polynomial + ** @fn Polynomial::sub @param other An other Polynomial @@ -216,6 +242,7 @@ class Polynomial{ @note The result of this operation is stored in this Polynomial + ** @fn void Polynomial::mul(const Polynomial&) @param other An other Polynomial @@ -224,6 +251,7 @@ class Polynomial{ @note The result of this operation is stored in this Polynomial + ** @fn void Polynomial::mul(const double) @param alpha A value @@ -232,10 +260,12 @@ class Polynomial{ @note The result of this operation is stored in this Polynomial + ** @fn Polynomial::power @param n A @em natural number @return Takes this Polynomial to the power @c n + ** @fn Polynomial Polynomial::compose(const Polynomial&) const @param other An other Polynomial, @@ -244,6 +274,7 @@ class Polynomial{ Let this Polynomial be @c P(x, @c y, @c z).@n This method returns a @em new Polynomial, representing @c P(Q(x, @c y, @c z), @c y, @c z) + ** @fn Polynomial Polynomial::compose(const Polynomial&, const Polynomial&) const @param otherA An other Polynomial, @@ -254,11 +285,13 @@ class Polynomial{ Let this Polynomial be @c P(x, @c y, @c z).@n This method returns a @em new Polynomial, representing @c P(Q(x, @c y, @c z), @c R(x, @c y, @c z), @c z) + ** @fn void Polynomial::operator=(const Polynomial&) @param other A Polynomial @return Sets this Polynomial to a @em copy of the given one + ** @fn Polynomial::toString @return Returns a string representing this Polynomial diff --git a/FunctionSpace/TriLagrangeBasis.h b/FunctionSpace/TriLagrangeBasis.h index 4ce5848bc8..c77554184c 100644 --- a/FunctionSpace/TriLagrangeBasis.h +++ b/FunctionSpace/TriLagrangeBasis.h @@ -19,9 +19,9 @@ class TriLagrangeBasis: public LagrangeBasis{ public: - //! @param odrer A natural number + //! @param order A natural number //! - //! Returns a new for TriLagrangeBasis + //! Returns a new TriLagrangeBasis //! of the given Order TriLagrangeBasis(int order); -- GitLab