Cantera
3.3.0a1
Install
User Guide
Examples
Reference
Develop
Community
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
9
#include "
cantera/base/ct_defs.h
"
10
#include "sundials/sundials_config.h"
11
#include "sundials/sundials_context.h"
12
13
namespace
Cantera
14
{
15
16
//! A wrapper for managing a SUNContext object
17
class
SundialsContext
18
{
19
public
:
20
SundialsContext
() {
21
#if SUNDIALS_VERSION_MAJOR >= 7
22
SUNContext_Create(SUN_COMM_NULL, &m_context);
23
SUNContext_ClearErrHandlers(m_context);
24
#else
25
SUNContext_Create(
nullptr
, &m_context);
26
#endif
27
}
28
~SundialsContext
() {
29
SUNContext_Free(&m_context);
30
}
31
SUNContext get() {
32
return
m_context;
33
}
34
35
private
:
36
SUNContext m_context;
37
};
38
39
}
40
41
#endif
Cantera::SundialsContext
A wrapper for managing a SUNContext object.
Definition
SundialsContext.h:18
ct_defs.h
This file contains definitions of constants, types and terms that are used in internal routines and a...
Cantera
Namespace for the Cantera kernel.
Definition
AnyMap.cpp:595
include
cantera
numerics
SundialsContext.h
Generated by
1.9.7