libtrixi
Data Types | Functions/Subroutines
Fortran API

NOTE: It is a known limitation of doxygen that Fortran interfaces will be listed as "Data Types". Please refer to the "Functions/Subroutines" section instead. More...

Data Types

interface  trixi_initialize_c
 
interface  trixi_finalize
 
interface  trixi_version_library_major
 
interface  trixi_version_library_minor
 
interface  trixi_version_library_patch
 
interface  trixi_version_library_c
 
interface  trixi_version_julia_c
 
interface  trixi_version_julia_extended_c
 
interface  trixi_initialize_simulation_c
 
interface  trixi_is_finished_c
 
interface  trixi_step
 
interface  trixi_finalize_simulation
 
interface  trixi_calculate_dt
 
interface  trixi_ndims
 
interface  trixi_nelements
 
interface  trixi_nelementsglobal
 
interface  trixi_ndofs
 
interface  trixi_ndofsglobal
 
interface  trixi_ndofselement
 
interface  trixi_nvariables
 
interface  trixi_nnodes
 
interface  trixi_load_node_reference_coordinates
 
interface  trixi_load_node_weights
 
interface  trixi_load_primitive_vars
 
interface  trixi_load_element_averaged_primitive_vars
 
interface  trixi_get_t8code_forest
 
interface  trixi_eval_julia_c
 

Functions/Subroutines

subroutine trixi_initialize_c (project_directory, depot_path)
 Initialize Julia runtime environment (C char pointer version) More...
 
subroutine trixi_finalize ()
 Finalize Julia runtime environment. More...
 
integer(c_int) function trixi_version_library_major ()
 Return major version number of libtrixi. More...
 
integer(c_int) function trixi_version_library_minor ()
 Return minor version number of libtrixi. More...
 
integer(c_int) function trixi_version_library_patch ()
 Return patch version number of libtrixi. More...
 
type(c_ptr) function trixi_version_library_c ()
 Return full version string of libtrixi (C char pointer version). More...
 
type(c_ptr) function trixi_version_julia_c ()
 Return name and version of loaded julia packages LibTrixi directly depends on (C char pointer version). More...
 
type(c_ptr) function trixi_version_julia_extended_c ()
 Return name and version of all loaded julia packages (C char pointer version). More...
 
integer(c_int) function trixi_initialize_simulation_c (libelixir)
 Set up Trixi simulation (C char pointer version) More...
 
integer(c_int) function trixi_is_finished_c (handle)
 Check if simulation is finished (C integer version) More...
 
subroutine trixi_step (handle)
 Perform next simulation step. More...
 
subroutine trixi_finalize_simulation (handle)
 Finalize simulation. More...
 
real(c_double) function trixi_calculate_dt (handle)
 Get time step length. More...
 
integer(c_int) function trixi_ndims (handle)
 Return number of spatial dimensions. More...
 
integer(c_int) function trixi_nelements (handle)
 Return number of local elements. More...
 
integer(c_int) function trixi_nelementsglobal (handle)
 Return global number of elements. More...
 
integer(c_int) function trixi_ndofs (handle)
 Return number of local degrees of freedom. More...
 
integer(c_int) function trixi_ndofsglobal (handle)
 Return global number of degrees of freedom. More...
 
integer(c_int) function trixi_ndofselement (handle)
 Return number of degrees of freedom per element. More...
 
integer(c_int) function trixi_nvariables (handle)
 Return number of (conservative) variables. More...
 
integer(c_int) function trixi_nnodes (handle)
 Return number of quadrature nodes per dimension. More...
 
subroutine trixi_load_node_reference_coordinates (handle, node_coords)
 Get reference coordinates of 1D quadrature nodes. More...
 
subroutine trixi_load_node_weights (handle, node_weights)
 Get weights of 1D quadrature nodes. More...
 
subroutine trixi_load_primitive_vars (handle, variable_id, data)
 Load primitive variable. More...
 
subroutine trixi_load_element_averaged_primitive_vars (handle, variable_id, data)
 Load element averages for primitive variable. More...
 
type(c_ptr) function trixi_get_t8code_forest (handle)
 Get t8code forest. More...
 
subroutine trixi_eval_julia_c (code)
 Execute Julia code (C char pointer version) More...
 
subroutine trixi_initialize (project_directory, depot_path)
 Initialize Julia runtime environment (Fortran convenience version) More...
 
character(len=:) function, allocatable trixi_version_library ()
 Return full version string of libtrixi (Fortran convenience version). More...
 
character(len=:) function, allocatable trixi_version_julia ()
 Return name and version of loaded julia packages LibTrixi directly depends on (Fortran convenience version). More...
 
character(len=:) function, allocatable trixi_version_julia_extended ()
 Return name and version of all loaded julia packages (Fortran convenience version). More...
 
integer(c_int) function trixi_initialize_simulation (libelixir)
 Set up Trixi simulation (Fortran convencience version) More...
 
logical function trixi_is_finished (handle)
 Check if simulation is finished (Fortran convenience version) More...
 
subroutine trixi_eval_julia (code)
 Execute Julia code (Fortran convenience version) More...
 

Detailed Description

NOTE: It is a known limitation of doxygen that Fortran interfaces will be listed as "Data Types". Please refer to the "Functions/Subroutines" section instead.

Function/Subroutine Documentation

◆ trixi_calculate_dt()

trixi_calculate_dt ( integer(c_int), intent(in), value  handle)

Get time step length.

Parameters
[in]handlesimulation handle
Returns
Time step length
See also
trixi_calculate_dt (C API)

◆ trixi_eval_julia()

subroutine libtrixi::trixi_eval_julia ( character(len=*), intent(in)  code)

Execute Julia code (Fortran convenience version)

Warning
Only for development. Code is not checked prior to execution.
See also
trixi_eval_julia_c (C char pointer version)
trixi_eval_julia_c (C API)

◆ trixi_eval_julia_c()

trixi_eval_julia_c ( character(kind=c_char), dimension(*), intent(in)  code)

Execute Julia code (C char pointer version)

Warning
Only for development. Code is not checked prior to execution.
See also
trixi_eval_julia_c (Fortran convenience version)
trixi_eval_julia_c (C API)

◆ trixi_finalize()

Finalize Julia runtime environment.

Clean up internal states. This routine should be executed near the end of the process' lifetime. After the call to trixi_finalize, no other libtrixi routines may be called anymore, including trixi_finalize itself.

See also
trixi_finalize (C API)

◆ trixi_finalize_simulation()

trixi_finalize_simulation ( integer(c_int), intent(in), value  handle)

Finalize simulation.

Parameters
[in]handlesimulation handle
See also
trixi_finalize_simulation_api_c "trixi_finalize_simulation (C API)"

◆ trixi_get_t8code_forest()

trixi_get_t8code_forest ( integer(c_int), intent(in), value  handle)

Get t8code forest.

Parameters
[in]handlesimulation handle
Returns
t8code forest
See also
trixi_get_t8code_forest (C API)

◆ trixi_initialize()

subroutine libtrixi::trixi_initialize ( character(len=*), intent(in)  project_directory,
character(len=*), intent(in), optional  depot_path 
)

Initialize Julia runtime environment (Fortran convenience version)

Parameters
[in]project_directoryPath to project directory (Fortran string).
[in]depot_pathPath to Julia depot path (Fortran string).
See also
trixi_initialize_c (C char pointer version)
trixi_initialize (C API)

◆ trixi_initialize_c()

trixi_initialize_c ( character(kind=c_char), dimension(*), intent(in)  project_directory,
character(kind=c_char), dimension(*), intent(in), optional  depot_path 
)

Initialize Julia runtime environment (C char pointer version)

Initialize Julia and activate the project at project_directory. If depot_path is given, forcefully set the environment variable JULIA_DEPOT_PATH to the value of depot_path. Ifdepot_pathis not given, then proceed as follows: If JULIA_DEPOT_PATHis already set, do not touch it. Otherwise, set JULIA_DEPOT_PATHtoproject_directory+default_depot_path`.

This routine must be called before most other libtrixi routines can be used. Libtrixi maybe only be initialized once; subsequent calls to trixi_initialize are erroneous.

Parameters
[in]project_directoryPath to project directory (C char pointer)
[in]depot_pathPath to Julia depot path (optional, C char pointer)
See also
trixi_initialize (Fortran convenience version)
trixi_initialize (C API)

◆ trixi_initialize_simulation()

integer(c_int) function libtrixi::trixi_initialize_simulation ( character(len=*), intent(in)  libelixir)

Set up Trixi simulation (Fortran convencience version)

Parameters
[in]libelixirPath to libelexir file.
Returns
handle (integer) to Trixi simulation instance
See also
trixi_initialize_simulation_c (C char pointer version)
trixi_initialize_simulation (C API)

◆ trixi_initialize_simulation_c()

trixi_initialize_simulation_c ( character(kind=c_char), dimension(*), intent(in)  libelixir)

Set up Trixi simulation (C char pointer version)

Parameters
[in]libelixirPath to libelexir file.
Returns
handle (integer) to Trixi simulation instance
See also
trixi_initialize_simulation (Fortran convenience version)
trixi_initialize_simulation (C API)

◆ trixi_is_finished()

logical function libtrixi::trixi_is_finished ( integer(c_int), intent(in)  handle)

Check if simulation is finished (Fortran convenience version)

Parameters
[in]handlesimulation handle
Returns
true if finished, false if not
See also
trixi_is_finished (C integer version)
trixi_is_finished (C API)

◆ trixi_is_finished_c()

trixi_is_finished_c ( integer(c_int), intent(in), value  handle)

Check if simulation is finished (C integer version)

Parameters
[in]handlesimulation handle
Returns
1 if finished, 0 if not
See also
trixi_is_finished (Fortran convenience version)
trixi_is_finished (C API)

◆ trixi_load_element_averaged_primitive_vars()

trixi_load_element_averaged_primitive_vars ( integer(c_int), intent(in), value  handle,
integer(c_int), intent(in), value  variable_id,
real(c_double), dimension(*), intent(in)  data 
)

Load element averages for primitive variable.

Parameters
[in]handlesimulation handle
[in]variable_idindex of variable
[out]dataaveraged values for all elements
See also
trixi_load_element_averaged_primitive_vars (C API)

◆ trixi_load_node_reference_coordinates()

trixi_load_node_reference_coordinates ( integer(c_int), intent(in), value  handle,
real(c_double), dimension(*), intent(out)  node_coords 
)

Get reference coordinates of 1D quadrature nodes.

The reference coordinates in [-1,1] of the quadrature nodes in the current DG scheme are stored in the provided array node_coords. The given array has to be of correct size, i.e. nnodes, and memory has to be allocated beforehand.

Parameters
[in]handlesimulation handle
[out]node_coordsnode reference coordinates
See also
trixi_load_node_reference_coordinates (C API)

◆ trixi_load_node_weights()

trixi_load_node_weights ( integer(c_int), intent(in), value  handle,
real(c_double), dimension(*), intent(out)  node_weights 
)

Get weights of 1D quadrature nodes.

The weights of the quadrature nodes in the current DG scheme are stored in the provided array node_weights. The given array has to be of correct size, i.e. nnodes, and memory has to be allocated beforehand.

Parameters
[in]handlesimulation handle
[out]node_weightsnode weights
See also
trixi_load_node_weights (C API)

◆ trixi_load_primitive_vars()

trixi_load_primitive_vars ( integer(c_int), intent(in), value  handle,
integer(c_int), intent(in), value  variable_id,
real(c_double), dimension(*), intent(in)  data 
)

Load primitive variable.

Parameters
[in]handlesimulation handle
[in]variable_idindex of variable
[out]dataprimitive variable values for all degrees of freedom
See also
trixi_load_primitive_vars (C API)

◆ trixi_ndims()

trixi_ndims ( integer(c_int), intent(in), value  handle)

Return number of spatial dimensions.

Parameters
[in]handlesimulation handle
See also
trixi_ndims (C API)

◆ trixi_ndofs()

trixi_ndofs ( integer(c_int), intent(in), value  handle)

Return number of local degrees of freedom.

Parameters
[in]handlesimulation handle
See also
trixi_ndofs (C API)

◆ trixi_ndofselement()

trixi_ndofselement ( integer(c_int), intent(in), value  handle)

Return number of degrees of freedom per element.

Parameters
[in]handlesimulation handle
See also
trixi_ndofselement (C API)

◆ trixi_ndofsglobal()

trixi_ndofsglobal ( integer(c_int), intent(in), value  handle)

Return global number of degrees of freedom.

Parameters
[in]handlesimulation handle
See also
trixi_ndofsglobal (C API)

◆ trixi_nelements()

trixi_nelements ( integer(c_int), intent(in), value  handle)

Return number of local elements.

Parameters
[in]handlesimulation handle
See also
trixi_nelements (C API)

◆ trixi_nelementsglobal()

trixi_nelementsglobal ( integer(c_int), intent(in), value  handle)

Return global number of elements.

Parameters
[in]handlesimulation handle
See also
trixi_nelementsglobal (C API)

◆ trixi_nnodes()

trixi_nnodes ( integer(c_int), intent(in), value  handle)

Return number of quadrature nodes per dimension.

Parameters
[in]handlesimulation handle
See also
trixi_nnodes (C API)

◆ trixi_nvariables()

trixi_nvariables ( integer(c_int), intent(in), value  handle)

Return number of (conservative) variables.

Parameters
[in]handlesimulation handle
See also
trixi_nvariables (C API

◆ trixi_step()

trixi_step ( integer(c_int), intent(in), value  handle)

Perform next simulation step.

Parameters
[in]handlesimulation handle
See also
trixi_step (C API)

◆ trixi_version_julia()

character(len=:) function, allocatable libtrixi::trixi_version_julia

Return name and version of loaded julia packages LibTrixi directly depends on (Fortran convenience version).

Returns
Name and version of loaded julia packages as Fortran allocatable string.
See also
trixi_version_julia_c (C char pointer version)
trixi_version_julia (C API)

◆ trixi_version_julia_c()

Return name and version of loaded julia packages LibTrixi directly depends on (C char pointer version).

Returns
Name and version of loaded julia packages as C char pointer.
See also
trixi_version_julia (Fortran convenience version)
trixi_version_julia (C API)

◆ trixi_version_julia_extended()

character(len=:) function, allocatable libtrixi::trixi_version_julia_extended

Return name and version of all loaded julia packages (Fortran convenience version).

Returns
Name and version of loaded julia packages as Fortran allocatable string.
See also
trixi_version_julia_extended_c (C char pointer version)
trixi_version_julia_extended (C API)

◆ trixi_version_julia_extended_c()

Return name and version of all loaded julia packages (C char pointer version).

Returns
Name and version of loaded julia packages as C char pointer.
See also
trixi_version_julia_extended (Fortran convenience version)
trixi_version_julia_extended (C API)

◆ trixi_version_library()

character(len=:) function, allocatable libtrixi::trixi_version_library

Return full version string of libtrixi (Fortran convenience version).

Returns
Full version string as Fortran allocatable string.
See also
trixi_version_library_c (C char pointer version)
trixi_version_library (C API)

◆ trixi_version_library_c()

Return full version string of libtrixi (C char pointer version).

Returns
Full version string as C char pointer.
See also
trixi_version_library (Fortran convenience version)
trixi_version_library (C API)

◆ trixi_version_library_major()

Return major version number of libtrixi.

Returns
Major version number as integer.
See also
trixi_version_library_major (C API)

◆ trixi_version_library_minor()

Return minor version number of libtrixi.

Returns
Minor version number as integer.
See also
trixi_version_library_minor (C API)

◆ trixi_version_library_patch()

Return patch version number of libtrixi.

Returns
Patch version number as integer.
See also
trixi_version_library_patch (C API)