PetscProblemStat.h 1.99 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ==  http://www.amdis-fem.org                                              ==
// ==                                                                        ==
// ============================================================================
//
// Software License for AMDiS
//
// Copyright (c) 2010 Dresden University of Technology 
// All rights reserved.
// Authors: Simon Vey, Thomas Witkowski et al.
//
// This file is part of AMDiS
//
// See also license.opensource.txt in the distribution.



/** \file PetscProblemStat.h */

#ifndef AMDIS_PETSC_PROBLEM_STAT_H
#define AMDIS_PETSC_PROBLEM_STAT_H

#include "AMDiS_fwd.h"
#include "Global.h"
28
29
#include "parallel/ParallelProblemStatBase.h"
#include "parallel/PetscSolver.h"
30
#include "parallel/PetscSolverFeti.h"
Thomas Witkowski's avatar
Thomas Witkowski committed
31
#include "parallel/PetscSolverGlobalMatrix.h"
32
#include "parallel/PetscSolverGlobalBlockMatrix.h"
Thomas Witkowski's avatar
Thomas Witkowski committed
33
#include "parallel/PetscSolverSchur.h"
34
35
36
37
38
39

namespace AMDiS {
  
  class PetscProblemStat : public ParallelProblemStatBase
  {
  public:
40
41
    PetscProblemStat(std::string nameStr, 
		     ProblemIterationInterface *problemIteration = NULL);
42

43
44
45
    PetscProblemStat(std::string nameStr,
		     PetscSolver *solver);

46
    ~PetscProblemStat()
47
    {
48
49
      if (deleteSolver)
	delete petscSolver;
50
    }
51

52
53
54
    void initialize(Flag initFlag,
		    ProblemStatSeq *adoptProblem = NULL,
		    Flag adoptFlag = INIT_NOTHING);
Thomas Witkowski's avatar
Thomas Witkowski committed
55

56
57
58
    void solve(AdaptInfo *adaptInfo,
	       bool createMatrixData = true,
	       bool storeMatrixData = false);
59
60

  protected:
61
    PetscSolver *petscSolver;
62
63

    bool deleteSolver;
64
65
66
67
  };

  typedef PetscProblemStat ParallelProblemStat;

68
69
70
71
#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
  typedef PetscProblemStat ProblemStat;
#endif

72
73
74
} // namespace AMDiS

#endif