Skip to content

Commit b905b98

Browse files
committed
add namespace scoping for geochemistry
1 parent 39e1d67 commit b905b98

13 files changed

+38
-20
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ set( hpcReact_headers
66
reactions/geochemistry/EquilibriumReactions.hpp
77
reactions/geochemistry/KineticReactions.hpp
88
reactions/geochemistry/ReactionsBase.hpp
9-
reactions/geochemistry/GeochemicalReactionsParameters.hpp
10-
reactions/geochemistry/GeochemicalReactionsParametersPredefined.hpp
9+
reactions/geochemistry/Parameters.hpp
10+
reactions/geochemistry/ParametersPredefined.hpp
1111
)
1212

1313
set( hpcReact_sources

src/reactions/base/unitTests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Specify list of tests
22
set( testSourceFiles
3-
testGeochemicalReactionsParameters.cpp )
3+
testParameters.cpp )
44

55
set( dependencyList hpcReact gtest )
66

src/reactions/base/unitTests/testReactionsParameterData.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include "../ReactionsBase_impl.hpp"
33
#include "MultiVector.hpp"
44
#include "common/CArrayWrapper.hpp"
5-
#include "../GeochemicalReactionsParametersPredefined.hpp"
5+
#include "../ParametersPredefined.hpp"
66

77
#include <gtest/gtest.h>
88

src/reactions/geochemistry/EquilibriumReactions.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
namespace hpcReact
1111
{
12+
namespace geochemistry
13+
{
1214

1315
template< typename REAL_TYPE,
1416
typename REAL_DATA_ARRAY_1D_VIEW_TYPE,
@@ -96,7 +98,7 @@ class EquilibriumReactions : public ReactionsBase< REAL_TYPE,
9698

9799
};
98100

99-
101+
} // namespace geochemistry
100102
} // namespace hpcReact
101103

102104
#include "common/macrosCleanup.hpp"

src/reactions/geochemistry/EquilibriumReactions_impl.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
//#include "lapack.h"
77
namespace hpcReact
88
{
9+
namespace geochemistry
10+
{
911

1012
template< typename REAL_TYPE,
1113
typename REAL_DATA_ARRAY_1D_VIEW_TYPE,
@@ -324,7 +326,7 @@ EquilibriumReactions< REAL_TYPE,
324326

325327
}
326328

327-
329+
} // namespace geochemistry
328330
} // namespace hpcReact
329331

330332
#include "common/macrosCleanup.hpp"

src/reactions/geochemistry/KineticReactions.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
namespace hpcReact
77
{
8+
namespace geochemistry
9+
{
810

911
template< typename REAL_TYPE,
1012
typename REAL_DATA_ARRAY_1D_VIEW_TYPE,
@@ -45,6 +47,7 @@ class KineticReactions : public ReactionsBase< REAL_TYPE,
4547

4648
};
4749

50+
} // namespace geochemistry
4851
} // namespace hpcReact
4952

5053
#include "common/macrosCleanup.hpp"

src/reactions/geochemistry/KineticReactions_impl.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33

44
namespace hpcReact
55
{
6+
namespace geochemistry
7+
{
8+
69
// function to the reaction rate. Includes impact of temperature, concentration, surface area, volume fraction and porosity
710
template< typename REAL_TYPE,
811
typename REAL_DATA_ARRAY_1D_VIEW_TYPE,
@@ -60,6 +63,7 @@ KineticReactions< REAL_TYPE,
6063
}
6164
}
6265

66+
} // namespace geochemistry
6367
} // namespace hpcReact
6468

6569
#include "common/macrosCleanup.hpp"

src/reactions/geochemistry/GeochemicalReactionsParameters.hpp renamed to src/reactions/geochemistry/Parameters.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ template< typename REAL_TYPE,
99
typename INT_TYPE,
1010
int NUM_PRIMARY_SPECIES,
1111
int NUM_SECONDARY_SPECIES >
12-
struct EquilibriumGeochemicalReactionsParameters
12+
struct EquilibriumParameters
1313
{
1414
using RealType = REAL_TYPE;
1515
using IntType = INT_TYPE;
@@ -39,7 +39,7 @@ template< typename REAL_TYPE,
3939
int NUM_PRIMARY_SPECIES,
4040
int NUM_SECONDARY_SPECIES,
4141
int NUM_KINETIC_REACTIONS >
42-
struct KineticGeochemicalReactionsParameters
42+
struct KineticParameters
4343
{
4444
using RealType = REAL_TYPE;
4545
using IntType = INT_TYPE;
@@ -72,7 +72,7 @@ template< typename REAL_TYPE,
7272
int NUM_PRIMARY_SPECIES,
7373
int NUM_SECONDARY_SPECIES,
7474
int NUM_KINETIC_REACTIONS >
75-
struct GeochemicalReactionsParameters
75+
struct Parameters
7676
{
7777
using RealType = REAL_TYPE;
7878
using IntType = INT_TYPE;
@@ -104,12 +104,12 @@ struct GeochemicalReactionsParameters
104104
template< int ... PRIMARY_SPECIES,
105105
int ... SECONDARY_SPECIES,
106106
int ... SPECIES_PERMUTATIONS >
107-
constexpr EquilibriumGeochemicalReactionsParameters< REAL_TYPE, INT_TYPE, NUM_PRIMARY_SPECIES, NUM_SECONDARY_SPECIES >
107+
constexpr EquilibriumParameters< REAL_TYPE, INT_TYPE, NUM_PRIMARY_SPECIES, NUM_SECONDARY_SPECIES >
108108
equilibriumReactionsParams_impl( std::integer_sequence< int, PRIMARY_SPECIES... >,
109109
std::integer_sequence< int, SECONDARY_SPECIES... >,
110110
std::integer_sequence< int, SPECIES_PERMUTATIONS... > )
111111
{
112-
return EquilibriumGeochemicalReactionsParameters< REAL_TYPE, INT_TYPE, NUM_PRIMARY_SPECIES, NUM_SECONDARY_SPECIES >{
112+
return EquilibriumParameters< REAL_TYPE, INT_TYPE, NUM_PRIMARY_SPECIES, NUM_SECONDARY_SPECIES >{
113113
{m_ionSizePrimary[ PRIMARY_SPECIES ]...},
114114
{m_ionSizeSec[ SECONDARY_SPECIES ]...},
115115
{m_chargePrimary[ PRIMARY_SPECIES ]...},
@@ -122,7 +122,7 @@ struct GeochemicalReactionsParameters
122122
};
123123
}
124124

125-
constexpr EquilibriumGeochemicalReactionsParameters< REAL_TYPE, INT_TYPE, NUM_PRIMARY_SPECIES, NUM_SECONDARY_SPECIES >
125+
constexpr EquilibriumParameters< REAL_TYPE, INT_TYPE, NUM_PRIMARY_SPECIES, NUM_SECONDARY_SPECIES >
126126
equilibriumReactions()
127127
{
128128
return equilibriumReactionsParams_impl( std::make_integer_sequence< int, NUM_PRIMARY_SPECIES >{},

src/reactions/geochemistry/GeochemicalReactionsParametersPredefined.hpp renamed to src/reactions/geochemistry/ParametersPredefined.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
#pragma once
22

3-
#include "GeochemicalReactionsParameters.hpp"
3+
#include "Parameters.hpp"
44

55
namespace hpcReact
66
{
7-
7+
namespace geochemistry
8+
{
89

910
constexpr
10-
GeochemicalReactionsParameters< double, int, 7, 11, 2 > chemicalReactionsParams =
11+
Parameters< double, int, 7, 11, 2 > chemicalReactionsParams =
1112
{
1213
// m_ionSizePrimary
1314
{ 9.00, 4.00, 6.00, 4.00, 3.00, 8.00, 4.00 },
@@ -54,5 +55,5 @@ GeochemicalReactionsParameters< double, int, 7, 11, 2 > chemicalReactionsParams
5455
1.0
5556
};
5657

57-
58+
} // namespace geochemistry
5859
} // namespace hpcReact

src/reactions/geochemistry/ReactionsBase.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77

88
namespace hpcReact
99
{
10-
10+
namespace geochemistry
11+
{
1112

1213

1314
template< typename REAL_TYPE,
@@ -44,6 +45,7 @@ class ReactionsBase
4445
REAL_TYPE & ionicStrength );
4546
};
4647

48+
} // namespace geochemistry
4749
} // namespace hpcReact
4850

4951
#include "common/macrosCleanup.hpp"

0 commit comments

Comments
 (0)