source: src/mg.hpp@ 728149

Last change on this file since 728149 was 4571da, checked in by Julian Iseringhausen <isering@…>, 14 years ago

vmg: Implement fourth-order discretization of the Poisson equation.

git-svn-id: https://svn.version.fz-juelich.de/scafacos/trunk@1762 5161e1c8-67bf-11de-9fd5-51895aff932f

  • Property mode set to 100644
File size: 1.6 KB
Line 
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
13#include <map>
14
15#include "base/command_factory.hpp"
16#include "base/factory.hpp"
17
18namespace VMG
19{
20
21class Comm;
22class Discretization;
23class Grid;
24class Interface;
25class LevelOperator;
26class Multigrid;
27class Smoother;
28class Solver;
29class Stencil;
30class TempGrid;
31
32class MG
33{
34public:
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();
49 static VMG::Grid& GetRhsMaxLevel();
50 static VMG::Grid& GetSolMaxLevel();
51 static VMG::Smoother* GetSmoother();
52 static VMG::Solver* GetSolver();
53 static VMG::TempGrid* GetTempGrid();
54
55 static VMG::Factory& GetFactory();
56 static VMG::CommandFactory& GetCommands();
57
58 static void InitializeFromParticleConfigFile(const char* filename);
59
60 static void PostInit();
61 static void Solve();
62 static void Destroy();
63 static bool IsInitialized();
64
65 static void SetState(const int& key);
66
67private:
68 MG();
69 virtual ~MG();
70
71 void RegisterLibraryCommands();
72
73 vmg_float ComputeVectorNorm(const Multigrid& vec);
74
75 static VMG::CommandFactory command_factory;
76 std::map<int, VMG::Factory> factories;
77 int state;
78};
79
80}
81
82#endif
Note: See TracBrowser for help on using the repository browser.