Skip to content

Commit

Permalink
add self.dX
Browse files Browse the repository at this point in the history
  • Loading branch information
jouvetg committed Sep 19, 2022
1 parent 8d8d5fa commit bd8f2e1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/synthetic/igm-run.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def update_smb_mysmb(self):
glacier.config.varplot_max = 250

# This permits to compute particle trajectories
glacier.config.tracking_method ='simple'
glacier.config.tracking_method ='3d'
glacier.config.frequency_seeding = 1000 # we seed every 10 years
glacier.config.density_seeding = 0.1 # we seed each 5 point of the 2D grid

Expand Down
3 changes: 3 additions & 0 deletions src/igm.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ def initialize_fields(self):
# define cell spacing
self.dx = self.x[1] - self.x[0]

# define dX
self.dX = tf.ones_like(self.thk) * self.dx

# compiute surface gradient
self.slopsurfx, self.slopsurfy = self.compute_gradient_tf(
self.usurf, self.dx, self.dx
Expand Down

0 comments on commit bd8f2e1

Please sign in to comment.