You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are some initial thoughts for an API that would allow one to do more than just control the main time integration loop from outside. The idea is to keep this initial post updated (by anyone) with the results of the subsequent discussion.
Basic querying
Functions to get basic information from Trixi.jl.
inttrixi_ndims(inthandle); // Return number of spatial dimensionsinttrixi_nelements(inthandle); // Return number of elements (cells)inttrixi_polydeg(inthandle); // Return polynomial degree of DGSEM approximationinttrixi_nvariables(inthandle); // Return number of (conservative) variablesinttrixi_ndofs(inthandle); // Return total number of degrees of freedominttrixi_ndofs_element(inthandle); // Return number of degrees of freedom for one element
Raw data exchange
Direct access to solution data u.
voidtrixi_load_u(double*u, inthandle); // Load data from Trixi.jl into `u`voidtrixi_store_u(constdouble*u, inthandle); // Store data from `u` in Trixi.jl
Block-structured data exchange
DGSEM has >> 1 degrees of freedom (DOF) per element. However, other programs might not care for our Gauss node distribution and just want equidistant data (a.k.a. finite-volume-type block-structured data), e.g., 8x8x8 cell-centered values per element. Thus we provide convenience functions that allow loading and storing in such block-structured format and do the conversion to Gauss nodes internally.
voidtrixi_set_blocksize(intblocksize, inthandle); // Set 1D block sizeinttrixi_get_blocksize(inthandle); // Get 1D block sizeinttrixi_ndofs_block(inthandle); // Return total #DOFs for block-structured datavoidtrixi_load_u_block(double*u, inthandle); // Load block-structured data from Trixi.jlvoidtrixi_store_u_block(constdouble*u, inthandle); // Store block structured data in Trixi.jl
The text was updated successfully, but these errors were encountered:
int trixi_ndims(int handle); // Return number of spatial dimensions
int trixi_nelements(int handle); // Return number of elements (cells) on local MPI rank
int trixi_nelements_global(int handle); // Return global number of element (cells)
int trixi_nvariables(int handle); // Return number of (conservative) variables
int trixi_polydeg(int handle); // Return polynomial degree of DGSEM approximation
int trixi_ndofs(int handle); // Return total number of degrees of freedom
int trixi_ndofs_element(int handle); // Return number of degrees of freedom for one element
Data exchange
Pointwise
void trixi_load_primitive_vars(int handle, int variable_id, double * data);
Compute primitive variables and load variable with variable_id into data.
void trixi_store_primitive_vars(int handle, int variable_id, double * data);
Piecewise constant
void trixi_load_element_averaged_primitive_vars(int handle, int variable_id, double * data);
Compute cell-wise averages of variable with variable_id and load into data.
void trixi_store_cell_averages(double * data, int handle);
Store cell-wise averages for Trixi, e.g. a velocity field for a transport problem.
DG aware
Data would need to be interpolated to Gauss nodes. This could be done using a finer mesh, i.e. n^d finite-volume-type cells are used to set up a DG polynomial on a single cell with n^d DOFs.
Here are some initial thoughts for an API that would allow one to do more than just control the main time integration loop from outside. The idea is to keep this initial post updated (by anyone) with the results of the subsequent discussion.
Basic querying
Functions to get basic information from Trixi.jl.
Raw data exchange
Direct access to solution data
u
.Block-structured data exchange
DGSEM has >> 1 degrees of freedom (DOF) per element. However, other programs might not care for our Gauss node distribution and just want equidistant data (a.k.a. finite-volume-type block-structured data), e.g., 8x8x8 cell-centered values per element. Thus we provide convenience functions that allow loading and storing in such block-structured format and do the conversion to Gauss nodes internally.
The text was updated successfully, but these errors were encountered: