The CGNS/MLL library wrapper.
The pyCGNS wrap classes are simple wrappers on top of the ADF and the MLL libraries.
The pyADF class holds a connection to a CGNS file provides the user with a Python-like interface to ADF calls.
Each method or attribute use actually runs the ADF library functions
ADF calls to DB have the same name without the `ADF` prefix and with a lowercase name. Argument list always try to be as close as possible to the ADF original argument list
Closes a CGNS database. It does `not’ delete the object, so we suggest you use the Python del statement instead of this method.
Not implemented at ADF library level.
pyCGNS: wrapper to CGNS calls - pyCGNS creation opens a database - CGNS calls are partly implemented
-Get ADF root id -(pyCGNS)
‘root-id:D=’adfroot‘()’
The ‘root’ attribute has the same contents.
-Get info about an arbitrary motion node -Arbitrary Grid Motion
‘return-tuple=’arbitrarymotionread‘(base-id:I,zone-id:I,motion-id:I)’
The returned tuple contains: (name:S,ArbitraryGridMotionType:I)
-Create a new arbitrary motion node -Arbitrary Grid Motion
‘arbitrary-motion-id:I=’arbitrarymotionwrite‘(base-id:I,zone-id:I,name:S,type:I)’
type:ArbitraryGridMotionType
-Get infos about a given array -Data Array
‘(array-name:S,data-type:S,data-dim:I,data-vector:(I,...))=’arrayinfo‘(array-id:I)’
The current node is the parent node of the requested array. The data-type enumerate can be found using the cross dictionnary. There is redondancy of ‘data-dim’ and ‘data-vector’, first can be deduced from the second.
-Get the array data -Data Array
‘data-array:A=’arrayread‘(array-id:I)’
The array id its index under the current node. See ‘arrayinfo’ remarks.
-Create or update a new array -Data Array
‘array-id:I=’arraywrite‘(array-name:S,d-type:S,d-dim:I,d-vector:(I,...),d-array:A)’
All type, dim vector are refering to the array of data itself. See also ‘arrayinfo’ remarks.
-Get the axisymmetry parameters -Axisymmetry
‘(reference-point:(D,D),axis-vector:(D,D))=’axisymread‘(base-id:I)’
Should be 2D.
-Set the axisymmetry parameters -Axisymmetry
‘None=’axisymwrite‘(base-id:I,reference-point:(D,D),axis-vector:(D,D))’
Should be 2D.
-Get the ADF id of a base -undocumented MLL
‘base-id:D=’baseid‘(base-id:I)’
The argument is the MLL id, the return value is the ADF id, it is a double float value. Such an id cannot be obtained if the CGNS/ADF file has been open as write only.
-Get infos about a given base -Base
‘(base-idx:I,base-name:S,cell-dim:I,phys-dim:I)=’baseread‘(base-idx:I)’
Arg is base id, returns a tuple with base information.
-Count number of bases -Base
‘nbases:I=’bases‘()’
The ‘nbases’ attribute has the same contents.
-Create a new base in an existing CGNS file -Base
‘base-idx:I=’basewrite‘(base-name:S,cell-dim:I,phys-dim:I)’
Args are base name, cell and physical dimensions. Returns the new id of the created base
-Get the area parameters -Boundary Condition
‘(region:S,type:I,surf:D)=’bcarearead‘(base-id:I,zone-id:I,bc-id:I)’
Type is AreaType
-Set the area parameters -Boundary Condition
‘None=’bcareawrite‘(base-id:I,zone-id:I,bc-id:I,type:I,surf:D,region:S)’
Type is AreaType
-Read the dataset set of a given BC -Boundary Condition
‘return-tuple=’bcdatasetread‘(base-id:I,zone-id:I,bc-id:I,dset-id:I)’
The return tuple is the following. (dset-name:S,bc-data-type:I,dir-flag:I,neu-flag:I)
-Write the dataset set of a given BC -Boundary Condition
‘dset-id:I=’bcdatasetwrite‘(base-id:I,zone-id:I,bc-id:I,dset-name:S,dset-type:I)’
dset-type:BCType
-Write the data in a BC dataset -Boundary Condition
‘None=’bcdatawrite‘(base-id:I,zone-id:I,bc-id:I,dset-id:I,bc-data-type:I)’
bc-data-type:BCDataType
-Get the BC ADF id -undocumented MLL
‘bc-id:D=’bcid‘(base-id:I,zone-id:I,bc-id:I)’
Used for ADF functions
-Get info from a given BC -Boundary Condition
‘return-tuple=’bcinfo‘(base-id:I,zone-id:I,bc-id:I)’
The result tuple has the following members, in that order. The ‘name:S’ of the node, its ‘bc-type:I’ and its ‘point-set-type:I’. The ‘number-of-points:I’, the ‘normal-index:(I,I,I)’, the ‘data-type:I’ for the normals, the ‘normal-flag:I’ and the ‘number-of-bc-data-set:I’.
-Write the normals of a given BC -Boundary Condition
‘None=’bcnormalwrite‘(base-id:I,zone-id:I,bc-id:I,args...)’
The trailing args are the following, in this order. The ‘normal-index:(I,I,I)’, ‘normal-flag:I’, ‘data-type:I’, ‘normal-list:((D,D,D),...). Caution: normal-flag is forced to FALSE, normal-list is not taken into account.
-Read point and normal lists from a given BC -Boundary Condition
‘(point-list:A,normal-list:A)=’bcread‘(base-id:I,zone-id:I,bc-id:I)’
Comment
-Get the type of BC wallfunction -Boundary Condition
‘WallFunctionType:I=’bcwallfunctionread‘(base-id:I,zone-id:I,bc-id:I)’
Comment
-Set the type of BC wallfunction -Boundary Condition
‘None=’bcwallfunctionwrite‘(base-id:I,zone-id:I,bc-id:I,type:I)’
Type is WallFunctionType
-Create a new BC -Boundary Condition
‘bc-id:I=’bcwrite‘(base-id:I,zone-id:I,args...)’
The trailing arguments are the following, in that order. The ‘bc-name:S’, ‘bc-type:I’, ‘bc-point-set-type:I’, the ‘point-set-list:((I,I,I),...)’. The number of points in the point set list is deduced from the length of the point list, except if the point set type is PointRange. In that case, the number of points is forced to 2.
-Get the name of the iterative data base -Iterative Data
‘(name:S,number-of-it:I)=’biterread‘(base-id:I)’
No Comment
-Create base iterative data -Iterative Data
‘None=’biterwrite‘(base-id:I,name:S,iteration:I)’
No Comment
-Close the current CGNS file -(pyCGNS)
‘None=’close‘()’
Close is performed by del if not already (explicitely) done.
-Get special connect properties -Special Grid Connectivity
‘averate-type:I=’connaverageread‘(base-id:I,zone-id:I,connect-id:I)’
The type is ‘AverageInterfaceType’.
-Set special connect properties -Special Grid Connectivity
‘None=’connaveragewrite‘(base-id:I,zone-id:I,connect-id:I,averate-type:I)’
The type is ‘AverageInterfaceType’.
-Get information about generalized connect node -Grid Connectivity
‘return-tuple=’conninfo‘(base-id:I,zone-id:I,connect-id:I)’
The return tuple contains: ‘connect-name:S’, ‘gridlocation:I’, ‘gridconnectivity:I’, ‘pointsettype:I’, ‘number-of-points:I’, ‘donor-name:S’, ‘donor-zone-type:I’, donor-point-set-type:I’, ‘donor-data-type:I’ and ‘donor-number-of-points:I’
-Get special connect properties -Special Grid Connectivity
‘return-tuple=’connperiodicread‘(base-id:I,zone-id:I,connect-id:I)’
The size of arrays is the base physical dimension. The reurn-tuple is ‘(rot-center:A,rot-angle:A,translation:A)’.
-Set special connect properties -Special Grid Connectivity
‘None=’connperiodicwrite‘(base-id:I,zone-id:I,connect-id:I,args...)’
the trailing args are ‘rot-center:A’, ‘rot-angle:A’ , ‘translation:A’. The size of these arrays is the base physical dimension.
-Get generalized connectivity points -Grid Connectivity
‘return-tuple=’connread‘(base-id:I,zone-id:I,connect-id:I)’
The tuple contains two arrays of integers ‘target-interface-points:A’ and ‘donor-interface-oints:A’.
-Create a generalized connectivity node -Grid Connectivity
‘connect-id:I=’connwrite‘(args)’
The arguments are defining (in this order) the ‘base-id:I’,’zone-id:I’ of the new node, its ‘name:S’, the ‘gridlocation:I’, ‘gridconnectivitytype:I’ and ‘point-set-type:I’ of the current (target) node interface. The ‘number-of-points:I’ and ‘interface-points:A’ which is an array of integers. Then the ‘donor-name:S’, its ‘zonetype:I’, ‘point-set-type:I’ and ‘data-type:I’, the ‘number-of-donor-points:I’ and the actual array of points ‘donor-points:A’.
Note the ‘DataType’ is force to ‘Integer’.
-Get the convergence under current node -Convergence
‘(number-of-iteration:I,node-name:S)=’convergenceread‘()’
No args, current node is used.
-Craete of update a convergence node -Convergence
‘None=’convergencewrite‘(number-of-iteration:I,node-name:S)’
Uses the current node. Should return the node id.
-Get the conversion datatype -Units and Dimensionals
‘datatype:I=’conversioninfo‘()’
Python only handles double. Beware at write time, you can have double/single.
-Get the conversion values -Units and Dimensionals
‘(D,D)=’conversionread‘()’
See ‘conversionwrite’ remarks.
-Create or update the conversion factors -Units and Dimensionals
‘None=’conversionwrite‘(data-type:I,(D,D))’
Conversion values are: scale, offset
-Get the ADF id of a coordinate -undocumented MLL
‘coord-id:D=’coordid‘(base-id:I,zone-id:I,coord-id:I)’
See ‘baseid’ remarks.
-Get infos about a given coordinate -Coordinates
‘(data-type:S,node-name:S)=’coordinfo‘(base-id:I,zone-id:I,coord-id:I)’
See ‘coordwrite’ remarks.
-Read the coordinate array -Coordinates
‘coord-array:A=’coordread‘(base-id:I,zone-id:I,coord-name:S,read-mode:I)’
The returned array is a ‘pyArray’ containing the data with the required format. Unfair-remark: a zone name is required, but all requests to nodes are done using integer ids. The read mode is default to 0, that is a C-like read (i,j,k). The mode=1 is fortran like read (k,j,i). Please, take care of the dimensions in that case, see the ‘zoneread’ remarks.
-Create a coordinate array node -Coordinates
‘coord-id:I=’coordwrite‘(base-id:I,zone-id:I,data-type:S,node-name:S,data-array:A)’
data-type:DataType
-Get the dataclass under current node -Units and Dimensionals
‘data-class:I=’dataclassread‘()’
See ‘dataclasswrite’ remarks.
-Create or update the dataclass under current node -Units and Dimensionals
‘None=’dataclasswrite‘(data-class:I)’
The ‘data-class’ is a ‘DataClass’ enumerate.
-Delete the given node -Node
‘None=’delenode‘(name:S)’
Removes the current node (and its children).
-Get the descriptor contents -Descriptor
‘(desc-name:S,desc-text:S)=’descriptorread‘(desc-id:I)’
The current node is used.
-Count number of descriptors -Descriptor
‘ndescriptor:I=’descriptors‘()’
The ‘ndescriptor’ attribute has the same contents.
-Create or update a descriptor under the current node -Descriptor
‘None=’descriptorwrite‘(desc-name:S,desc-test:S)’
Unfair-remark: We should get the descriptor id as returned argument.
-Get diffusion info -Flow Equation Set
‘(I,I,I,I,I)=’diffusionread‘()’
No Comment
-Set diffusion info -Flow Equation Set
‘None=’diffusionwrite‘(I,I,I,I,I)’
No Comment
-Get the name of discrete node -Discrete Data
‘disc-name:S=’discreteread‘(base-id:I,zone-id:I,disc-id:I)’
No Comment
-Create a new discrete data node -Discrete Data
‘dics-id:I=’discretewrite‘(base-id:I,zone-id:I,disc-name:S)’
No Comment
-Get the number of elements for this section -Element Connectivity
‘number:I=’elementdatasize‘(base-id:I,zone-id:I,section-id:I)’
See ‘section-write’
-Get elements of a section -Element Connectivity
‘(elements:A,parents:A)=’elementsread‘(base-id:I,zone-id:I,section-id:I)’
Returns two arrays of I
-Read chemistry flags -Flow Equation Set
‘equation-flags:(I,I)=’equationsetchemistryread‘()’
No Comment
-Get equation set info -Flow Equation Set
‘equation-dim:(I,I,I,I,I)=’equationsetread‘()’
No Comment
-Set equation set info -Flow Equation Set
‘None=’equationsetwrite‘(equation-dim:I)’
No Comment
-Get the exponents datatype -Units and Dimensionals
‘datatype:I=’exponentsinfo‘()’
Python only handles double. Beware at write time, you can have double/single.
-Get the exponents values -Units and Dimensionals
‘(D,D,D,D,D)=’exponentsread‘()’
See ‘exponentswrite’ remarks.
-Create or update the exponents -Units and Dimensionals
‘None=’exponentswrite‘(data-type:I,(D,D,D,D,D))’
Exponents values are: Mass, Length, Time, Temperature, Angle.
-Get name of current node family for a given BC -Families
‘(bc-name:S,bc-type:I)=’familybocoread‘(base-id:I,fam-id:I,bc-id:I)’
No Comment
-Create name of current node family for a given BC -Families
‘bc-id:I=’familyboconamewrite‘(base-id:I,fam-id:I,bc-name:S,bc-type:I)’
No Comment
-Get name of current node family -Families
‘fam-name:S=’familynameread‘()’
No Comment
-Creates name of current node family -Families
‘None=’familynamewrite‘(fam-name:S)’
No Comment
-Get info about a given family -Families
‘(fam-name:S,number-of-fam-bc:I,number-of-geo:I)=’familyread‘(base-id:I,fam-id:I)’
No Comment
-Create a new family node -Families
‘fam-id:I=’familywrite‘(base-id:I,fam-name:S)’
No Comment
-Get the ADF id of a solution field -undocumented MLL
‘field-id:D=’fieldid‘(base-id:I,zone-id:I,sol-id:I,field-id:I)’
See ‘baseid’ remarks.
-Get infos about a given solution field -Flow Solution
‘(data-type:S,field-name:S)=’fieldinfo‘(base-id:I,zone-id:I,sol-id:I,field-id:I)’
See ‘coordwrite’ remarks.
-Get the data array of a given solution field -Flow Solution
‘data-array:A=’fieldread‘(base-id:I,zone-id:I,sol-id:I,field-name:S,args...)’
The trailing args are ‘data-type:S’ and tuples of indices: ‘i-min:(I,I,I)’ ‘i-max:(I,I,I)’. These ‘imin’ and ‘imax’ tuples are forced to 3D, but only relevant values are used. Other values can be set to zero. Unfair-remark: field name is required.
-Create a data array for a solution field -Flow Solution
‘field-id:I=’fieldwrite‘(base-id:I,zone-id:I,sol-id:I,args...)’
The trailing args are ‘data-type:S’, ‘field-name:S’ and the array of data ‘data-array:A’. See also ‘coordwrite’ remarks.
-Get geometry info -Families
‘(geo-name:S,file:S,CAD:S,parts:I)=’georead‘(base-id:I,fam-id:I,geo-id:I)’
No Comment
-Creates geometry info -Families
‘geo-id:I=’geowrite‘(base-id:I,fam-id:I,geo-name:S,file:S,CAD:S)’
No Comment
-Set the current node -Node
‘node-id:D=’goto‘(base-id:I,path:((node-type:S,node-id:I),...))’
The ‘goto’ sets the current node to the leaf of the given path. The path itself is a list of tuples. Each tuple contains the node type a first argument, its index as second arg. Note the returned id is not (yet) trustable.
-Get governing equations info -Flow Equation Set
‘governing-eq-type:I=’governingread‘()’
No Comment
-Set governing equations info -Flow Equation Set
‘None=’governingwrite‘(governing-eq-type:I)’
No Comment
-Get the gravity vector -Auxiliary Data
‘(gravity-vector:(D,...))=’gravityread‘(base-id:I)’
Size depends on physical dimension of base.
-Set the gravity vector -Auxiliary Data
‘None=’gravitywrite‘(base-id:I,gravity-vector:(D,...))’
Size depends on physical dimension of base.
-Get the grid location info -Grid
‘grid-location:I=’gridlocationread‘()’
Under current node
-Set the grid location info -Grid
‘None=’gridlocationwrite‘(grid-location:I)’
Under current node
-Get the grid name -Grid
‘grid-name:S=’gridread‘(base-id:I,zone-id:I,grid-id:I)’
Comment
-Create a new grid node -Grid
‘grid-id:I=’function‘(base-id:I,zone-id:I,grid-name:S)’
Comment
-Get info from a given overset hole node -Overset Holes
‘return-tuple=’holeinfo‘(base-id:I,zone-id:I,hole-id:I)’
Returns a tuple containing ‘name:S’ of the overset hole, ‘grid-location:I’ of the returned set(s) of points, the ‘point-set-type:I’, the ‘number-of-point-sets:I’ and the /number-of-points-per-point-set:I’. Should be called before holeread in order to have array dimensions before allocation.
-Get info from a given overset hole node -Overset Holes
‘point-array:A’=’holeread‘(base-id:I,zone-id:I,hole-id:I)’
Gets the array containing the points. Dimensions depens on the PointSetType (see holeinfo).
-Create a new overset hole node -Overset Holes
‘hole-id:I=’holewrite‘(base-id:I,zone-id:I,hole-name:S,g-location:S,point-array:A)’
The grid location is a string. The corresponding enumerate can be found using the cross dictionnary.
-Get the ADF id of a given node -(pyCGNS)
‘node-id:D=’id‘(base-id:I,path:((node-type:S,node-id:I),...))’
Uses the same syntax as ‘goto’, but doesn’t set the current node. This id call is not trustable, it has not beeen tested and probably has a destructive effect on cgnslib global variables... See ‘goto’ remarks
-Get the name of integral node -Integral Data
‘integral-name:S=’integralread‘(integral-id:I)’
Under current node.
-Create a new integral node -Integral Data
‘integral-id:I=’integralwrite‘(integral-name:S)’
Under current node.
-Test if current node is a link -Link
‘true-if-is-link:I=’islink‘()’
Uses current node.
-Get the current error -(pyCGNS)
‘(error-code:I,error-message:S)=’lasterror‘()’
The ‘error’ attribute has the same contents.
-Get library version -(pyCGNS)
‘version:D=’libversion‘()’
The ‘version’ attribute has the same contents.
-Get infos about a given link -Link
‘(file-name:S,target-name:S))=’linkread‘()’
Uses the current node as argument node previously set by ‘goto’ call.
-Create a link -Link
‘None=’linkwrite‘(source-name:S,file-name:S,target-name:S)’
Args are the link name, the destination file, destination node name. Returns None.
-Get model info -Flow Equation Set
‘(model-name:S,model-type:I)=’modelread‘(nodel-name:S)’
No Comment
-Set model info -Flow Equation Set
‘None=’modelwrite‘(model-name:S,model-type:I)’
No Comment
-Get file name -(pyCGNS)
‘filename:S=’name‘()’
The ‘name’ attribute has the same contents.
-Get number of arbitrary motion nodes -Arbitrary Grid Motion
‘number-of-motion:I=’narbitrarymotions‘(base-id:I,zone-id:I)’
No Comment
-Count arrays under the current node -Data Array
‘number-of-arrays:I=’narrays‘()’
Use ‘goto’ to set the current node.
-Get the count of BC -Boundary Condition
‘number-of-bc:I=’nbc‘(base-id:I,zone-id:I)’
No comment
-Get number of generalized connectivities -Grid Connectivity
‘number:I=’nconns‘(base-id:I,zone-id:I)’
No comment.
-Count coordinates nodes in the zone -Coordinates
‘number-of-coords:I=’ncoords‘(base-id:I,zone-id:I)’
See ‘nzones’ remarks.
-Get count of discrete node -Discrete Data
‘number-of-discrete:I=’ndiscrete‘(base-id:I,zone-id:I)’
No Comment
-Count families in the base -Families
‘number-of-families:I=’nfamilies‘(base-id:I)’
No Comment
-Count fields in the solution -Flow Solution
‘number-of-fields:I=’nfields‘(base-id:I,zone-id:I,sol-id:I)’
See ‘nzones’ remarks.
-Count the number of grids -Grid
‘number-of-grids:I=’ngrids‘(base-id:I,zone-id:I)’
Comment
-Get the count of overset holes -Overset Holes
‘number-of-holes:I=’nholes‘(base-id:I,zone-id:I)’
Returns the number of overset holes in the current zone
-Get count of integral data nodes -Integral Data
‘number-of-integral=’nintegrals‘()’
Counts under current node
-Count the one2one nodes -Grid Connectivity
‘number-of-one2one:I=’none2one‘(base-id:I,zone-id:I)’
Comment
-Count the one2one nodes for the whole base -Grid Connectivity
‘number-of-one2one:I=’none2oneglobal‘(base-id:I)’
Comment
-Get the number of nodes for an element type -Element Connectivity
‘number:I=’npe‘(element-type:I)’
element-type is an enumerate.
-Get number of rigid motion nodes -Rigid Grid Motion
‘number-of-motion:I=’nrigidmotions‘(base-id:I,zone-id:I)’
No Comment
-Get lower range index -Element Connectivity
‘section-index:I=’nsections‘(base-id:I,zone-id:I)’
The lower range is (imin, jmin, kmin)
-Get count of solutions -Flow Solution
‘number-of-solutions:I=’nsols‘(base-id:I,zone-id:I)’
No Comment
-Count number of user data -User Data
‘number-of-userdata:I=’nuserdata‘()’
Under current node.
-Count zones in the base -Zone
‘number-of-zones:I=’nzones‘(base-id:I)’
The zone count is a max, the zone ids are starting from 1 (one). Thus, using ‘nzones’ with a ‘range’ function should be done with ‘range(1,file.nzones(base)+1)’
-Get the ADF id of a one2one node -undocumented MLL
‘one2one-id:D=’one2oneid‘(base-id:I,zone-id:I,one2one-id:I)’
Comment
-Get the one2one node informations -Grid Connectivity
‘return-tuple=’one2oneread‘(base-id:I,zone-id:I,one2one-id:I)’
The return tuple has the following members, in that order. The ‘name:S’ of the node, the ‘donor-name:S’, the ‘range’ tuple and the ‘donor-range’ tuple which are both six-integer tuples. Then the ‘transform’ tuple is a three-integer tuple.
-Get the one2one node informations for whole base -Grid Connectivity
‘return-list=’one2onereadglobal‘(base-id:I)’
The return is a list of tuples, each tuple tuple has the following members, in that order. The ‘name:S’ of the node, the ‘zone:S’ name for which the conectivity information is related, the ‘donor-name:S’, the ‘range’ tuple and the ‘donor-range’ tuple which are both six-integer tuples. Then the ‘transform’ tuple is a three-integer tuple.
-Create a 1to1 connectivity node -Grid Connectivity
‘one2one-id:I=’one2onewrite‘(base-id:I,zone-id:I,args...)’
The trailing arguments are the following, in that order. The ‘name:S’ of the node, the ‘donor-name:S’, the ‘range’ tuple and the ‘donor-range’ tuple which are both six-integer tuples. Then the ‘transform’ tuple is a three-integer tuple.
-Get the ordinal under current node -Ordinal
‘ordinal:I=’ordinalread‘()’
Comment
-Create or update an ordinal node under current node -Ordinal
‘None=’ordinalwrite‘(ordinal:I)’
Comment
-Write the parent data in a section -Element Connectivity
‘None=’parentdatawrite‘(base-id:I,zone-id:I,section-id:I,parent-data:A)’
No return
-Get part info -Families
‘part-name:S=’partread‘(base-id:I,fam-id:I,geo-id:I,part-id:I)’
No Comment
-Create part info -Families
‘part-id:I=’partwrite‘(base-id:I,fam-id:I,geo-id:I,part-name:S)’
No Comment
-Get info about a rigid motion node -Rigid Grid Motion
‘return-tuple=’rigidmotionread‘(base-id:I,zone-id:I,motion-id:I)’
The returned tuple contains: (name:S,RigidGridMotionType:I)
-Create a new rigid motion node -Rigid Grid Motion
‘rigid-motion-id:I=’rigidmotionwrite‘(base-id:I,zone-id:I,name:S,type:I)’
type:RigidGridMotionType
-Get the rind indices under current node -Grid
‘(imin:I,imax:I,jmin:I,jmax:I,kmin,kmax:I)=’rindread‘()’
See ‘rindwrite’ comment.
-Create of update the rind indices under current node -Grid
‘None=’rindwrite‘((imin:I,imax:I,jmin:I,jmax:I,kmin,kmax:I))’
Uses the current node. Tuple depends on dimensions, J or K could be unused in the case of 1D, 2D. Always give 6 integers, set them to zero if you are not 3D
-Get the rotation parameters -Rotating Coordinates
‘(rate-vector:(D,...),center:(D,...))=’rotatingread‘()’
The ‘(D,...)’ have the base physical dimension (i.e. 2 in 2D and 3 in 3d).
-Set the rotation parameters -Rotating Coordinates
‘None=’rotatingwrite‘(rate-vector:(D,...),center:(D,...))’
See ‘rotatingread’
-Get infos about a given section -Element Connectivity
‘return-tuple=’sectionread‘(base-id:I,zone-id:I,section-id:I)’
Returns a tuple containing ‘name:S’ of the section, its ‘type:I’ ‘start:I’ and ‘end:I’, ‘last-bnd-index:I’, ‘parent-flag:I’.
-Write a section -Element Connectivity
‘section-id=’sectionwrite‘(base-id:I,zone-id:I,section-name:S,args...)’
The trailing args are the ‘type:I’ of the section elements the ‘start:I’ and ‘end:I’ indices, ‘last-bnd-index:I’ index and at last the ‘elements:A’ array itself (of type ‘type).
-Get simulation type info -Flow Equation Set
‘simulation-type:I=’simulationtyperead‘(base-id:I)’
No Comment
-Set simulation type info -Flow Equation Set
‘None=’simulationtypewrite‘(base-id:I,simulation-type:I)’
No Comment
-Get the ADF id of a solution -undocumented MLL
‘sol-id:D=’solid‘(base-id:I,zone-id:I,sol-id:I)’
See ‘baseid’ remarks.
-Get infos about a given solution -Flow Solution
‘(grid-location:S,sol-name:S)=’solinfo‘(base-id:I,zone-id:I,sol-id:I)’
See ‘solwrite’ remarks.
-Create a new solution -Flow Solution
‘sold-id:I=’solwrite‘(base-id:I,zone-id:I,sol-name:S,grid-location:S)’
The grid location is a string. The corresponding enumerate can be found using the cross dictionnary. Examples: s=db.solwrite(1,z,mySolutionName,CGNS.CellCenter) s=db.solwrite(1,z,mySolutionName,CGNS.CellCenter_[myGridLocation])
-Get state info -Flow Equation Set
‘state-description:S=’stateread‘()’
No Comment
-Set state info -Flow Equation Set
‘None=’statewrite‘(state-description:S)’
No Comment
-Get the units under current node -Units and Dimensionals
‘(mass-u:S,length-u:S,time-u:S,temp-u:S,angle-u:S)=’unitsread‘()’
See ‘unitswrite’ remarks.
-Create or update a units set under current node -Units and Dimensionals
‘None=’unitswrite‘(mass-u:S,length-u:S,time-u:S,temp-u:S,angle-u:S)’
See remarks about the constants dictionnary, one can either use the defined strings, variables or their enumerates. should be much more documented/checked here
-Get name of the given user data id -User Data
‘(userdata-id:i,userdata-name:S)=’userdataread‘(userdata-id:I)’
Under current node.
-Create a new userdata node -User Data
‘userdata-id:I=’userdatawrite‘(userdata-name:S)’
Under current node, which should be set by a goto call. Actually returns the new UserData node id. It is supposed that the goto call is made by pyCGNS.
-Get the name of the iterative data zone -Iterative Data
‘name:S=’ziterread‘(base-id:I,zone-id:I)’
No Comment
-Create zone iterative data -Iterative Data
‘None=’ziterwrite‘(base-id:I,zone-id:I,name:S)’
No Comment
-Get the ADF id of a zone -undocumented MLL
‘zone-id:D=’zoneid‘(base-id:I,zone-id:I)’
See ‘baseid’ remarks.
-Get infos about a given zone -Zone
‘(base-id:I,zone-id:I,zone-name:S,size-tuple(I,...)=’zoneread‘(base-id:I,zone-id:I)’
The tuple returns a useful informatinos, including arguments ids. The dimension tuple size depends on the zone size. To get this tuple size, use the ‘len’ function.
-Get the type of a given zone -Zone
‘zone-type:S=’zonetype‘(base-id:I,zone-id:I)’
The returned string can be used as entry key into ZoneType dictionnary, in order to get the actual integer value for the corresponding enumerate.
-Create a new zone -Zone
‘zone-id:I=’zonewrite‘(base-id:I,zone-name:S,size-tuple:(I,...),zone-type:S)’
See ‘zonetype’ remarks.