| Rev | Line | |
|---|
| [48b662] | 1 | /**
|
|---|
| 2 | * @file mg.hpp
|
|---|
| 3 | * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
|
|---|
| 4 | * @date Mon Apr 18 13:01:13 2011
|
|---|
| 5 | *
|
|---|
| 6 | * @brief Header file for the VMG main class.
|
|---|
| 7 | *
|
|---|
| 8 | */
|
|---|
| 9 |
|
|---|
| 10 | #ifndef MG_HPP_
|
|---|
| 11 | #define MG_HPP_
|
|---|
| 12 |
|
|---|
| [dfed1c] | 13 | #include <map>
|
|---|
| 14 |
|
|---|
| 15 | #include "base/command_factory.hpp"
|
|---|
| [48b662] | 16 | #include "base/factory.hpp"
|
|---|
| 17 |
|
|---|
| 18 | namespace VMG
|
|---|
| 19 | {
|
|---|
| 20 |
|
|---|
| 21 | class Comm;
|
|---|
| 22 | class Discretization;
|
|---|
| [dfed1c] | 23 | class Grid;
|
|---|
| [48b662] | 24 | class Interface;
|
|---|
| 25 | class LevelOperator;
|
|---|
| 26 | class Multigrid;
|
|---|
| 27 | class Smoother;
|
|---|
| 28 | class Solver;
|
|---|
| 29 | class Stencil;
|
|---|
| 30 | class TempGrid;
|
|---|
| 31 |
|
|---|
| 32 | class MG
|
|---|
| 33 | {
|
|---|
| 34 | public:
|
|---|
| 35 | static MG* Instance()
|
|---|
| 36 | {
|
|---|
| 37 | static MG mgs;
|
|---|
| 38 | return &mgs;
|
|---|
| 39 | }
|
|---|
| 40 |
|
|---|
| 41 | static void SetInterface(Interface* interface, Comm* comm);
|
|---|
| 42 |
|
|---|
| 43 | static VMG::Comm* GetComm();
|
|---|
| 44 | static VMG::Discretization* GetDiscretization();
|
|---|
| 45 | static VMG::Interface* GetInterface();
|
|---|
| 46 | static VMG::LevelOperator* GetLevelOperator();
|
|---|
| 47 | static VMG::Multigrid* GetRhs();
|
|---|
| 48 | static VMG::Multigrid* GetSol();
|
|---|
| [4571da] | 49 | static VMG::Grid& GetRhsMaxLevel();
|
|---|
| 50 | static VMG::Grid& GetSolMaxLevel();
|
|---|
| [48b662] | 51 | static VMG::Smoother* GetSmoother();
|
|---|
| 52 | static VMG::Solver* GetSolver();
|
|---|
| 53 | static VMG::TempGrid* GetTempGrid();
|
|---|
| 54 |
|
|---|
| 55 | static VMG::Factory& GetFactory();
|
|---|
| [dfed1c] | 56 | static VMG::CommandFactory& GetCommands();
|
|---|
| 57 |
|
|---|
| 58 | static void InitializeFromParticleConfigFile(const char* filename);
|
|---|
| [48b662] | 59 |
|
|---|
| [894a5f] | 60 | static void PostInit();
|
|---|
| [48b662] | 61 | static void Solve();
|
|---|
| 62 | static void Destroy();
|
|---|
| 63 | static bool IsInitialized();
|
|---|
| 64 |
|
|---|
| [dfed1c] | 65 | static void SetState(const int& key);
|
|---|
| 66 |
|
|---|
| [48b662] | 67 | private:
|
|---|
| 68 | MG();
|
|---|
| 69 | virtual ~MG();
|
|---|
| 70 |
|
|---|
| 71 | void RegisterLibraryCommands();
|
|---|
| 72 |
|
|---|
| 73 | vmg_float ComputeVectorNorm(const Multigrid& vec);
|
|---|
| 74 |
|
|---|
| [dfed1c] | 75 | static VMG::CommandFactory command_factory;
|
|---|
| 76 | std::map<int, VMG::Factory> factories;
|
|---|
| 77 | int state;
|
|---|
| [48b662] | 78 | };
|
|---|
| 79 |
|
|---|
| 80 | }
|
|---|
| 81 |
|
|---|
| 82 | #endif
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.