1. IntroductionΒΆ

ViennaGrid for Python is a set of Python modules that make the functionality of ViennaGrid accessible to Python programmers.

As ViennaGrid’s website explains, ViennaGrid is a C++ library designed for the handling of structured and unstructured meshes in arbitrary spatial dimensions using different coordinate systems. However, the Python interface has some limitations regarding the supported spatial dimensions: you can no longer handle meshes in arbitrary dimensions; instead, it is limited to 2D and 3D meshes, but this should suffice for the vast majority of applications.

In short, ViennaGrid for Python enables you to define and work with meshes based on lines, triangles, quadrilaterals and tetrahedra using cartesian (1D, 2D and 3D), polar (2D), cylindrical (3D) or spherical (3D) coordinates.

ViennaGrid for Python is based on two Python modules that should be considered separately:

  1. viennagrid.wrapper
  2. viennagrid

viennagrid.wrapper is the low-level module that wraps ViennaGrid’s C++ classes and functions to Python. On the other hand, viennagrid is a higher-level module that provides a more Pythonic interface to ViennaGrid, and which actually relies on viennagrid.wrapper to provide its functionality.

Even though we are talking only about viennagrid as a Python module, ViennaGrid for Python is actually a Python package which consists of the following modules:

However, we refer only to viennagrid and viennagrid.wrapper because we want to mark the difference between them, and we include the rest of the modules with viennagrid when we speak, because all of them provide a high-level interface (excepting viennagrid.wrapper).

In general, you will want to use viennagrid instead of viennagrid.wrapper. However, there may be some circumstances under which you may prefer to use viennagrid.wrapper directly. We will look into this with further detail in the Tutorials.

Previous topic

ViennaGrid for Python 0.1.0-rc.4 documentation

Next topic

2. Installation instructions

This Page