ParallelProblemStat.h 2.19 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/******************************************************************************
 *
 * AMDiS - Adaptive multidimensional simulations
 *
 * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
 * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
 *
 * Authors: 
 * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 *
 * This file is part of AMDiS
 *
 * See also license.opensource.txt in the distribution.
 * 
 ******************************************************************************/


/** \file ParallelProblemStatBase.h */

#ifndef AMDIS_PARALLEL_PROBLEM_STAT_BASE_H
#define AMDIS_PARALLEL_PROBLEM_STAT_BASE_H

#include "parallel/MeshDistributor.h"
#include "ProblemStat.h"

namespace AMDiS
{
  namespace Parallel 
  {

   /**
    * \ingroup Problem 
    *
    * \brief
    * This class defines the stationary problem definition in parallel
    * computations.
    **/
    class ParallelProblemStat : public ProblemStatSeq
    {
    public:
      ParallelProblemStat(std::string nameStr,
46
			  ProblemIterationInterface *problemIteration = NULL);
47
48
49
50
51
52
53
54

      virtual ~ParallelProblemStat() {}

      void buildAfterCoarsen(AdaptInfo *adaptInfo, Flag flag,
			    bool assembleMatrix = true,
			    bool assembleVector = true);

      void initialize(Flag initFlag,
55
		      ProblemStatSeq *adoptProblem = NULL,
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
		      Flag adoptFlag = INIT_NOTHING);

      /// Must be called before Meshdistributor::initParallelization()
      /// is called.
      void addPeriodicBC(BoundaryType type, int row, int col);

    private:
      /// add PETSc and PMTL solvers to CreatorMap
      void addSolvers();
      
      /// add parallel PMTL preconditioners to CreatorMap
      void addPreconditioner();
      
    protected:
      MeshDistributor *meshDistributor;

    public:
      static double initTimeStamp;
      static bool initialized;
    };
    
  } // end namespace Parallel

#ifdef HAVE_PARALLEL_DOMAIN_AMDIS
80
  typedef detail::ProblemStat<Parallel::ParallelProblemStat> ProblemStat; 
81
82
83
84
85
#endif
  
} // end namespace AMDiS

#endif