Usage Reference for pyvisfile.silo

pyvisfile.silo.get_silo_version()
pyvisfile.silo.set_deprecate_warnings(max)

Silo 4.6.1 or newer only.

Database file object

class pyvisfile.silo.SiloFile[source]
close()
get_toc()

Returns a DBToc instance.

get_curve(name)

Returns a DBCurve instance.

get_quadmesh(name)

Returns a DBQuadMesh instance.

get_quadvar(name)

Returns a DBQuadVar instance.

put_curve(*args, **kwargs)[source]

Overloaded function.

  1. put_curve(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: numpy.ndarray[numpy.float32], arg2: numpy.ndarray[numpy.float32], arg3: (anonymous namespace)::DBoptlistWrapper) -> None

  2. put_curve(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: numpy.ndarray[numpy.float64], arg2: numpy.ndarray[numpy.float64], arg3: (anonymous namespace)::DBoptlistWrapper) -> None

put_defvars(vname, vars)[source]

Add an defined variable (“expression”) to this database.

The vars argument consists of a list of tuples of type (name, definition) or (name, definition, DB_VARTYPE_SCALAR | DB_VARTYPE_VECTOR) or even (name, definition, DB_VARTYPE_XXX, {options}) If the type is not specified, scalar is assumed.

put_multimesh(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: sequence, arg2: (anonymous namespace)::DBoptlistWrapper)None[source]
put_multivar(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: sequence, arg2: (anonymous namespace)::DBoptlistWrapper)None[source]
put_pointmesh(*args, **kwargs)[source]

Overloaded function.

  1. put_pointmesh(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: numpy.ndarray[numpy.float32], arg2: (anonymous namespace)::DBoptlistWrapper) -> None

  2. put_pointmesh(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: numpy.ndarray[numpy.float64], arg2: (anonymous namespace)::DBoptlistWrapper) -> None

put_pointvar(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: object, arg3: (anonymous namespace)::DBoptlistWrapper)None[source]
put_pointvar1(*args, **kwargs)[source]

Overloaded function.

  1. put_pointvar1(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: numpy.ndarray[numpy.float32], arg3: (anonymous namespace)::DBoptlistWrapper) -> None

  2. put_pointvar1(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: numpy.ndarray[numpy.float64], arg3: (anonymous namespace)::DBoptlistWrapper) -> None

put_quadmesh(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: object, arg2: int, arg3: (anonymous namespace)::DBoptlistWrapper)None[source]
put_quadvar(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: object, arg3: object, arg4: object, arg5: int, arg6: (anonymous namespace)::DBoptlistWrapper)None[source]
put_quadvar1(*args, **kwargs)[source]

Overloaded function.

  1. put_quadvar1(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: numpy.ndarray[numpy.float32], arg3: sequence, arg4: int, arg5: (anonymous namespace)::DBoptlistWrapper) -> None

  2. put_quadvar1(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: numpy.ndarray[numpy.float64], arg3: sequence, arg4: int, arg5: (anonymous namespace)::DBoptlistWrapper) -> None

put_ucdmesh(*args, **kwargs)[source]

Overloaded function.

  1. put_ucdmesh(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: sequence, arg2: numpy.ndarray[numpy.float32], arg3: int, arg4: str, arg5: str, arg6: (anonymous namespace)::DBoptlistWrapper) -> None

  2. put_ucdmesh(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: sequence, arg2: numpy.ndarray[numpy.float64], arg3: int, arg4: str, arg5: str, arg6: (anonymous namespace)::DBoptlistWrapper) -> None

put_ucdvar(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: object, arg3: object, arg4: int, arg5: (anonymous namespace)::DBoptlistWrapper)None[source]
put_ucdvar1(*args, **kwargs)[source]

Overloaded function.

  1. put_ucdvar1(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: numpy.ndarray[numpy.float32], arg3: int, arg4: (anonymous namespace)::DBoptlistWrapper) -> None

  2. put_ucdvar1(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: str, arg2: numpy.ndarray[numpy.float64], arg3: int, arg4: (anonymous namespace)::DBoptlistWrapper) -> None

put_zonelist_2(self: pyvisfile.silo._internal.DBFile, arg0: str, arg1: int, arg2: int, arg3: std::vector<int, std::allocator<int> >, arg4: int, arg5: int, arg6: std::vector<int, std::allocator<int> >, arg7: std::vector<int, std::allocator<int> >, arg8: std::vector<int, std::allocator<int> >, arg9: (anonymous namespace)::DBoptlistWrapper)None[source]

Support for Parallel Computation

class pyvisfile.silo.ParallelSiloFile(pathname, rank, ranks, *args, **kwargs)[source]

A SiloFile that automatically creates a parallel master file.

This class is meant to be instantiated on every rank of an MPI computation. It creates one data file per rank, and it automatically chooses a rank that writes a master file.

The contents of the master file is automatically built, without any further user intervention.

A .silo extension is automatically appended to pathname for the master file, as are rank numbers and the extension for each individual rank.

This class can be used as a context manager in with statement.

__init__(pathname, rank, ranks, *args, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

close()[source]
put_zonelist(*args, **kwargs)[source]
put_zonelist_2(*args, **kwargs)[source]
put_ucdmesh(mname, coordnames, coords, nzones, zonel_name, facel_name, optlist)[source]
put_ucdvar1(vname, mname, vec, centering, optlist=None)[source]
put_ucdvar(vname, mname, varnames, vars, centering, optlist=None)[source]
put_defvars(vname, vars)[source]

Add an defined variable (“expression”) to this database.

The vars argument consists of a list of tuples of type (name, definition) or (name, definition, DB_VARTYPE_SCALAR | DB_VARTYPE_VECTOR). or even (name, definition, DB_VARTYPE_XXX, {options}). If the type is not specified, scalar is assumed.

put_pointmesh(mname, coords, optlist=None)[source]
put_pointvar1(vname, mname, var, optlist=None)[source]
put_pointvar(vname, mname, vars, optlist=None)[source]
put_quadmesh(mname, coords, coordtype=130, optlist=None)[source]
put_quadvar1(vname, mname, var, dims, centering, optlist=None)[source]
put_quadvar(vname, mname, varnames, vars, dims, centering, optlist=None)[source]

Supporting Objects

class pyvisfile.silo.IntVector
append(val)
extend(iterable)
reserve(count)

Data objects

class pyvisfile.silo.DBToc
array_names
csgmesh_names
csgvar_names
curve_names
defvars_names
dir_names
groupelmap_names
mat_names
matspecies_names
mrgtree_names
mrgvar_names
multimat_names
multimatspecies_names
multimesh_names
multimeshadj_names
multivar_names
obj_names
ptmesh_names
ptvar_names
qmesh_names
qvar_names
ucdmesh_names
ucdvar_names
var_names
class pyvisfile.silo.DBCurve
id
origin
reference
title
x
xlabel
xunits
xvarname
y
ylabel
yunits
yvarname
class pyvisfile.silo.DBQuadMesh
base_index
block_no
coord_sys
coords
coordtype
cycle
dtime
facetype
group_no
guihide
id
labels
major_order
max_extents
max_index
min_extents
min_index
mrgtree_name
name
ndims
nnodes
nspace
origin
planar
size_index
start_index
stride
time
units
class pyvisfile.silo.DBQuadVar
align
ascii_labels
cycle
dtime
guihide
id
label
major_order
max_index
meshid
meshname
min_index
mixlen
name
ndims
nels
nvals
origin
stride
time
units
use_specmf
vals

Constants

Drivers

pyvisfile.silo.DB_NETCDF
pyvisfile.silo.DB_PDB
pyvisfile.silo.DB_TAURUS
pyvisfile.silo.DB_UNKNOWN
pyvisfile.silo.DB_DEBUG
pyvisfile.silo.DB_HDF5

The below entries only work for Silo 4.6.1 and newer.

pyvisfile.silo.DB_HDF5_SEC2
pyvisfile.silo.DB_HDF5_STDIO
pyvisfile.silo.DB_HDF5_CORE
pyvisfile.silo.DB_HDF5_MPIO
pyvisfile.silo.DB_HDF5_MPIOP

Flags for DBCreate

pyvisfile.silo.DB_CLOBBER
pyvisfile.silo.DB_NOCLOBBER

Flags for DBOpen

pyvisfile.silo.DB_READ
pyvisfile.silo.DB_APPEND

Target machine for DBCreate

pyvisfile.silo.DB_LOCAL
pyvisfile.silo.DB_SUN3
pyvisfile.silo.DB_SUN4
pyvisfile.silo.DB_SGI
pyvisfile.silo.DB_RS6000
pyvisfile.silo.DB_CRAY
pyvisfile.silo.DB_INTEL

Options

pyvisfile.silo.DBOPT_ALIGN
pyvisfile.silo.DBOPT_COORDSYS
pyvisfile.silo.DBOPT_CYCLE
pyvisfile.silo.DBOPT_FACETYPE
pyvisfile.silo.DBOPT_HI_OFFSET
pyvisfile.silo.DBOPT_LO_OFFSET
pyvisfile.silo.DBOPT_LABEL
pyvisfile.silo.DBOPT_XLABEL
pyvisfile.silo.DBOPT_YLABEL
pyvisfile.silo.DBOPT_ZLABEL
pyvisfile.silo.DBOPT_MAJORORDER
pyvisfile.silo.DBOPT_NSPACE
pyvisfile.silo.DBOPT_ORIGIN
pyvisfile.silo.DBOPT_PLANAR
pyvisfile.silo.DBOPT_TIME
pyvisfile.silo.DBOPT_UNITS
pyvisfile.silo.DBOPT_XUNITS
pyvisfile.silo.DBOPT_YUNITS
pyvisfile.silo.DBOPT_ZUNITS
pyvisfile.silo.DBOPT_DTIME
pyvisfile.silo.DBOPT_USESPECMF
pyvisfile.silo.DBOPT_XVARNAME
pyvisfile.silo.DBOPT_YVARNAME
pyvisfile.silo.DBOPT_ZVARNAME
pyvisfile.silo.DBOPT_ASCII_LABEL
pyvisfile.silo.DBOPT_MATNOS
pyvisfile.silo.DBOPT_NMATNOS
pyvisfile.silo.DBOPT_MATNAME
pyvisfile.silo.DBOPT_NMAT
pyvisfile.silo.DBOPT_NMATSPEC
pyvisfile.silo.DBOPT_BASEINDEX
pyvisfile.silo.DBOPT_ZONENUM
pyvisfile.silo.DBOPT_NODENUM
pyvisfile.silo.DBOPT_BLOCKORIGIN
pyvisfile.silo.DBOPT_GROUPNUM
pyvisfile.silo.DBOPT_GROUPORIGIN
pyvisfile.silo.DBOPT_NGROUPS
pyvisfile.silo.DBOPT_MATNAMES
pyvisfile.silo.DBOPT_EXTENTS_SIZE
pyvisfile.silo.DBOPT_EXTENTS
pyvisfile.silo.DBOPT_MATCOUNTS
pyvisfile.silo.DBOPT_MATLISTS
pyvisfile.silo.DBOPT_MIXLENS
pyvisfile.silo.DBOPT_ZONECOUNTS
pyvisfile.silo.DBOPT_HAS_EXTERNAL_ZONES
pyvisfile.silo.DBOPT_PHZONELIST
pyvisfile.silo.DBOPT_MATCOLORS
pyvisfile.silo.DBOPT_BNDNAMES
pyvisfile.silo.DBOPT_REGNAMES
pyvisfile.silo.DBOPT_ZONENAMES
pyvisfile.silo.DBOPT_HIDE_FROM_GUI

Error trapping method

pyvisfile.silo.DB_TOP
pyvisfile.silo.DB_NONE
pyvisfile.silo.DB_ALL
pyvisfile.silo.DB_ABORT
pyvisfile.silo.DB_SUSPEND
pyvisfile.silo.DB_RESUME

Errors

pyvisfile.silo.E_NOERROR
pyvisfile.silo.E_BADFTYPE
pyvisfile.silo.E_NOTIMP
pyvisfile.silo.E_NOFILE
pyvisfile.silo.E_INTERNAL
pyvisfile.silo.E_NOMEM
pyvisfile.silo.E_BADARGS
pyvisfile.silo.E_CALLFAIL
pyvisfile.silo.E_NOTFOUND
pyvisfile.silo.E_TAURSTATE
pyvisfile.silo.E_MSERVER
pyvisfile.silo.E_PROTO
pyvisfile.silo.E_NOTDIR
pyvisfile.silo.E_MAXOPEN
pyvisfile.silo.E_NOTFILTER
pyvisfile.silo.E_MAXFILTERS
pyvisfile.silo.E_FEXIST
pyvisfile.silo.E_FILEISDIR
pyvisfile.silo.E_FILENOREAD
pyvisfile.silo.E_SYSTEMERR
pyvisfile.silo.E_FILENOWRITE
pyvisfile.silo.E_INVALIDNAME
pyvisfile.silo.E_NOOVERWRITE
pyvisfile.silo.E_CHECKSUM
pyvisfile.silo.E_NERRORS

Definitions for MAJOR_ORDER

pyvisfile.silo.DB_ROWMAJOR
pyvisfile.silo.DB_COLMAJOR

Definitions for COORD_TYPE

pyvisfile.silo.DB_COLLINEAR
pyvisfile.silo.DB_NONCOLLINEAR
pyvisfile.silo.DB_QUAD_RECT
pyvisfile.silo.DB_QUAD_CURV

Definitions for CENTERING

pyvisfile.silo.DB_NOTCENT
pyvisfile.silo.DB_NODECENT
pyvisfile.silo.DB_ZONECENT
pyvisfile.silo.DB_FACECENT
pyvisfile.silo.DB_BNDCENT

Definitions for COORD_SYSTEM

pyvisfile.silo.DB_CARTESIAN
pyvisfile.silo.DB_CYLINDRICAL
pyvisfile.silo.DB_SPHERICAL
pyvisfile.silo.DB_NUMERICAL
pyvisfile.silo.DB_OTHER

Definitions for ZONE FACE_TYPE

pyvisfile.silo.DB_RECTILINEAR
pyvisfile.silo.DB_CURVILINEAR

Definitions for PLANAR

pyvisfile.silo.DB_AREA
pyvisfile.silo.DB_VOLUME

Definitions for flag values

pyvisfile.silo.DB_ON
pyvisfile.silo.DB_OFF

Definitions for derived variable types

pyvisfile.silo.DB_VARTYPE_SCALAR
pyvisfile.silo.DB_VARTYPE_VECTOR
pyvisfile.silo.DB_VARTYPE_TENSOR
pyvisfile.silo.DB_VARTYPE_SYMTENSOR
pyvisfile.silo.DB_VARTYPE_ARRAY
pyvisfile.silo.DB_VARTYPE_MATERIAL
pyvisfile.silo.DB_VARTYPE_SPECIES
pyvisfile.silo.DB_VARTYPE_LABEL

Definitions for CSG boundary types

pyvisfile.silo.DBCSG_QUADRIC_G
pyvisfile.silo.DBCSG_SPHERE_PR
pyvisfile.silo.DBCSG_ELLIPSOID_PRRR
pyvisfile.silo.DBCSG_PLANE_G
pyvisfile.silo.DBCSG_PLANE_X
pyvisfile.silo.DBCSG_PLANE_Y
pyvisfile.silo.DBCSG_PLANE_Z
pyvisfile.silo.DBCSG_PLANE_PN
pyvisfile.silo.DBCSG_PLANE_PPP
pyvisfile.silo.DBCSG_CYLINDER_PNLR
pyvisfile.silo.DBCSG_CYLINDER_PPR
pyvisfile.silo.DBCSG_BOX_XYZXYZ
pyvisfile.silo.DBCSG_CONE_PNLA
pyvisfile.silo.DBCSG_CONE_PPA
pyvisfile.silo.DBCSG_POLYHEDRON_KF
pyvisfile.silo.DBCSG_HEX_6F
pyvisfile.silo.DBCSG_TET_4F
pyvisfile.silo.DBCSG_PYRAMID_5F
pyvisfile.silo.DBCSG_PRISM_5F

Definitions for 2D CSG boundary types

pyvisfile.silo.DBCSG_QUADRATIC_G
pyvisfile.silo.DBCSG_CIRCLE_PR
pyvisfile.silo.DBCSG_ELLIPSE_PRR
pyvisfile.silo.DBCSG_LINE_G
pyvisfile.silo.DBCSG_LINE_X
pyvisfile.silo.DBCSG_LINE_Y
pyvisfile.silo.DBCSG_LINE_PN
pyvisfile.silo.DBCSG_LINE_PP
pyvisfile.silo.DBCSG_BOX_XYXY
pyvisfile.silo.DBCSG_ANGLE_PNLA
pyvisfile.silo.DBCSG_ANGLE_PPA
pyvisfile.silo.DBCSG_POLYGON_KP
pyvisfile.silo.DBCSG_TRI_3P
pyvisfile.silo.DBCSG_QUAD_4P

Definitions for CSG Region operators

pyvisfile.silo.DBCSG_INNER
pyvisfile.silo.DBCSG_OUTER
pyvisfile.silo.DBCSG_ON
pyvisfile.silo.DBCSG_UNION
pyvisfile.silo.DBCSG_INTERSECT
pyvisfile.silo.DBCSG_DIFF
pyvisfile.silo.DBCSG_COMPLIMENT
pyvisfile.silo.DBCSG_XFORM
pyvisfile.silo.DBCSG_SWEEP

Shape types

These constants only work for Silo 4.6.1 and newer.

pyvisfile.silo.DB_ZONETYPE_BEAM
pyvisfile.silo.DB_ZONETYPE_TRIANGLE
pyvisfile.silo.DB_ZONETYPE_QUAD
pyvisfile.silo.DB_ZONETYPE_POLYHEDRON
pyvisfile.silo.DB_ZONETYPE_TET
pyvisfile.silo.DB_ZONETYPE_PYRAMID
pyvisfile.silo.DB_ZONETYPE_PRISM
pyvisfile.silo.DB_ZONETYPE_HEX

Data types

class pyvisfile.silo.DBdatatype
DB_INT
DB_SHORT
DB_LONG
DB_LONG_LONG
DB_FLOAT
DB_DOUBLE
DB_CHAR
DB_NOTYPE

Object types

class pyvisfile.silo.DBObjectType
DB_INVALID_OBJECT
DB_QUADMESH
DB_QUADVAR
DB_UCDMESH
DB_UCDVAR
DB_MULTIMESH
DB_MULTIVAR
DB_MULTIMAT
DB_MULTIMATSPECIES
DB_MULTIBLOCKMESH
DB_MULTIBLOCKVAR
DB_MULTIMESHADJ
DB_MATERIAL
DB_MATSPECIES
DB_FACELIST
DB_ZONELIST
DB_EDGELIST
DB_PHZONELIST
DB_CSGZONELIST
DB_CSGMESH
DB_CSGVAR
DB_CURVE
DB_DEFVARS
DB_POINTMESH
DB_POINTVAR
DB_ARRAY
DB_DIR
DB_VARIABLE
DB_USERDEF