Skip to content

module myna.application.deer.mesh

Functionality for operating on Exodus mesh input for a Deer simulation


class NetCDF4Dataset

Class to load and calculate NetCDF4 mesh properties relevant to the Deer app.

Assumes that the NetCDF4 file was generated by Cubit/Sculpt. See Myna's cubit/vtk_to_exodus_region app output for an example.

method NetCDF4Dataset.__init__

__init__(data_file)

Load the mesh and calculate basic properties.

Args:

  • data_file: (str) path to NetCDF data file to load

method NetCDF4Dataset.get_full_orientation_array

get_full_orientation_array()

Generates the full orientation array, including empty blocks

Returns:

  • full_orientation_array: (np.array, size (max_block_number,3)) array describing the Euler angles in Bunge ZXZ notation for all blocks in the mesh, including empty blocks

method NetCDF4Dataset.set_dimensions

set_dimensions(mesh)

Calculates the coordinate dimensions of the netCDF4.Dataset object and sets the self.bounds, shape = (3,)), and self.range, (shape = (3,))

Args:

  • mesh: netCDF4.Dataset object

method NetCDF4Dataset.set_euler_angles

set_euler_angles(mesh)

Extract the Euler angles describing the crystallographic orientation of each block to a numpy array

Args:

  • mesh: netCDF4.Dataset object

method NetCDF4Dataset.set_filled_block_numbers

set_filled_block_numbers(mesh)

Gets the list of non-empty block indices from the mesh

Args:

  • mesh: netCDF4.Dataset object

method NetCDF4Dataset.set_max_block_number

set_max_block_number(mesh)

Finds the largest block number in the netCDF4.Dataset object

Args:

  • mesh: netCDF4.Dataset object

method NetCDF4Dataset.set_n_blocks

set_n_blocks(mesh)

Calculates the number of blocks in the netCDF4.Dataset object

Args:

  • mesh: netCDF4.Dataset object

This file was automatically generated via lazydocs.