#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include "read_exodus_grid.h"
#include "utils_common.h"
#include "io_utils.h"
#include "geometry.h"
#include "read_grid.h"
#include "yac_mpi_internal.h"
#include <netcdf.h>
Go to the source code of this file.
|
| static size_t * | generate_offsets (size_t N, int *counts) |
| |
| static int | partition_idx_from_element_idx (size_t element_idx, size_t num_elements, int num_partitions) |
| |
| void | yac_read_exodus_grid_information_parallel (const char *filename, MPI_Comm comm, yac_coordinate_pointer *node_coords, yac_int **elem_ids, yac_int **node_ids, size_t *num_elem, size_t *num_nodes, int **num_nodes_per_elem, int **num_elem_per_node, size_t **elem_to_node, size_t **node_to_elem) |
| |
| static int | compare_temp_edges (void const *a, void const *b) |
| |
| static int | check_pole (double *vertex) |
| |
| static int | check_lon_edge (double *vertex_a_, double *vertex_b_) |
| |
| static int | check_lat_edge (double *vertex_a, double *vertex_b) |
| |
| struct yac_basic_grid_data | yac_read_exodus_basic_grid_data_parallel (const char *filename, int use_ll_edges, MPI_Comm comm) |
| |
| struct yac_basic_grid * | yac_read_exodus_basic_grid_parallel (char const *filename, char const *gridname, int use_ll_edges, MPI_Comm comm) |
| |
◆ check_lat_edge()
| static int check_lat_edge |
( |
double * | vertex_a, |
|
|
double * | vertex_b ) |
|
static |
◆ check_lon_edge()
| static int check_lon_edge |
( |
double * | vertex_a_, |
|
|
double * | vertex_b_ ) |
|
static |
◆ check_pole()
| static int check_pole |
( |
double * | vertex | ) |
|
|
static |
◆ compare_temp_edges()
| static int compare_temp_edges |
( |
void const * | a, |
|
|
void const * | b ) |
|
static |
◆ generate_offsets()
| static size_t * generate_offsets |
( |
size_t | N, |
|
|
int * | counts ) |
|
static |
◆ partition_idx_from_element_idx()
| static int partition_idx_from_element_idx |
( |
size_t | element_idx, |
|
|
size_t | num_elements, |
|
|
int | num_partitions ) |
|
inlinestatic |
◆ yac_read_exodus_basic_grid_data_parallel()
| struct yac_basic_grid_data yac_read_exodus_basic_grid_data_parallel |
( |
const char * | filename, |
|
|
int | use_ll_edges, |
|
|
MPI_Comm | comm ) |
Reads in an EXODUS-formated grid netcdf file in parallel and returns a yac_basic_grid_data built from it.
- Parameters
-
| [in] | filename | name of the EXODUS-formated grid netcdf file |
| [in] | use_ll_edges | if != 0, assume that all edges of the grid follow circles of either constant longitude or constant latitude and set edge types accordingly. Otherwise it is assumed that all edges follow great circles. |
| [in] | comm | MPI communicator containing all proceses that will get a part of the grid |
- Returns
- yac_basic_grid_data structure containing part of the grid.
- See also
- Configuration of parallel IO in YAC
Definition at line 420 of file read_exodus_grid.c.
◆ yac_read_exodus_basic_grid_parallel()
| struct yac_basic_grid * yac_read_exodus_basic_grid_parallel |
( |
char const * | filename, |
|
|
char const * | gridname, |
|
|
int | use_ll_edges, |
|
|
MPI_Comm | comm ) |
Reads in an EXODUS-formated grid netcdf file in parallel and returns a yac_basic_grid built from it.
- Parameters
-
| [in] | filename | name of the EXODUS-formated grid netcdf file |
| [in] | gridname | name of grid |
| [in] | use_ll_edges | if != 0, assume that all edges of the grid follow circles of either constant longitude or constant latitude and set edge types accordingly. Otherwise it is assumed that all edges follow great circles. |
| [in] | comm | MPI communicator containing all proceses that will get a part of the grid |
- Returns
- yac_basic_grid structure containing part of the grid.
- See also
- Configuration of parallel IO in YAC
Definition at line 547 of file read_exodus_grid.c.
◆ yac_read_exodus_grid_information_parallel()
| void yac_read_exodus_grid_information_parallel |
( |
const char * | filename, |
|
|
MPI_Comm | comm, |
|
|
yac_coordinate_pointer * | node_coords, |
|
|
yac_int ** | elem_ids, |
|
|
yac_int ** | node_ids, |
|
|
size_t * | num_elem, |
|
|
size_t * | num_nodes, |
|
|
int ** | num_nodes_per_elem, |
|
|
int ** | num_elem_per_node, |
|
|
size_t ** | elem_to_node, |
|
|
size_t ** | node_to_elem ) |
Reads in an EXODUS-formated grid netcdf file and returns the grid information in a format that allows the user to set up a yac_basic_grid_data structure. The reading is done in parallel and a basic domain decomposition is applied.
- Parameters
-
| [in] | filename | name of the EXODUS-formated grid netcdf file |
| [in] | comm | MPI communicator containing all proceses that will get a part of the grid |
| [out] | node_coords | Cartesian coordinates of all nodes/vertices |
| [out] | elem_ids | global ids of local elements/cells |
| [out] | node_ids | global ids of local nodes/vertices |
| [out] | num_elem | number of elements/cells in the local part of the grid |
| [out] | num_nodes | number of nodes/vertices in the local part of the the grid |
| [out] | num_nodes_per_elem | number of nodes/vertices per element/cell |
| [out] | num_elem_per_node | number of elements/cells per node/vertex |
| [out] | elem_to_node | local node/vertex indices for each local element/cell |
| [out] | node_to_elem | local element/cell indices for each local node/vertex |
- See also
- Configuration of parallel IO in YAC
Definition at line 46 of file read_exodus_grid.c.