Advanced Multi-Physics (AMP)
On-Line Documentation
MatrixParametersFactory.h
Go to the documentation of this file.
1#ifndef included_AMP_MatrixParameters_MatrixParametersFactory
2#define included_AMP_MatrixParameters_MatrixParametersFactory
3
4#include "AMP/utils/FactoryStrategy.hpp"
5
6
7namespace AMP::IO {
8class RestartManager;
9}
10
11
12namespace AMP::LinearAlgebra {
13
14class MatrixParametersBase;
15
16template<class MATRIXPARAMETERS>
17std::unique_ptr<MATRIXPARAMETERS>
19{
20 return std::make_unique<MATRIXPARAMETERS>( fid, manager );
21}
22
23
26{
27public:
30 {
31 static MatrixParametersFactory singletonInstance;
32 return singletonInstance;
33 }
34
36 static std::shared_ptr<MatrixParametersBase> create( int64_t fid,
37 AMP::IO::RestartManager *manager );
38
40 template<class MATRIXPARAMETERS>
41 static void registerMatrixParameters( const std::string &name )
42 {
43 FactoryStrategy<MatrixParametersBase, int64_t, AMP::IO::RestartManager *>::registerFactory(
44 name, createMatrixParametersFromRestart<MATRIXPARAMETERS> );
45 }
46};
47
48
49} // namespace AMP::LinearAlgebra
50
51#endif
Class to manage reading/writing restart data.
static MatrixParametersFactory & getFactory()
get a singleton instance of the factory
static std::shared_ptr< MatrixParametersBase > create(int64_t fid, AMP::IO::RestartManager *manager)
Create the matrix parameters from the restart file.
static void registerMatrixParameters(const std::string &name)
Register a matrix parameters with the factory.
std::unique_ptr< MATRIXPARAMETERS > createMatrixParametersFromRestart(int64_t fid, AMP::IO::RestartManager *manager)



Advanced Multi-Physics (AMP)
Oak Ridge National Laboratory
Idaho National Laboratory
Los Alamos National Laboratory
This page automatically produced from the
source code by doxygen
Last updated: Tue Mar 10 2026 13:06:40.
Comments on this page