Skip to content
Snippets Groups Projects
Commit 52841751 authored by Tom Fischer's avatar Tom Fischer
Browse files

[NL/DOF] Split MatrixProviderUser into ML/LinAlg/MatrixProvider and ML/LinAlg/VectorProvider.

parent 9431373b
No related branches found
No related tags found
No related merge requests found
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
#pragma once #pragma once
#include "MatrixProviderUser.h" #include "MatrixProvider.h"
#include "VectorProvider.h"
#include "numlib_export.h" #include "numlib_export.h"
namespace NumLib namespace NumLib
......
/**
* \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
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
#include <map> #include <map>
#include <memory> #include <memory>
#include "MatrixProviderUser.h" #include "MatrixProvider.h"
#include "VectorProvider.h"
namespace NumLib namespace NumLib
{ {
......
...@@ -69,29 +69,4 @@ public: ...@@ -69,29 +69,4 @@ public:
virtual ~VectorProvider() = default; 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 } // namespace NumLib
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
#include "MeshLib/IO/writeMeshToFile.h" #include "MeshLib/IO/writeMeshToFile.h"
#include "MeshLib/MeshGenerators/MeshGenerator.h" #include "MeshLib/MeshGenerators/MeshGenerator.h"
#include "NumLib/DOF/DOFTableUtil.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/ExtrapolatableElementCollection.h"
#include "NumLib/Extrapolation/Extrapolator.h" #include "NumLib/Extrapolation/Extrapolator.h"
#include "NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h" #include "NumLib/Extrapolation/LocalLinearLeastSquaresExtrapolator.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment