Open sloede opened 1 year ago
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
void trixi_load_cell_averages(double * data, int handle);
Compute cell-wise averages and load into u`.
This needs to be changed: not a single array for all variables, but individual arrays for each variablevoid trixi_store_cell_averages(double * data, int handle);
Store cell-wise averages for Trixi, e.g. a velocity field for a transport problem.
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.