Cantera  3.1.0a1
Loading...
Searching...
No Matches
SundialsContext.h
Go to the documentation of this file.
1//! @file SundialsContext.h
2
3// This file is part of Cantera. See License.txt in the top-level directory or
4// at https://cantera.org/license.txt for license and copyright information.
5
6#ifndef CT_SUNDIALSCONTEXT_H
7#define CT_SUNDIALSCONTEXT_H
8
10
11#if CT_SUNDIALS_VERSION >= 60
12 #include "sundials/sundials_context.h"
13#endif
14
15namespace Cantera
16{
17
18//! A wrapper for managing a SUNContext object, need for Sundials >= 6.0
20{
21#if CT_SUNDIALS_VERSION >= 60
22public:
24 #if CT_SUNDIALS_VERSION >= 70
25 SUNContext_Create(SUN_COMM_NULL, &m_context);
26
27 #else
28 SUNContext_Create(nullptr, &m_context);
29 #endif
30 }
32 SUNContext_Free(&m_context);
33 }
34 SUNContext get() {
35 return m_context;
36 }
37
38private:
39 SUNContext m_context;
40#endif
41// For older Sundials versions, this is an empty class
42};
43
44}
45
46#endif
A wrapper for managing a SUNContext object, need for Sundials >= 6.0.
This file contains definitions of constants, types and terms that are used in internal routines and a...
Namespace for the Cantera kernel.
Definition AnyMap.cpp:564