Package solvcon :: Package io :: Module domain :: Class DomainIO
[hide private]
[frames] | no frames]

Class DomainIO

source code

   object --+    
            |    
core.FormatIO --+
                |
               DomainIO

Proxy to dom directory format.

Nested Classes [hide private]

Inherited from core.FormatIO: __metaclass__

Instance Methods [hide private]
 
__init__(self, **kw)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
save(self, dom=None, dirname=None)
Save the block object into a file.
source code
solvcon.gendata.AttributeDict, list, int
read_meta(self, dirname=None)
Read meta-data of dom file from stream.
source code
solvcon.domain.Collective
load(self, dirname=None, bcmapper=None, with_split=False, domaintype=None)
Load domain from stream with BC mapper applied.
source code
solvcon.block.Block
load_block(self, dirname=None, blkid=None, bcmapper=None)
Load block from stream with BC mapper applied.
source code

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

Instance Variables [hide private]
  compressor
the compression to use: '', 'gz', or 'bz2'
  dirname
directory name of domain.
  dmf
the format class for the domain to be read.
  dom
attached block object.
  fmt
name of the format to use; can be either class name or revision string.
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, **kw)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

save(self, dom=None, dirname=None)

source code 

Save the block object into a file.

Parameters:
  • dom (solvcon.domain.Domain) - to-be-written domain object.
  • dirname (str) - directory name to be read.
Overrides: core.FormatIO.save

read_meta(self, dirname=None)

source code 

Read meta-data of dom file from stream.

Parameters:
  • dirname (str) - the directory of domain data.
Returns: solvcon.gendata.AttributeDict, list, int
meta-data, raw text lines of meta-data, and the length of meta-data in bytes.

load(self, dirname=None, bcmapper=None, with_split=False, domaintype=None)

source code 

Load domain from stream with BC mapper applied.

Parameters:
  • dirname (str) - directory name to be read.
  • bcmapper (dict) - BC type mapper.
  • with_split (bool) - load split block as well.
  • domaintype (type) - the type used to instantiate domain object.
Returns: solvcon.domain.Collective
the read domain object.
Overrides: core.FormatIO.load

load_block(self, dirname=None, blkid=None, bcmapper=None)

source code 

Load block from stream with BC mapper applied.

Parameters:
  • dirname (str) - directory name to be read.
  • blkid (int) - the id of block to be read.
  • bcmapper (dict) - BC type mapper.
Returns: solvcon.block.Block
the read block object.