Package solvcon :: Package io :: Module block :: Class OldTrivialBlockFormat
[hide private]
[frames] | no frames]

Class OldTrivialBlockFormat

source code


Simplest blk format (old).

Nested Classes [hide private]

Inherited from BlockFormat: __metaclass__

Instance Methods [hide private]
 
_save_meta(self, blk, stream)
Returns: nothing.
source code

Inherited from BlockFormat: __init__, load, save

Inherited from core.Format: read_meta

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

Class Methods [hide private]
solvcon.gendata.AttributeDict
_parse_meta(cls, lines)
Parse meta information from the file.
source code

Inherited from core.Format (private): _get_textpart

Static Methods [hide private]

Inherited from BlockFormat (private): _construct_subarrays, _convert_bc

Inherited from core.Format (private): _read_array, _write_array

Class Variables [hide private]
  FORMAT_REV = '0.0.0.1'
revision of format; must be overridden.
  SPEC_OF_META = (('GLOBAL', <type 'str'>), ('DESC', <type 'str'...
the order and converter of each meta-data section occured in the text part; must be overridden.
  META_GLOBAL = ('FORMAT_REV', ('flag_compress', 'compressor'))
  META_DESC = ('blkn', 'fpdtypestr')
  META_GEOM = ('FCMND', 'CLMND', 'CLMFC', 'ndim', 'nnode', 'nfac...
  META_SWITCH = ()
  META_ATT = ('ngroup', 'nbc')
  meta_length = 17
length of all META_ entries; calculated by FormatMeta.

Inherited from BlockFormat: FILE_HEADER

Inherited from core.Format: BINARY_MARKER, READ_BLOCK

Instance Variables [hide private]

Inherited from BlockFormat: compressor, fpdtype

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_save_meta(self, blk, stream)

source code 
Parameters:
  • blk (solvcon.block.Block) - block object to alter.
  • stream (file) - output stream.
Returns:
nothing.

_parse_meta(cls, lines)
Class Method

source code 

Parse meta information from the file.

Parameters:
  • lines (list) - text part of the file.
Returns: solvcon.gendata.AttributeDict
meta information dictionary.
Overrides: core.Format._parse_meta

Class Variable Details [hide private]

SPEC_OF_META

the order and converter of each meta-data section occured in the text part; must be overridden.
Value:
(('GLOBAL', <type 'str'>),
 ('DESC', <type 'str'>),
 ('GEOM', <type 'int'>),
 ('SWITCH', <function strbool at 0x1df4de8>),
 ('ATT', <type 'int'>))

META_GEOM

Value:
('FCMND',
 'CLMND',
 'CLMFC',
 'ndim',
 'nnode',
 'nface',
 'ncell',
 'nbound',
...