CGNS.VAL¶
The VALidator tool is a CGNS/Python tree checker. It parses a CGNS/Python tree and applies three kind of verifications. The first is the structural check, the second is the CGNS/SIDS check and the last is the user defined check.
The CGNS.VAL tool has a command line interface, it can be run in a user’s shell window and returns a set of diagnostics on the standard output. The CGNS.VAL tool has an embedded check tool which actually makes calls to the VALidator API. Then any user can use this VALidator API to make his own embedded check tool.
Quick start¶
The CGNS.VAL tool takes a CGNS/HDF5 file as argument and checks its contents, with respect to tree structure and CGNS/SIDS recommandations. The simple command line is:
CGNS.VAL naca012.hdf
Which loads the file, runs the checks and returns a list of diagnostics:
---------------------------------------------------------------------------
/Base#1/domain21/blockName
[S004:E] DataType [MT] not allowed for this node
[S007:E] Node [ElementRange] of type [IndexRange_t] is mandatory
[S191:E] Bad node value shape
[U110:E] Cannot handle such ElementType [None]
---------------------------------------------------------------------------
/Base#1/domain24
[U104:W] No ReferenceState found at Zone level
---------------------------------------------------------------------------
### CGNS/Python tree *NOT* Compliant
Each diagnostic entry starts with the node path followed by the list of warnings and errors detected at this node level.
API¶
The only function you can call in your Python script are run, showdiag and compliant.
The run function parses a full CGNS/Python tree and returns a complex diagnostic. This latter can be printed using showdiag.
The compliant function parses a full CGNS/Python tree and returns two values, a boolean telling you if the CGNS/Python is compliant or not and a list or diagnostics messages:
import CGNS.PAT.cgnslib as CGL
import CGNS.VAL.simplecheck as CGV
import CGNS.MAP as CGM
T=CGL.newCGNSTree()
diag=CGV.compliant(T)
if (diag[0]): CGM.save(mfile,T,[])
Glossary¶
- cgns.org¶
The official CGNS web site, by extension any document on this web site has an official taste…
- CGNS¶
The specific purpose of the CFD General Notation System (CGNS) project is to provide a standard for recording and recovering computer data associated with the numerical solution of the equations of fluid dynamics. See also the How to?.
- CGNS/SIDS¶
The Standard Interface Data Structure is the specification of the data model. This public document describes the syntax and the semantics of all tree-structured data required or proposed for a CFD simulation.
- CGNS/MLL¶
The Mid-Level Library is an example implementation of CGNS/SIDS on top of CGNS/ADF and CGNS/HDF5 mappings. This library has a C and a Fortran API.
- CGNS/ADF¶
The Advanced Data Format *CGNS/SIDS* implementation. A binary storage format and its companion library, developped by Boeing.
- CGNS/HDF5¶
The Hierarchical Data Format *CGNS/SIDS* implementation. A binary storage format and its companion library (see below).
- CGNS/Python¶
- CHLone¶
A CGNS/HDF5 compliant implementation. The CHLone library is available on SourceForge.
- HDF5¶
A powerful storage system for large data. The HDF5 library should be seen as a middleware system with a lot of powerful features related to efficient, portable and trustable storage mean.
- python¶
- cython¶
A compiler tool that translate Python/Numpy into C code for performance purpose.
- numpy¶
The numerical library for Python. Numpy is used to store the data in Python arrays which have a direct memory mapping to actual C or Fortran memory.
- VTK¶
A visualization toolkit used to display 3D objects in CGNS.NAV.
- PySide¶
The Python interface for the Qt toolkit. PySide
- Qt¶
A powerful graphical toolkit available under GPL v3, LGPL v2 and a commercial license. The current use of Qt is under LGPL v2 in pyCGNS.