Skip to content

Commit 99d6580

Browse files
committed
added equilibrium reactions and tests
1 parent 1fcc8a8 commit 99d6580

File tree

12 files changed

+824
-22
lines changed

12 files changed

+824
-22
lines changed

src/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set( hpcReact_headers
33
common/macros.hpp
44
common/CArrayWrapper.hpp
55
reactions/base/ReactionsParametersBase.hpp
6+
reactions/bulkGeneric/EquilibriumReactions.hpp
67
reactions/bulkGeneric/KineticReactions.hpp
78
reactions/bulkGeneric/Parameters.hpp
89
reactions/bulkGeneric/ParametersPredefined.hpp
@@ -51,7 +52,7 @@ target_include_directories( hpcReact
5152
# hpcReact_add_code_checks( PREFIX hpcReact
5253
# EXCLUDES "blt/*" )
5354

54-
add_subdirectory( reactions/bulkDebyeHuckel/unitTests )
55+
#add_subdirectory( reactions/bulkDebyeHuckel/unitTests )
5556
add_subdirectory( reactions/bulkGeneric/unitTests )
5657
add_subdirectory( common/unitTests )
5758
add_subdirectory( docs )

src/common/CArrayWrapper.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#pragma once
2+
#include "macros.hpp"
23

3-
#if defined( __CUDACC__ ) || defined( __HIPCC__ )
4-
#define HPCREACT_HOST_DEVICE __host__ __device__
5-
#else
6-
#define HPCREACT_HOST_DEVICE
7-
#endif
84

95
/**
106
* @brief A generic wrapper for C-style arrays of varying dimensionality.
@@ -197,5 +193,3 @@ struct CArrayWrapper< T, DIM0, DIM1, DIM2 >
197193
T data[DIM0][DIM1][DIM2];
198194
};
199195

200-
201-
#undef HPCREACT_HOST_DEVICE

src/common/DirectSystemSolve.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
#pragma once
2+
23
#include "macros.hpp"
34
#include<cmath>
45

56
namespace hpcReact
67
{
78
template< typename REAL_TYPE, int N >
8-
HPCREACT_HOST_DEVICE void solveNxN_pivoted(REAL_TYPE A[N][N], REAL_TYPE b[N], REAL_TYPE x[N])
9+
HPCREACT_HOST_DEVICE
10+
void solveNxN_pivoted(REAL_TYPE A[N][N], REAL_TYPE b[N], REAL_TYPE x[N])
911
{
1012

1113

12-
int pivot[N] = {0, 1, 2}; // Row index tracker
14+
int pivot[N]; // Row index tracker
1315
for (int i = 0; i < N; i++)
1416
{
1517
pivot[i] = i;

src/common/macros.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
#pragma once
2+
13

2-
#ifndef HPCREACT_MACROS_HPP
3-
#define HPCREACT_MACROS_HPP
44

55
#if defined( __CUDACC__ ) || defined( __HIPCC__ )
66
#define HPCREACT_USE_DEVICE
@@ -20,4 +20,3 @@
2020
/// unused.
2121
#define HPCREACT_UNUSED_VAR( ... ) (void)( __VA_ARGS__ )
2222

23-
#endif // HPCREACT_MACROS_HPP

src/common/macrosCleanup.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#undef HPCREACT_USE_DEVICE
2-
#undef HPCREACT_HOST_DEVICE
3-
#undef HPCREACT_GLOBAL
4-
#undef HPCREACT_UNUSED_VAR
5-
#undef UNDEFINE_PREPROCESSOR_VARS
6-
#undef HPCREACT_MACROS_HPP
1+
// #undef HPCREACT_USE_DEVICE
2+
// #undef HPCREACT_HOST_DEVICE
3+
// #undef HPCREACT_GLOBAL
4+
// #undef HPCREACT_UNUSED_VAR
5+
// #undef UNDEFINE_PREPROCESSOR_VARS
6+
// #undef HPCREACT_MACROS_HPP

0 commit comments

Comments
 (0)