PyNE C++
dagmc_bridge.h
1 #ifndef PYNE_SKQ36P4BFNE3VI6VHVADCDT4VQ
2 #define PYNE_SKQ36P4BFNE3VI6VHVADCDT4VQ
3 
4 /* Types.hpp may be validly included from C code */
5 #include <moab/Types.hpp>
6 #include <DagMC.hpp>
7 
8 #ifdef __cplusplus
9 using moab::ErrorCode;
10 using moab::EntityHandle;
11 using moab::DagMC;
12 
13 namespace pyne {
14 
15 static DagMC* DAG = new DagMC();
16 
17 extern "C" {
18 #endif
19 /* Notice to future maintainers:
20  * If this file is ever used as a C header from a C compilation unit,
21  * there will probably need to be an #elseif here that defines EntityHandle
22  * or includes an appropriate MOAB header. I don't think Types.hpp guarantees
23  * that EntityHandle will be defined in C.
24  */
25 
26 typedef double vec3[3];
27 
28 float dag_version(void);
29 
30 unsigned dag_rev_version(void);
31 
32 int dag_ent_handle_size(void);
33 
34 const int* geom_id_list(int dimension, int* number_of_items);
35 
36 EntityHandle handle_from_id(int dimension, int id);
37 int id_from_handle(EntityHandle eh);
38 
39 ErrorCode dag_load(const char* filename);
40 
41 void* dag_alloc_ray_history(void);
42 
43 void dag_dealloc_ray_history(void* history);
44 
45 ErrorCode dag_ray_fire(EntityHandle vol, vec3 ray_start, vec3 ray_dir,
46  EntityHandle* next_surf, double* next_surf_dist,
47  void* history, double distance_limit);
48 
49 ErrorCode dag_ray_follow(EntityHandle firstvol, vec3 ray_start, vec3 ray_dir,
50  double distance_limit, int* num_intersections,
51  EntityHandle** surfs, double** distances,
52  EntityHandle** volumes, void* data_buffers);
53 
54 void dag_dealloc_ray_buffer(void* data_buffers);
55 
56 ErrorCode dag_pt_in_vol(EntityHandle vol, vec3 pt, int* result, vec3 dir,
57  const void* history);
58 
59 ErrorCode dag_next_vol(EntityHandle surface, EntityHandle volume,
60  EntityHandle* next_vol);
61 
62 int vol_is_graveyard(EntityHandle vol);
63 /* int surf_is_spec_refl(EntityHandle surf); */
64 /* int surf_is_white_refl(EntityHandle surf); */
65 int vol_is_implicit_complement(EntityHandle vol);
66 
67 ErrorCode get_volume_metadata(EntityHandle vol, int* material, double* density, double* importance);
68 
69 ErrorCode get_volume_boundary(EntityHandle vol, vec3 minPt, vec3 maxPt);
70 
71 #ifdef __cplusplus
72 } // namespace pyne
73 } // extern "C"
74 #endif
75 
76 #endif /* PYNE_SKQ36P4BFNE3VI6VHVADCDT4VQ */
A container representing enrichment cascades.
Definition: _atomic_data.h:16