declarations.h

 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
* declarations.h
* Laplace2D
*
* Created by RJ Linton on 4/5/09.
* Copyright 2009 RJ Linton. All rights reserved.
*
*/
#ifndef _declarations_H
#define _declarations_H
#include <iostream>
#include <cmath>
//#include <string>
#include "gnuplot_i.hpp"
//These seem to be unnecessary I'm not sure why...
//#include <cstring>
//#include <iomanip>
//#include <ctime>
//#include <cstdlib>
//using namespace std;
using std::string;
using std::ofstream;
using std::ios;
using std::endl;
using std::cout;
//File name string varibales. Change baseDirString to change root location for output files
const string baseDirString = "/Users/rj/Desktop/";
const string intermediateFileName = baseDirString + "intermediateData.dat";
const string approxSolutionFileName = baseDirString + "approxSolution.dat";
const string exactSolutionFileName = baseDirString + "exactSolution.dat";
const string gnuplotFileName = baseDirString + "gnuplot.dat";
//Mathematical constants. Vnot is problem specific.
const double PI = 4.0*atan(1.0);
const double Vnot = 100;
//File stream objects. Nameing convention matches file name convention above.
ofstream intermediateOut;
ofstream approxSolutionOut;
ofstream exactSolutionOut;
ofstream gnuplotOut;
//Random number genterator variables. Change the low numbr and high number and range will reset.
const int lowest = 10;
const int highest = 80;
const int range = (highest - lowest) + 1;
//Input variables set to default values. These values are changed at runtime.
int resolution = 15;
double accuracy = 0.001;
//Loop counter variables. Remember to reset for each loop.
int i = 0;
int j = 0;
#endif