From 691074ec2f600a1ca43d34a57fedfbd7c32e2ba5 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Fri, 5 Jan 2024 09:28:17 +0100 Subject: [PATCH 1/4] adjust wording across docs and fix incorrect signature for saveProject function --- docs/src/CheatSheet.md | 20 ++++++++++---------- docs/src/development.md | 2 +- docs/src/github-git.md | 2 +- docs/src/guided-tour.md | 15 ++++++++------- docs/src/interactive-api.md | 27 +++++++++++++++------------ docs/src/interactive_overview.md | 2 +- docs/src/testing.md | 2 +- 7 files changed, 37 insertions(+), 33 deletions(-) diff --git a/docs/src/CheatSheet.md b/docs/src/CheatSheet.md index 2cb259e6..7cefd70e 100644 --- a/docs/src/CheatSheet.md +++ b/docs/src/CheatSheet.md @@ -5,7 +5,7 @@ of the interactive construction of boundary curves, background grid, etc. When possible, the commands presented below give generic versions of the function calls, e.g., for creating a new curve or adding the curve to a boundary chain. The script -`interactive_outer_boundary_generic.jl` in the `examples` folder +`interactive_outer_boundary_generic.jl` in the `examples/` folder constructs an identical example mesh as shown in the [Guided tour](@ref) using generic function calls. @@ -36,11 +36,11 @@ The `options` are any sum of `MODEL`, `GRID`, `REFINEMENTS`, and `MESH`. ## Curves ``` - c = new(name, startLocation [x,y,z],endLocation [x,y,z]) *Straight Line* - c = new(name,center [x,y,z],radius, startAngle, endAngle) *Circular Arc* - c = new(name, xEqn, yEqn, zEqn) *Parametric equation* - c = new(name, dataFile) *Spline with data from a file* - c = new(name, nKnots, knotsMatrix) *Spline with given knot values* + c = new(name, startLocation [x,y,z], endLocation [x,y,z]) *Straight Line* + c = new(name, center [x,y,z], radius, startAngle, endAngle) *Circular Arc* + c = new(name, xEqn, yEqn, zEqn) *Parametric equation* + c = new(name, dataFile) *Spline with data from a file* + c = new(name, nKnots, knotsMatrix) *Spline with given knot values* ``` Shown here is the use of the function `new`, which is a shortcut to the full functions, e.g. `newCircularArcCurve`, etc. which have the same arguments. @@ -55,9 +55,9 @@ Shown here is the use of the function `new`, which is a shortcut to the full fun ## Adding to a Project ``` - add!(p, c) *Add outer boundary curve* - add!(p, c, ) *Add curve to an inner boundary* - add!(p, r) *Add refinement region* + add!(p, c) *Add outer boundary curve* + add!(p, c, ) *Add curve to an inner boundary* + add!(p, r) *Add refinement region* addBackgroundGrid!(p, [top, left, bottom, right], [nX, nY, nZ]) *No outer boundary* addBackgroundGrid!(p, [dx, dy, dz]) *If an outer boundary is present* @@ -76,7 +76,7 @@ Shown here is the use of the function `add!`, which is a shortcut to the full fu ## Removing from Project ``` - removeOuterboundary!(p) *Entire outer boundary curve* + removeOuterBoundary!(p) *Entire outer boundary curve* removeInnerBoundary!(p, innerBoundaryName) *Entire inner boundary curve* remove!(p, name) *Curve in outer boundary* remove!(p, name, innerBoundaryName) *Curve in inner boundary* diff --git a/docs/src/development.md b/docs/src/development.md index 4ea9c970..45b4085c 100644 --- a/docs/src/development.md +++ b/docs/src/development.md @@ -32,7 +32,7 @@ are available for almost any operating system. They also are preinstalled on virtually all Unix-like systems. However, Vim and Emacs come with their own, steep learning curve if they have never been used before. Therefore, if in doubt, it is probably easier to get started with a classic GUI-based text editor (like -Juno). If you decide to use Vim or Emacs, make sure that you install the +VS Code). If you decide to use Vim or Emacs, make sure that you install the corresponding Vim plugin [julia-vim](https://github.com/JuliaEditorSupport/julia-vim) or Emacs major mode [julia-emacs](https://github.com/JuliaEditorSupport/julia-emacs). diff --git a/docs/src/github-git.md b/docs/src/github-git.md index 15864f3c..50111ed8 100644 --- a/docs/src/github-git.md +++ b/docs/src/github-git.md @@ -193,7 +193,7 @@ the following steps need to be taken (as documented for GitLab in issue java -jar bfg-1.13.0.jar --strip-blobs-bigger-than 10M HOHQMesh.jl.git # Enter repo - cd Trixi.jl.git + cd HOHQMesh.jl.git # Clean up reflog and force aggressive garbage collection git reflog expire --expire=now --all && git gc --prune=now --aggressive diff --git a/docs/src/guided-tour.md b/docs/src/guided-tour.md index 2dc7ceaa..32f27390 100644 --- a/docs/src/guided-tour.md +++ b/docs/src/guided-tour.md @@ -1,6 +1,6 @@ # Guided tour -In this brief overview, we highlight two scripts from the `examples` folder +In this brief overview, we highlight two scripts from the `examples/` folder that demonstrate the interactive mesh functionality of HOHQMesh.jl. In depth explanations of the functionality are provided in the [Tutorials](@ref). @@ -82,7 +82,7 @@ if isdefined(Main, :Makie) @info "To visualize the project (boundary curves, background grid, mesh, etc.), include `GLMakie` and run again." end -# Generate the mesh. This produces the mesh and TecPlot files `AllFeatures.mesh` and `AllFeatures.tec` +# Generate the mesh. This produces the mesh and TecPlot files `IceCreamCone.mesh` and `IceCreamCone.tec` # and save them to the `out` folder. Also, if there is an active plot in the project `p` it is # updated with the mesh that was generated. @@ -112,16 +112,16 @@ circular arc. Again, they are defined counter-clockwise. For convenience, `newProject` will generate default run parameters used by HOHQMesh, like the plot file format and the smoother. The parameters can be edited with setter commands. For example, the script -sets the polynomial order (default = 5) and the plot file format (default = "skeleton"). +resets the polynomial order (default = 5) and the plot file format (default = "skeleton"). One run parameter that must be set manually is the background grid. Since there is an outer -boundary, that determines the extent of the domain to be meshed, so only the mesh size needs +boundary, that determines the extent of the domain to be meshed, only the mesh size needs to be specified using ``` addBackgroundGrid!(proj::Project, bgSize::Array{Float64}) ``` -The example sets the background mesh size to be 0.1 in the x and y directions. +The example sets the background mesh size to be 0.5 in the x and y directions. The z component is ignored. The script finishes by generating the quad mesh and plotting the results, as shown below @@ -132,9 +132,10 @@ Finally, the script returns the project so that it can be edited further, if des To save a control file for HOHQMesh, simply invoke ``` -saveProject(proj::Project, outFile::String) +saveProject(proj::Project) ``` -where `outFile` is the name of the control file (traditionally with a .control extension). +where the name of the control file (traditionally with a .control extension) matches the +name of the `proj`. `saveProject` is automatically called when a mesh is generated. Note, a third example script `interactive_outer_boundary_generic.jl` is identical to that diff --git a/docs/src/interactive-api.md b/docs/src/interactive-api.md index 103f150d..55098467 100644 --- a/docs/src/interactive-api.md +++ b/docs/src/interactive-api.md @@ -6,10 +6,11 @@ ``` [Return:Project] proj = newProject(name::String, folder::String) ``` -The supplied name will be the default name of the mesh and plot files generated by HOHQMesh. The folder is +The supplied name will be the default name of the control, mesh, and plot files +generated by HOHQMesh. The folder is the directory in which those files will be placed. The empty project will include default `RunParameters` -and a default `SpringSmoother`, both of which can be modified later, if desired. The only thing required to -add is the background grid. +and a default `SpringSmoother`, both of which can be modified later, if desired. +The only thing required to add is the background grid. ### Opening an existing project file @@ -17,8 +18,8 @@ A project can be created from an existing HOHQMesh control file with ``` [Return:Project] proj = openProject(fileName::String, folder::String) ``` -The supplied `fileName` will be the name of the project and the generated mesh and plot files will be placed -in the supplied `folder`. +The supplied `fileName` will be the name of the project and the generated mesh and +plot files will be placed in the supplied `folder`. ### Saving a `Project` ``` @@ -106,10 +107,12 @@ By default, the mesh, plot and stats files will be written with the name and pat ### Smoothing operations -A default smoother is created when `newProject` is called, which sets the status to `ON`, type to -`LinearAndCrossbarSpring`, and number of iterations = 25. These are generally good enough for most purposes. -The most likely parameter to change is the number of iterations. Further details on the smoothing strategy -and how it works are available [here](https://trixi-framework.github.io/HOHQMesh/the-control-input/#the-smoother). +A default smoother is created when `newProject` is called, which sets the status to `ON`, +type to `LinearAndCrossbarSpring`, and number of iterations = 25. +These are generally good enough for most purposes. +The most likely parameter to change is the number of iterations. +Further details on the smoothing strategy and how it works are available +[here](https://trixi-framework.github.io/HOHQMesh/the-control-input/#the-smoother). To change the defaults, the smoother parameters can be set/enquired with the functions ``` @@ -130,7 +133,7 @@ To remove the smoother altogether, use ### Adding the background grid There are three forms for the background grid definition, one for when there is an outer boundary, -and two for when there is not. One form of background grid **must** to be specified +and two for when there is not. One form of background grid **must** be specified after a new project has been created. ``` [Return:nothing] addBackgroundGrid!(proj::Project, @@ -165,7 +168,7 @@ If a plot is present it will be updated automatically. Refinement can be specified either at a point, using the `RefinementCenter`, or along a line, using a `RefinementLine`. You can have as many of these refinement regions as you want. They are useful if you know regions of the solution where refinement is needed -(e.g. a wake) or in problematic areas of the geometry (e.g a sharp corner). +(e.g. a wake) or in problematic areas of the geometry (e.g. a sharp corner). To create a `RefinementCenter`, ``` @@ -202,7 +205,7 @@ To get a reference to a refinement region with a given name, use Finally, to get a list of all the refinement regions, ``` - [Return:Array{Dict{String,Any}}] array = allRefinementRegions(proj::Project) + [Return:Array{Dict{String,Any}}] array = allRefinementRegions(proj::Project) ``` A refinement region can be edited by using the following: diff --git a/docs/src/interactive_overview.md b/docs/src/interactive_overview.md index 52524826..c6791de8 100644 --- a/docs/src/interactive_overview.md +++ b/docs/src/interactive_overview.md @@ -5,7 +5,7 @@ mesh using Julia. It serves as a front end to the HOHQMesh program, and is designed to let one build a meshing project interactively while graphically displaying the results. -Several scripts are available in the `examples` folder +Several scripts are available in the `examples/` folder to get you started. These example scripts follow the naming convention of `interactive_*` where the phrase interactive indicates their association with this API and then trailing information will indicate what that script demonstrates. For instance, the file `interactive_spline_curves.jl` diff --git a/docs/src/testing.md b/docs/src/testing.md index f43fc0d8..f8eae3e9 100644 --- a/docs/src/testing.md +++ b/docs/src/testing.md @@ -9,7 +9,7 @@ functionality or add other errors. In the main which allows to run tests automatically upon certain events. When, how, and what is tested by GitHub Actions is controlled by the workflow file [`.github/workflows/ci.yml`](https://github.com/trixi-framework/HOHQMesh.jl/blob/main/.github/workflows/ci.yml). -In Trixi and its related repositories, tests are triggered by +In HOHQMesh and its related repositories, tests are triggered by * each `git push` to `main` and * each `git push` to any pull request. Besides checking functionality, we also analyze the [Test coverage](@ref) to From c885975b959c5069eea4ae105e8a180379b4ce3a Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Fri, 5 Jan 2024 09:28:39 +0100 Subject: [PATCH 2/4] update main docs page to link to the JuliaCon presentation --- docs/src/index.md | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/src/index.md b/docs/src/index.md index 32709ff9..0a64ad34 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -5,11 +5,21 @@ This package is a Julia frontend to the Fortran-based *High Order Hex-Quad Meshe [David A. Kopriva](https://www.math.fsu.edu/~kopriva/). It augments HOHQMesh with [interactive functionality](@ref InteractiveTool) that gives a user the ability to create, visualize, and generate high-order meshes. -It further allows one to seamlessly integrate meshes generated by HOHQMesh into a Julia-based simulation workflow. -For example, running a simulation on an unstructured quadrilateral mesh -with [Trixi.jl](https://trixi-framework.github.io/Trixi.jl/stable/tutorials/hohqmesh_tutorial/). HOHQMesh.jl is available on Linux, MacOS, and Windows. +Further, one can seamlessly integrate meshes generated by HOHQMesh into a Julia-based simulation workflow. +The presentation [From Mesh Generation to Adaptive Simulation: A Journey in Julia](https://youtu.be/_N4ozHr-t9E), +originally given as part of JuliaCon 2022, outlines how to use HOHQMesh.jl together +with [Trixi.jl](https://github.com/trixi-framework/Trixi.jl) for an adaptive simulation +in two spatial dimensions on a complex domain. +More details as well as code to run the simulation presented can be found at the +[reproducibility repository](https://github.com/trixi-framework/talk-2022-juliacon_toolchain) +for the presentation. +An additional resource is a +[tutorial](https://trixi-framework.github.io/Trixi.jl/stable/tutorials/hohqmesh_tutorial/) +available in the Trixi.jl documentation that describes how to run a simulation +on an unstructured quadrilateral mesh. + ## Installation If you have not yet installed Julia, please [follow the instructions for your operating system](https://julialang.org/downloads/platform/). HOHQMesh.jl works From 0243705221fca0a4c5019ad1773b878ae381c989 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Fri, 5 Jan 2024 09:29:43 +0100 Subject: [PATCH 3/4] update tutorials output because some mesh statistic values change (very) slightly --- docs/src/tutorials/create_edit_curves.md | 36 +++++++++---------- docs/src/tutorials/curved_outer_boundary.md | 36 +++++++++---------- docs/src/tutorials/introduction.md | 25 +++++++------ docs/src/tutorials/spline_curves.md | 18 +++++----- docs/src/tutorials/straight_outer_boundary.md | 18 +++++----- 5 files changed, 68 insertions(+), 65 deletions(-) diff --git a/docs/src/tutorials/create_edit_curves.md b/docs/src/tutorials/create_edit_curves.md index 7afda25c..04f6ced6 100644 --- a/docs/src/tutorials/create_edit_curves.md +++ b/docs/src/tutorials/create_edit_curves.md @@ -243,21 +243,21 @@ generate_mesh(sandbox_project) ******************* 2D Mesh Statistics: ******************* - Total time = 8.7928000000000006E-002 - Number of nodes = 513 + Total time = 7.5414000000000009E-002 + Number of nodes = 511 Number of Edges = 933 Number of Elements = 422 Number of Subdivisions = 7 Mesh Quality: Measure Minimum Maximum Average Acceptable Low Acceptable High Reference - Signed Area 0.00003020 1.17336756 0.18813064 0.00000000 999.99900000 1.00000000 - Aspect Ratio 1.00984888 2.32321419 1.31488869 1.00000000 999.99900000 1.00000000 - Condition 1.00041121 2.42894151 1.21101797 1.00000000 4.00000000 1.00000000 - Edge Ratio 1.01674110 3.74861238 1.59495734 1.00000000 4.00000000 1.00000000 - Jacobian 0.00001734 1.13821390 0.14136293 0.00000000 999.99900000 1.00000000 - Minimum Angle 32.20087774 89.35157729 68.75755243 40.00000000 90.00000000 90.00000000 - Maximum Angle 90.60787193 152.53515465 113.36966060 90.00000000 135.00000000 90.00000000 + Signed Area 0.00002932 1.17335568 0.18813138 0.00000000 999.99900000 1.00000000 + Aspect Ratio 1.00953438 2.30790024 1.31439620 1.00000000 999.99900000 1.00000000 + Condition 1.00041663 2.41773865 1.21024584 1.00000000 4.00000000 1.00000000 + Edge Ratio 1.01673809 3.68828437 1.59413340 1.00000000 4.00000000 1.00000000 + Jacobian 0.00001750 1.13820387 0.14143901 0.00000000 999.99900000 1.00000000 + Minimum Angle 32.22733574 89.35690571 68.75321248 40.00000000 90.00000000 90.00000000 + Maximum Angle 90.61089476 152.37947944 113.36221513 90.00000000 135.00000000 90.00000000 Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 ``` The call to `generate_mesh` also prints mesh quality statistics to the screen @@ -413,21 +413,21 @@ generate_mesh(sandbox_project) ******************* 2D Mesh Statistics: ******************* - Total time = 0.13299600000000000 - Number of nodes = 714 + Total time = 0.11353599999999998 + Number of nodes = 712 Number of Edges = 1308 Number of Elements = 596 Number of Subdivisions = 7 Mesh Quality: Measure Minimum Maximum Average Acceptable Low Acceptable High Reference - Signed Area 0.00003020 1.15662678 0.12823840 0.00000000 999.99900000 1.00000000 - Aspect Ratio 1.01082600 3.14765817 1.34292128 1.00000000 999.99900000 1.00000000 - Condition 1.00037252 2.59936116 1.22903490 1.00000000 4.00000000 1.00000000 - Edge Ratio 1.02724726 3.74861238 1.64807401 1.00000000 4.00000000 1.00000000 - Jacobian 0.00001734 1.13150266 0.09438571 0.00000000 999.99900000 1.00000000 - Minimum Angle 31.88018513 89.33451932 67.86550651 40.00000000 90.00000000 90.00000000 - Maximum Angle 90.43850948 157.31718198 114.36070355 90.00000000 135.00000000 90.00000000 + Signed Area 0.00002932 1.15661960 0.12823902 0.00000000 999.99900000 1.00000000 + Aspect Ratio 1.01050856 3.14732001 1.34260027 1.00000000 999.99900000 1.00000000 + Condition 1.00037771 2.59434067 1.22850175 1.00000000 4.00000000 1.00000000 + Edge Ratio 1.02744717 3.68828437 1.64751502 1.00000000 4.00000000 1.00000000 + Jacobian 0.00001750 1.13149451 0.09443920 0.00000000 999.99900000 1.00000000 + Minimum Angle 31.87236189 89.33988565 67.86178629 40.00000000 90.00000000 90.00000000 + Maximum Angle 90.44177106 157.27121105 114.35699650 90.00000000 135.00000000 90.00000000 Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 ``` The visualization updates automatically and the background grid is *removed* after when the mesh is generated. diff --git a/docs/src/tutorials/curved_outer_boundary.md b/docs/src/tutorials/curved_outer_boundary.md index dfbaf3d2..998667a6 100644 --- a/docs/src/tutorials/curved_outer_boundary.md +++ b/docs/src/tutorials/curved_outer_boundary.md @@ -126,21 +126,21 @@ generate_mesh(blob_project) ******************* 2D Mesh Statistics: ******************* - Total time = 0.10612399999999998 - Number of nodes = 481 + Total time = 8.4328000000000000E-002 + Number of nodes = 479 Number of Edges = 895 Number of Elements = 417 Number of Subdivisions = 5 Mesh Quality: Measure Minimum Maximum Average Acceptable Low Acceptable High Reference - Signed Area 0.00025346 0.36181966 0.11936327 0.00000000 999.99900000 1.00000000 - Aspect Ratio 1.00002883 2.58066393 1.26340310 1.00000000 999.99900000 1.00000000 - Condition 1.00000000 3.11480166 1.18583253 1.00000000 4.00000000 1.00000000 - Edge Ratio 1.00006177 4.80707901 1.51313656 1.00000000 4.00000000 1.00000000 - Jacobian 0.00011326 0.28172540 0.10292251 0.00000000 999.99900000 1.00000000 - Minimum Angle 29.30873612 89.99827738 73.08079323 40.00000000 90.00000000 90.00000000 - Maximum Angle 90.00132792 156.87642432 109.37004979 90.00000000 135.00000000 90.00000000 + Signed Area 0.00025286 0.36208840 0.11936333 0.00000000 999.99900000 1.00000000 + Aspect Ratio 1.00002882 2.58443761 1.26335838 1.00000000 999.99900000 1.00000000 + Condition 1.00000000 3.12867591 1.18585825 1.00000000 4.00000000 1.00000000 + Edge Ratio 1.00006176 4.77438730 1.51314025 1.00000000 4.00000000 1.00000000 + Jacobian 0.00011275 0.28170345 0.10292806 0.00000000 999.99900000 1.00000000 + Minimum Angle 29.38249259 89.99827733 73.08294187 40.00000000 90.00000000 90.00000000 + Maximum Angle 90.00132795 156.98701187 109.36585212 90.00000000 135.00000000 90.00000000 Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 ``` The call to `generate_mesh` also prints mesh quality statistics to the screen and updates the @@ -176,21 +176,21 @@ generate_mesh(blob_project) ******************* 2D Mesh Statistics: ******************* - Total time = 0.11373499999999999 - Number of nodes = 505 + Total time = 9.2778999999999986E-002 + Number of nodes = 503 Number of Edges = 940 Number of Elements = 438 Number of Subdivisions = 5 Mesh Quality: Measure Minimum Maximum Average Acceptable Low Acceptable High Reference - Signed Area 0.00025346 0.36181966 0.11412658 0.00000000 999.99900000 1.00000000 - Aspect Ratio 1.00002884 2.47585614 1.26424390 1.00000000 999.99900000 1.00000000 - Condition 1.00000000 3.11480166 1.18425870 1.00000000 4.00000000 1.00000000 - Edge Ratio 1.00006177 4.80707901 1.51413601 1.00000000 4.00000000 1.00000000 - Jacobian 0.00011326 0.28172540 0.09814547 0.00000000 999.99900000 1.00000000 - Minimum Angle 29.30873612 89.99827901 72.79596483 40.00000000 90.00000000 90.00000000 - Maximum Angle 90.00132782 156.87642433 109.63912468 90.00000000 135.00000000 90.00000000 + Signed Area 0.00025286 0.36208840 0.11412688 0.00000000 999.99900000 1.00000000 + Aspect Ratio 1.00002883 2.47056840 1.26416662 1.00000000 999.99900000 1.00000000 + Condition 1.00000000 3.12867592 1.18429212 1.00000000 4.00000000 1.00000000 + Edge Ratio 1.00006176 4.77438730 1.51407242 1.00000000 4.00000000 1.00000000 + Jacobian 0.00011275 0.28170345 0.09814903 0.00000000 999.99900000 1.00000000 + Minimum Angle 29.38249259 89.99827897 72.80049710 40.00000000 90.00000000 90.00000000 + Maximum Angle 90.00132784 156.98701188 109.63478104 90.00000000 135.00000000 90.00000000 Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 ``` Note, the circular region indicating the refinement center is removed from the plot when the mesh is generated. diff --git a/docs/src/tutorials/introduction.md b/docs/src/tutorials/introduction.md index fddd42b6..47afe661 100644 --- a/docs/src/tutorials/introduction.md +++ b/docs/src/tutorials/introduction.md @@ -15,10 +15,11 @@ the simulation framework [Trixi.jl](https://github.com/trixi-framework/Trixi.jl) ## [Straight-sided outer boundary](@ref) -This tutorial gives an introduction to the main functionality of the interactive meshing. In -particular, adding a straight-sided bounding box for the outer domain and two circular inner boundary -chains. It also demonstrates how to adjust some of the mesh parameters as well as the output mesh file -format. +This tutorial gives an introduction to the main functionality of the interactive meshing. +In particular, adding a straight-sided bounding box for the outer domain +and two circular inner boundary chains. +It also demonstrates how to adjust some of the mesh parameters as well as +the output mesh file format. ### Synopsis @@ -30,8 +31,9 @@ Demonstrates how to: ## [Curved outer boundary](@ref) -This tutorial constructs an outer domain boundary using parametric equations. The background grid is then -set and a preliminary mesh is generated. It highlights how a user can manually add a refinement region where +This tutorial constructs an outer domain boundary using parametric equations. +The background grid is then set and a preliminary mesh is generated. +It highlights how a user can manually add a refinement region where necessary from this visual inspection. ### Synopsis @@ -44,9 +46,9 @@ Demonstrates how to: ## [Spline curves](@ref) -This tutorial constructs a circular outer domain and three inner boundary curves. Two of the inner curves -are constructed using cubic splines and the third inner boundary is a triangular shape built from -three straight line "curves". +This tutorial constructs a circular outer domain and three inner boundary curves. +Two of the inner curves are constructed using cubic splines and the third inner +boundary is a triangular shape built from three straight line "curves". ### Synopsis @@ -59,8 +61,9 @@ Demonstrates how to: ## [Creating and editing curves](@ref) -This tutorial demonstrates how to construct and edit curve segments defined in inner / outer boundary -chains. A curve "chain" in the HOHQMesh context means a closed curve that is +This tutorial demonstrates how to construct and edit curve segments defined +in inner / outer boundary chains. +A curve "chain" in the HOHQMesh context means a closed curve that is composed of an arbitrary number of pieces. Each curve segment of a chain can be a different curve type, e.g., a circular arc can connect to a spline that connects to a parametric equation curve. diff --git a/docs/src/tutorials/spline_curves.md b/docs/src/tutorials/spline_curves.md index 7f68b941..9d37cdad 100644 --- a/docs/src/tutorials/spline_curves.md +++ b/docs/src/tutorials/spline_curves.md @@ -212,21 +212,21 @@ generate_mesh(spline_project) ******************* 2D Mesh Statistics: ******************* - Total time = 0.29613000000000000 - Number of nodes = 1177 + Total time = 0.25359100000000001 + Number of nodes = 1176 Number of Edges = 2225 Number of Elements = 1047 Number of Subdivisions = 4 Mesh Quality: Measure Minimum Maximum Average Acceptable Low Acceptable High Reference - Signed Area 0.00006214 0.15607014 0.04505181 0.00000000 999.99900000 1.00000000 - Aspect Ratio 1.00008989 2.78073390 1.23192911 1.00000000 999.99900000 1.00000000 - Condition 1.00000055 3.81350981 1.15526066 1.00000000 4.00000000 1.00000000 - Edge Ratio 1.00014319 6.76310951 1.46264239 1.00000000 4.00000000 1.00000000 - Jacobian 0.00001495 0.10424741 0.03955903 0.00000000 999.99900000 1.00000000 - Minimum Angle 37.25504203 89.96195708 74.41060580 40.00000000 90.00000000 90.00000000 - Maximum Angle 90.03105286 157.27881545 107.90994073 90.00000000 135.00000000 90.00000000 + Signed Area 0.00006209 0.15607019 0.04505180 0.00000000 999.99900000 1.00000000 + Aspect Ratio 1.00008965 2.78091496 1.23178864 1.00000000 999.99900000 1.00000000 + Condition 1.00000055 3.82171291 1.15535543 1.00000000 4.00000000 1.00000000 + Edge Ratio 1.00014261 6.78201663 1.46249737 1.00000000 4.00000000 1.00000000 + Jacobian 0.00001491 0.10424647 0.03955817 0.00000000 999.99900000 1.00000000 + Minimum Angle 37.24189766 89.96174556 74.42003031 40.00000000 90.00000000 90.00000000 + Maximum Angle 90.03128071 157.35065162 107.91806148 90.00000000 135.00000000 90.00000000 Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 ``` The call to `generate_mesh` also prints mesh quality statistics to the screen. diff --git a/docs/src/tutorials/straight_outer_boundary.md b/docs/src/tutorials/straight_outer_boundary.md index 7ec39262..f3e9c042 100644 --- a/docs/src/tutorials/straight_outer_boundary.md +++ b/docs/src/tutorials/straight_outer_boundary.md @@ -7,7 +7,7 @@ output mesh file format. The outer boundary, background grid and mesh will be visualized for quality inspection. It provides details and clarification for the script `interactive_outer_box_two_circles.jl` -from the [examples](https://github.com/trixi-framework/HOHQMesh.jl/tree/main/examples) folder. +from the [examples/](https://github.com/trixi-framework/HOHQMesh.jl/tree/main/examples) folder. ### Synopsis @@ -171,7 +171,7 @@ generate_mesh(box_project) ******************* 2D Mesh Statistics: ******************* - Total time = 3.5553999999999995E-002 + Total time = 2.9116999999999997E-002 Number of nodes = 498 Number of Edges = 921 Number of Elements = 422 @@ -179,13 +179,13 @@ generate_mesh(box_project) Mesh Quality: Measure Minimum Maximum Average Acceptable Low Acceptable High Reference - Signed Area 0.34513058 1.15383206 0.91833833 0.00000000 999.99900000 1.00000000 - Aspect Ratio 1.00000004 1.71083844 1.08733476 1.00000000 999.99900000 1.00000000 - Condition 1.00000000 1.46558793 1.04922640 1.00000000 4.00000000 1.00000000 - Edge Ratio 1.00000006 2.43503343 1.16700825 1.00000000 4.00000000 1.00000000 - Jacobian 0.17863168 1.07210721 0.86801359 0.00000000 999.99900000 1.00000000 - Minimum Angle 50.56155029 89.99999787 83.84466557 40.00000000 90.00000000 90.00000000 - Maximum Angle 90.00000259 136.97479459 96.69930735 90.00000000 135.00000000 90.00000000 + Signed Area 0.34513977 1.15385313 0.91833886 0.00000000 999.99900000 1.00000000 + Aspect Ratio 1.00000004 1.71084672 1.08736698 1.00000000 999.99900000 1.00000000 + Condition 1.00000000 1.46547984 1.04928616 1.00000000 4.00000000 1.00000000 + Edge Ratio 1.00000006 2.43578615 1.16710823 1.00000000 4.00000000 1.00000000 + Jacobian 0.17854786 1.07210200 0.86801191 0.00000000 999.99900000 1.00000000 + Minimum Angle 50.57680338 89.99999787 83.84338772 40.00000000 90.00000000 90.00000000 + Maximum Angle 90.00000259 136.97085026 96.70176380 90.00000000 135.00000000 90.00000000 Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 ``` The call to `generate_mesh` also prints mesh quality statistics to the screen and updates the From 0a57b6041251e5a3010cc85998fa17b0045f8749 Mon Sep 17 00:00:00 2001 From: Andrew Winters Date: Fri, 5 Jan 2024 10:24:58 +0100 Subject: [PATCH 4/4] Apply suggestions from code review Co-authored-by: Hendrik Ranocha --- docs/src/development.md | 3 ++- docs/src/guided-tour.md | 4 ++-- docs/src/interactive-api.md | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/src/development.md b/docs/src/development.md index 45b4085c..c2e32599 100644 --- a/docs/src/development.md +++ b/docs/src/development.md @@ -32,7 +32,8 @@ are available for almost any operating system. They also are preinstalled on virtually all Unix-like systems. However, Vim and Emacs come with their own, steep learning curve if they have never been used before. Therefore, if in doubt, it is probably easier to get started with a classic GUI-based text editor (like -VS Code). If you decide to use Vim or Emacs, make sure that you install the +VS Code with the [Julia extension](https://code.visualstudio.com/docs/languages/julia)). +If you decide to use Vim or Emacs, make sure that you install the corresponding Vim plugin [julia-vim](https://github.com/JuliaEditorSupport/julia-vim) or Emacs major mode [julia-emacs](https://github.com/JuliaEditorSupport/julia-emacs). diff --git a/docs/src/guided-tour.md b/docs/src/guided-tour.md index 32f27390..bd460886 100644 --- a/docs/src/guided-tour.md +++ b/docs/src/guided-tour.md @@ -134,8 +134,8 @@ To save a control file for HOHQMesh, simply invoke ``` saveProject(proj::Project) ``` -where the name of the control file (traditionally with a .control extension) matches the -name of the `proj`. +where the name of the control file (traditionally with a `.control` extension) matches the +name of the project `proj`. `saveProject` is automatically called when a mesh is generated. Note, a third example script `interactive_outer_boundary_generic.jl` is identical to that diff --git a/docs/src/interactive-api.md b/docs/src/interactive-api.md index 55098467..da82fc28 100644 --- a/docs/src/interactive-api.md +++ b/docs/src/interactive-api.md @@ -112,7 +112,7 @@ type to `LinearAndCrossbarSpring`, and number of iterations = 25. These are generally good enough for most purposes. The most likely parameter to change is the number of iterations. Further details on the smoothing strategy and how it works are available -[here](https://trixi-framework.github.io/HOHQMesh/the-control-input/#the-smoother). +[in the documentation](https://trixi-framework.github.io/HOHQMesh/the-control-input/#the-smoother). To change the defaults, the smoother parameters can be set/enquired with the functions ```