ParallelDomainVec.h 2.54 KB
Newer Older
1
2
3
4
5
6
// ============================================================================
// ==                                                                        ==
// == AMDiS - Adaptive multidimensional simulations                          ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
7
// ==  TU Dresden                                                            ==
8
// ==                                                                        ==
9
10
11
// ==  Institut fr Wissenschaftliches Rechnen                               ==
// ==  Zellescher Weg 12-14                                                  ==
// ==  01069 Dresden                                                         ==
12
13
14
15
// ==  germany                                                               ==
// ==                                                                        ==
// ============================================================================
// ==                                                                        ==
16
// ==  https://gforge.zih.tu-dresden.de/projects/amdis/                      ==
17
18
19
20
21
22
23
24
25
// ==                                                                        ==
// ============================================================================

/** \file ParallelDomainVec.h */

#ifndef AMDIS_PARALLELDOMAINVEC_H
#define AMDIS_PARALLELDOMAINVEC_H

#include "ParallelDomainBase.h"
26
#include "ProblemVec.h"
27
28
29
30
31
32

namespace AMDiS {

  class ParallelDomainVec : public ParallelDomainBase
  {
  public:
33
    ParallelDomainVec(ProblemVec *problem,
34
35
36
37
		      ProblemInstatVec *problemInstat);

    void initParallelization(AdaptInfo *adaptInfo);

38
39
40
41
42
43
44
    virtual void solveInitialProblem(AdaptInfo *adaptInfo)
    {
      ParallelDomainBase::solveInitialProblem(adaptInfo);

      synchVectors(*(probVec->getSolution()));
    }

45
46
47
48
49
50
51
52
53
54
55
56
57
58
    // Writes all data of this object to an output stream.
    virtual void serialize(std::ostream &out)
    {
      probVec->serialize(out);
      ParallelDomainBase::serialize(out);
    }

    // Reads the object data from an input stream.
    virtual void deserialize(std::istream &in)
    {
      probVec->deserialize(in);
      ParallelDomainBase::deserialize(in);
    }

59
60
61
62
63
64
65
66
67
68
69
70
  protected:
    /// Starts the solution of the linear system using Petsc.
    void solve();

  protected:
    /// Pointer to the stationary problem.
    ProblemVec *probVec;
  };

}

#endif // AMDIS_PARALLELDOMAINVEC_H