Skip to content

Commit

Permalink
Closes #7, updates .gitignore for hier data
Browse files Browse the repository at this point in the history
Fixes VisibleDeprecationWarning by converting all instances of supp to an
int when loaded from the dict. Squelches matplotlib warning raised from
internal workings of pyplot.pause.
  • Loading branch information
mountaindust committed Jan 12, 2017
1 parent b1cbdb4 commit 93200df
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions pyIB2d/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Generated data
viz_IB2d/
hier_IB2d_data/

# Byte-compiled / optimized / DLL files
__pycache__/
Expand Down
2 changes: 1 addition & 1 deletion pyIB2d/IBM_Blackbox/IBM_Driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def main(struct_name, mu, rho, grid_Info, dt, T_FINAL, model_Info):
Ly = grid_Info['Ly'] # Length of Eulerian grid in y-coordinate
dx = grid_Info['dx'] # Spatial-size in x
dy = grid_Info['dy'] # Spatial-size in y
supp = grid_Info['supp'] # Delta-function support
supp = int(grid_Info['supp']) # Delta-function support

# PRINTING/PLOTTING INFO #
pDump = grid_Info['pDump'] # Print (Plot) Dump interval
Expand Down
2 changes: 1 addition & 1 deletion pyIB2d/IBM_Blackbox/Supp.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def please_Move_Lagrangian_Point_Positions(u, v, xL_P, yL_P, xL_H, yL_H, x, y,\
Ly = grid_Info['Ly']
dx = grid_Info['dx']
dy = grid_Info['dy']
supp = grid_Info['supp']
supp = int(grid_Info['supp'])
Nb = grid_Info['Nb']
ds = grid_Info['ds']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def please_Find_Lagrangian_Forces_On_Eulerian_grid(dt, current_time, xLag, yLag,
Ly = grid_Info['Ly'] # Length of Eulerian grid in y-coordinate
dx = grid_Info['dx'] # Spatial-size in x
dy = grid_Info['dy'] # Spatial-size in y
supp = grid_Info['supp'] # Delta-function support
supp = int(grid_Info['supp']) # Delta-function support
Nb = grid_Info['Nb'] # # of Lagrangian pts.
ds = grid_Info['ds'] # Lagrangian spacing

Expand Down Expand Up @@ -714,7 +714,7 @@ def give_Me_Delta_Function_Approximations_For_Force_Calc(x,y,grid_Info,xLag,yLag
Ly = grid_Info['Ly']
dx = grid_Info['dx']
dy = grid_Info['dy']
supp = grid_Info['supp']
supp = int(grid_Info['supp'])
Nb = grid_Info['Nb']

# Find the indices of the points (xi, yj) where the 1D delta functions are
Expand Down
5 changes: 4 additions & 1 deletion pyIB2d/IBM_Blackbox/please_Plot_Results.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import matplotlib.pyplot as plt
plt.rcParams['image.cmap'] = 'viridis'
from math import sqrt
import warnings

###########################################################################
#
Expand Down Expand Up @@ -237,7 +238,9 @@ def please_Plot_Results(ds,X,Y,U,V,vort,uMag,p,chiX,chiY,\
plt.box(on=True)

plt.draw()
plt.pause(0.0001) #no idea why this is necessary, but it is
with warnings.catch_warnings():
warnings.simplefilter("ignore")
plt.pause(0.0001) #no idea why this is necessary, but it is



Expand Down
2 changes: 1 addition & 1 deletion pyIB2d/IBM_Blackbox/please_Update_Fluid_Velocity.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def please_Update_Fluid_Velocity(U, V, Fx, Fy, rho, mu, grid_Info, dt):
Ly = grid_Info['Ly']
dx = grid_Info['dx']
dy = grid_Info['dy']
supp = grid_Info['supp']
supp = int(grid_Info['supp'])
Nb = grid_Info['Nb']
ds = grid_Info['ds']

Expand Down

0 comments on commit 93200df

Please sign in to comment.