-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add feature to create bottom topography from data (#27)
* add capability to read in bottom information from a file and create an interpolant * add test control file for new feature * update Makefile with new module * betters comments * hook the new feature into the SMModel * try to use INQUIRE and throw exception but there is an issue * Add USE ErrorTypesModule to import routine for throwing exceptions * can now throw a fatal error if the topography data file is invalid * add new global constant for a deafult file path length * properly pick the file unit for readin. Adjust error exception call * remove bilinear interpolant and reorder functions * store the matrix in compressed column format to save on code length and (slightly) on time * Enable boundary interpolant for extruded meshes on the first layer * This ensures that bottom topography contains interpolant information for the boundary specification. However, this change may introduce unnecessary interpolant information for extruded models that do not require interpolant data. * Fix refinement bug Fix the problem where overrefinement happens near a straight boundary. This was due to the dz component not being ignored. * Allow topography data to be rectangular * The topography IO allowed only square grids to be specified to input topography. To permit topographic grids with domains with different side lengths, `nnodes` has been transitioned to `nx,ny`. Necessary changes to the data structure and routines where nnodes was referenced have been applied in this commit. * The MtStHelens example file has been adjusted to list `nx, ny` just after the first header line. * Enable bottom cell sidewall interpolants in output mesh file * For cells that are adjacent to topography, the bottom face, and four sidewalls need to include interpolant data in the mesh output file. This ensures that the bottom edges of the side walls conform to the bottom face of the bottom cells. * Update ABAQUS_IceCreamCone.control Add \n to end of the file. * spacing adjustments * name change of new class and data type * 3DTestingAndTests Added 3D testing to code and four test cases. * Add Flag to benchmarks Ad the Quad mesh flag - 1 to the 2D benchmark data files. * Update MeshQualityAnalysis.f90 Add more comments about addition of 3D shape measure. * fix incorrect size in test setup array * update St Helens example. Omit the tec and inp files due to size * add smaller bottom extrusion from file example and a corresponding test * added documentation on how to add a new test case * update the 3d examples list * add description of gridded data mesh file format to the docs * added example code of setting a TOPOGEPHY file for readin * Add Finals Add FINAL declarations for classes where they had been forgotten. * Remove extra routine Remove addStringToDictionary from DataFileTopographyClass used in the parent class. Make that routine private in parent. * typo fixes in the new docs * typo fixes in the comments of DataFileTopographyClass.f90 Co-authored-by: Joe Schoonover <[email protected]> Co-authored-by: David Kopriva <[email protected]>
- Loading branch information
1 parent
98e2631
commit 9c05292
Showing
51 changed files
with
188,635 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
1690 1835 3525 2 | ||
3.07838E-01 | ||
1.22505E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
2 | ||
144 245 | ||
9.70085E-01 | ||
3.83146E+00 | ||
2.91848E-01 | ||
6.08656E-01 | ||
7.01044E-02 | ||
3.19161E-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
421 487 908 1 | ||
1.38420E+00 | ||
1.28309E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
1010 1188 2201 2 | ||
1.26107E+00 | ||
1.28826E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
2 | ||
306 462 | ||
9.68461E-01 | ||
3.12881E+00 | ||
3.92395E-01 | ||
6.38969E-01 | ||
9.30021E-02 | ||
5.36813E-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
426 473 898 0 | ||
5.89676E-02 | ||
1.05437E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
2 | ||
204 330 | ||
9.59694E-01 | ||
1.73251E+00 | ||
4.15022E-01 | ||
8.56197E-01 | ||
9.24916E-02 | ||
4.88786E-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
692 755 1447 1 | ||
2.31202E+00 | ||
1.19741E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
657 773 1430 4 | ||
1.69415E-03 | ||
1.24086E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
2 | ||
412 610 | ||
8.75287E-01 | ||
1.46245E+00 | ||
2.75374E-01 | ||
8.98911E-01 | ||
1.58062E-01 | ||
3.30209E-01 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
447 528 973 3 | ||
1.95190E-02 | ||
1.24509E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
2 | ||
1400 1794 | ||
9.55389E-01 | ||
3.51397E+00 | ||
7.27103E-03 | ||
5.44166E-01 | ||
9.41815E-02 | ||
9.09321E-03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
129 160 286 0 | ||
5.64831E-01 | ||
1.27215E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
1 | ||
216 256 472 0 | ||
8.62942E-01 | ||
1.16029E+00 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,4 +75,4 @@ | |
\end{INNER_BOUNDARIES} | ||
|
||
\end{MODEL} | ||
\end{FILE} | ||
\end{FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
% | ||
% An example using a bottom topography constructed from a data file | ||
% | ||
\begin{CONTROL_INPUT} | ||
|
||
\begin{RUN_PARAMETERS} | ||
mesh file name = Benchmarks/MeshFiles/Tests/BottomFromFile.inp | ||
plot file name = Benchmarks/PlotFiles/Tests/BottomFromFile.tec | ||
stats file name = none | ||
test file name = Benchmarks/BenchmarkData/BottomFromFile.txt | ||
mesh file format = ABAQUS | ||
polynomial order = 4 | ||
plot file format = sem | ||
\end{RUN_PARAMETERS} | ||
|
||
\begin{MESH_PARAMETERS} | ||
element type = hex | ||
\end{MESH_PARAMETERS} | ||
|
||
\begin{BACKGROUND_GRID} | ||
x0 = [ -3.0, -2.0, 1.0] | ||
dx = [ 1.0, 1.0, 1.0] | ||
N = [ 6, 4, 5] | ||
\end{BACKGROUND_GRID} | ||
|
||
\begin{SIMPLE_EXTRUSION} | ||
direction = 3 | ||
height = 3.0 | ||
subdivisions = 6 | ||
start surface name = Riverbed | ||
end surface name = Top | ||
\end{SIMPLE_EXTRUSION} | ||
|
||
\begin{SPRING_SMOOTHER} | ||
smoothing = ON | ||
smoothing type = LinearAndCrossBarSpring | ||
number of iterations = 25 | ||
\end{SPRING_SMOOTHER} | ||
|
||
\end{CONTROL_INPUT} | ||
|
||
\begin{MODEL} | ||
|
||
\begin{TOPOGRAPHY} | ||
data file = Examples/3D/BottomFromFile/exp_bottom.txt | ||
\end{TOPOGRAPHY} | ||
|
||
\end{MODEL} | ||
|
||
\end{FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
\begin{CONTROL_INPUT} | ||
|
||
\begin{RUN_PARAMETERS} | ||
mesh file name = Benchmarks/MeshFiles/Tests/HalfCircle3DR.mesh | ||
plot file name = Benchmarks/PlotFiles/Tests/HalfCircle3DR.tec | ||
stats file name = Benchmarks/StatsFiles/Tests/HalfCircle3DR.txt | ||
test file name = Benchmarks/BenchmarkData/HalfCircle3DRBenchmark.txt | ||
mesh file format = ISM | ||
polynomial order = 5 | ||
plot file format = sem | ||
\end{RUN_PARAMETERS} | ||
|
||
\begin{BACKGROUND_GRID} | ||
background grid size = [0.75,0.75,0.75] | ||
\end{BACKGROUND_GRID} | ||
|
||
\begin{SIMPLE_ROTATION} | ||
direction = 1 | ||
rotation angle factor = 1.0 | ||
subdivisions = 6 | ||
start surface name = start | ||
end surface name = end | ||
\end{SIMPLE_ROTATION} | ||
|
||
\begin{SPRING_SMOOTHER} | ||
smoothing = ON | ||
smoothing type = LinearAndCrossBarSpring | ||
number of iterations = 15 | ||
\end{SPRING_SMOOTHER} | ||
|
||
\end{CONTROL_INPUT} | ||
|
||
\begin{MODEL} | ||
|
||
\begin{OUTER_BOUNDARY} | ||
\begin{PARAMETRIC_EQUATION_CURVE} | ||
name = circle | ||
xEqn = x(t) = 4.0*cos(pi*t) | ||
yEqn = y(t) = 0.5 + 4.0*sin(pi*t) | ||
zEqn = z(t) = 0.0 | ||
\end{PARAMETRIC_EQUATION_CURVE} | ||
\begin{END_POINTS_LINE} | ||
name = cut | ||
xStart = [-4.0,0.5,0.0] | ||
xEnd = [4.0,0.5,0.0] | ||
\end{END_POINTS_LINE} | ||
\end{OUTER_BOUNDARY} | ||
|
||
\end{MODEL} | ||
\end{FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
\begin{CONTROL_INPUT} | ||
|
||
\begin{RUN_PARAMETERS} | ||
mesh file name = Benchmarks/MeshFiles/Tests/HalfCircleExtrude.mesh | ||
plot file name = Benchmarks/PlotFiles/Tests/HalfCircleExtrude.tec | ||
stats file name = None | ||
test file name = Benchmarks/BenchmarkData/HalfCircleExtBenchmark.txt | ||
mesh file format = ISM | ||
polynomial order = 5 | ||
plot file format = sem | ||
\end{RUN_PARAMETERS} | ||
|
||
\begin{BACKGROUND_GRID} | ||
background grid size = [0.75,0.75,0.75] | ||
\end{BACKGROUND_GRID} | ||
|
||
\begin{SIMPLE_EXTRUSION} | ||
direction = 1 | ||
height = 4.0 | ||
subdivisions = 4 | ||
start surface name = bottom | ||
end surface name = top | ||
\end{SIMPLE_EXTRUSION} | ||
|
||
\begin{SPRING_SMOOTHER} | ||
smoothing = ON | ||
smoothing type = LinearAndCrossBarSpring | ||
number of iterations = 15 | ||
\end{SPRING_SMOOTHER} | ||
|
||
\end{CONTROL_INPUT} | ||
|
||
\begin{MODEL} | ||
|
||
\begin{OUTER_BOUNDARY} | ||
\begin{PARAMETRIC_EQUATION_CURVE} | ||
name = circle | ||
xEqn = x(t) = 4.0*cos(pi*t) | ||
yEqn = y(t) = 4.0*sin(pi*t) | ||
zEqn = z(t) = 0.0 | ||
\end{PARAMETRIC_EQUATION_CURVE} | ||
\begin{END_POINTS_LINE} | ||
name = cut | ||
xStart = [-4.0,0.0,0.0] | ||
xEnd = [4.0,0.0,0.0] | ||
\end{END_POINTS_LINE} | ||
\end{OUTER_BOUNDARY} | ||
|
||
\end{MODEL} | ||
\end{FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
% | ||
% An example using a bottom topography | ||
% | ||
\begin{CONTROL_INPUT} | ||
|
||
\begin{RUN_PARAMETERS} | ||
mesh file name = Benchmarks/MeshFiles/Tests/Pond3D.mesh | ||
plot file name = Benchmarks/PlotFiles/Tests/Pond3D.tec | ||
stats file name = Benchmarks/StatsFiles/Tests/Pond3D.txt | ||
test file name = Benchmarks/BenchmarkData/Pond.txt | ||
mesh file format = ISM | ||
polynomial order = 6 | ||
plot file format = sem | ||
\end{RUN_PARAMETERS} | ||
|
||
\begin{BACKGROUND_GRID} | ||
background grid size = [0.75,0.75,0.75] | ||
\end{BACKGROUND_GRID} | ||
|
||
\begin{SIMPLE_EXTRUSION} | ||
direction = 3 | ||
height = 3.0 | ||
subdivisions = 4 | ||
start surface name = bottom | ||
end surface name = top | ||
\end{SIMPLE_EXTRUSION} | ||
|
||
\begin{SPRING_SMOOTHER} | ||
smoothing = ON | ||
smoothing type = LinearAndCrossBarSpring | ||
number of iterations = 25 | ||
\end{SPRING_SMOOTHER} | ||
|
||
\end{CONTROL_INPUT} | ||
|
||
\begin{MODEL} | ||
|
||
\begin{OUTER_BOUNDARY} | ||
\begin{CIRCULAR_ARC} | ||
name = circle | ||
units = degrees | ||
center = [0.0, 0,0,0.0] | ||
radius = 4.0 | ||
start angle = 0.0 | ||
end angle = 360.0 | ||
\end{CIRCULAR_ARC} | ||
\end{OUTER_BOUNDARY} | ||
|
||
\begin{TOPOGRAPHY} | ||
eqn = f(x,y) = 1.5*exp(-0.5*((x-1.0)^2 + (y-1.0)^2)) + 0.75*exp(-0.5*((x+1.0)^2 + (y+1.0)^2)) | ||
\end{TOPOGRAPHY} | ||
|
||
\end{MODEL} | ||
\end{FILE} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
\begin{CONTROL_INPUT} | ||
|
||
\begin{RUN_PARAMETERS} | ||
mesh file name = Benchmarks/MeshFiles/Tests/SigmoidSweepAndScale.mesh | ||
plot file name = Benchmarks/PlotFiles/Tests/SigmoidSweepAndScale.tec | ||
stats file name = None | ||
test file name = Benchmarks/BenchmarkData/SigmoidSweepAndScale.txt | ||
mesh file format = ISM | ||
polynomial order = 4 | ||
plot file format = skeleton | ||
\end{RUN_PARAMETERS} | ||
|
||
\begin{BACKGROUND_GRID} | ||
background grid size = [0.25,0.25,0.25] | ||
\end{BACKGROUND_GRID} | ||
|
||
\begin{SWEEP_ALONG_CURVE} | ||
algorithm = Hanson | ||
subdivisions per segment = 25 | ||
start surface name = bottom | ||
end surface name = top | ||
\end{SWEEP_ALONG_CURVE} | ||
|
||
\begin{SPRING_SMOOTHER} | ||
smoothing = ON | ||
smoothing type = LinearAndCrossBarSpring | ||
number of iterations = 15 | ||
\end{SPRING_SMOOTHER} | ||
|
||
\end{CONTROL_INPUT} | ||
|
||
\begin{MODEL} | ||
|
||
\begin{OUTER_BOUNDARY} | ||
\begin{PARAMETRIC_EQUATION_CURVE} | ||
name = circle | ||
xEqn = x(t) = cos(2*pi*t) | ||
yEqn = y(t) = sin(2*pi*t) | ||
zEqn = z(t) = 0.0 | ||
\end{PARAMETRIC_EQUATION_CURVE} | ||
\end{OUTER_BOUNDARY} | ||
|
||
\begin{SWEEP_CURVE} | ||
\begin{PARAMETRIC_EQUATION_CURVE} | ||
name = straight2 | ||
xEqn = x(t) = 3.0 + 8*t | ||
yEqn = y(t) = 3.0/(1 + 1/exp(10*(t-0.5))) | ||
zEqn = z(t) = 3.0/(1 + 1/exp(10*(t-0.5))) | ||
\end{PARAMETRIC_EQUATION_CURVE} | ||
\end{SWEEP_CURVE} | ||
|
||
\begin{SWEEP_SCALE_FACTOR} | ||
\begin{PARAMETRIC_EQUATION} | ||
eqn = r(t) = 1.0 - 0.75*t | ||
\end{PARAMETRIC_EQUATION} | ||
\end{SWEEP_SCALE_FACTOR} | ||
|
||
\end{MODEL} | ||
\end{FILE} |
Oops, something went wrong.