diff --git a/src/amdis/ContextGeometry.hpp b/src/amdis/ContextGeometry.hpp index acc8c0b4bf46ae6cc4a1df6b599f3e9ae2184845..66f83f5dd050948cac8a38d4a3091ebdd14c767c 100644 --- a/src/amdis/ContextGeometry.hpp +++ b/src/amdis/ContextGeometry.hpp @@ -36,6 +36,8 @@ namespace AMDiS * Since an intersection has a geometry (and localGeometry) different from the * geometry (and localGeometry) of the entity it belongs to, these objects * are provided as well. + * + * \tparam LC LocalContext, either element or intersection **/ template struct ContextGeometry @@ -63,22 +65,25 @@ namespace AMDiS {} public: - + /// Return the bound element (entity of codim 0) Element const& element() const { return *element_; } + /// Return the LocalContext, either the element or an intersection. LocalContext const& localContext() const { return *localContext_; } + /// Return the geometry of the \ref Element Geometry const& geometry() const { return *geometry_; } + /// Return the geometry of the element, or geometryInInside of the intersection LocalGeometry const& localGeometry() const { return localGeometry_impl(IsEntity{}); @@ -87,7 +92,7 @@ namespace AMDiS public: - /// Coordinate p given in localGeometry, transformed to coordinate in geometry. + /// Coordinate p given in localGeometry, transformed to coordinate in geometry of the LocalContext. template decltype(auto) local(Coordinate const& p) const { diff --git a/src/amdis/gridfunctions/DOFVectorView.hpp b/src/amdis/gridfunctions/DOFVectorView.hpp index ff4cf0f5c31fa134ecc70ca77c71d3d068f1d08e..55f0bf74ecd8cc6679aaab03d16bdc3c83a1bbc4 100644 --- a/src/amdis/gridfunctions/DOFVectorView.hpp +++ b/src/amdis/gridfunctions/DOFVectorView.hpp @@ -35,7 +35,7 @@ namespace AMDiS * **Example:** *  * auto v = makeDOFVectorView(prob.solutionVector(),0); - * v.interpolate([](auto const& x) { return x[0]; }); + * v.interpolate_noalias([](auto const& x) { return x[0]; }); *  **/ template diff --git a/src/amdis/gridfunctions/DiscreteFunction.hpp b/src/amdis/gridfunctions/DiscreteFunction.hpp index 47d9d07eef9265e458a3193faa709504fe7fe848..609a1af50a983425db12edd6f5f726e180cfb515 100644 --- a/src/amdis/gridfunctions/DiscreteFunction.hpp +++ b/src/amdis/gridfunctions/DiscreteFunction.hpp @@ -60,7 +60,7 @@ namespace AMDiS /// A LocalFunction representing the derivative of the DOFVector on a bound element class GradientLocalFunction; - /// A LocalFunction representign the value the DOFVector on a bound element + /// A LocalFunction representing the value the DOFVector on a bound element class LocalFunction; public: diff --git a/src/amdis/linearalgebra/DOFMatrixBase.hpp b/src/amdis/linearalgebra/DOFMatrixBase.hpp index 906deface3c0a599e3539332d8f7ddd2c58f7ea8..116032d57dee58a52ecf1256936a16065919b15c 100644 --- a/src/amdis/linearalgebra/DOFMatrixBase.hpp +++ b/src/amdis/linearalgebra/DOFMatrixBase.hpp @@ -11,6 +11,15 @@ namespace AMDiS { + /** + * Basis implementation of DOFMatrix, i.e. a sparse matrix storing all the + * assembled Operators indexed with DOF indices. The matrix data is associated + * to a row and column global basis. + * + * \tparam RB Basis of the matrix rows + * \tparam CB Basis of matrix columns + * \tparam Backend A linear-algebra backend for the matrix storage + **/ template class DOFMatrixBase { @@ -99,7 +108,24 @@ namespace AMDiS backend_.insert(flatMultiIndex(row), flatMultiIndex(col), value); } - /// Associate a local operator with this DOFMatrix + /// \brief Associate a local operator with this DOFMatrix + /** + * Stores an operator in a list that gets assembled during a call to \ref assemble(). + * The operator may be assigned to a specific context, i.e. either an element + * operator, an intersection operator, or a boundary operator. + * The \p row and \p col tree paths specify the sub-basis for test and trial + * functions the operator is applied to. + * + * \tparam ContextTag One of \ref tag::element_operator, \ref tag::intersection_operator + * or \ref tag::boundary_operator indicating where to assemble this operator. + * \tparam PreOperator An pre-operator that can be bound to a gridView, or a valid + * GridOperator. + * \tparam row A tree-path for the RowBasis + * \tparam col A tree-path for the ColBasis + * + * [[expects: row is valid tree-path in RowBasis]] + * [[expects: col is valid tree-path in ColBasis]] + **/ template void addOperator(ContextTag contextTag, Operator const& preOp, diff --git a/src/amdis/linearalgebra/DOFVectorBase.hpp b/src/amdis/linearalgebra/DOFVectorBase.hpp index de0ed9fc06031af098f8f99076e6a1d51c2afe1a..f4752b162330c7a59ab522948f5d4f61e6350ebb 100644 --- a/src/amdis/linearalgebra/DOFVectorBase.hpp +++ b/src/amdis/linearalgebra/DOFVectorBase.hpp @@ -16,7 +16,15 @@ namespace AMDiS { - /// The basic container that stores a base vector and a corresponding basis + /// \brief The basic container that stores a base vector and a corresponding basis + /** + * Basis implementation of DOFVector, i.e. a vector storing all the + * assembled Operators indexed with DOF indices. The vector data is associated + * to a global basis. + * + * \tparam B Basis of the vector + * \tparam Backend A linear algebra backend implementing the storage and operations. + **/ template class DOFVectorBase : public DOFVectorInterface diff --git a/src/amdis/linearalgebra/mtl/DOFMatrix.hpp b/src/amdis/linearalgebra/mtl/DOFMatrix.hpp index 3142e940ef1859902f0e788ef74d58654a0e9eaa..0e62a990a6d0dd3fcf5b83339bcbd0bbf3bc3551 100644 --- a/src/amdis/linearalgebra/mtl/DOFMatrix.hpp +++ b/src/amdis/linearalgebra/mtl/DOFMatrix.hpp @@ -16,8 +16,7 @@ namespace AMDiS { - /// \brief The basic container that stores a base matrix and a corresponding - /// row/column feSpace. + /// \brief The basic container that stores a base matrix template class MtlMatrix { diff --git a/src/amdis/linearalgebra/mtl/DOFVector.hpp b/src/amdis/linearalgebra/mtl/DOFVector.hpp index 49057cdaa3f12fcccefd93e1c98072302a7e30c0..36d3edb6ee7fbea4ab694b5b21d681912ebccf9d 100644 --- a/src/amdis/linearalgebra/mtl/DOFVector.hpp +++ b/src/amdis/linearalgebra/mtl/DOFVector.hpp @@ -9,7 +9,7 @@ namespace AMDiS { - /// The basic container that stores a base vector and a corresponding basis + /// The basic container that stores a base vector data template class MtlVector { diff --git a/src/amdis/operations/Composer.hpp b/src/amdis/operations/Composer.hpp index 891be0af1ed670899ab89a75c9ff2c6b1ca449e8..2e1338f0fa02ede1bdd03adf34b5f9679f6bca2b 100644 --- a/src/amdis/operations/Composer.hpp +++ b/src/amdis/operations/Composer.hpp @@ -13,6 +13,19 @@ namespace AMDiS { namespace Operation { + /// \brief Composition of Functors. + /** + * \ingroup operations + * Implement the composition c:=f(g1,g2,...,gN), where f is an N-ary functor + * gI are functors of the same arity. The composition is defined as + *  + * c(a1,a2,...,aM) := f(g1(a1,a2,..,aM), g2(a1,a2,...,aM),...,gN(a1,a2,...,aM)) + * ` + * + * **Requirements:** + * - sizeof...(Gs) == N, with N = arity(F) + * - arity(Gs[0]) == arity(Gs[i]) for i = 1,...,N-1 + **/ template struct Composer { @@ -48,7 +61,7 @@ namespace AMDiS }; #endif - /// Generator function for \ref composer + /// Generator function for \ref Composer template constexpr auto compose(F&& f, Gs&&... gs) {