aboutsummaryrefslogtreecommitdiff
path: root/Carpet/Requirements/src/location.hh
blob: 18063846d0c70f75c633a9ed380c3ebb95728bb5 (plain)
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
#ifndef LOCATION_HH
#define LOCATION_HH

#include <cctk_Schedule.h>

#include <iostream>
#include <string>

namespace Requirements {

  using namespace std;

  // Struct defining a location of a grid point
  struct location_t {
    string info;
    cFunctionData const* fd;
    int it;
    int vi;
    int rl, m, tl;
    location_t():
      info(""), fd(0), it(-1), vi(-1), rl(-1), m(-1), tl(-1)
    {}
    location_t(string info_):
      info(info_), fd(0), it(-1), vi(-1), rl(-1), m(-1), tl(-1)
    {}
    location_t(string info_, cFunctionData const* fd_):
      info(info_), fd(fd_), it(-1), vi(-1), rl(-1), m(-1), tl(-1)
    {}
    // Output helper
    void output (ostream& os) const;
  };
  
  inline ostream& operator<<(ostream& os, const location_t& loc)
  {
    loc.output(os);
    return os;
  }
}

#endif