{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "# Checkout www.pygimli.org for more examples" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n# GIMLi basics\n\nThis is the first tutorial where we demonstrate the general use of\n:term:`GIMLi` in Python, i.e., :term:`pyGIMLi`.\n\nThe modelling as well as the inversion part of :term:`GIMLi` often requires a\nspatial discretization for the domain of interest, the so called\n:gimliapi:`GIMLI::Mesh`.\nThis tutorial shows some basic aspects of handling a mesh.\n\nFirst, the library needs to be imported.\nTo avoid name clashes with other libraries we suggest to ``import pygimli`` and\nalias it to the simple abbreviation ``pg``: CR\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "import pygimli as pg" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Every part of the c++ namespace :gimliapi:`GIMLI` is bound to python and can\nbe used with the leading ``pg.``\n\nFor instance get the current version for :term:`GIMLi` with:\n\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "collapsed": false }, "outputs": [], "source": [ "print(pg.__version__)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now that we know the name space :gimliapi:`GIMLI`, we can create a first mesh.\nA mesh is represented by a collection of nodes, cells and boundaries,\ni.e., geometrical entities.\n\n
A regularly spaced mesh consisting of rectangles or hexahedrons is\n usually called a grid. However, a grid is just a special variant of a mesh\n so GIMLi treats it the same. The only difference is how they are created.