In [1]:
# For Python 3 compatibility
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
try:
import pyrst
except ImportError:
# Add the PRST path to Python path.
import sys
import os
# Directory where the pyrst module is found
pyrst_import_path = os.path.normpath(os.path.join(os.getcwd(), "..", "..", ".."))
sys.path.append(pyrst_import_path)
import pyrst
import pyrst.incomp
import pyrst.gridprocessing
import pyrst.utils
In [5]:
# Make the grid. A single column.
G = pyrst.gridprocessing.cartGrid([1, 1, 30], [1, 1, 30])
print(G)
In [6]:
import matplotlib.pyplot as plt
%matplotlib inline
In [ ]:
def plotGrid(G):
"""
Plots exterior grid faces.
Synopsis:
plotGrid(G)
plotGrid(G, cells)
plotGrid(G, ax=ax)
plotGrid(G,)
"""