|
void | trixi_initialize (const char *project_directory, const char *depot_path) |
| Initialize Julia runtime environment. More...
|
|
void | trixi_finalize () |
| Finalize Julia runtime environment. More...
|
|
int | trixi_version_library_major () |
| Return major version number of libtrixi. More...
|
|
int | trixi_version_library_minor () |
| Return minor version number of libtrixi. More...
|
|
int | trixi_version_library_patch () |
| Return patch version number of libtrixi. More...
|
|
const char * | trixi_version_library () |
| Return full version string of libtrixi. More...
|
|
const char * | trixi_version_julia () |
| Return name and version of loaded Julia packages LibTrixi directly depends on. More...
|
|
const char * | trixi_version_julia_extended () |
| Return name and version of all loaded Julia packages. More...
|
|
int | trixi_initialize_simulation (const char *libelixir) |
| Set up Trixi simulation. More...
|
|
void | trixi_finalize_simulation (int handle) |
| Finalize simulation. More...
|
|
int | trixi_is_finished (int handle) |
| Check if simulation is finished. More...
|
|
void | trixi_step (int handle) |
| Perform next simulation step. More...
|
|
int | trixi_ndims (int handle) |
| Return number of spatial dimensions. More...
|
|
int | trixi_nelements (int handle) |
| Return number of local elements. More...
|
|
int | trixi_nelementsglobal (int handle) |
| Return global number of elements. More...
|
|
int | trixi_ndofs (int handle) |
| Return number of local degrees of freedom. More...
|
|
int | trixi_ndofsglobal (int handle) |
| Return global number of degrees of freedom. More...
|
|
int | trixi_ndofselement (int handle) |
| Return number of degrees of freedom per element. More...
|
|
int | trixi_nvariables (int handle) |
| Return number of (conservative) variables. More...
|
|
int | trixi_nnodes (int handle) |
| Return number of quadrature nodes per dimension. More...
|
|
double | trixi_calculate_dt (int handle) |
| Get time step length. More...
|
|
double | trixi_get_simulation_time (int handle) |
| Return current physical time. More...
|
|
void | trixi_load_node_reference_coordinates (int handle, double *node_coords) |
| Get reference coordinates of 1D quadrature nodes. More...
|
|
void | trixi_load_node_weights (int handle, double *node_weights) |
| Get weights of 1D quadrature nodes. More...
|
|
void | trixi_load_primitive_vars (int handle, int variable_id, double *data) |
| Load primitive variable. More...
|
|
void | trixi_load_element_averaged_primitive_vars (int handle, int variable_id, double *data) |
| Load element averages for primitive variable. More...
|
|
void | trixi_register_data (int handle, int index, int size, const double *data) |
| Store data vector in current simulation's registry. More...
|
|
t8_forest_t | trixi_get_t8code_forest (int handle) |
|
void | trixi_eval_julia (const char *code) |
| Execute Julia code. More...
|
|
void trixi_initialize |
( |
const char * |
project_directory, |
|
|
const char * |
depot_path |
|
) |
| |
Initialize Julia runtime environment.
Initialize Julia and activate the project at project_directory
. If depot_path
is not a null pointer, forcefully set the environment variable JULIA_DEPOT_PATH
to the value of depot_path
. If depot_path
is null, then proceed as follows: If JULIA_DEPOT_PATH
is already set, do not touch it. Otherwise, set JULIA_DEPOT_PATH
to project_directory
+ default_depot_path
This function must be called before most other libtrixi functions can be used. Libtrixi maybe only be initialized once; subsequent calls to trixi_initialize
are erroneous.
- Parameters
-
[in] | project_directory | Path to project directory. |
[in] | depot_path | Path to Julia depot path (optional; can be null pointer). |
void trixi_register_data |
( |
int |
handle, |
|
|
int |
index, |
|
|
int |
size, |
|
|
const double * |
data |
|
) |
| |
Store data vector in current simulation's registry.
A reference to the passed data array data
will be stored in the registry of the simulation given by simstate_handle
at given index
. The registry object has to be created in init_simstate()
of the running libelixir and can be used throughout the simulation.
The registry object has to exist, has to be of type LibTrixiDataRegistry
, and has to hold enough data references such that access at index
is valid. Memory storage remains on the user side. It must not be deallocated as long as it might be accessed via the registry. The size of data
has to match size
.
- Parameters
-
[in] | handle | simulation handle |
[in] | index | index in registry where data vector will be stored |
[in] | size | size of given data vector |
[in] | data | data vector to store |
const char* trixi_version_julia |
( |
| ) |
|
Return name and version of loaded Julia packages LibTrixi directly depends on.
The return value is a read-only pointer to a NULL-terminated string with the name and version information of the loaded Julia packages, separated by newlines.
The returned pointer is to static memory and must not be used to change the contents of the version string. Multiple calls to the function will return the same address.
This function is thread-safe. It must be run after trixi_initialize
has been called.
- Returns
- Pointer to a read-only, NULL-terminated character array with the names and versions of loaded Julia packages.
const char* trixi_version_julia_extended |
( |
| ) |
|
Return name and version of all loaded Julia packages.
The return value is a read-only pointer to a NULL-terminated string with the name and version information of all loaded Julia packages, including implicit dependencies, separated by newlines.
The returned pointer is to static memory and must not be used to change the contents of the version string. Multiple calls to the function will return the same address.
This function is thread-safe. It must be run after trixi_initialize
has been called.
- Returns
- Pointer to a read-only, NULL-terminated character array with the names and versions of all loaded Julia packages.
const char* trixi_version_library |
( |
| ) |
|
Return full version string of libtrixi.
The return value is a read-only pointer to a NULL-terminated string with the version information. This may include not just MAJOR.MINOR.PATCH but possibly also additional build or development version information.
The returned pointer is to static memory and must not be used to change the contents of the version string. Multiple calls to the function will return the same address.
This function is thread-safe and may be run before trixi_initialize
has been called.
- Returns
- Pointer to a read-only, NULL-terminated character array with the full version of libtrixi.