Overture  Version 25
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 
19 {
20  public:
22  virtual ~MultigridEquationSolver();
23 
24  virtual int solve(realCompositeGridFunction & u,
26 
27  // new way to set coefficients:
29  const IntegerArray & boundaryConditions,
30  const RealArray & bcData );
31 
32  // old way to set coefficients:
34  const IntegerArray & boundaryConditions=Overture::nullIntArray(),
35  const RealArray & bcData=Overture::nullRealArray() );
36 
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 
57 
58 };
59 
60 
61 #endif