Overture
Version 25
Main Page
Namespaces
Classes
Files
File List
File Members
Overture.v25.d
include
MultigridEquationSolver.h
Go to the documentation of this file.
1
#ifndef MULTIGRID_EQUATION_SOLVER_H
2
#define MULTIGRID_EQUATION_SOLVER_H
3
4
//
5
// Multigrid solver for Oges
6
//
7
8
#include "
OvertureDefine.h
"
9
#include OV_STD_INCLUDE(iostream)
10
11
#include <math.h>
12
#include <assert.h>
13
14
#include "
EquationSolver.h
"
15
#include "
Ogmg.h
"
16
17
18
class
MultigridEquationSolver
:
public
EquationSolver
19
{
20
public
:
21
MultigridEquationSolver
(
Oges
& oges_);
22
virtual
~MultigridEquationSolver
();
23
24
virtual
int
solve
(
realCompositeGridFunction
& u,
25
realCompositeGridFunction
& f);
26
27
// new way to set coefficients:
28
virtual
int
setCoefficientsAndBoundaryConditions
(
realCompositeGridFunction
& coeff,
29
const
IntegerArray
& boundaryConditions,
30
const
RealArray
& bcData );
31
32
// old way to set coefficients:
33
virtual
int
setCoefficientArray
(
realCompositeGridFunction
& coeff,
34
const
IntegerArray
& boundaryConditions=
Overture::nullIntArray
(),
35
const
RealArray
& bcData=
Overture::nullRealArray
() );
36
37
virtual
int
setEquationAndBoundaryConditions
(
OgesParameters::EquationEnum
equation,
38
CompositeGridOperators
& op,
39
const
IntegerArray
& boundaryConditions,
40
const
RealArray
& bcData,
41
RealArray
& constantCoeff =
Overture::nullRealArray
(),
42
realCompositeGridFunction
*variableCoeff=
NULL
);
43
44
// call this function when the grid changes (and before setCoefficientsAndBoundaryConditions)
45
virtual
int
setGrid
(
CompositeGrid
& cg );
46
47
// Set the MultigridCompositeGrid to use: (for use with Ogmg)
48
virtual
int
set
(
MultigridCompositeGrid
& mgcg );
49
50
virtual
int
printStatistics
( FILE *file = stdout )
const
;
// output any relevant statistics
51
52
virtual
real
sizeOf
( FILE *file=
NULL
);
// return number of bytes allocated
53
54
protected
:
55
56
Ogmg
ogmg
;
57
58
};
59
60
61
#endif
Generated on Fri Jan 4 2013 10:17:56 for Overture by
1.8.3