libtrixi
trixi.h
Go to the documentation of this file.
1 #ifndef TRIXI_H_
2 #define TRIXI_H_
3 
9 // Setup
10 void trixi_initialize(const char * project_directory, const char * depot_path);
11 void trixi_finalize();
12 
13 // Version information
17 const char* trixi_version_library();
18 const char* trixi_version_julia();
19 const char* trixi_version_julia_extended();
20 
21 // Simulation control
22 int trixi_initialize_simulation(const char * libelixir);
23 void trixi_finalize_simulation(int handle);
24 int trixi_is_finished(int handle);
25 void trixi_step(int handle);
26 
27 // Simulation data
28 int trixi_ndims(int handle);
29 int trixi_nelements(int handle);
30 int trixi_nelementsglobal(int handle);
31 int trixi_ndofs(int handle);
32 int trixi_ndofsglobal(int handle);
33 int trixi_ndofselement(int handle);
34 int trixi_nvariables(int handle);
35 int trixi_nnodes(int handle);
36 double trixi_calculate_dt(int handle);
37 void trixi_load_node_reference_coordinates(int handle, double* node_coords);
38 void trixi_load_node_weights(int handle, double* node_weights);
39 void trixi_load_primitive_vars(int handle, int variable_id, double * data);
40 void trixi_load_element_averaged_primitive_vars(int handle, int variable_id, double * data);
41 
42 // T8code
43 #if !defined(T8_H) && !defined(T8_FOREST_GENERAL_H)
44 typedef struct t8_forest *t8_forest_t;
45 #endif
47 
48 // Misc
49 void trixi_eval_julia(const char * code);
50 
55 #endif // ifndef LIBTRIXI_H_
void trixi_finalize()
Finalize Julia runtime environment.
Definition: api.c:157
const char * trixi_version_julia()
Return name and version of loaded Julia packages LibTrixi directly depends on.
Definition: api.c:290
int trixi_version_library_patch()
Return patch version number of libtrixi.
Definition: api.c:236
double trixi_calculate_dt(int handle)
Get time step length.
Definition: api.c:436
const char * trixi_version_julia_extended()
Return name and version of all loaded Julia packages.
Definition: api.c:317
int trixi_nvariables(int handle)
Return number of (conservative) variables.
Definition: api.c:571
void trixi_load_primitive_vars(int handle, int variable_id, double *data)
Load primitive variable.
Definition: api.c:657
void trixi_initialize(const char *project_directory, const char *depot_path)
Initialize Julia runtime environment.
Definition: api.c:101
int trixi_ndofs(int handle)
Return number of local degrees of freedom.
Definition: api.c:516
void trixi_eval_julia(const char *code)
Execute Julia code.
Definition: api.c:734
int trixi_nelementsglobal(int handle)
Return global number of elements.
Definition: api.c:495
int trixi_is_finished(int handle)
Check if simulation is finished.
Definition: api.c:371
int trixi_initialize_simulation(const char *libelixir)
Set up Trixi simulation.
Definition: api.c:349
t8_forest_t trixi_get_t8code_forest(int handle)
Definition: api.c:709
int trixi_ndofselement(int handle)
Return number of degrees of freedom per element.
Definition: api.c:554
struct t8_forest * t8_forest_t
Definition: trixi.h:44
const char * trixi_version_library()
Return full version string of libtrixi.
Definition: api.c:264
int trixi_ndofsglobal(int handle)
Return global number of degrees of freedom.
Definition: api.c:537
void trixi_finalize_simulation(int handle)
Finalize simulation.
Definition: api.c:409
int trixi_version_library_major()
Return major version number of libtrixi.
Definition: api.c:196
int trixi_nelements(int handle)
Return number of local elements.
Definition: api.c:474
void trixi_load_node_weights(int handle, double *node_weights)
Get weights of 1D quadrature nodes.
Definition: api.c:632
int trixi_version_library_minor()
Return minor version number of libtrixi.
Definition: api.c:216
void trixi_step(int handle)
Perform next simulation step.
Definition: api.c:390
void trixi_load_element_averaged_primitive_vars(int handle, int variable_id, double *data)
Load element averages for primitive variable.
Definition: api.c:683
int trixi_ndims(int handle)
Return number of spatial dimensions.
Definition: api.c:453
int trixi_nnodes(int handle)
Return number of quadrature nodes per dimension.
Definition: api.c:588
void trixi_load_node_reference_coordinates(int handle, double *node_coords)
Get reference coordinates of 1D quadrature nodes.
Definition: api.c:610