source: src/mg.hpp@ 177495

Last change on this file since 177495 was 177495, checked in by Julian Iseringhausen <isering@…>, 13 years ago

Implemented boundary values derived from continious problem.

  • Property mode set to 100644
File size: 2.3 KB
RevLine 
[fcf7f6]1/*
2 * vmg - a versatile multigrid solver
3 * Copyright (C) 2012 Institute for Numerical Simulation, University of Bonn
4 *
5 * vmg is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * vmg is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
[48b662]19/**
20 * @file mg.hpp
21 * @author Julian Iseringhausen <isering@ins.uni-bonn.de>
22 * @date Mon Apr 18 13:01:13 2011
23 *
24 * @brief Header file for the VMG main class.
25 *
26 */
27
28#ifndef MG_HPP_
29#define MG_HPP_
30
[dfed1c]31#include <map>
32
33#include "base/command_factory.hpp"
[48b662]34#include "base/factory.hpp"
35
36namespace VMG
37{
38
[177495]39class BoundaryValueSetter;
[48b662]40class Comm;
[b57b9b]41class Cycle;
[48b662]42class Discretization;
[dfed1c]43class Grid;
[48b662]44class Interface;
45class LevelOperator;
46class Multigrid;
47class Smoother;
48class Solver;
49class Stencil;
50class TempGrid;
51
52class MG
53{
54public:
55 static MG* Instance()
56 {
57 static MG mgs;
58 return &mgs;
59 }
60
61 static VMG::Comm* GetComm();
[b57b9b]62 static VMG::Cycle* GetCycle();
[48b662]63 static VMG::Discretization* GetDiscretization();
64 static VMG::Interface* GetInterface();
65 static VMG::LevelOperator* GetLevelOperator();
66 static VMG::Multigrid* GetRhs();
67 static VMG::Multigrid* GetSol();
[4571da]68 static VMG::Grid& GetRhsMaxLevel();
69 static VMG::Grid& GetSolMaxLevel();
[48b662]70 static VMG::Smoother* GetSmoother();
71 static VMG::Solver* GetSolver();
72 static VMG::TempGrid* GetTempGrid();
[177495]73 static VMG::BoundaryValueSetter* GetBoundaryValueSetter();
[48b662]74
75 static VMG::Factory& GetFactory();
[dfed1c]76 static VMG::CommandFactory& GetCommands();
77
[894a5f]78 static void PostInit();
[48b662]79 static void Solve();
80 static void Destroy();
81 static bool IsInitialized();
82
[dfed1c]83 static void SetState(const int& key);
84
[48b662]85private:
86 MG();
87 virtual ~MG();
88
89 void RegisterLibraryCommands();
90
91 vmg_float ComputeVectorNorm(const Multigrid& vec);
92
[dfed1c]93 static VMG::CommandFactory command_factory;
94 std::map<int, VMG::Factory> factories;
95 int state;
[48b662]96};
97
98}
99
100#endif
Note: See TracBrowser for help on using the repository browser.