Chombo + EB  3.2
ChomboNVector.H
Go to the documentation of this file.
1 #ifdef CH_LANG_CC
2 /*
3  * _______ __
4  * / ___/ / ___ __ _ / / ___
5  * / /__/ _ \/ _ \/ V \/ _ \/ _ \
6  * \___/_//_/\___/_/_/_/_.__/\___/
7  * Please refer to Copyright.txt, in Chombo's root directory.
8  */
9 #endif
10 
11 #ifndef _CHOMBOSUNDIALS_H
12 #define _CHOMBOSUNDIALS_H
13 
14 #include <sundials/sundials_types.h>
15 #include <sundials/sundials_nvector.h>
16 
17 #include "ChomboSundialsAdaptor.H"
18 
19 /// Macros and definitions for SUNDIALS nvector interface
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 //! Forward declare pointer-to type
27 
28 //! content in SUNDIALS nvector, pointer to Chombo adaptor
31  bool own_data;
32 };
33 
34 //! public API
35 N_Vector N_VNew_Ch(SUNContext sunctx, ChomboSundialsAdaptor* adaptor);
36 void N_VDataExchange(N_Vector v);
37 bool N_VEquate(N_Vector x, N_Vector z);
38 
39 // accessor macros
40 #define NV_CONTENT_CH(v) ( static_cast<N_VectorContent_Ch>(v->content) )
41 #define NV_ADAP_CH(v) ( (*NV_CONTENT_CH(v)->adaptor) )
42 #define NV_OWN_DATA_CH(v) ( NV_CONTENT_CH(v)->own_data )
43 
44 #ifdef __cplusplus
45 } // extern "C"
46 #endif
47 
48 #endif
content in SUNDIALS nvector, pointer to Chombo adaptor
Definition: ChomboNVector.H:29
N_Vector N_VNew_Ch(SUNContext sunctx, ChomboSundialsAdaptor *adaptor)
public API
ChomboSundialsAdaptor * adaptor
Definition: ChomboNVector.H:30
Virtual base class contract to interact with SUNDIALS.
Definition: ChomboSundialsAdaptor.H:26
bool own_data
Definition: ChomboNVector.H:31
struct _N_VectorContent_Ch * N_VectorContent_Ch
Macros and definitions for SUNDIALS nvector interface.
Definition: ChomboNVector.H:26
void N_VDataExchange(N_Vector v)
bool N_VEquate(N_Vector x, N_Vector z)