Package solvcon :: Package io :: Module vtk :: Class VtkLegacyUstGridWriter
[hide private]
[frames] | no frames]

Class VtkLegacyUstGridWriter

source code


VTK legacy unstructured mesh file format. Capable for ASCII or BINARY.

Instance Methods [hide private]
 
__init__(self, blk, *args, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
write(self, outf, close_on_finish=False)
Output to VTK file.
source code
str
_convert_scalar_data(self, arr)
Helper to convert scalar data array from a block.
source code
str
_convert_vector_data(self, arr)
Helper to convert vector data array from a block.
source code
str
_make_data_header(self)
Returns: made up unstructred grid data header.
source code
str
_make_nodes(self)
Returns: made up node coordinates.
source code
str
_make_cells(self)
Returns: made up cell definition.
source code
str
_make_value(self)
Returns: made up field value.
source code
str
_make_value_scalar(self)
Returns: made up scalar value.
source code
str
_make_value_vector(self)
Returns: made up vector value.
source code

Inherited from VtkLegacyWriter (private): _make_file_header

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from VtkLegacyWriter (private): _ensure_endian, _get_dtypestr

Class Variables [hide private]

Inherited from VtkLegacyWriter: cltpn_map

Instance Variables [hide private]
  cache_grid
flag to cache the grid data (True) or not (False).
  griddata
cached grid data.
  scalars
dictionary holding scalar data.
  vectors
dictionary holding vector data.

Inherited from VtkLegacyWriter: binary, blk, fpdtype

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, blk, *args, **kw)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

write(self, outf, close_on_finish=False)

source code 

Output to VTK file.

Parameters:
  • outf (file str) - output file object or file name.
  • close_on_finish (bool) - flag close on finishing (True). Default False. If outf is file name, the output file will be close no matter what is set in this flag.
Returns:
nothing

_convert_scalar_data(self, arr)

source code 

Helper to convert scalar data array from a block.

Parameters:
  • arr (numpy.ndarray) - array to be converted. It will be copied and remain untouched.
Returns: str
converted data string.

_convert_vector_data(self, arr)

source code 

Helper to convert vector data array from a block.

Parameters:
  • arr (numpy.ndarray) - array to be converted. It will be copied and remain untouched.
Returns: str
converted data string.

_make_data_header(self)

source code 
Returns: str
made up unstructred grid data header.

_make_nodes(self)

source code 
Returns: str
made up node coordinates.

_make_cells(self)

source code 
Returns: str
made up cell definition.

_make_value(self)

source code 
Returns: str
made up field value.

_make_value_scalar(self)

source code 
Returns: str
made up scalar value.

_make_value_vector(self)

source code 
Returns: str
made up vector value.

Instance Variable Details [hide private]

cache_grid

flag to cache the grid data (True) or not (False). Default True.