diff --git a/src/amdis/DirichletBC.hpp b/src/amdis/DirichletBC.hpp index 34a281e1c992a40192133583403bac3484a1fa91..14267f6c5c1288113d060aa1b700862e7eb394e0 100644 --- a/src/amdis/DirichletBC.hpp +++ b/src/amdis/DirichletBC.hpp @@ -82,13 +82,13 @@ namespace AMDiS using Dune::Functions::interpolate; Dune::Hybrid::ifElse(std::is_same<RangeType_t<typename RowBasis::LocalView::Tree>, Range>{}, [&](auto id) { - auto rhsWrapper = wrapper(rhs.getVector()); + auto rhsWrapper = wrapper(rhs.vector()); interpolate(id(rowBasis), rhsWrapper, values_, dirichletNodes_); }); Dune::Hybrid::ifElse(std::is_same<RangeType_t<typename ColBasis::LocalView::Tree>, Range>{}, [&](auto id) { - auto solutionWrapper = wrapper(solution.getVector()); + auto solutionWrapper = wrapper(solution.vector()); interpolate(id(colBasis), solutionWrapper, values_, dirichletNodes_); }); diff --git a/src/amdis/FileWriter.hpp b/src/amdis/FileWriter.hpp index 50a40c1d7d71969f84d9fe48f62b1a4b336e2a49..7e0686d3fef0c5a45713fc661cf81416406ab04d 100644 --- a/src/amdis/FileWriter.hpp +++ b/src/amdis/FileWriter.hpp @@ -43,14 +43,13 @@ namespace AMDiS constexpr std::size_t VTKFieldSize = Size<Range>; - template <class Traits, class TreePath> + template <class GlobalBasis, class RangeType, class TreePath> class FileWriter : public FileWriterInterface { private: // typedefs and static constants - using GlobalBasis = typename Traits::GlobalBasis; using GridView = typename GlobalBasis::GridView; - using Vector = DOFVectorConstView<Traits,TreePath>; + using Vector = DOFVectorConstView<GlobalBasis,RangeType,TreePath>; using Range = typename Vector::Range; /// Dimension of the mesh @@ -123,12 +122,12 @@ namespace AMDiS }; - template <class Traits, class TreePath> - std::shared_ptr<FileWriter<Traits,TreePath>> makeFileWriterPtr( - std::string baseName, - DOFVectorConstView<Traits,TreePath> const& dofvector) + template <class GlobalBasis, class Range, class TreePath> + std::shared_ptr<FileWriter<GlobalBasis,Range,TreePath>> + makeFileWriterPtr(std::string baseName, + DOFVectorConstView<GlobalBasis,Range,TreePath> const& dofvector) { - return std::make_shared<FileWriter<Traits,TreePath>>(baseName, dofvector); + return std::make_shared<FileWriter<GlobalBasis,Range,TreePath>>(baseName, dofvector); } } // end namespace AMDiS diff --git a/src/amdis/ProblemStat.hpp b/src/amdis/ProblemStat.hpp index 9e36f2ca8ddaa34689db11e5d47400ac691a8971..874df4660b60473df17c5dd50c76568c953e9a7c 100644 --- a/src/amdis/ProblemStat.hpp +++ b/src/amdis/ProblemStat.hpp @@ -68,7 +68,7 @@ namespace AMDiS static constexpr int dow = Grid::dimensionworld; using SystemMatrix = DOFMatrix<GlobalBasis, GlobalBasis, double>; - using SystemVector = DOFVector<Traits, double>; + using SystemVector = DOFVector<GlobalBasis, double>; using LinearSolverType = LinearSolverInterface<typename SystemMatrix::BaseMatrix, typename SystemVector::BaseVector>; diff --git a/src/amdis/ProblemStat.inc.hpp b/src/amdis/ProblemStat.inc.hpp index 92a7b2155a095f204eea5f93351a73925bec6fc7..934882d5c6e50cc5b50f46fc98f74bbfad3a1c55 100644 --- a/src/amdis/ProblemStat.inc.hpp +++ b/src/amdis/ProblemStat.inc.hpp @@ -281,7 +281,7 @@ solve(AdaptInfo& adaptInfo, bool createMatrixData, bool storeMatrixData) solution_->compress(); - linearSolver_->solve(systemMatrix_->getMatrix(), solution_->getVector(), rhs_->getVector(), + linearSolver_->solve(systemMatrix_->getMatrix(), solution_->vector(), rhs_->vector(), solverInfo); if (solverInfo.getInfo() > 0) { diff --git a/src/amdis/gridfunctions/DOFVectorView.hpp b/src/amdis/gridfunctions/DOFVectorView.hpp index 0cfccfc24e91911cdb18f4ec96b69cda4d50ca34..86b52e7e7771030973eeae3b3a83932e9672cd47 100644 --- a/src/amdis/gridfunctions/DOFVectorView.hpp +++ b/src/amdis/gridfunctions/DOFVectorView.hpp @@ -20,13 +20,12 @@ namespace AMDiS * @{ **/ - template <class Traits, class TreePathType> + template <class GlobalBasisType, class RangeType, class TreePathType> class DOFVectorConstView { public: - using GlobalBasis = typename Traits::GlobalBasis; + using GlobalBasis = GlobalBasisType; using TreePath = TreePathType; - using Vector = DOFVector<Traits>; using Tree = typename GlobalBasis::LocalView::Tree; using SubTree = typename Dune::TypeTree::ChildForTreePath<Tree, TreePath>; @@ -37,6 +36,8 @@ namespace AMDiS using Domain = typename EntitySet::GlobalCoordinate; using Range = RangeType_t<SubTree>; + static_assert(std::is_arithmetic<RangeType>::value, ""); + // Don't know how to determine Range with non-trivial RangeType using RawSignature = typename Dune::Functions::SignatureTraits<Range(Domain)>::RawSignature; using DerivativeTraits = Dune::Functions::DefaultDerivativeTraits<RawSignature>; @@ -201,11 +202,11 @@ namespace AMDiS public: /// Constructor. Stores a pointer to the dofVector and a copy of the treePath. - DOFVectorConstView(DOFVector<Traits> const& dofVector, TreePath const& treePath) + DOFVectorConstView(DOFVector<GlobalBasis,RangeType> const& dofVector, TreePath const& treePath) : dofVector_(&dofVector) , treePath_(treePath) - , entitySet_(dofVector.getFeSpace().gridView()) - , nodeToRangeEntry_(Dune::Functions::makeDefaultNodeToRangeMap(dofVector.getFeSpace(), treePath)) + , entitySet_(dofVector.basis().gridView()) + , nodeToRangeEntry_(Dune::Functions::makeDefaultNodeToRangeMap(dofVector.basis(), treePath)) {} /// Evaluate the view on this DOFVector in global coordinates @@ -230,7 +231,7 @@ namespace AMDiS /// Return global basis GlobalBasis const& basis() const { - return dofVector_->getFeSpace(); + return dofVector_->basis(); } /// Return treePath associated with this view @@ -240,13 +241,13 @@ namespace AMDiS } /// Return const coefficient vector - DOFVector<Traits> const& coefficients() const + DOFVector<GlobalBasis,RangeType> const& coefficients() const { return *dofVector_; } protected: - DOFVector<Traits> const* dofVector_; + DOFVector<GlobalBasis,RangeType> const* dofVector_; TreePath const treePath_; EntitySet entitySet_; @@ -255,18 +256,18 @@ namespace AMDiS // A mutable version of DOFVectorView - template <class Traits, class TreePathType> + template <class GlobalBasisType, class RangeType, class TreePathType> class DOFVectorMutableView - : public DOFVectorConstView<Traits, TreePathType> + : public DOFVectorConstView<GlobalBasisType, RangeType, TreePathType> { - using Super = DOFVectorConstView<Traits, TreePathType>; + using Super = DOFVectorConstView<GlobalBasisType, RangeType, TreePathType>; - using GlobalBasis = typename Traits::GlobalBasis; + using GlobalBasis = GlobalBasisType; using TreePath = TreePathType; public: /// Constructor. Stores a pointer to the mutable `dofvector`. - DOFVectorMutableView(DOFVector<Traits>& dofVector, TreePath const& treePath) + DOFVectorMutableView(DOFVector<GlobalBasis,RangeType>& dofVector, TreePath const& treePath) : Super(dofVector, treePath) , mutableDofVector_(&dofVector) {} @@ -281,11 +282,11 @@ namespace AMDiS auto&& gridFct = makeGridFunction(std::forward<Expr>(expr), basis.gridView()); - DOFVector<Traits> tmp(basis, "tmp"); + DOFVector<GlobalBasis,RangeType> tmp(*mutableDofVector_); Dune::Functions::interpolate(basis, treePath, tmp, std::forward<decltype(gridFct)>(gridFct)); // move data from temporary vector into stored DOFVector - mutableDofVector_->getVector() = std::move(tmp.getVector()); + mutableDofVector_->vector() = std::move(tmp.vector()); return *this; } @@ -297,13 +298,13 @@ namespace AMDiS /// Return the mutable DOFVector - DOFVector<Traits>& coefficients() { return *mutableDofVector_; } + DOFVector<GlobalBasis,RangeType>& coefficients() { return *mutableDofVector_; } /// Return the const DOFVector using Super::coefficients; protected: - DOFVector<Traits>* mutableDofVector_; + DOFVector<GlobalBasis,RangeType>* mutableDofVector_; }; /** @} **/ @@ -311,34 +312,34 @@ namespace AMDiS #ifndef DOXYGEN // A Generator for a const \ref DOFVectorView. - template <class Traits, class TreePath> - auto makeDOFVectorView(DOFVector<Traits> const& dofVector, TreePath const& treePath) + template <class GlobalBasis, class RangeType, class TreePath> + auto makeDOFVectorView(DOFVector<GlobalBasis, RangeType> const& dofVector, TreePath const& treePath) { - return DOFVectorConstView<Traits, TreePath>{dofVector, treePath}; + return DOFVectorConstView<GlobalBasis, RangeType, TreePath>{dofVector, treePath}; } // A Generator for a mutable \ref DOFVectorView. - template <class Traits, class TreePath> - auto makeDOFVectorView(DOFVector<Traits>& dofVector, TreePath const& treePath) + template <class GlobalBasis, class RangeType, class TreePath> + auto makeDOFVectorView(DOFVector<GlobalBasis, RangeType>& dofVector, TreePath const& treePath) { - return DOFVectorMutableView<Traits, TreePath>{dofVector, treePath}; + return DOFVectorMutableView<GlobalBasis, RangeType, TreePath>{dofVector, treePath}; } // A Generator for a const \ref DOFVectorView. - template <class Traits> - auto makeDOFVectorView(DOFVector<Traits> const& dofVector) + template <class GlobalBasis, class RangeType> + auto makeDOFVectorView(DOFVector<GlobalBasis, RangeType> const& dofVector) { auto treePath = Dune::TypeTree::hybridTreePath(); - return DOFVectorConstView<Traits, decltype(treePath)>{dofVector, treePath}; + return DOFVectorConstView<GlobalBasis, RangeType, decltype(treePath)>{dofVector, treePath}; } // A Generator for a mutable \ref DOFVectorView. - template <class Traits> - auto makeDOFVectorView(DOFVector<Traits>& dofVector) + template <class GlobalBasis, class RangeType> + auto makeDOFVectorView(DOFVector<GlobalBasis, RangeType>& dofVector) { auto treePath = Dune::TypeTree::hybridTreePath(); - return DOFVectorMutableView<Traits, decltype(treePath)>{dofVector, treePath}; + return DOFVectorMutableView<GlobalBasis, RangeType, decltype(treePath)>{dofVector, treePath}; } #endif diff --git a/src/amdis/gridfunctions/DOFVectorView.inc.hpp b/src/amdis/gridfunctions/DOFVectorView.inc.hpp index a97dc1a47b1922b0db421f80b19468858a4f2076..139a1ab4c98883747d4882eee5bac08975a663ea 100644 --- a/src/amdis/gridfunctions/DOFVectorView.inc.hpp +++ b/src/amdis/gridfunctions/DOFVectorView.inc.hpp @@ -4,8 +4,8 @@ namespace AMDiS { -template <class Traits, class TreePath> -typename DOFVectorConstView<Traits, TreePath>::Range DOFVectorConstView<Traits, TreePath>:: +template <class GB, class RT, class TP> +typename DOFVectorConstView<GB,RT,TP>::Range DOFVectorConstView<GB,RT,TP>:: LocalFunction::operator()(LocalDomain const& x) const { assert( bound_ ); @@ -48,8 +48,8 @@ LocalFunction::operator()(LocalDomain const& x) const } -template <class Traits, class TreePath> -typename DOFVectorConstView<Traits, TreePath>::DerivativeRange DOFVectorConstView<Traits, TreePath>:: +template <class GB, class RT, class TP> +typename DOFVectorConstView<GB,RT,TP>::DerivativeRange DOFVectorConstView<GB,RT,TP>:: GradientLocalFunction::operator()(LocalDomain const& x) const { assert( bound_ ); diff --git a/src/amdis/linear_algebra/istl/DOFVector.hpp b/src/amdis/linear_algebra/istl/DOFVector.hpp index 77fa9d66c4cae779646ccf1a69a5638b19abbff4..63a5aebb576426830f9354ed8b3456044f5c93b3 100644 --- a/src/amdis/linear_algebra/istl/DOFVector.hpp +++ b/src/amdis/linear_algebra/istl/DOFVector.hpp @@ -50,13 +50,13 @@ namespace AMDiS } /// Return the data-vector \ref vector - BaseVector const& getVector() const + BaseVector const& vector() const { return *vector; } /// Return the data-vector \ref vector - BaseVector& getVector() + BaseVector& vector() { return *vector; } @@ -107,7 +107,7 @@ namespace AMDiS /// Calls the copy assignment operator of the BaseVector \ref vector void copy(Self const& that) { - *vector = that.getVector(); + *vector = that.vector(); } private: diff --git a/src/amdis/linear_algebra/mtl/BlockMTLVector.hpp b/src/amdis/linear_algebra/mtl/BlockMTLVector.hpp index 05d93d238c0798722d1682b17689493d009c1671..8bcc2466e34fd78c0db172f78d24a262b4bcdb89 100644 --- a/src/amdis/linear_algebra/mtl/BlockMTLVector.hpp +++ b/src/amdis/linear_algebra/mtl/BlockMTLVector.hpp @@ -91,7 +91,7 @@ namespace AMDiS explicit BlockVectorWrapper(BlockVector& blockVector, bool copyBack = !std::is_const<BlockVector>::value) : blockVector(blockVector) - , vector(num_rows(blockVector)) + , vector_(num_rows(blockVector)) , copyBack(copyBack) { assignTo(); @@ -107,8 +107,8 @@ namespace AMDiS BlockVector const& getBlockVector() const { return blockVector; } /// Return a reference to the contiguose-vector - Vector& getVector() { return vector; } - Vector const& getVector() const { return vector; } + Vector& vector() { return vector_; } + Vector const& vector() const { return vector_; } private: /// copy from block-vector to vector @@ -119,7 +119,7 @@ namespace AMDiS std::size_t finish = start + num_rows(blockVector[r]); mtl::irange range(start, finish); - vector[range] = blockVector[r]; + vector_[range] = blockVector[r]; start = finish; } } @@ -137,14 +137,14 @@ namespace AMDiS std::size_t finish = start + num_rows(blockVector[r]); mtl::irange range(start, finish); - blockVector[r] = vector[range]; + blockVector[r] = vector_[range]; start = finish; } } private: BlockVector& blockVector; - Vector vector; + Vector vector_; /// Copy data back to block-vector on destruction bool copyBack; @@ -159,16 +159,16 @@ namespace AMDiS "This specialization is for contiguose vectors only."); public: explicit BlockVectorWrapper(BlockVector& vector, bool = false) - : vector(vector) + : vector_(vector) {} /// Return a reference to the vector - BlockVector const& getBlockVector() const { return vector; } - BlockVector& getVector() { return vector; } - BlockVector const& getVector() const { return vector; } + BlockVector const& getBlockVector() const { return vector_; } + BlockVector& vector() { return vector_; } + BlockVector const& vector() const { return vector_; } private: - BlockVector& vector; + BlockVector& vector_; }; template <class BlockVector, class Vector> diff --git a/src/amdis/linear_algebra/mtl/DOFVector.hpp b/src/amdis/linear_algebra/mtl/DOFVector.hpp index 6cfb293aac137b7c371a73642be289c0f64e54cb..789d92701cef9c820d0e4918f5b5c9c762169303 100644 --- a/src/amdis/linear_algebra/mtl/DOFVector.hpp +++ b/src/amdis/linear_algebra/mtl/DOFVector.hpp @@ -16,117 +16,114 @@ namespace AMDiS { - /// The basic container that stores a base vector and a corresponding feSpace - template <class Traits, class ValueType = double> + /// The basic container that stores a base vector and a corresponding basis + template <class GlobalBasis, class RangeType = double> class DOFVector { using Self = DOFVector; public: - /// The type of the \ref feSpace - using GlobalBasis = typename Traits::GlobalBasis; + /// The type of the \ref basis + using Basis = GlobalBasis; /// The type of the base vector - using BaseVector = MTLDenseVector<ValueType>; + using BaseVector = MTLDenseVector<RangeType>; /// The index/size - type using size_type = typename GlobalBasis::size_type; /// The type of the elements of the DOFVector - using value_type = ValueType; - - /// The underlying field-type (typically the same as \ref value_type) - using field_type = typename BaseVector::value_type; + using range_type = RangeType; /// Constructor. Constructs new BaseVector. - DOFVector(GlobalBasis const& feSpace, std::string name) - : feSpace(feSpace) - , name(name) - , vector(ClonablePtr<BaseVector>::make()) + DOFVector(GlobalBasis const& basis, std::string name) + : basis_(&basis) + , name_(name) + , vector_(ClonablePtr<BaseVector>::make()) { compress(); } /// Constructor. Takes reference to existing BaseVector - DOFVector(GlobalBasis const& feSpace, std::string name, + DOFVector(GlobalBasis const& basis, std::string name, BaseVector& vector_ref) - : feSpace(feSpace) - , name(name) - , vector(vector_ref) + : basis_(&basis) + , name_(name) + , vector_(vector_ref) {} - /// Return the basis \ref feSpace of the vector - GlobalBasis const& getFeSpace() const + /// Return the basis \ref basis of the vector + Basis const& basis() const { - return feSpace; + return *basis_; } /// Return the data-vector \ref vector - BaseVector const& getVector() const + BaseVector const& vector() const { - return *vector; + return *vector_; } /// Return the data-vector \ref vector - BaseVector& getVector() + BaseVector& vector() { - return *vector; + return *vector_; } - /// Return the size of the \ref feSpace - size_type getSize() const + /// Return the size of the \ref basis + size_type size() const { - return feSpace.dimension(); + return basis_->dimension(); } /// Return the \ref name of this vector - std::string getName() const + std::string name() const { - return name; + return name_; } - /// Resize the \ref vector to the size of the \ref feSpace. + /// Resize the \ref vector to the size of the \ref basis. void compress() { - if (num_rows(*vector) != getSize()) { - resize(getSize()); - *vector = ValueType(0); + if (num_rows(*vector_) != size()) { + resize(size()); + *vector_ = range_type(0); } } template <class SizeInfo> void resize(SizeInfo s) { - vector->change_dim(size_type(s)); + vector_->change_dim(size_type(s)); } /// Access the entry \p i of the \ref vector with read-access. template <class Index> - value_type const& operator[](Index idx) const + range_type const& operator[](Index idx) const { auto const i = flatMultiIndex(idx); - test_exit_dbg( i < num_rows(*vector) , - "Index ", i, " out of range [0,", num_rows(*vector), ")" ); - return (*vector)[i]; + test_exit_dbg( i < num_rows(*vector_) , + "Index ", i, " out of range [0,", num_rows(*vector_), ")" ); + return (*vector_)[i]; } /// Access the entry \p i of the \ref vector with write-access. template <class Index> - value_type& operator[](Index idx) + range_type& operator[](Index idx) { auto const i = flatMultiIndex(idx); - test_exit_dbg( i < num_rows(*vector) , - "Index ", i, " out of range [0,", num_rows(*vector), ")" ); - return (*vector)[i]; + test_exit_dbg( i < num_rows(*vector_) , + "Index ", i, " out of range [0,", num_rows(*vector_), ")" ); + return (*vector_)[i]; } - /// \brief interpolate a function \p f to the basis \ref feSpace and store the + /// \brief interpolate a function \p f to the basis \ref basis and store the /// coefficients in \ref vector. template <class F> void interpol(F&& f) { - Dune::Functions::interpolate(feSpace, *this, std::forward<F>(f)); + Dune::Functions::interpolate(*basis_, *this, std::forward<F>(f)); } /// Scale each DOFVector by the factor \p s. @@ -134,7 +131,7 @@ namespace AMDiS std::enable_if_t< Concepts::Arithmetic<Scalar>, Self&> operator*=(Scalar s) { - (*vector) *= s; + (*vector_) *= s; return *this; } @@ -143,37 +140,55 @@ namespace AMDiS std::enable_if_t< Concepts::Arithmetic<Scalar>, Self&> operator=(Scalar s) { - (*vector) = s; + (*vector_) = s; return *this; } /// Calls the copy assignment operator of the BaseVector \ref vector void copy(Self const& that) { - *vector = that.getVector(); + *vector_ = *that.vector_; } private: /// The finite element space / basis associated with the data vector - GlobalBasis const& feSpace; + Basis const* basis_; /// The name of the DOFVector (used in file-writing) - std::string name; + std::string name_; /// The data-vector (can hold a new BaseVector or a pointer to external data - ClonablePtr<BaseVector> vector; + ClonablePtr<BaseVector> vector_; // friend class declarations template <class, class> friend class SystemVector; }; - - /// Constructor a dofvector from given feSpace and name - template <class Traits, class ValueType = double> - DOFVector<Traits, ValueType> - makeDOFVector(typename Traits::GlobalBasis const& basis, std::string name) +#if DUNE_HAVE_CXX_CLASS_TEMPLATE_ARGUMENT_DEDUCTION + // Deduction rules + template <class GlobalBasis> + DOFVector(GlobalBasis const& basis, std::string name) + -> DOFVector<GlobalBasis, double>; + + template <class GlobalBasis, class RangeType> + DOFVector(GlobalBasis const& basis, std::string name, MTLDenseVector<RangeType>& coefficients) + -> DOFVector<GlobalBasis, RangeType>; +#endif + + /// Constructor a dofvector from given basis and name + template <class GlobalBasis, class RangeType = double> + DOFVector<GlobalBasis, RangeType> + makeDOFVector(GlobalBasis const& basis, std::string name) { return {basis, name}; } + /// Constructor a dofvector from given basis, name, and coefficient vector + template <class GlobalBasis, class RangeType> + DOFVector<GlobalBasis, RangeType> + makeDOFVector(GlobalBasis const& basis, std::string name, MTLDenseVector<RangeType>& coefficients) + { + return {basis, name, coefficients}; + } + } // end namespace AMDiS diff --git a/src/amdis/linear_algebra/mtl/LinearSolver.hpp b/src/amdis/linear_algebra/mtl/LinearSolver.hpp index b8a1f70e1a1929b999d6f9abd35c5d603ec14751..856f44dd664320ab08b3dfcf454d7f5bb0dede01 100644 --- a/src/amdis/linear_algebra/mtl/LinearSolver.hpp +++ b/src/amdis/linear_algebra/mtl/LinearSolver.hpp @@ -70,7 +70,7 @@ namespace AMDiS msg("fill MTL4 matrix needed ", t.elapsed(), " seconds"); } - int error = runner->solve(A, X.getVector(), B.getVector(), solverInfo); + int error = runner->solve(A, X.vector(), B.vector(), solverInfo); solverInfo.setError(error); if (!solverInfo.doStoreMatrixData()) diff --git a/src/amdis/linear_algebra/mtl/SystemVector.hpp b/src/amdis/linear_algebra/mtl/SystemVector.hpp index 93123b79b26a328fcd345c29a51fab599c31e567..dcf7e32815db9f859e58a61d675b24b04dd62bab 100644 --- a/src/amdis/linear_algebra/mtl/SystemVector.hpp +++ b/src/amdis/linear_algebra/mtl/SystemVector.hpp @@ -89,8 +89,8 @@ namespace AMDiS SystemVector(FeSpaces const& feSpaces, std::vector<std::string> const& names) : feSpaces(feSpaces) , names(names) - , vector{} - , dofvectors(Impl::buildDOFVectors<DOFVectors>(feSpaces, names, vector)) + , vector_{} + , dofvectors(Impl::buildDOFVectors<DOFVectors>(feSpaces, names, vector_)) { compress(); } @@ -113,7 +113,7 @@ namespace AMDiS auto& getVector(const index_t<I> = {}) { static_assert(I < size(), "Index out of range [0,SIZE)" ); - return vector[I]; + return vector_[I]; } /// Return a shared pointer to the I'th underlaying base vector @@ -121,12 +121,12 @@ namespace AMDiS auto const& getVector(const index_t<I> = {}) const { static_assert(I < size(), "Index out of range [0,SIZE)" ); - return vector[I]; + return vector_[I]; } /// Return the underlying multi vector - MultiVector& getVector() { return vector; } - MultiVector const& getVector() const { return vector; } + MultiVector& vector() { return vector_; } + MultiVector const& vector() const { return vector_; } /// Return the I'th finite element space template <std::size_t I = 0> @@ -203,7 +203,7 @@ namespace AMDiS operator*=(Scalar s) { forEach(range_<0, size()>, [this, s](const auto I) { - vector[I] *= s; + vector_[I] *= s; }); return *this; } @@ -214,7 +214,7 @@ namespace AMDiS operator=(Scalar s) { forEach(range_<0, size()>, [this, s](const auto I) { - vector[I] = s; + vector_[I] = s; }); return *this; } @@ -227,7 +227,7 @@ namespace AMDiS std::vector<std::string> names; /// a tuple of base vectors, i.e. mtl::dense_vectors - MultiVector vector; + MultiVector vector_; /// a tuple of dofvectors referencing \ref vector DOFVectors dofvectors;