コード例 #1
0
#  ---------------------------------------------------------------------------
#  pyCGNS - Python package for CFD General Notation System -
#  See license.txt file in the root directory of this Python module source  
#  ---------------------------------------------------------------------------
#
from __future__ import unicode_literals
import CGNS.PAT.cgnslib      as C
import CGNS.PAT.cgnserrors   as E
import CGNS.PAT.cgnskeywords as K
import numpy             as N

data = C.newZoneBC(None)

C.newReferenceState(data)
C.newDataClass(data)
C.newDimensionalUnits(data)
C.newUserDefinedData(data, '{UserDefinedData}')
C.newDescriptor(data, '{Descriptor}')

status = '-'
comment = 'SIDS structural node'
pattern = [data, status, comment]
コード例 #2
0
d = CGL.newDataClass(g, CGK.NondimensionalParameter_s)
f = CGL.newFlowSolution(z)
d = CGL.newDataClass(f, CGK.NondimensionalParameter_s)
a = CGL.newDataArray(f,
                     '{DataArray}',
                     value=NPY.ones((4, 6, 8), dtype='float64', order='F'))
d = CGL.newDataClass(a, CGK.NondimensionalParameter_s)
n = CGL.newZoneBC(z)
d = CGL.newDataClass(n, CGK.NondimensionalParameter_s)
q = CGL.newBC(n, '{BC}', family='{Family}')
d = CGL.newDataClass(q, CGK.NondimensionalParameter_s)
s = CGL.newBCDataSet(q, '{Set#01}')
d = CGL.newDataClass(s, CGK.NondimensionalParameter_s)
c = CGL.newBCData(s, CGK.Dirichlet_s)
d = CGL.newDataClass(c, CGK.NondimensionalParameter_s)
r = CGL.newReferenceState(b)
d = CGL.newDataClass(r, CGK.NondimensionalParameter_s)
a = CGL.newAxisymmetry(b)
d = CGL.newDataClass(a, CGK.NondimensionalParameter_s)
a = CGL.newRotatingCoordinates(b)
d = CGL.newDataClass(a, CGK.NondimensionalParameter_s)
a = CGL.newDiscreteData(z, '{DiscreteData}')
d = CGL.newDataClass(a, CGK.NondimensionalParameter_s)
i = CGL.newBaseIterativeData(b, '{BaseIterativeData}')
d = CGL.newDataClass(i, CGK.NondimensionalParameter_s)
i = CGL.newZoneIterativeData(z, '{ZoneIterativeData}')
d = CGL.newDataClass(i, CGK.NondimensionalParameter_s)
m = CGL.newRigidGridMotion(z,
                           '{RigidGridMotion}',
                           vector=NPY.array([[0.0, 0.0], [0.0, 0.0],
                                             [0.0, 0.0]]))