Skip to content

Draft: Small stepgrid change - #733

Open
kbarnhart wants to merge 1 commit into
clawpack:masterfrom
kbarnhart:small_stepgrid_change
Open

Draft: Small stepgrid change#733
kbarnhart wants to merge 1 commit into
clawpack:masterfrom
kbarnhart:small_stepgrid_change

Conversation

@kbarnhart

Copy link
Copy Markdown
Contributor

Another change based on D-Claw development: In D-Claw we have one variable in q that should not be set to zero when q(1)<drytol.

This suggestion is intended to retain geoclaw functionality, but not require a D-Claw specific routine that differs only by this line.

@rjleveque @mandli @dlgeorge

@mandli

mandli commented Aug 26, 2026

Copy link
Copy Markdown
Member

This is probably true for any field that is momentum related I suppose. Most of the other fields, unless they somehow have velocity issues, would not necessarily want to zero it out either. In the multilayer code we do the following:

      forall(i=1:mitot, j=1:mjtot, k=1:num_layers,
     &       q(3*(k-1)+1,i,j) / rho(k) < dry_tolerance(k))
        q(3*(k-1)+1,i,j) = max(q(3*(k-1)+1,i,j), 0.d0)
        q(3*(k-1)+2,i,j) = 0.d0
        q(3*(k-1)+3,i,j) = 0.d0
      end forall

Given the momentum equations are interspersed with the other fields, this also required another stepgrid.f.

In any case, modulo the bouss code, I think being explicit about this is probably fine. The alternative would be to call something that would do only this custom bit. I suppose this might be a recurring task that may be easier to implement that way, but that may be too complex a solution for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants