@@ -8,29 +8,29 @@ namespace bulkGeneric
88{
99
1010template < typename REAL_TYPE,
11- typename REAL_DATA_ARRAY_1D_VIEW_TYPE,
12- typename REAL_CONST_DATA_ARRAY_1D_VIEW_TYPE,
13- typename REAL_DATA_ARRAY_2D_VIEW_TYPE,
1411 typename INT_TYPE,
1512 typename INDEX_TYPE >
1613class KineticReactions
1714{
1815public:
1916
2017 using RealType = REAL_TYPE;
21- using RealDataArrayView1d = REAL_DATA_ARRAY_1D_VIEW_TYPE;
22- using RealConstDataArrayView1d = REAL_CONST_DATA_ARRAY_1D_VIEW_TYPE;
23- using RealDataArrayView2d = REAL_DATA_ARRAY_2D_VIEW_TYPE;
18+ // using RealDataArrayView1d = REAL_DATA_ARRAY_1D_VIEW_TYPE;
19+ // using RealConstDataArrayView1d = REAL_CONST_DATA_ARRAY_1D_VIEW_TYPE;
20+ // using RealDataArrayView2d = REAL_DATA_ARRAY_2D_VIEW_TYPE;
2421 using IntType = INT_TYPE;
2522 using IndexType = INDEX_TYPE;
2623
27- template < typename PARAMS_DATA >
24+ template < typename PARAMS_DATA,
25+ typename ARRAY_1D_TO_CONST,
26+ typename ARRAY_1D,
27+ typename ARRAY_2D >
2828 static HPCREACT_HOST_DEVICE inline void
2929 computeReactionRates ( RealType const & temperature,
3030 PARAMS_DATA const & params,
31- RealConstDataArrayView1d const & primarySpeciesConcentration,
32- RealDataArrayView1d & reactionRates,
33- RealDataArrayView2d & reactionRatesDerivatives )
31+ ARRAY_1D_TO_CONST const & primarySpeciesConcentration,
32+ ARRAY_1D & reactionRates,
33+ ARRAY_2D & reactionRatesDerivatives )
3434 {
3535 computeReactionRates_impl< PARAMS_DATA, true >( temperature,
3636 params,
@@ -39,14 +39,16 @@ class KineticReactions
3939 reactionRatesDerivatives );
4040 }
4141
42- template < typename PARAMS_DATA >
42+ template < typename PARAMS_DATA,
43+ typename ARRAY_1D_TO_CONST,
44+ typename ARRAY_1D >
4345 static HPCREACT_HOST_DEVICE inline void
4446 computeReactionRates ( RealType const & temperature,
4547 PARAMS_DATA const & params,
46- RealConstDataArrayView1d const & primarySpeciesConcentration,
47- RealDataArrayView1d & reactionRates)
48+ ARRAY_1D_TO_CONST const & primarySpeciesConcentration,
49+ ARRAY_1D & reactionRates)
4850 {
49- RealDataArrayView2d reactionRatesDerivatives;
51+ REAL_TYPE reactionRatesDerivatives[PARAMS_DATA::numReactions][PARAMS_DATA::numSpecies] = { 0.0 } ;
5052 computeReactionRates_impl< PARAMS_DATA, false >( temperature,
5153 params,
5254 primarySpeciesConcentration,
@@ -55,13 +57,16 @@ class KineticReactions
5557 }
5658
5759
58- template < typename PARAMS_DATA >
60+ template < typename PARAMS_DATA,
61+ typename ARRAY_1D_TO_CONST,
62+ typename ARRAY_1D,
63+ typename ARRAY_2D >
5964 static HPCREACT_HOST_DEVICE inline void
6065 computeSpeciesRates ( RealType const & temperature,
6166 PARAMS_DATA const & params,
62- RealConstDataArrayView1d const & primarySpeciesConcentration,
63- RealDataArrayView1d & speciesRates,
64- RealDataArrayView2d & primarySpeciesRatesDerivatives )
67+ ARRAY_1D_TO_CONST const & primarySpeciesConcentration,
68+ ARRAY_1D & speciesRates,
69+ ARRAY_2D & primarySpeciesRatesDerivatives )
6570 {
6671 computeSpeciesRates_impl< PARAMS_DATA, true >( temperature,
6772 params,
@@ -70,14 +75,16 @@ class KineticReactions
7075 primarySpeciesRatesDerivatives );
7176 }
7277
73- template < typename PARAMS_DATA >
78+ template < typename PARAMS_DATA,
79+ typename ARRAY_1D_TO_CONST,
80+ typename ARRAY_1D >
7481 static HPCREACT_HOST_DEVICE inline void
7582 computeSpeciesRates ( RealType const & temperature,
7683 PARAMS_DATA const & params,
77- RealConstDataArrayView1d const & primarySpeciesConcentration,
78- RealDataArrayView1d & speciesRates )
84+ ARRAY_1D_TO_CONST const & primarySpeciesConcentration,
85+ ARRAY_1D & speciesRates )
7986 {
80- RealDataArrayView2d primarySpeciesRatesDerivatives;
87+ double primarySpeciesRatesDerivatives;
8188 computeSpeciesRates_impl< PARAMS_DATA, false >( temperature,
8289 params,
8390 primarySpeciesConcentration,
@@ -87,21 +94,29 @@ class KineticReactions
8794
8895
8996private:
90- template < typename PARAMS_DATA, bool CALCULATE_DERIVATIVES >
97+ template < typename PARAMS_DATA,
98+ bool CALCULATE_DERIVATIVES,
99+ typename ARRAY_1D_TO_CONST,
100+ typename ARRAY_1D,
101+ typename ARRAY_2D >
91102 static HPCREACT_HOST_DEVICE inline void
92103 computeReactionRates_impl ( RealType const & temperature,
93104 PARAMS_DATA const & params,
94- RealConstDataArrayView1d const & primarySpeciesConcentration,
95- RealDataArrayView1d & reactionRates,
96- RealDataArrayView2d & reactionRatesDerivatives );
105+ ARRAY_1D_TO_CONST const & primarySpeciesConcentration,
106+ ARRAY_1D & reactionRates,
107+ ARRAY_2D & reactionRatesDerivatives );
97108
98- template < typename PARAMS_DATA, bool CALCULATE_DERIVATIVES >
109+ template < typename PARAMS_DATA,
110+ bool CALCULATE_DERIVATIVES,
111+ typename ARRAY_1D_TO_CONST,
112+ typename ARRAY_1D,
113+ typename ARRAY_2D >
99114 static HPCREACT_HOST_DEVICE inline void
100115 computeSpeciesRates_impl ( RealType const & temperature,
101- PARAMS_DATA const & params,
102- RealConstDataArrayView1d const & primarySpeciesConcentration,
103- RealDataArrayView1d & speciesRates,
104- RealDataArrayView2d & primarySpeciesRatesDerivatives );
116+ PARAMS_DATA const & params,
117+ ARRAY_1D_TO_CONST const & primarySpeciesConcentration,
118+ ARRAY_1D & speciesRates,
119+ ARRAY_2D & primarySpeciesRatesDerivatives );
105120
106121};
107122
0 commit comments