Bridge++  Ver. 2.0.2
MultiGrid.h
Go to the documentation of this file.
1 
16 //====================================================================
17 #pragma once
18 
20 #include "lib/Fopr/afopr.h"
21 
22 
23 template<class AFIELD1, class AFIELD2>
24 class MultiGrid
25 {
26  public:
27  typedef AFIELD1 Afield_coarse_t;
28  typedef AFIELD2 Afield_fine_t;
30 
31  protected:
32  static const std::string class_name;
34 
35  public:
37  : m_vl(CommonParameters::Vlevel()) {}
38 
39  MultiGrid(const std::vector<int>& coarse_lattice,
40  const std::vector<int>& fine_lattice,
41  const int nin = 0,
42  const int nvec = 0)
43  : m_vl(CommonParameters::Vlevel()) {}
44 
45  virtual ~MultiGrid() {}
46 
47  private:
48  MultiGrid(const MultiGrid&);
49  MultiGrid& operator=(const MultiGrid&);
50 
51  public:
52  virtual void init(const std::vector<int>& coarse_lattice, const std::vector<int>& fine_lattice, const int nin, const int nvec) = 0;
53 
54  virtual void set_afopr_coarse(AFopr<AFIELD1> *afopr) {}
55  virtual void set_afopr_fine(AFopr<AFIELD2> *afopr) {}
56 
57  virtual const Index_t *get_block_index() const = 0;
58 
59  virtual std::vector<AFIELD2> *get_testvectors() = 0;
60  virtual const std::vector<AFIELD2> *get_testvectors() const = 0;
61 
62  virtual void set_testvectors() = 0;
63  virtual void set_testvectors(const std::vector<AFIELD2>&) = 0;
64 
65  virtual void gramschmidt() = 0;
66  virtual void gramschmidt(std::vector<AFIELD2>& fine_vectors) const = 0;
67 
68  virtual void make_fine_vector(AFIELD2&, const AFIELD1&) const = 0;
69  virtual void make_coarse_vector(AFIELD1&, const AFIELD2&) const = 0;
70 };
71 
72 
73 //============================================================END=====
MultiGrid::get_block_index
virtual const Index_t * get_block_index() const =0
CommonParameters
Common parameter class: provides parameters as singleton.
Definition: commonParameters.h:42
AFopr
Definition: afopr.h:48
MultiGrid::init
virtual void init(const std::vector< int > &coarse_lattice, const std::vector< int > &fine_lattice, const int nin, const int nvec)=0
AIndex_block_lex< typename AFIELD2::real_t, AFIELD2::IMPL >
MultiGrid::Afield_fine_t
AFIELD2 Afield_fine_t
Definition: MultiGrid.h:28
MultiGrid::MultiGrid
MultiGrid()
Definition: MultiGrid.h:36
MultiGrid::class_name
static const std::string class_name
Definition: MultiGrid.h:32
MultiGrid::get_testvectors
virtual std::vector< AFIELD2 > * get_testvectors()=0
MultiGrid::operator=
MultiGrid & operator=(const MultiGrid &)
MultiGrid::make_coarse_vector
virtual void make_coarse_vector(AFIELD1 &, const AFIELD2 &) const =0
MultiGrid
Definition: MultiGrid.h:24
MultiGrid::set_testvectors
virtual void set_testvectors()=0
MultiGrid::Afield_coarse_t
AFIELD1 Afield_coarse_t
Definition: MultiGrid.h:27
MultiGrid::Index_t
AIndex_block_lex< typename AFIELD2::real_t, AFIELD2::IMPL > Index_t
Definition: MultiGrid.h:29
MultiGrid::m_vl
Bridge::VerboseLevel m_vl
Definition: MultiGrid.h:33
MultiGrid::set_afopr_coarse
virtual void set_afopr_coarse(AFopr< AFIELD1 > *afopr)
Definition: MultiGrid.h:54
MultiGrid::set_afopr_fine
virtual void set_afopr_fine(AFopr< AFIELD2 > *afopr)
Definition: MultiGrid.h:55
MultiGrid::gramschmidt
virtual void gramschmidt()=0
MultiGrid::MultiGrid
MultiGrid(const std::vector< int > &coarse_lattice, const std::vector< int > &fine_lattice, const int nin=0, const int nvec=0)
Definition: MultiGrid.h:39
MultiGrid::~MultiGrid
virtual ~MultiGrid()
Definition: MultiGrid.h:45
aindex_block_lex_base.h
afopr.h
Bridge::VerboseLevel
VerboseLevel
Definition: bridgeIO.h:42
MultiGrid::make_fine_vector
virtual void make_fine_vector(AFIELD2 &, const AFIELD1 &) const =0