armi.nuclearDataIO.cccc.geodst module

Read/write a CCCC GEODST geometry definition file.

GEODST files define fine and coarse meshes and mappings between region numbers and mesh indices. They also store some zone information.

File format definition is from [CCCC-IV].

Examples

>>> geo = geodst.readBinary("GEODST")
>>> print(geo.xmesh)
>>> geo.zmesh[-1]*=2  # make a modification to data
>>> geodst.writeBinary(geo, "GEODST2")
class armi.nuclearDataIO.cccc.geodst.GeodstData[source]

Bases: armi.nuclearDataIO.cccc.cccc.DataContainer

Data representation that can be read from or written to a GEODST file.

The region numbers in this data structure START AT 1, not zero! Thus you must always remember the off-by-one conversion when comparing with list or matrix indices.

Notes

Analogous to a IsotxsLibrary for ISTOXS files.

class armi.nuclearDataIO.cccc.geodst.GeodstStream(data: armi.nuclearDataIO.cccc.cccc.DataContainer, fileName: str, fileMode: str)[source]

Bases: armi.nuclearDataIO.cccc.cccc.StreamWithDataContainer

Stream for reading to/writing from with GEODST data.

Parameters
  • geom (GeodstData) – Data structure

  • fileName (str) – path to geodst file

  • fileMode (str) – string indicating if fileName is being read or written, and in ascii or binary format

Create an instance of a Stream.

Parameters
  • fileName (str) – name of the file to be read

  • fileMode (str) – the file mode, i.e. ‘w’ for writing ASCII, ‘r’ for reading ASCII, ‘wb’ for writing binary, and ‘rb’ for reading binary.

static _getDataContainer() → armi.nuclearDataIO.cccc.geodst.GeodstData[source]
readWrite()[source]

Step through the structure of a GEODST file and read/write it.

Logic to control which records will be present is here, which comes directly off the File specification.

_rwFileID()[source]

Read/write file id record.

Notes

The username, version, etc are embedded in this string but it’s usually blank. The number 28 was actually obtained from a hex editor and may be code specific.

_rw1DRecord()[source]

Read/write File specifications on 1D record.

This record contains 27 integers.

_rw2DRecord()[source]

Read/write 1-D coarse mesh boundaries and fine mesh intervals.

_rw3DRecord()[source]

Read/write 2-D coarse mesh boundaries and fine mesh intervals.

_rw4DRecord()[source]

Read/write 3-D coarse mesh boundaries and fine mesh intervals.

_rw5DRecord()[source]

Read/write Geometry data from 5D record.

_rw6DRecord()[source]

Read/write region assignments to coarse mesh interval.

_rw7DRecord()[source]

Read/write region assignments to fine mesh interval.