-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestGenericChainReactions.cpp
More file actions
59 lines (52 loc) · 1.76 KB
/
testGenericChainReactions.cpp
File metadata and controls
59 lines (52 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*
* ------------------------------------------------------------------------------------------------------------
* SPDX-License-Identifier: (BSD-3-Clause)
*
* Copyright (c) 2025- Lawrence Livermore National Security LLC
* All rights reserved
*
* See top level LICENSE files for details.
* ------------------------------------------------------------------------------------------------------------
*/
#include "reactions/unitTestUtilities/kineticReactionsTestUtilities.hpp"
#include "../ChainGeneric.hpp"
using namespace hpcReact;
using namespace hpcReact::unitTest_utilities;
//******************************************************************************
TEST( testChainGenericKineticReactions, computeReactionRatesTest_chainReactionParams )
{
using namespace hpcReact::ChainGeneric;
double const initialSpeciesConcentration[] =
{
1.0, // C1
1e-8, // C2
1e-8 // C3
};
double const surfaceArea[] =
{
0.0, // C1 -> C2
0.0, // C2 -> C3
0.0 // C3 ->
};
double const expectedReactionRates[] =
{
0.05, // C1 -> C2
3e-10, // C2 -> C3
2e-10 // C3 ->
};
double const expectedReactionRatesDerivatives[][3] =
{ { 0.05, 0.0, 0.0 },
{ 0.0, 0.03, 0.0 },
{ 0.0, 0.0, 0.02 } };
computeReactionRatesTest< double >( serialAllKineticParams.kineticReactionsParameters(),
initialSpeciesConcentration,
surfaceArea, // No use. Just to pass something here
expectedReactionRates,
expectedReactionRatesDerivatives );
}
int main( int argc, char * * argv )
{
::testing::InitGoogleTest( &argc, argv );
int const result = RUN_ALL_TESTS();
return result;
}