| Cantera 3.0.0

Loading...
Searching...
No Matches
PreconditionerFactory.h
Go to the documentation of this file.
1//! @file PreconditionerFactory.h
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
6#ifndef PRECONDITIONER_FACTORY_H
7#define PRECONDITIONER_FACTORY_H
8
9#include "cantera/base/FactoryBase.h"
10
11 namespace Cantera
12{
13
14 class PreconditionerBase;
15
16//! Factory class to create preconditioner objects
17 class PreconditionerFactory : public Factory<PreconditionerBase>
18{
19 public:
20 static PreconditionerFactory* factory();
21
22 //! Delete preconditioner factory
23 void deleteFactory() override;
24
25 private:
26 static PreconditionerFactory* s_factory;
27 static std::mutex precon_mutex;
28 PreconditionerFactory();
29};
30
31//! Create a Preconditioner object of the specified type
32 shared_ptr<PreconditionerBase> newPreconditioner(const string& precon);
33
34}
35
36#endif
FactoryBase.h
File contains the FactoryBase class declarations.
Cantera::Factory
Factory class that supports registering functions to create objects.
Definition FactoryBase.h:69
Cantera::PreconditionerFactory
Factory class to create preconditioner objects.
Definition PreconditionerFactory.h:18
Cantera::PreconditionerFactory::deleteFactory
void deleteFactory() override
Delete preconditioner factory.
Definition PreconditionerFactory.cpp:21
Cantera
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564
Cantera::newPreconditioner
shared_ptr< PreconditionerBase > newPreconditioner(const string &precon)
Create a Preconditioner object of the specified type.
Definition PreconditionerFactory.cpp:35