Closed cjvogl closed 9 years ago
Is there anyway to avoid adding num_dim
to the constructor?
getgauge
doesn't need to know num_dim
for reading fort.gauges
since this always has the same format regardless of the number of dimensions. We only need num_dim
for reading or printing the gauge locations and it seems like it should be possible to simplify things if we refactor a bit, and use things like gauge[1:-2]
. I'd prefer to avoid adding this argument to getgauge
.
While we could definitely get around using num_dim in getgauge to read the fort.gauges file, per your suggestion, I think there needs to be some way to tell the underlying GaugeData object that the gauges are 3D (visclaw/data.py:292) when reading the gauges.data file. In particular, the write() (amrclaw/data.py:226) and read() (amrclaw/data.py:253) of GaugeData currently rely on GaugeData.num_dim... which is set to a default value of 2 in init().
I think we can avoid this by using the version in clawpack/amrclaw#128.
That version in clawpack/amrclaw#128 looks good to me. I'll remove all mentions of num_dim from this PR.
This should be all set now. My apologies for the confusion while I get over the learning curve for the structure of clawpack and using github PRs
No worries, this is going as smoothly as any multi-repository set of changes and discussions could go...
Added num_dim and additional printing code to account for 3rd dimension when using 3d gauges.