In [1]:
# visulize the convergance of the numerical method
import sys
import petsc4py
petsc4py.init(sys.argv)
%pylab inline
pylab.rcParams['figure.figsize'] = (18.5, 10.5)
import matplotlib
matplotlib.rc('text', usetex=True)
matplotlib.rcParams['text.latex.preamble']=[r"\usepackage{mathtools, bm}"]
import numpy as np
import pandas as pd
from src import stokes_flow as sf
from src.StokesFlowMethod import *
from petsc4py import PETSc
import os
import re
import glob
from scipy.io import loadmat, savemat
import matplotlib.pyplot as plt
from IPython.display import display, HTML
from scanf import scanf
from io import StringIO
from codeStore import support_fun as spf
PWD = os.getcwd()
fontsize = 40
np.set_printoptions(linewidth=110, precision=5)
In [5]:
fig = plt.figure()
fig.patch.set_facecolor('white')
ax1 = fig.add_subplot(1, 2, 2)
ax2 = fig.add_subplot(1, 2, 1)
ax1.loglog(1, 1, linestyle='-.', linewidth=3, label='$relative\ error\ of\ \\bm{u}_{pipe}$')
ax1.legend(fontsize=fontsize*0.5, loc=2)
Out[5]: