-
Notifications
You must be signed in to change notification settings - Fork 2
/
Geometry.h
69 lines (56 loc) · 1.82 KB
/
Geometry.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
62
63
64
65
66
67
68
/*
Author: ESGonzalez
Date: 1/8/18
*/
#ifndef __GEOMETRY_H__
#define __GEOMETRY_H__
#include <iostream>
#include <fstream>
#include <cmath>
#include <vector>
#include <memory>
#include <utility>
#include <string>
#include <cassert>
#include "Random.h"
#include "Utility.h"
#include "Point.h"
#include "Cell.h"
#include "Surface.h"
#include "Estimator.h"
#include "Source.h"
using std::vector;
using std::make_shared;
typedef std::shared_ptr< Cell > Cell_ptr;
typedef std::shared_ptr< Material > Mat_ptr;
typedef std::shared_ptr< surface > Surf_ptr;
typedef std::shared_ptr< Estimator > Estimator_ptr;
typedef std::shared_ptr< Source > Source_ptr;
typedef std::shared_ptr< Nuclide > Nuclide_ptr;
typedef std::shared_ptr< Reaction > Reaction_ptr;
class Geometry
{
private:
std::vector< Cell_ptr > cells;
std::vector< Surf_ptr > surfaces;
std::vector< Mat_ptr > materials;
Source_ptr source; // do we want to turn this into a vector?
public:
Geometry() {};
~Geometry() {};
// Adders/Setters
void addCell ( Cell_ptr newCell ) { cells.push_back(newCell); };
void addSurface ( Surf_ptr newSurface ) { surfaces.push_back(newSurface); };
void addMaterial ( Mat_ptr newMaterial ) { materials.push_back(newMaterial); };
void setSource ( Source_ptr newSource ) { source = newSource; };
// Getters
std::vector< Mat_ptr > getMaterials() { return materials; };
std::vector< Cell_ptr > getCells() { return cells; };
std::vector< Surf_ptr > getSurfaces() { return surfaces; };
Source_ptr getSource() { return source; };
// Functions
void readXS ( std::string filename , int nGroups, bool loud );
Cell_ptr whereAmI ( point pos );
Part_ptr sampleSource() { return source->sample(); };
};
#endif