t8  UNKNOWN
t8code is a C library to manage a forest of adaptive space-trees of general element classes in parallel.
Functions
t8_forest_netcdf.h File Reference

The Header-File providing a function to write out a forest in a NetCDF-4 file. More...

#include <t8_forest/t8_forest_general.h>
#include <t8_netcdf.h>

Go to the source code of this file.

Functions

void t8_forest_write_netcdf (t8_forest_t forest, const char *file_prefix, const char *file_title, int dim, int num_extern_netcdf_vars, t8_netcdf_variable_t *ext_variables[], sc_MPI_Comm comm)
 Creates a netCDF-4 file containing the (geometrical) information about the given forest mesh and additional elementwise data variables This functions calls 't8_forest_write_netcdf_ext()' with default values for 'netcdf_var_storage_mode' (NC_CONTIGUOUS) and 'netcdf_var_mpi_access' (NC_INDEPENDENT). More...
 
void t8_forest_write_netcdf_ext (t8_forest_t forest, const char *file_prefix, const char *file_title, int dim, int num_extern_netcdf_vars, t8_netcdf_variable_t *ext_variables[], sc_MPI_Comm comm, int netcdf_var_storage_mode, int netcdf_var_mpi_access)
 Creates a netCDF-4 file containing the (geometrical) information about the given forest mesh and additional elementwise data variables. More...
 

Detailed Description

The Header-File providing a function to write out a forest in a NetCDF-4 file.

Function Documentation

◆ t8_forest_write_netcdf()

void t8_forest_write_netcdf ( t8_forest_t  forest,
const char *  file_prefix,
const char *  file_title,
int  dim,
int  num_extern_netcdf_vars,
t8_netcdf_variable_t ext_variables[],
sc_MPI_Comm  comm 
)

Creates a netCDF-4 file containing the (geometrical) information about the given forest mesh and additional elementwise data variables This functions calls 't8_forest_write_netcdf_ext()' with default values for 'netcdf_var_storage_mode' (NC_CONTIGUOUS) and 'netcdf_var_mpi_access' (NC_INDEPENDENT).

Parameters
[in]forestA forest.
[in]file_prefixA string which holds the file's name (output file will be 'file_prefix.nc').
[in]file_titleA string to caption the NetCDF-File.
[in]dimThe Dimension of the forest mesh (2D or 3D).
[in]num_extern_netcdf_varsThe number of extern user-defined variables which hold elementwise data (if none, set it to 0).
[in]ext_variablesAn array of pointers of the herein before mentioned user-defined variables (if none, set it to NULL).
[in]commThe sc_MPI_Communicator to use.

◆ t8_forest_write_netcdf_ext()

void t8_forest_write_netcdf_ext ( t8_forest_t  forest,
const char *  file_prefix,
const char *  file_title,
int  dim,
int  num_extern_netcdf_vars,
t8_netcdf_variable_t ext_variables[],
sc_MPI_Comm  comm,
int  netcdf_var_storage_mode,
int  netcdf_var_mpi_access 
)

Creates a netCDF-4 file containing the (geometrical) information about the given forest mesh and additional elementwise data variables.

Parameters
[in]forestA forest.
[in]file_prefixA string which holds the file's name (output file will be 'file_prefix.nc').
[in]file_titleA string to caption the NetCDF-File.
[in]dimThe Dimension of the forest mesh (2D or 3D).
[in]num_extern_netcdf_varsThe number of extern user-defined variables which hold elementwise data (if none, set it to 0).
[in]ext_variablesAn array of pointers of the herein before mentioned user-defined variables (if none, set it to NULL).
[in]commThe sc_MPI_Communicator to use.
[in]netcdf_var_storage_modeThis defines whether the variables in the netCDF-4 File are stored contiguously (NC_CONTIGUOUS) or in chunks (NC_CHUNKED (in this case netCDF's default chunking scheme is used)).
[in]netcdf_var_mpi_accessThis defines whether the mpi processes are writing the variables' data collectively or independently.
Note
Only use this extended version of t8_forest_write_netcdf if you know exactly what you are doing. In all other cases, we recommend using t8_forest_write_netcdf instead.