@@ -8,11 +8,11 @@ Structure
8
8
The high-level directory structure delineates the types of microphysics
9
9
and the generic solvers:
10
10
11
- * ``conductivity ``: thermal conductivity routines
11
+ * ``conductivity/ ``: thermal conductivity routines
12
12
13
- * ``constants ``: fundamental constants
13
+ * ``constants/ ``: fundamental constants
14
14
15
- * ``Docs ``: the sphinx source for this documentation
15
+ * ``Docs/ ``: the sphinx source for this documentation
16
16
17
17
* ``EOS/ ``: the various equations of state
18
18
@@ -41,7 +41,13 @@ and the generic solvers:
41
41
42
42
* ``util/ ``: linear algebra solvers and other routines.
43
43
44
- Design Philosophy
44
+
45
+ .. note ::
46
+
47
+ All quantities are assumed to be in CGS units, unless otherwise
48
+ specified.
49
+
50
+ Design philosophy
45
51
=================
46
52
47
53
Any application that uses Microphysics will at minimum need to
@@ -64,10 +70,33 @@ of the species defined by the network to interpret the state.
64
70
65
71
We try to maximize code reuse in the Microphysics source, so the
66
72
solvers (ODE integration for the network and Newton-Raphson root
67
- finding for the EOS) is separated from the specific implementations of
73
+ finding for the EOS) are separated from the specific implementations of
68
74
the microphysics.
69
75
70
- .. note ::
71
76
72
- All quantities are assumed to be in CGS units, unless otherwise
73
- specified.
77
+
78
+ GPU considerations
79
+ ==================
80
+
81
+ .. index :: GPUs
82
+
83
+ All of the Microphysics routines are written to run on GPUs. This is
84
+ enabled in application codes by using the AMReX lambda-capturing
85
+ mechanism (see the [AMReX GPU
86
+ documentation](https://amrex-codes.github.io/amrex/docs_html/GPU.html)
87
+ for more information).
88
+
89
+ This means leveraging the AMReX data-structures, macros, and
90
+ functions. The unit tests (see :ref: `sec:unit_tests `) provide a good
91
+ reference for how to interface the Microphysics solvers and physics
92
+ terms with an AMReX-based code.
93
+
94
+ There are a few places where Microphysics behaves slightly differently
95
+ when running on a CPU vs. a GPU:
96
+
97
+ * In the VODE integrator, we disable Jacobian-caching to save memory.
98
+ See :ref: `ch:networks:integrators `.
99
+
100
+ * In general we disable printing from GPU kernels, due to register
101
+ pressure. Some output can be enabled by compiling with
102
+ ``USE_GPU_PRINTF=TRUE ``.
0 commit comments