diff --git a/NumLib/DOF/GlobalMatrixProviders.h b/NumLib/DOF/GlobalMatrixProviders.h index e386b459c1c579b4bf68e213734e6c2cf4c2f808..529edf2914dd532db86a3d86016b8e6a83cb0068 100644 --- a/NumLib/DOF/GlobalMatrixProviders.h +++ b/NumLib/DOF/GlobalMatrixProviders.h @@ -10,7 +10,8 @@ #pragma once -#include "MatrixProviderUser.h" +#include "MatrixProvider.h" +#include "VectorProvider.h" #include "numlib_export.h" namespace NumLib diff --git a/NumLib/DOF/MatrixProvider.h b/NumLib/DOF/MatrixProvider.h new file mode 100644 index 0000000000000000000000000000000000000000..18d3fb693003ea455094d9f86212d47d2c898d17 --- /dev/null +++ b/NumLib/DOF/MatrixProvider.h @@ -0,0 +1,42 @@ +/** + * \file + * \copyright + * Copyright (c) 2012-2021, OpenGeoSys Community (http://www.opengeosys.org) + * Distributed under a Modified BSD License. + * See accompanying file LICENSE.txt or + * http://www.opengeosys.org/project/license + * + */ + +#pragma once + +#include <cstddef> + +#include "MathLib/LinAlg/MatrixSpecifications.h" + +namespace NumLib +{ +/*! Manages storage for matrices. + * + * This the matrix-analog of VectorProvider. The same notes apply to this class. + */ +class MatrixProvider +{ +public: + //! Get an uninitialized matrix with the given \c id. + virtual GlobalMatrix& getMatrix(std::size_t& id) = 0; + + //! Get a matrix according to the given specifications in the storage + //! of the matrix with the given \c id. + virtual GlobalMatrix& getMatrix(MathLib::MatrixSpecifications const& ms, + std::size_t& id) = 0; + + //! Release the given matrix. + //! + //! \pre \c A must have been acquired before, i.e., you must not call this + //! method twice in a row in the same \c A! + virtual void releaseMatrix(GlobalMatrix const& A) = 0; + + virtual ~MatrixProvider() = default; +}; +} // namespace NumLib diff --git a/NumLib/DOF/SimpleMatrixVectorProvider.h b/NumLib/DOF/SimpleMatrixVectorProvider.h index 293af10f08b89b258a47affdf5f77782a244a99c..f87a478cca08eca4faa1dc6c99d6bb274017097b 100644 --- a/NumLib/DOF/SimpleMatrixVectorProvider.h +++ b/NumLib/DOF/SimpleMatrixVectorProvider.h @@ -13,7 +13,8 @@ #include <map> #include <memory> -#include "MatrixProviderUser.h" +#include "MatrixProvider.h" +#include "VectorProvider.h" namespace NumLib { diff --git a/NumLib/DOF/MatrixProviderUser.h b/NumLib/DOF/VectorProvider.h similarity index 77% rename from NumLib/DOF/MatrixProviderUser.h rename to NumLib/DOF/VectorProvider.h index 8fe4430c898d4e9a7d9b808f27cd072e459ce027..1ed74c9ef0dcd1215cda37739673d51c5293e3da 100644 --- a/NumLib/DOF/MatrixProviderUser.h +++ b/NumLib/DOF/VectorProvider.h @@ -69,29 +69,4 @@ public: virtual ~VectorProvider() = default; }; - -/*! Manages storage for matrices. - * - * This the matrix-analog of VectorProvider. The same notes apply to this class. - */ -class MatrixProvider -{ -public: - //! Get an uninitialized matrix with the given \c id. - virtual GlobalMatrix& getMatrix(std::size_t& id) = 0; - - //! Get a matrix according to the given specifications in the storage - //! of the matrix with the given \c id. - virtual GlobalMatrix& getMatrix(MathLib::MatrixSpecifications const& ms, - std::size_t& id) = 0; - - //! Release the given matrix. - //! - //! \pre \c A must have been acquired before, i.e., you must not call this - //! method twice in a row in the same \c A! - virtual void releaseMatrix(GlobalMatrix const& A) = 0; - - virtual ~MatrixProvider() = default; -}; - } // namespace NumLib diff --git a/Tests/NumLib/TestExtrapolation.cpp b/Tests/NumLib/TestExtrapolation.cpp index 2e1cce4e0e57b7a502e993d82fec09a7fd9b6e42..95712d625a3e27c010bc19455f93e78860bf1341 100644 --- a/Tests/NumLib/TestExtrapolation.cpp +++ b/Tests/NumLib/TestExtrapolation.cpp @@ -13,7 +13,8 @@ #include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/MeshGenerators/MeshGenerator.h" #include "NumLib/DOF/DOFTableUtil.h" -#include "NumLib/DOF/MatrixProviderUser.h" +#include "NumLib/DOF/MatrixProvider.h" +#include "NumLib/DOF/VectorProvider.h" #include "NumLib/Extrapolation/ExtrapolatableElementCollection.h" #include "NumLib/Extrapolation/Extrapolator.h" #include "NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h"