NeoPZ
pzmganalysis.h
Go to the documentation of this file.
1 
6 #ifndef TPZMGANALYSIS_H
7 #define TPZMGANALYSIS_H
8 
9 #include "pzanalysis.h"
10 #include "pztransfer.h"
11 
13 template<class T>
15 
16 template <class TVar>
18 
19 template<class T, class V>
20 
21 class TPZAvlMap;
22 class TPZOneDRef;
23 class TPZGeoEl;
24 
29 class TPZMGAnalysis : public TPZAnalysis {
30 public:
31 
33  virtual ~TPZMGAnalysis();
34 
37 
39  void AppendMesh (TPZCompMesh * mesh);
40 
42  TPZCompMesh *PopMesh ();
43 
45  virtual void Solve ();
46 
49 
55  static TPZCompMesh *UniformlyRefineMesh (TPZCompMesh *mesh, bool withP = false);
56 
65  static void MeshError ( TPZCompMesh *fine,TPZCompMesh *coarse,
66  TPZVec<REAL> &ervec,
67  void (*f) (const TPZVec<REAL> &loc, TPZVec<STATE> &val, TPZFMatrix<STATE> &deriv),
68  TPZVec<REAL> &truervec);
69 
70 private:
73 
76 
79 
83 
84 
93  static REAL ElementError (TPZInterpolatedElement *fine,
94  TPZInterpolatedElement *coarse,
95  TPZTransform<> &tr,
96  void (*f) (const TPZVec<REAL> &loc, TPZVec<STATE> &val, TPZFMatrix<STATE> &deriv),
97  REAL &truerror);
98 };
99 
100 #endif //TPZMGANALYSIS_H
Contains TPZAnalysis class which implements the sequence of actions to perform a finite element analy...
Defines step solvers class. Solver.
Definition: pzmganalysis.h:17
static TPZCompMesh * UniformlyRefineMesh(TPZCompMesh *mesh, bool withP=false)
Proceeds the uniformly h-p refinement of mesh.
REAL val(STATE &number)
Returns value of the variable.
Definition: pzartdiff.h:23
TPZStack< TPZFMatrix< STATE > * > fSolutions
Contains the meshes solutions.
Definition: pzmganalysis.h:75
Contains the TPZTransfer class which implements a rectangular sparse block matrix.
TPZStack< TPZMatrixSolver< STATE > * > fPrecondition
Contains the preconditioner of the solution method if the solution method is a krylov method...
Definition: pzmganalysis.h:82
TPZCompMesh * PopMesh()
Pop the last mesh of the meshes vector.
static void MeshError(TPZCompMesh *fine, TPZCompMesh *coarse, TPZVec< REAL > &ervec, void(*f)(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv), TPZVec< REAL > &truervec)
Evaluates the error between aproximation of coarse and fine meshes.
void error(char *string)
Definition: testShape.cc:7
TPZMGAnalysis(TPZCompMesh *)
Creates an object multigrid analysis giving a computational mesh.
virtual ~TPZMGAnalysis()
Destructor.
Implements the sequence of actions to perform a finite element analysis. Analysis.
Definition: pzanalysis.h:32
f
Definition: test.py:287
void AppendMesh(TPZCompMesh *mesh)
Append a mesh to the meshes vector.
Defines the behaviour of all geometric elements. GeometryTPZGeoEl is the common denominator for all g...
Definition: pzgeoel.h:43
void ComputeError(TPZVec< REAL > &error)
Loads the last two solutions and call the error between these two aproximations.
Implements multigrid analysis. TPZMGAnalysis is derived from TPZAnalysis. Analysis.
Definition: pzmganalysis.h:29
TPZStack< TPZCompMesh *> fMeshes
Contains the computational meshes of one cycle.
Definition: pzmganalysis.h:72
This class implements a stack object. Utility.
Definition: pzcheckmesh.h:14
Implements computational mesh. Computational Mesh.
Definition: pzcmesh.h:47
TPZStack< TPZMatrixSolver< STATE > * > fSolvers
Contains the solution method applied to the mesh.
Definition: pzmganalysis.h:78
virtual void Solve()
Uses fSolver object to apply a solution algorithm.
Implements an affine transformation between points in parameter space. Topology Utility.
Definition: pzmganalysis.h:14
static REAL ElementError(TPZInterpolatedElement *fine, TPZInterpolatedElement *coarse, TPZTransform<> &tr, void(*f)(const TPZVec< REAL > &loc, TPZVec< STATE > &val, TPZFMatrix< STATE > &deriv), REAL &truerror)
Calculates an element error based on two aproximations.
Implements computational element based on an interpolation space. Computational Element.
Definition: pzintel.h:27