Package solvcon :: Package io :: Module gambit :: Class GambitNeutral
[hide private]
[frames] | no frames]

Class GambitNeutral

source code


Represent information in a Gambit Neutral file.

Instance Methods [hide private]
 
__init__(self, data)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__str__(self)
str(x)
source code
solvcon.block.Block
toblock(self, onlybcnames=None, bcname_mapper=None, fpdtype=None, use_incenter=False)
Convert GambitNeutral object to Block object.
source code
 
_convert_interior_to(self, blk)
Convert interior information, i.e., connectivities, from GambitNeutral to Block object.
source code
 
_convert_bc_to(self, blk, onlynames=None, name_mapper=None)
Convert boundary condition information from GambitNeutral object into Block object.
source code

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

Class Variables [hide private]
numpy.ndarray CLTPN_MAP = array([0, 1, 2, 3, 4, 6, 5, 7], dtype=int32)
map cltpn from self to block.
dict CLNDS_MAP = {1: {2: [2, 3], 3: [2, 4]}, 2: {4: [2, 3, 4, 5], 8...
map clnds definition from self to block.
dict CLFCS_RMAP
map clfcs definition back from block to self.
Instance Variables [hide private]
list bcs
list of BoundaryCondition objects.
str data_source
identify the generation of the file from which program and version.
numpy.ndarray elems
elements array of shape of (nelem, :).
list grps
list of ElementGroup objects.
str header
file header string.
int nbsets
number of boundary condition sets.
int ndfcd
number of coordinate directions (2/3).
int ndfvl
number of velocity components (2/3).
int nelem
number of elements.
int ngrps
number of element groups.
numpy.ndarray nodes
nodes array of shape of (numnp, ndfcd).
int numnp
number of nodes.
str title
title for this file.
Properties [hide private]
  ndim
  nnode
  ncell

Inherited from object: __class__

Method Details [hide private]

__init__(self, data)
(Constructor)

source code 

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

Overrides: object.__init__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

toblock(self, onlybcnames=None, bcname_mapper=None, fpdtype=None, use_incenter=False)

source code 

Convert GambitNeutral object to Block object.

Parameters:
  • onlybcnames (list) - positively list wanted names of BCs.
  • bcname_mapper (dict) - map name to bc type number.
  • fpdtype (str) - floating-point dtype.
  • use_incenter (bool) - use incenter when creating block.
Returns: solvcon.block.Block
Block object.

_convert_interior_to(self, blk)

source code 

Convert interior information, i.e., connectivities, from GambitNeutral to Block object.

Parameters:
  • blk (solvcon.block.Block) - to-be-written Block object.
Returns:
nothing.

_convert_bc_to(self, blk, onlynames=None, name_mapper=None)

source code 

Convert boundary condition information from GambitNeutral object into Block object.

Parameters:
  • blk (solvcon.block.Block) - to-be-written Block object.
  • onlynames (list) - positively list wanted names of BCs.
  • name_mapper (dict) - map name to bc type and value dictionary; the two objects are organized in a tuple.
Returns:
nothing.

Class Variable Details [hide private]

CLNDS_MAP

map clnds definition from self to block.
Type:
dict
Value:
{1: {2: [2, 3], 3: [2, 4]},
 2: {4: [2, 3, 4, 5], 8: [2, 4, 6, 8], 9: [2, 4, 6, 8]},
 3: {3: [2, 3, 4], 6: [2, 4, 6], 7: [2, 4, 6]},
 4: {8: [2, 3, 5, 4, 6, 7, 9, 8],
     20: [2, 4, 9, 7, 14, 16, 21, 19],
     27: [2, 4, 10, 8, 20, 22, 28, 26]},
 5: {4: [2, 3, 4, 5], 10: [2, 4, 7, 11]},
 6: {6: [2, 4, 3, 5, 7, 6], 15: [2, 7, 4, 11, 16, 13], 18: [2, 7, 4, 1\
...

Property Details [hide private]

ndim

Get Method:
unreachable.ndim(self)

nnode

Get Method:
unreachable.nnode(self)

ncell

Get Method:
unreachable.ncell(self)