PyFlux language syntax
PyFlux: what is it?
PyFlux = |
---|
Python programming language + Flux command language |
PyFlux is therefore an overload of Python into which Flux commands are added.
PyFlux syntax
The PyFlux syntax is based:
- on the syntax of the Python programming language
- on the Flux database structure (Flux entities and commands)
Flux entities and PyFlux objects
PyFlux is an object-oriented programming language. There is a PyFlux type (class) corresponding to each Flux type-entity. The Flux entities are PyFlux objects (instances). The structure of the object is defined by fields called attributes, which possess a set of methods. The methods form the object interface.
A PyFlux type can have sub-types, which inherit the attributes and methods from their parent type. The sub-types are distinguished from their parent type by means of the supplementary attributes and methods.
Example: Point type
The structure of the Flux entity in the PyFlux language is presented in the example of the Point entity.
Flux entities / PyFlux types
Some examples of the Flux type-entity and its corresponding PyFlux type are presented in the table below.
Flux type-entity | PyFlux type |
---|---|
Domain Type | DomainType |
Infinite Box | InfiniteBox |
Periodicity | Periodicity |
Symmetry | Symmetry |
Coordinate System | CoordSys |
Transformation | Transf |
Line | Line |
Point Region | RegionPoint |
Line Region | RegionLine |
Face Region | RegionFace |
Mesh Point | MeshPoint |
Mesh Line | MeshLine |
Mesh Generator | MeshGenerator |
… | … |
Other PyFlux types
The PyFlux types corresponding to the basic data types are presented in the table below.
Basic data type | PyFlux type |
---|---|
Integer | I04 |
Real | R08 |
String | C80 |
File | File |