Skip to content
Snippets Groups Projects
Commit 657b46e3 authored by Cristian Lalescu's avatar Cristian Lalescu
Browse files

saves interp_problem intermediary states

parent 697cff7f
No related branches found
No related tags found
No related merge requests found
Pipeline #53046 passed
......@@ -7,6 +7,20 @@ def main():
nproc = 6
f = plt.figure(figsize = (4., 4.))
a = f.add_subplot(111)
for p in range(nproc):
for y in range((nproc)*slab):
a.plot([y, y],
range(p*slab, (p+1)*slab),
marker = '.',
linestyle = 'none',
color = 'brown')
a.set_ylim(bottom = -1, top = 12)
a.set_xlim(left = -1)
a.set_ylabel('$z$')
a.set_xlabel('$x,y$')
a.set_aspect('equal')
f.tight_layout(pad = 0.5)
f.savefig('interp_problem_0.pdf')
for p in range(nproc):
color = plt.get_cmap('plasma')(p*1./nproc)
a.add_patch(
......@@ -17,17 +31,17 @@ def main():
alpha = .2))
a.text(-.6, p*slab+.5, '$p_{0}$'.format(p),
verticalalignment = 'center')
for y in range((nproc)*slab):
a.plot([y, y],
range(p*slab, (p+1)*slab),
marker = '.',
linestyle = 'none',
color = color)
f.savefig('interp_problem_1.pdf')
for X, Y in [(8.9, 8.3),
(2.3, 3.7)]:
a.plot([X], [Y],
color = 'black',
marker = 'x')
marker = 'x',
markersize = 10,
markeredgewidth=3)
f.savefig('interp_problem_2.pdf')
for X, Y in [(8.9, 8.3),
(2.3, 3.7)]:
for n in [1, 2]:
a.add_patch(
mpatches.Rectangle(
......@@ -38,13 +52,8 @@ def main():
a.text(math.floor(X)+.5, math.floor(Y - n)-.6,
'$n = {0}$'.format(n),
horizontalalignment = 'center')
a.set_ylim(bottom = -1, top = 12)
a.set_xlim(left = -1)
a.set_ylabel('$z$')
a.set_xlabel('$x,y$')
a.set_aspect('equal')
f.tight_layout()
f.savefig('interp_problem.pdf')
f.savefig('interp_problem_3.pdf')
return None
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment