An open source method of characteristics neutron transport code.
DeviceMaterial.h
Go to the documentation of this file.
1 
9 #ifndef DEVICEMATERIAL_H_
10 #define DEVICEMATERIAL_H_
11 
12 #ifdef __cplusplus
13 #include "../log.h"
14 #include "../Material.h"
15 #endif
16 
17 
22 struct dev_material {
23 
25  int _id;
26 
28  FP_PRECISION* _sigma_t;
29 
32  FP_PRECISION* _sigma_f;
33 
36  FP_PRECISION* _nu_sigma_f;
37 
39  FP_PRECISION* _chi;
40 
42  FP_PRECISION* _fiss_matrix;
43 
45  FP_PRECISION* _sigma_s;
46 
51  _sigma_t = NULL;
52  _sigma_s = NULL;
53  _sigma_f = NULL;
54  _nu_sigma_f = NULL;
55  _chi = NULL;
56  _fiss_matrix = NULL;
57  }
58 
63  if (_sigma_t != NULL)
64  delete [] _sigma_t;
65  if (_sigma_s != NULL)
66  delete [] _sigma_s;
67  if (_sigma_f != NULL)
68  delete [] _sigma_f;
69  if (_nu_sigma_f != NULL)
70  delete [] _nu_sigma_f;
71  if (_chi != NULL)
72  delete [] _chi;
73  if (_fiss_matrix != NULL)
74  delete [] _fiss_matrix;
75  }
76 
77 };
78 
79 
80 #endif /* MATERIAL_H_ */
FP_PRECISION * _sigma_f
Definition: DeviceMaterial.h:32
~dev_material()
Destructor releases data for all Material's cross-sections on GPU.
Definition: DeviceMaterial.h:62
FP_PRECISION * _nu_sigma_f
Definition: DeviceMaterial.h:36
FP_PRECISION * _fiss_matrix
Definition: DeviceMaterial.h:42
FP_PRECISION * _chi
Definition: DeviceMaterial.h:39
FP_PRECISION * _sigma_t
Definition: DeviceMaterial.h:28
dev_material()
Constructor for a dev_material struct on a GPU.
Definition: DeviceMaterial.h:50
FP_PRECISION * _sigma_s
Definition: DeviceMaterial.h:45
A Material's nuclear data to be stored on a GPU.
Definition: DeviceMaterial.h:22
int _id
Definition: DeviceMaterial.h:25