Metric to Development Pull Request - #134
DK-ombudsman wants to merge 65 commits into
Conversation
…d of interpolate_rhs_from_mesh to use Metric.H
…ack to the previous prescription.
… spherical FD reflecting test
| @@ -0,0 +1,86 @@ | |||
| ''' | |||
There was a problem hiding this comment.
for constant backgrounds, there is an option in emu to specify the rho/T/Ye in the parameter file without creating a background file. That might be the more simple way to do it to minimize the amount of code that needs to be maintained.
| @@ -1,5 +1,5 @@ | |||
| #!/bin/bash | |||
| for f in $(grep -rIPl "\t" ../../Source) | |||
| for f in $(grep -rIl $'\t' ../../Source) | |||
There was a problem hiding this comment.
That was committed by mistake. That's a change which is particular to my macOS system
| if (parms->cfl_factor > 0.0) { | ||
| Real min_length; | ||
|
|
||
| if (parms->coord_sys == 0) { |
There was a problem hiding this comment.
rather than having an if statement here, it should just ask the metric about the min length. That way the only if statement is the one that chooses the metric.
| p.rdata(PIdx::pupz) / p.rdata(PIdx::pupt)}; | ||
|
|
||
| // For curvilinear coordinates, we convert phat to curvilinear components projected on a local orthonormal tetrad for each particle | ||
| if (parms->coord_sys != 0) { |
There was a problem hiding this comment.
rather than having if statements here, this should just be a function contained in the metric. That way the only if statement is the one that chooses the metric.
There was a problem hiding this comment.
the cartesian metric can trivially just return without doing anything
|
|
||
| FourVec pos_int; | ||
|
|
||
| if (coord_sys == 0) { |
There was a problem hiding this comment.
same statement regarding if statements - this logic should be in the metric class.
| mode == BoundaryCondition::outflow) { | ||
| p.pos(d) = reflected_pos; | ||
|
|
||
| if (parms->coord_sys == 0) { |
There was a problem hiding this comment.
same statement regarding if statements - this logic should be in the metric class.
|
|
||
| p.rdata(PIdx::pupx + d) = -p.rdata(PIdx::pupx + d); | ||
|
|
||
| if (parms->coord_sys == 0) { |
There was a problem hiding this comment.
same statement regarding if statements - this logic should be in the metric class.
|
|
||
| //calculating cell volume | ||
| amrex::Real V_cell; | ||
| if (coord_sys == 0) { |
There was a problem hiding this comment.
same statement regarding if statements - this logic should be in the metric class.
|
I have not yet weighed in on the PR until Debraj/Sherwood finish their discussions from Sherwood's review. Just as an update!! I have seen it, just waiting for my turn. |
…ackground generator
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X4d9PEZdQvr3LGj1RALd1U
srichers
left a comment
There was a problem hiding this comment.
Overall, looks good. Only a couple of small modifications to apply.
|
|
||
| metric.coord_conv_inv(p); | ||
|
|
||
| // p.rdata(PIdx::pupx) = p.rdata(PIdx::pupx) + 0.05*p.rdata(PIdx::pupt); |
There was a problem hiding this comment.
If this is not used, should we delete the code?
There was a problem hiding this comment.
Yes. deleted.
| for (int j = sy.first(); j <= sy.last(); ++j) { | ||
| for (int i = sx.first(); i <= sx.last(); ++i) { | ||
| // getting the upper and lower bounds of the cell | ||
| const amrex::Real x1_lo = plo[0] + i / dxi[0]; |
There was a problem hiding this comment.
this code is repeated below, so I think we should turn it into a function.
There was a problem hiding this comment.
It does not have any coordinate system components to it ( so it's same for all coordinate systems). Should the function still be in metric or where should I put the function?
…he upper and lower bounds of the cell
cellio00
left a comment
There was a problem hiding this comment.
I approve of these changes; however It looks like there are requested changes still.
No description provided.