-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstencil.cpp
43 lines (35 loc) · 1.03 KB
/
stencil.cpp
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
/******************************************************************************
* GRIDGEN: Grid Generating Compiler
* By: Andy Stone (aistone@gmail.com)
* (C) Copyright 2011 Colorado State University
*****************************************************************************/
#include "stencil.hpp"
#include <iostream>
using namespace std;
Neighbor::Neighbor() {
mName = "UNKNOWN";
}
Neighbor::Neighbor(string name) {
setName(name);
}
void Neighbor::setName(string name) {
mName = name;
}
void Neighbor::addCondition(Exp *condition, Exp **result) {
mConditions.push_back(condition);
mResults.push_back(result);
}
void Neighbor::setDefault(Exp **dflt) {
mDefault = dflt;
}
void Neighbor::print() {
//cout << "Neighbor: " << mName << endl;
//for(int i = 0; i < numConditions(); i++) {
// cout << mConditions[i] << ": " << mResults[i];
//}
//cout << "Default: " << mDefault << endl;
}
Edge::Edge(Neighbor offset, double coefficient) {
mNeighbor = offset;
mCoefficient = coefficient;
}