diff --git a/dev/CheatSheet/index.html b/dev/CheatSheet/index.html index 900003e2..a1276c8f 100644 --- a/dev/CheatSheet/index.html +++ b/dev/CheatSheet/index.html @@ -4,7 +4,7 @@ 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.

Manual Refinement

   r = newRefinementCenter(name, center, gridSize, radius)
+   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.

Manual Refinement

   r = newRefinementCenter(name, type, center, gridSize, radius)
    r = newRefinementLine(name, type, startPoint, endPoint, gridSize, width)

Adding to a Project

   add!(p, c)                        *Add outer boundary curve*
    add!(p, c, <InnerBoundaryName>)   *Add curve to an inner boundary*
    add!(p, r)                        *Add refinement region*
@@ -18,4 +18,4 @@
    remove!(p, name)                           *Curve in outer boundary*
    remove!(p, name, innerBoundaryName)        *Curve in inner boundary*
    removeRefinementRegion!(p, name)

Editing items

All items have set/get methods to edit them. Most actions have undo() and redo(). To find out what the next undo/redo actions are, use undoActionName() and redoActionName() to print them to the screen.

Meshing

   generate_mesh(p)
-   remove_mesh!(p)
+ remove_mesh!(p) diff --git a/dev/authors/index.html b/dev/authors/index.html index 1a60c4a1..64794c4f 100644 --- a/dev/authors/index.html +++ b/dev/authors/index.html @@ -1,2 +1,2 @@ -Authors · HOHQMesh.jl

Authors

HOHQMesh.jl is maintained by the Trixi authors. Its development is coordinated by the principal developers who are its main contributors and can be contacted in case of questions about HOHQMesh. In addition, there are contributors who have provided substantial additions or modifications. The HOHQMesh mesh generator itself is developed by David A. Kopriva.

Principal Developers

Contributors

The following people contributed major additions or modifications to HOHQMesh and are listed in alphabetical order:

  • David Kopriva
  • Hendrik Ranocha
  • Michael Schlottke-Lakemper
  • Andrew Winters
+Authors · HOHQMesh.jl

Authors

HOHQMesh.jl is maintained by the Trixi authors. Its development is coordinated by the principal developers who are its main contributors and can be contacted in case of questions about HOHQMesh. In addition, there are contributors who have provided substantial additions or modifications. The HOHQMesh mesh generator itself is developed by David A. Kopriva.

Principal Developers

Contributors

The following people contributed major additions or modifications to HOHQMesh and are listed in alphabetical order:

  • David Kopriva
  • Hendrik Ranocha
  • Michael Schlottke-Lakemper
  • Andrew Winters
diff --git a/dev/contributing/index.html b/dev/contributing/index.html index ede87c5b..a690faef 100644 --- a/dev/contributing/index.html +++ b/dev/contributing/index.html @@ -35,4 +35,4 @@ are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with - this project or the open source license(s) involved. + this project or the open source license(s) involved. diff --git a/dev/development/index.html b/dev/development/index.html index 5f5e8b61..7f14b4da 100644 --- a/dev/development/index.html +++ b/dev/development/index.html @@ -1,2 +1,2 @@ -Development · HOHQMesh.jl

Development

Text editors

When writing code, the choice of text editor can have a significant impact on productivity and developer satisfaction. While using the default text editor of the operating system has its own benefits (specifically the lack of an explicit installation procure), usually it makes sense to switch to a more programming-friendly tool. In the following, a few of the many options are listed and discussed:

VS Code

Visual Studio Code is a modern open source editor with good support for Julia. While Juno had some better support in the past, the developers of Juno and the Julia VS Code plugin are joining forces and concentrating on VS Code since support of Atom has been suspended. Basically, all comments on Juno below also apply to VS Code.

Juno

If you are new to programming or do not have a preference for a text editor yet, Juno is a good choice for developing Julia code. It is based on Atom, a sophisticated and widely used editor for software developers, and is enhanced with several Julia-specific features. Furthermore and especially helpful for novice programmers, it has a MATLAB-like appearance with easy and interactive access to the current variables, the help system, and a debugger.

Vim or Emacs

Vim and Emacs are both very popular editors that work great with Julia. One of their advantages is that they are text editors without a GUI and as such 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 corresponding Vim plugin julia-vim or Emacs major mode julia-emacs.

Releasing a new version of HOHQMesh

  • Check whether everything is okay, tests pass etc.
  • Set the new version number in Project.toml according to the Julian version of semver. Commit and push.
  • Comment @JuliaRegistrator register on the commit setting the version number.
  • JuliaRegistrator will create a PR with the new version in the General registry. Wait for it to be merged.
  • Increment the version number in Project.toml again with suffix -pre. For example, if you have released version v0.2.0, use v0.2.1-pre as new version number.

Preview the documentation

You can build the documentation of HOHQMesh.jl locally by running

julia --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")'

from the HOHQMesh.jl main directory. Then, you can look at the html files generated in docs/build. For PRs triggered from branches inside the HOHQMesh.jl main repository previews of the new documentation are generated at https://trixi-framework.github.io/HOHQMesh.jl/previews/PRXXX, where XXX is the number of the PR. Note, this does not work for PRs from forks for security reasons (since anyone could otherwise push arbitrary stuff, including malicious code).

+Development · HOHQMesh.jl

Development

Text editors

When writing code, the choice of text editor can have a significant impact on productivity and developer satisfaction. While using the default text editor of the operating system has its own benefits (specifically the lack of an explicit installation procure), usually it makes sense to switch to a more programming-friendly tool. In the following, a few of the many options are listed and discussed:

VS Code

Visual Studio Code is a modern open source editor with good support for Julia. While Juno had some better support in the past, the developers of Juno and the Julia VS Code plugin are joining forces and concentrating on VS Code since support of Atom has been suspended. Basically, all comments on Juno below also apply to VS Code.

Juno

If you are new to programming or do not have a preference for a text editor yet, Juno is a good choice for developing Julia code. It is based on Atom, a sophisticated and widely used editor for software developers, and is enhanced with several Julia-specific features. Furthermore and especially helpful for novice programmers, it has a MATLAB-like appearance with easy and interactive access to the current variables, the help system, and a debugger.

Vim or Emacs

Vim and Emacs are both very popular editors that work great with Julia. One of their advantages is that they are text editors without a GUI and as such 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 corresponding Vim plugin julia-vim or Emacs major mode julia-emacs.

Releasing a new version of HOHQMesh

  • Check whether everything is okay, tests pass etc.
  • Set the new version number in Project.toml according to the Julian version of semver. Commit and push.
  • Comment @JuliaRegistrator register on the commit setting the version number.
  • JuliaRegistrator will create a PR with the new version in the General registry. Wait for it to be merged.
  • Increment the version number in Project.toml again with suffix -pre. For example, if you have released version v0.2.0, use v0.2.1-pre as new version number.

Preview the documentation

You can build the documentation of HOHQMesh.jl locally by running

julia --project=docs -e 'using Pkg; Pkg.instantiate(); include("docs/make.jl")'

from the HOHQMesh.jl main directory. Then, you can look at the html files generated in docs/build. For PRs triggered from branches inside the HOHQMesh.jl main repository previews of the new documentation are generated at https://trixi-framework.github.io/HOHQMesh.jl/previews/PRXXX, where XXX is the number of the PR. Note, this does not work for PRs from forks for security reasons (since anyone could otherwise push arbitrary stuff, including malicious code).

diff --git a/dev/github-git/index.html b/dev/github-git/index.html index 03341183..283e1891 100644 --- a/dev/github-git/index.html +++ b/dev/github-git/index.html @@ -41,4 +41,4 @@ git rebase # Clean reflog and force garbage collection -git reflog expire --expire=now --all && git gc --prune=now --aggressive

IMPORTANT: You need to do a git rebase instead of a git pull when updating the fixed branch.

+git reflog expire --expire=now --all && git gc --prune=now --aggressive

IMPORTANT: You need to do a git rebase instead of a git pull when updating the fixed branch.

diff --git a/dev/guided-tour/index.html b/dev/guided-tour/index.html index dd0258a7..09a00d9a 100644 --- a/dev/guided-tour/index.html +++ b/dev/guided-tour/index.html @@ -59,4 +59,4 @@ generate_mesh(p) # After the mesh successfully generates mesh statistics, such as the number of corner nodes, -# the number of elements etc., are printed to the REPL

The first line creates a new project, where the mesh and plot file names will be derived from the project name, "IceCreamCone" written to the specified folder.

To develop the model, one adds curves to the outer boundary or to multiple inner boundaries, if desired. As in HOHQMesh, there are four curve classes currently available:

In the example, the outer boundary is a closed circular arc with center at [0.0, 0.0, 0.0] with radius 4, starting at zero and ending at 360 degrees. It is added to the project with addCurveToOuterBoundary!. You can add any number of curves to the outer boundary.

Similarly, you create curves and add them to as many inner boundaries that you want to have. In the example, there is one inner boundary, "IceCreamCone" made up of two straight lines and a half 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").

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 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 z component is ignored.

The script finishes by generating the quad mesh and plotting the results, as shown below

iceCreamCone

Finally, the script returns the project so that it can be edited further, if desired.

To save a control file for HOHQMesh, simply invoke

saveProject(proj::Project, outFile::String)

where outFile is the name of the control file (traditionally with a .control extension). saveProject is automatically called when a mesh is generated.

Note, a third example script interactive_outer_boundary_generic.jl is identical to that which was explained above except that the function calls use the generic versions of functions, e.g., new or add!.

+# the number of elements etc., are printed to the REPL

The first line creates a new project, where the mesh and plot file names will be derived from the project name, "IceCreamCone" written to the specified folder.

To develop the model, one adds curves to the outer boundary or to multiple inner boundaries, if desired. As in HOHQMesh, there are four curve classes currently available:

In the example, the outer boundary is a closed circular arc with center at [0.0, 0.0, 0.0] with radius 4, starting at zero and ending at 360 degrees. It is added to the project with addCurveToOuterBoundary!. You can add any number of curves to the outer boundary.

Similarly, you create curves and add them to as many inner boundaries that you want to have. In the example, there is one inner boundary, "IceCreamCone" made up of two straight lines and a half 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").

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 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 z component is ignored.

The script finishes by generating the quad mesh and plotting the results, as shown below

iceCreamCone

Finally, the script returns the project so that it can be edited further, if desired.

To save a control file for HOHQMesh, simply invoke

saveProject(proj::Project, outFile::String)

where outFile is the name of the control file (traditionally with a .control extension). saveProject is automatically called when a mesh is generated.

Note, a third example script interactive_outer_boundary_generic.jl is identical to that which was explained above except that the function calls use the generic versions of functions, e.g., new or add!.

diff --git a/dev/index.html b/dev/index.html index 6152cbd7..177a9769 100644 --- a/dev/index.html +++ b/dev/index.html @@ -2,4 +2,4 @@ Home · HOHQMesh.jl

HOHQMesh.jl

This package is a Julia frontend to the Fortran-based High Order Hex-Quad Mesher (a.k.a. HOHQMesh) created and developed by David A. Kopriva. It augments HOHQMesh with interactive functionality 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. HOHQMesh.jl is available on Linux, MacOS, and Windows.

Installation

If you have not yet installed Julia, please follow the instructions for your operating system. HOHQMesh.jl works with Julia v1.6 and above.

HOHQMesh.jl is a registered Julia package. Hence, you can install it by executing the following commands in the Julia REPL:

julia> import Pkg; Pkg.add("HOHQMesh")

HOHQMesh.jl depends on the binary distribution of the HOHQMesh mesh generator, which is available via the Julia package HOHQMesh_jll.jl and which is automatically installed as a dependency.

Usage

In the Julia REPL, you can load HOHQMesh with

julia> using HOHQMesh

and then happily generate away!

Two 2D examples GingerbreadMan and NACA0012 and a 3D example Snake (all from HOHQMesh itself) come delivered with this package. You can generate a mesh for them by executing

julia> control_file = joinpath(HOHQMesh.examples_dir(), "GingerbreadMan.control")
 
 julia> output = generate_mesh(control_file)

You will then find the resulting output files (mesh, plot file, statistics) in the designated output directory, which defaults to out. The GingerbreadMan.control file will yield the following mesh,

gingerbreadman_with_edges_400px

while the 3D file Snake.control produces this mesh:

snake_400px

Examples scripts of interactive mesh generation tools are available in the examples/ subdirectory. These example scripts are prefaced with the phrase interactive_. There is a brief summary at the top of each interactive example script that describes the mesh it will create and the features of HOHQMesh it uses. An example script can be executed from a Julia REPL session with an include(...) statement, e.g.,

julia> include(joinpath(HOHQMesh.examples_dir(), "interactive_outer_box_two_circles.jl"))

The resulting output mesh and plot files are saved in the output directory out as designated in the example script. Mesh statistics are printed to the screen.

The interactive functionality uses Makie.jl to visualize the boundary curves and mesh from the interactive tool. A Makie backend, such as GLMakie, can be loaded in addition to HOHQMesh

julia> using Pkg; Pkg.add("GLMakie")
-julia> using GLMakie

Now, running the example script produces a figure in addition to the mesh and plot files that are saved and the output of mesh statistics to the screen.

box_two_circles

Further explanation of the interactive functionality can be found here. Additional examples are available in the Tutorials.

Authors

HOHQMesh.jl is maintained by the Trixi authors. Its principal developers are Andrew Winters (Linköping University, Sweden) and David A. Kopriva. The HOHQMesh mesh generator itself is developed by David A. Kopriva.

License and contributing

HOHQMesh.jl is licensed under the MIT license (see License). HOHQMesh itself is also available under the MIT license. Since HOHQMesh is an open-source project, we are very happy to accept contributions from the community. Please refer to Contributing for more details. To get in touch with the developers, join us on Slack or create an issue.

Acknowledgements

The authors would like to thank David A. Kopriva for making the sources of HOHQMesh available as open source, and for assisting with making it work with Julia.

+julia> using GLMakie

Now, running the example script produces a figure in addition to the mesh and plot files that are saved and the output of mesh statistics to the screen.

box_two_circles

Further explanation of the interactive functionality can be found here. Additional examples are available in the Tutorials.

Authors

HOHQMesh.jl is maintained by the Trixi authors. Its principal developers are Andrew Winters (Linköping University, Sweden) and David A. Kopriva. The HOHQMesh mesh generator itself is developed by David A. Kopriva.

License and contributing

HOHQMesh.jl is licensed under the MIT license (see License). HOHQMesh itself is also available under the MIT license. Since HOHQMesh is an open-source project, we are very happy to accept contributions from the community. Please refer to Contributing for more details. To get in touch with the developers, join us on Slack or create an issue.

Acknowledgements

The authors would like to thank David A. Kopriva for making the sources of HOHQMesh available as open source, and for assisting with making it work with Julia.

diff --git a/dev/interactive-api/index.html b/dev/interactive-api/index.html index be9c7765..89eadfb3 100644 --- a/dev/interactive-api/index.html +++ b/dev/interactive-api/index.html @@ -106,4 +106,4 @@ [Return:Float64] getArcEndAngle(arc::Dict{String,Any}) [Return:Float64] getArcRadius(arc::Dict{String,Any})

Undo/redo

The interactive mesh functionality has unlimited undo/redo for most actions.

In interactive mode, actions can be undone by the commands

   [Return:String] undo()
    [Return:String] redo()

where the return string contains the name of the action performed.

To find out what the next actions are, use

   [Return:String] undoActionName()
-   [Return:String] redoActionName()

Finally, to clear the undo stack, use

   [Return:nothing] clearUndoRedo()
+ [Return:String] redoActionName()

Finally, to clear the undo stack, use

   [Return:nothing] clearUndoRedo()
diff --git a/dev/interactive_overview/index.html b/dev/interactive_overview/index.html index 16fccebf..ccaa4ec1 100644 --- a/dev/interactive_overview/index.html +++ b/dev/interactive_overview/index.html @@ -4,4 +4,4 @@ c = newParametricEquationCurve(<name>, xEqn, yEqn, zEqn) *Parametric equation* c = newSplineCurve(<name>, dataFile) *Spline with data from a file* c = newSpline(<name>, nKnots, knotsMatrix) *Spline with given knot values*

See Defining curves for further details on the different curve type currently supported by HOHQMesh.

The generic name for each of these curve creation methods is new!. The generic can be used instead of the longer descriptive name to save typing during interactive sessions, if desired.

  • Add curves to build the model to see what you have added,

    addOuterBoundaryCurve!(p, <curveName>)                      *Add outer boundary curve*
    -addInnerBoundaryCurve!(p, <curveName>, <InnerBoundaryName>) *Add curve to an inner boundary*

    For a single inner / outer boundary curve the command above directly adds the curve into the Project. If the inner / outer boundary curve is a chain of multiple curves then they must be added to the Project in an order which yields a closed curves with counter-clockwise orientation. See the Guided tour for an example of a chain of curves.

    Curves can be added by using the generic add! function instead of the longer descriptive name to save typing during interactive sessions, if desired.

  • Visualize the project's model, if desired

    plotProject!(p, MODEL)

    Plots are updated in response to user interactions. However, to update the plot at any time, use

    updatePlot!(p, options)

    Options are MODEL, GRID, MESH, and REFINEMENTS. To plot combinations, sum the options, e.g. MODEL+GRID or MODEL+MESH. You normally are not interested in the background grid once the mesh is generated.

    Visualization requirement

    The interactive functionality uses Makie.jl to visualize the Project information. Therefore, in addition to HOHQMesh.jl a user must load a Makie backend (for example, GLMakie or CairoMakie) if visualization is desired.

  • Set the background grid

    When no outer boundary curve is present, the background grid can be set with

    addBackgroundGrid!(p, lower left [x,y,z], spacing [dx,dy,dz], num Intervals [nX,nY,nZ])

    Or

    addBackgroundGrid!(p, [top value, left value, bottom value, right value], num Intervals [nX,nY,nZ])

    The first method creates the rectangular boundary with extent [x0[1], x0[1] + N*dx[1]] by [x0[2], x0[2] + N*dx[2]]. The second method sets a rectangular bounding box with extent [top value, left value, bottom value, right value] and the number of elements in each direction. The first exists for historical reasons; the second is probably the easiest to use.

    When an outer boundary is present the background grid can be set as

    addBackgroundGrid!(p, [dx, dy, dz])

    where the spacing controls the number of elements in each direction.

    Background grid

    A background grid is required by HOHQMesh. If one is not present in the Project and a user attempts to generate the mesh a warning is thrown.

  • Adjust meshing parameters, if desired. For instance, one can adjust the polynomial order in the Project for any curved boundaries by

    setPolynomialOrder!(p, order)

    The background grid size can be adjusted where we can set the grid size in the x and y directions, dx and dy, can be set separately

    setBackgroundGridSize!(p, 0.5, 0.25)

    See Controlling the mesh generation for details on adjusting parameters already present in the Project.

  • Generate the mesh

    generate_mesh(p)

    The mesh file will be saved in <folder> with the name <projectName>.mesh. A HOHQMesh control file is automatically created from the contents of the Project and is also saved in that folder with the name <projectName>.control. This control file can be read in again later and modified, remeshed, etc. The function generate_mesh will print the mesh information and statistics, and will plot the mesh as in the figure above, if a plot is otherwise visible. If not, it can always be plotted with the plotProject! command.

  • Advanced

    All objects and information contained in the variable type Project are actually dictionaries of type Dict{String, Any}. Since Julia is not an object oriented language, the parameters and other parts of these internal dictionaries can be accessed and edited directly by key and value. However, if you do that, then certain features like undo/redo and automatic plot updating will not work.

    +addInnerBoundaryCurve!(p, <curveName>, <InnerBoundaryName>) *Add curve to an inner boundary*

    For a single inner / outer boundary curve the command above directly adds the curve into the Project. If the inner / outer boundary curve is a chain of multiple curves then they must be added to the Project in an order which yields a closed curves with counter-clockwise orientation. See the Guided tour for an example of a chain of curves.

    Curves can be added by using the generic add! function instead of the longer descriptive name to save typing during interactive sessions, if desired.

  • Visualize the project's model, if desired

    plotProject!(p, MODEL)

    Plots are updated in response to user interactions. However, to update the plot at any time, use

    updatePlot!(p, options)

    Options are MODEL, GRID, MESH, and REFINEMENTS. To plot combinations, sum the options, e.g. MODEL+GRID or MODEL+MESH. You normally are not interested in the background grid once the mesh is generated.

    Visualization requirement

    The interactive functionality uses Makie.jl to visualize the Project information. Therefore, in addition to HOHQMesh.jl a user must load a Makie backend (for example, GLMakie or CairoMakie) if visualization is desired.

  • Set the background grid

    When no outer boundary curve is present, the background grid can be set with

    addBackgroundGrid!(p, lower left [x,y,z], spacing [dx,dy,dz], num Intervals [nX,nY,nZ])

    Or

    addBackgroundGrid!(p, [top value, left value, bottom value, right value], num Intervals [nX,nY,nZ])

    The first method creates the rectangular boundary with extent [x0[1], x0[1] + N*dx[1]] by [x0[2], x0[2] + N*dx[2]]. The second method sets a rectangular bounding box with extent [top value, left value, bottom value, right value] and the number of elements in each direction. The first exists for historical reasons; the second is probably the easiest to use.

    When an outer boundary is present the background grid can be set as

    addBackgroundGrid!(p, [dx, dy, dz])

    where the spacing controls the number of elements in each direction.

    Background grid

    A background grid is required by HOHQMesh. If one is not present in the Project and a user attempts to generate the mesh a warning is thrown.

  • Adjust meshing parameters, if desired. For instance, one can adjust the polynomial order in the Project for any curved boundaries by

    setPolynomialOrder!(p, order)

    The background grid size can be adjusted where we can set the grid size in the x and y directions, dx and dy, can be set separately

    setBackgroundGridSize!(p, 0.5, 0.25)

    See Controlling the mesh generation for details on adjusting parameters already present in the Project.

  • Generate the mesh

    generate_mesh(p)

    The mesh file will be saved in <folder> with the name <projectName>.mesh. A HOHQMesh control file is automatically created from the contents of the Project and is also saved in that folder with the name <projectName>.control. This control file can be read in again later and modified, remeshed, etc. The function generate_mesh will print the mesh information and statistics, and will plot the mesh as in the figure above, if a plot is otherwise visible. If not, it can always be plotted with the plotProject! command.

  • Advanced

    All objects and information contained in the variable type Project are actually dictionaries of type Dict{String, Any}. Since Julia is not an object oriented language, the parameters and other parts of these internal dictionaries can be accessed and edited directly by key and value. However, if you do that, then certain features like undo/redo and automatic plot updating will not work.

    diff --git a/dev/license/index.html b/dev/license/index.html index 62731bcd..cd33afe0 100644 --- a/dev/license/index.html +++ b/dev/license/index.html @@ -1,2 +1,2 @@ -License · HOHQMesh.jl

    License

    MIT License

    Copyright (c) 2021-present David Kopriva, Andrew Winters, and Michael Schlottke-Lakemper

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    +License · HOHQMesh.jl

    License

    MIT License

    Copyright (c) 2021-present David Kopriva, Andrew Winters, and Michael Schlottke-Lakemper

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    diff --git a/dev/reference/index.html b/dev/reference/index.html index c4cf2d9a..cf784478 100644 --- a/dev/reference/index.html +++ b/dev/reference/index.html @@ -1,35 +1,35 @@ -Reference · HOHQMesh.jl

    HOHQMesh.jl API

    HOHQMesh.add!Method
    add!(proj::Project, crv::Dict{String,Any}, boundaryName::String)

    Add a curve to the inner boundary named boundaryName.

    source
    HOHQMesh.add!Method
    add!(proj::Project, obj::Dict{String,Any})

    Add a curve to the outer boundary or a refinement reion to the project

    source
    HOHQMesh.addBackgroundGrid!Method
    addBackgroundGrid!(proj::Project, x0::Array{Float64}, dx::Array{Float64}, N::Array{Int})

    Add the background grid block using the left corner, x0, the grid size dx, and the number of intervals in each direction. Use this when there is no outer boundary defined in the model. This version mimics HOHQMesh's backgroundGrid block, but the version

    addBackgroundGrid!(proj::Project, box::Array{Float64},  N::Array{Int} )

    is a lot easier to use.

    TODO: Change HOHQMesh and delete this way to specify the domain and use the bounding box one instead.

    source
    HOHQMesh.addBackgroundGrid!Method
    addBackgroundGrid!(proj::Project, box::Array{Float64},  N::Array{Int} )

    Add the background grid block with bounding box = [TOP, LEFT, BOTTOM, RIGHT] and the number of intervals in each diredction. Use this when there is no outer boundary defined in the model.

    source
    HOHQMesh.addBackgroundGrid!Method
    addBackgroundGrid(proj::Project, bgSize::Array{Float64})

    Add the background grid block with the grid size to be a 3-vector. Use this when there is an outer boundary defined in the model.

    source
    HOHQMesh.addCurveToInnerBoundary!Method
    addCurveToInnerBoundary!(proj::Project, crv::Dict{String,Any}, boundaryName::String)

    Add a curve to the inner boundary with name boundaryName. If an inner boundary of that name does not exist, one is created.

    source
    HOHQMesh.addCurveToOuterBoundary!Method
    addCurveToOuterBoundary!(proj::Project, crv::Dict{String,Any})

    Add a curve to the outer boundary. The curves must be added in order counter-clockwise

    source
    HOHQMesh.addObserverMethod
    addObserver(observer::Any, note::String, f::Any)

    f is the function to be executed (called) when a notification of name note is given.

    The function called upon notification must have the signature f(observer, sender, args...)

    source
    HOHQMesh.addOuterBoundary!Method
    addOuterBoundary!(proj::Project, outerBoundary::Dict{String,Any})

    Add an empty outer boundary to the project. There can be only one. This function is only used as part of an undo operation removing the outer boundary.

    source
    HOHQMesh.addRunParameters!Function
    addRunParameters!(proj::Project,
    +Reference · HOHQMesh.jl

    HOHQMesh.jl API

    HOHQMesh.add!Method
    add!(proj::Project, crv::Dict{String,Any}, boundaryName::String)

    Add a curve to the inner boundary named boundaryName.

    source
    HOHQMesh.add!Method
    add!(proj::Project, obj::Dict{String,Any})

    Add a curve to the outer boundary or a refinement reion to the project

    source
    HOHQMesh.addBackgroundGrid!Method
    addBackgroundGrid!(proj::Project, x0::Array{Float64}, dx::Array{Float64}, N::Array{Int})

    Add the background grid block using the left corner, x0, the grid size dx, and the number of intervals in each direction. Use this when there is no outer boundary defined in the model. This version mimics HOHQMesh's backgroundGrid block, but the version

    addBackgroundGrid!(proj::Project, box::Array{Float64},  N::Array{Int} )

    is a lot easier to use.

    TODO: Change HOHQMesh and delete this way to specify the domain and use the bounding box one instead.

    source
    HOHQMesh.addBackgroundGrid!Method
    addBackgroundGrid!(proj::Project, box::Array{Float64},  N::Array{Int} )

    Add the background grid block with bounding box = [TOP, LEFT, BOTTOM, RIGHT] and the number of intervals in each diredction. Use this when there is no outer boundary defined in the model.

    source
    HOHQMesh.addBackgroundGrid!Method
    addBackgroundGrid(proj::Project, bgSize::Array{Float64})

    Add the background grid block with the grid size to be a 3-vector. Use this when there is an outer boundary defined in the model.

    source
    HOHQMesh.addCurveToInnerBoundary!Method
    addCurveToInnerBoundary!(proj::Project, crv::Dict{String,Any}, boundaryName::String)

    Add a curve to the inner boundary with name boundaryName. If an inner boundary of that name does not exist, one is created.

    source
    HOHQMesh.addCurveToOuterBoundary!Method
    addCurveToOuterBoundary!(proj::Project, crv::Dict{String,Any})

    Add a curve to the outer boundary. The curves must be added in order counter-clockwise

    source
    HOHQMesh.addObserverMethod
    addObserver(observer::Any, note::String, f::Any)

    f is the function to be executed (called) when a notification of name note is given.

    The function called upon notification must have the signature f(observer, sender, args...)

    source
    HOHQMesh.addOuterBoundary!Method
    addOuterBoundary!(proj::Project, outerBoundary::Dict{String,Any})

    Add an empty outer boundary to the project. There can be only one. This function is only used as part of an undo operation removing the outer boundary.

    source
    HOHQMesh.addRunParameters!Function
    addRunParameters!(proj::Project,
                       plotFormat::String     = "skeleton",
                       meshFileFormat::String = "ISM-V2",
    -                  polynomialOrder::Int   = 5)

    Add a RUN_PARAMETERS block and set all the parameters in one call.

    source
    HOHQMesh.addSpringSmoother!Function
    addSpringSmoother!(status::String, type::String, nIterations::Int)

    Status is either ON or OFF Type is either LinearSpring or LinearAndCrossbarSpring

    source
    HOHQMesh.bboxUnionMethod
    bboxUnion(box1::Array{Float64}, box2::Array{Float64})

    Returns the union of two bounding boxes

    source
    HOHQMesh.curveBoundsMethod

    curveBounds(crvPoints::Array{Float64,2})

    Find the bounds of a single curve, discretized as an array

    source
    HOHQMesh.emptyBoundsMethod
    emptyBounds()

    Returns an array that will always be ignored when unioned with another bounding box.

    source
    HOHQMesh.extract_mesh_file_formatMethod
    extract_mesh_file_format(control_file)

    Return a string with the desired output format of the HOHQMesh generated mesh file. This information is given within the RUN_PARAMETERS of the CONTROL_INPUT block of the control file. See the HOHQMesh documentation for details.

    source
    HOHQMesh.generate_meshMethod
    generate_mesh(control_file;
    +                  polynomialOrder::Int   = 5)

    Add a RUN_PARAMETERS block and set all the parameters in one call.

    source
    HOHQMesh.addSpringSmoother!Function
    addSpringSmoother!(status::String, type::String, nIterations::Int)

    Status is either ON or OFF Type is either LinearSpring or LinearAndCrossbarSpring

    source
    HOHQMesh.bboxUnionMethod
    bboxUnion(box1::Array{Float64}, box2::Array{Float64})

    Returns the union of two bounding boxes

    source
    HOHQMesh.curveBoundsMethod

    curveBounds(crvPoints::Array{Float64,2})

    Find the bounds of a single curve, discretized as an array

    source
    HOHQMesh.emptyBoundsMethod
    emptyBounds()

    Returns an array that will always be ignored when unioned with another bounding box.

    source
    HOHQMesh.extract_mesh_file_formatMethod
    extract_mesh_file_format(control_file)

    Return a string with the desired output format of the HOHQMesh generated mesh file. This information is given within the RUN_PARAMETERS of the CONTROL_INPUT block of the control file. See the HOHQMesh documentation for details.

    source
    HOHQMesh.generate_meshMethod
    generate_mesh(control_file;
                   output_directory="out",
                   mesh_filename=nothing, plot_filename=nothing, stats_filename=nothing,
    -              verbose=false)

    Generate a mesh based on the control_file with the HOHQMesh mesh generator and store resulting files in output_directory.

    You can set the mesh filename, the plot filename, and the statistics filename using the keyword arguments mesh_filename, plot_filename, and stats_filename, respectively. If set to nothing, the filenames for the mesh file, plot file, and statistics file are generated automatically from the control file name. For example, path/to/ControlFile.control will result in output files ControlFile.mesh, ControlFile.tec, and ControlFile.txt.

    You can activate verbose output from HOHQMesh that prints additional messages and debugging mesh information with the keyword argument verbose.

    This function returns the output to stdout of the HOHQMesh binary when generating the mesh.

    source
    HOHQMesh.generate_meshMethod
    generate_mesh(proj::Project)

    Generate a mesh from the information stored in a Project created using the interactive mesh functionality. First a check is made if a background grid exists and all inner/outer boundary curves are valid.

    This function will then make a HOHQMesh control file from the control dictionary proj.controlDict and use it to call the wrapper function that interfaces with HOHQMesh. The resulting mesh and control files will be saved to proj.projectDirectory. Also, if there is an active plot of the mesh project it will update to display the generated mesh.

    This function returns the output to stdout of the HOHQMesh binary when generating the mesh.

    source
    HOHQMesh.getArcCenterMethod
    getArcCenter(crv::Dict{String,Any}, point::Array{Float64})

    Get the center of a circular arc as an array

    source
    HOHQMesh.getArcUnitsMethod
    getArcUnits(crv::Dict{String,Any}, units::String)

    Get the units for the start and end angles of a circular arc curve.

    source
    HOHQMesh.getCurveMethod

    getCurve(proj::Project, curveName::String, boundaryName::String)

    Get the curve named curveName from the inner boundary named boundaryName

    source
    HOHQMesh.getCurveMethod

    getCurve(proj::Project, curveName::String)

    Get the curve with name curveName from the outer boundary.

    source
    HOHQMesh.getCurveTypeMethod
    getCurveType(crv::Dic{String,Any})
    +              verbose=false)

    Generate a mesh based on the control_file with the HOHQMesh mesh generator and store resulting files in output_directory.

    You can set the mesh filename, the plot filename, and the statistics filename using the keyword arguments mesh_filename, plot_filename, and stats_filename, respectively. If set to nothing, the filenames for the mesh file, plot file, and statistics file are generated automatically from the control file name. For example, path/to/ControlFile.control will result in output files ControlFile.mesh, ControlFile.tec, and ControlFile.txt.

    You can activate verbose output from HOHQMesh that prints additional messages and debugging mesh information with the keyword argument verbose.

    This function returns the output to stdout of the HOHQMesh binary when generating the mesh.

    source
    HOHQMesh.generate_meshMethod
    generate_mesh(proj::Project)

    Generate a mesh from the information stored in a Project created using the interactive mesh functionality. First a check is made if a background grid exists and all inner/outer boundary curves are valid.

    This function will then make a HOHQMesh control file from the control dictionary proj.controlDict and use it to call the wrapper function that interfaces with HOHQMesh. The resulting mesh and control files will be saved to proj.projectDirectory. Also, if there is an active plot of the mesh project it will update to display the generated mesh.

    This function returns the output to stdout of the HOHQMesh binary when generating the mesh.

    source
    HOHQMesh.getArcCenterMethod
    getArcCenter(crv::Dict{String,Any}, point::Array{Float64})

    Get the center of a circular arc as an array

    source
    HOHQMesh.getArcUnitsMethod
    getArcUnits(crv::Dict{String,Any}, units::String)

    Get the units for the start and end angles of a circular arc curve.

    source
    HOHQMesh.getCurveMethod

    getCurve(proj::Project, curveName::String, boundaryName::String)

    Get the curve named curveName from the inner boundary named boundaryName

    source
    HOHQMesh.getCurveMethod

    getCurve(proj::Project, curveName::String)

    Get the curve with name curveName from the outer boundary.

    source
    HOHQMesh.getCurveTypeMethod
    getCurveType(crv::Dic{String,Any})
     
     Get the type of the curve, `END_POINTSLINE_CURVE`, `PARAMETRIC_EQUATION_CURVE`,
    -`SPLINE_CURVE`, or `CIRCULAR_ARC` as a string.
    source
    HOHQMesh.getEndPointMethod
    getEndPoint(crv::Dict{String,Any}, point::Array{Float64})

    Get the end point for a line curve as an array.

    source
    HOHQMesh.getNameMethod
    getName(proj::Project)

    Returns the filename to be used by the mesh, plot, control, and stats files.

    source
    HOHQMesh.getRefinementGridSizeMethod
    getRefinementGridSize(r::Dict{String,Any})

    Returns the grid size,h, as Float64. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementLocationMethod
    getRefinementLocation(r::Dict{String,Any})

    Return Array{Float64} of the location of the refinement center.r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementNameMethod
    getRefinementName(r::Dict{String,Any})

    Return name of the refinement. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementRegionMethod
    getRefinementRegion(proj::Project, indx)

    Get the refinement region with index, indx from the project. Returns nothing if there is none. The return value is a dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementRegionMethod
    (i,r) = getRefinementRegion(project, name)

    Get the refinement region with the given name and its location in the list of refinement regions.

    source
    HOHQMesh.getRefinementStartMethod
    getRefinementStart  (r::Dict{String,Any})

    Return Array{Float64} of the start location of the refinement line. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementTypeMethod
    getRefinementType(r::Dict{String,Any})

    Return the type of refinement, either "smooth" or "sharp". r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementWidthMethod
    getRefinementWidth(r::Dict{String,Any})

    Returns the region width,w, as Float64. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getStartPointMethod
    getStartPoint(crv::Dict{String,Any}, point::Array{Float64})

    Get the start point for a line curve as an array

    source
    HOHQMesh.innerBoundaryIndicesMethod
    innerBoundaryIndices(proj::Project, curveName::String)

    Returns (curveIndex,chainIndex) for the location of the curve named curveName in it's inner boundary chain.

    source
    HOHQMesh.insertInnerBoundaryCurveAtIndex!Method
    insertInnerBoundaryCurveAtIndex!(proj::Project, crv::Dict{String,Any},
    -                                 indx::Int, boundaryName::String)

    Insert a curve crv into an inner boundary chain boundaryName at the specified index indx.

    source
    HOHQMesh.modelChainIsOKMethod
    modelChainIsOK(chain::Vector{Dict{String, Any}}, chainName::String)

    Returns true if the chain of curves is contiguous and closed; false otherwise.

    source
    HOHQMesh.modelCurvesAreOKMethod
    modelCurvesAreOK(proj::Project)

    Go through all curves in the model and make sure they are connected and closed. Also, remove any empty outer / inner boundary chains.

    Returns true if all curves are connected and closed, false otherwise.

    source
    HOHQMesh.newFunction
    new(name::String,
    +`SPLINE_CURVE`, or `CIRCULAR_ARC` as a string.
    source
    HOHQMesh.getEndPointMethod
    getEndPoint(crv::Dict{String,Any}, point::Array{Float64})

    Get the end point for a line curve as an array.

    source
    HOHQMesh.getNameMethod
    getName(proj::Project)

    Returns the filename to be used by the mesh, plot, control, and stats files.

    source
    HOHQMesh.getRefinementGridSizeMethod
    getRefinementGridSize(r::Dict{String,Any})

    Returns the grid size,h, as Float64. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementLocationMethod
    getRefinementLocation(r::Dict{String,Any})

    Return Array{Float64} of the location of the refinement center.r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementNameMethod
    getRefinementName(r::Dict{String,Any})

    Return name of the refinement. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementRegionMethod
    getRefinementRegion(proj::Project, indx)

    Get the refinement region with index, indx from the project. Returns nothing if there is none. The return value is a dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementRegionMethod
    (i,r) = getRefinementRegion(project, name)

    Get the refinement region with the given name and its location in the list of refinement regions.

    source
    HOHQMesh.getRefinementStartMethod
    getRefinementStart  (r::Dict{String,Any})

    Return Array{Float64} of the start location of the refinement line. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementTypeMethod
    getRefinementType(r::Dict{String,Any})

    Return the type of refinement, either "smooth" or "sharp". r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getRefinementWidthMethod
    getRefinementWidth(r::Dict{String,Any})

    Returns the region width,w, as Float64. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.getStartPointMethod
    getStartPoint(crv::Dict{String,Any}, point::Array{Float64})

    Get the start point for a line curve as an array

    source
    HOHQMesh.innerBoundaryIndicesMethod
    innerBoundaryIndices(proj::Project, curveName::String)

    Returns (curveIndex,chainIndex) for the location of the curve named curveName in it's inner boundary chain.

    source
    HOHQMesh.insertInnerBoundaryCurveAtIndex!Method
    insertInnerBoundaryCurveAtIndex!(proj::Project, crv::Dict{String,Any},
    +                                 indx::Int, boundaryName::String)

    Insert a curve crv into an inner boundary chain boundaryName at the specified index indx.

    source
    HOHQMesh.modelChainIsOKMethod
    modelChainIsOK(chain::Vector{Dict{String, Any}}, chainName::String)

    Returns true if the chain of curves is contiguous and closed; false otherwise.

    source
    HOHQMesh.modelCurvesAreOKMethod
    modelCurvesAreOK(proj::Project)

    Go through all curves in the model and make sure they are connected and closed. Also, remove any empty outer / inner boundary chains.

    Returns true if all curves are connected and closed, false otherwise.

    source
    HOHQMesh.newFunction
    new(name::String,
         center::Array{Float64},
         radius::Float64,
         startAngle::Float64,
         endAngle::Float64,
    -    units::String)

    Create a new circular arc.

    source
    HOHQMesh.newFunction
    new(name::String,
    +    units::String)

    Create a new circular arc.

    source
    HOHQMesh.newFunction
    new(name::String,
         xEqn::String,
         yEqn::String,
    -    zEqn::String = "z(t) = 0.0" )

    Create a new parametric equation curve.

    source
    HOHQMesh.newMethod
    new(name::String,
    +    zEqn::String = "z(t) = 0.0" )

    Create a new parametric equation curve.

    source
    HOHQMesh.newMethod
    new(name::String,
              xStart::Array{Float64},
    -         xEnd::Array{Float64})

    Create a new line defined by its end points.

    source
    HOHQMesh.newMethod
    new(name::String, nKnots::Int, data::Matrix{Float64})

    Create a spline curve from an array of knots

    source
    HOHQMesh.newMethod
    new(name::String, dataFile::String)

    Create a spline curve from the contents of a data file.

    source
    HOHQMesh.newCircularArcCurveFunction
    newCircularArcCurve(name::String, center::Array{Float64},
    +         xEnd::Array{Float64})

    Create a new line defined by its end points.

    source
    HOHQMesh.newMethod
    new(name::String, nKnots::Int, data::Matrix{Float64})

    Create a spline curve from an array of knots

    source
    HOHQMesh.newMethod
    new(name::String, dataFile::String)

    Create a spline curve from the contents of a data file.

    source
    HOHQMesh.newCircularArcCurveFunction
    newCircularArcCurve(name::String, center::Array{Float64},
         startAngle::Float64, endAngle::Float64,
    -    units::String)

    Creates and returns a new circular arc curve in the form of a Dictionary

    source
    HOHQMesh.newEndPointsLineCurveMethod
    newEndPointsLineCurve(name::String, xStart::Array{Float64},xEnd::Array[Float64])

    Creates and returns a new curve defined by its end points in the form of a Dictionary

    source
    HOHQMesh.newEndPointsLineCurveMethod
    newEndPointsLineCurve(name::String, xStart::Array{Float64},xEnd::Array[Float64])

    Creates and returns a new curve defined by its end points in the form of a Dictionary

    source
    HOHQMesh.newParametricEquationCurveFunction
    newParametricEquationCurve(name::String,
                                xEqn::String,
                                yEqn::String,
    -                           zEqn::String = "z(t) = 0.0" )

    Creates and returns a new parametricEquationCurve in the form of a Dictionary

    source
    HOHQMesh.newProjectMethod
    newProject(name::String, folder::String)

    Create a new project with the given name. That name will be used for the mesh and plot files in the specified folder.

    source
    HOHQMesh.newRefinementCenterMethod
    newRefinementCenter(name, type,
    +                           zEqn::String = "z(t) = 0.0" )

    Creates and returns a new parametricEquationCurve in the form of a Dictionary

    source
    HOHQMesh.newProjectMethod
    newProject(name::String, folder::String)

    Create a new project with the given name. That name will be used for the mesh and plot files in the specified folder.

    source
    HOHQMesh.newRefinementCenterMethod
    newRefinementCenter(name, type,
                         center, meshSize,
    -                    width)

    Create refinement center of type "smooth" or "sharp" centered at center = [x,y,z] with a mesh size meshSize spread over a radius width.

    source
    HOHQMesh.newRefinementLineMethod
    newRefinementLine(name, type,
    +                    width)

    Create refinement center of type "smooth" or "sharp" centered at center = [x,y,z] with a mesh size meshSize spread over a radius width.

    source
    HOHQMesh.newRefinementLineMethod
    newRefinementLine(name, type,
                       start, end,
                       meshSize,
    -                  width)

    Create refinement line of type "smooth" or "sharp" between start = [x,y,z] and end = [x,y,z] with a mesh size meshSize spread over a width width.

    source
    HOHQMesh.newSplineCurveMethod
    newSplineCurve(name::String, nKnots::Int, data::Array{Float64,4})

    Returns a spline curve given the number of knots and the array of knots.

    source
    HOHQMesh.newSplineCurveMethod
    newSplineCurve(name::String, dataFile::String)

    Returns a spline curve given a data file that contains the number of knots on the first line, and the spline data following that.

    source
    HOHQMesh.openProjectMethod
    openProject(fileName::String, folder::String)

    Open existing project described in the control File.

    folder   = folder the control file is in
    -fileName = the name of the file
    source
    HOHQMesh.remove!Method
    remove!(proj::Project, curveName::String, innerBoundaryName::String)

    Delete the curve named curveName from the inner boundary named innerBoundaryName

    source
    HOHQMesh.remove!Method
    remove!(proj::Project, curveName::String)

    Delete the curve named curveName from the outer boundary

    source
    HOHQMesh.remove_mesh!Method
    remove_mesh!(proj::Project)

    Remove the mesh file from proj.projectDirectory and delete the mesh from the plot

    source
    HOHQMesh.saveProjectMethod
    saveProject(proj::Project)
    +                  width)

    Create refinement line of type "smooth" or "sharp" between start = [x,y,z] and end = [x,y,z] with a mesh size meshSize spread over a width width.

    source
    HOHQMesh.newSplineCurveMethod
    newSplineCurve(name::String, nKnots::Int, data::Array{Float64,4})

    Returns a spline curve given the number of knots and the array of knots.

    source
    HOHQMesh.newSplineCurveMethod
    newSplineCurve(name::String, dataFile::String)

    Returns a spline curve given a data file that contains the number of knots on the first line, and the spline data following that.

    source
    HOHQMesh.openProjectMethod
    openProject(fileName::String, folder::String)

    Open existing project described in the control File.

    folder   = folder the control file is in
    +fileName = the name of the file
    source
    HOHQMesh.remove!Method
    remove!(proj::Project, curveName::String, innerBoundaryName::String)

    Delete the curve named curveName from the inner boundary named innerBoundaryName

    source
    HOHQMesh.remove!Method
    remove!(proj::Project, curveName::String)

    Delete the curve named curveName from the outer boundary

    source
    HOHQMesh.remove_mesh!Method
    remove_mesh!(proj::Project)

    Remove the mesh file from proj.projectDirectory and delete the mesh from the plot

    source
    HOHQMesh.saveProjectMethod
    saveProject(proj::Project)
     
    -proj     = Project to be saved

    Save a project dictionary to the file path specified when the project was created.

    source
    HOHQMesh.setArcUnits!Method
    setArcUnits(crv::Dict{String,Any}, units::String)

    Set the units for the start and end angles of a circular arc curve.

    source
    HOHQMesh.setBackgroundGridSize!Method
    setBackgroundGridSize!(proj::Project, dx::Array{Float64}, key::String)

    Set the grid size dx of an existing background grid within proj. Here, dx is passed an array.

    source
    HOHQMesh.setBackgroundGridSize!Method
    setBackgroundGridSize!(proj::Project, dx::Float64, dy::Float64, key::String)

    Set the grid size dx of an existing background grid within proj. Here, the new grid size in either direction is passed individually with dxand dy.

    source
    HOHQMesh.setBackgroundGridSteps!Method
    setBackgroundGridSteps!(proj::Project, N::Array{Int})

    Set how many steps of size setBackgroundGridSpacing in each direction the background grid extends from the lower left.

    source
    HOHQMesh.setMeshFileFormat!Method
    setMeshFileFormat(proj::Project, meshFileFormat::String)

    Set the file format for the mesh file. Acceptable choices are "ISM", "ISM-V2", or "ABAQUS".

    source
    HOHQMesh.setName!Method
    setName(proj::Project,name::String)

    The name of the project is the filename to be used by the mesh, plot, and stats files. It is also the name of the control file the tool will produce.

    source
    HOHQMesh.setPlotFileFormat!Method
    setPlotFileFormat(proj::Project, plotFileFormat::String)

    Set the file format for the plot file. Acceptable choices are "sem", which includes interior nodes and boundary nodes and "skeleton", which includes only the corner nodes.

    source
    HOHQMesh.setRefinementGridSize!Method
    setRefinementGridSize!(r::Dict{String,Any}, h)

    Set the grid size, h for the refinement region. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.setRefinementName!Method
    setRefinementName!(r::Dict{String,Any}, type)

    Set a name for the refinement region.r is the dictionary that represents the refinement region.

    source
    HOHQMesh.setRefinementWidth!Method
    setRefinementWidth!(r::Dict{String,Any}, width)

    Set the width of the refinement region. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.setXEqn!Method
    setXEqn!(parametricEquationCurve, eqn)

    For a parametric equation, set the x-equation.

    source
    HOHQMesh.setYEqn!Method
    setYEqn!(parametricEquationCurve, eqn)

    For a parametric equation, set the y-equation.

    source
    HOHQMesh.setZEqn!Method
    setZEqn!(parametricEquationCurve, eqn)

    For a parametric equation, set the zEqn-equation.

    source
    +proj = Project to be saved

    Save a project dictionary to the file path specified when the project was created.

    source
    HOHQMesh.setArcUnits!Method
    setArcUnits(crv::Dict{String,Any}, units::String)

    Set the units for the start and end angles of a circular arc curve.

    source
    HOHQMesh.setBackgroundGridSize!Method
    setBackgroundGridSize!(proj::Project, dx::Array{Float64}, key::String)

    Set the grid size dx of an existing background grid within proj. Here, dx is passed an array.

    source
    HOHQMesh.setBackgroundGridSize!Method
    setBackgroundGridSize!(proj::Project, dx::Float64, dy::Float64, key::String)

    Set the grid size dx of an existing background grid within proj. Here, the new grid size in either direction is passed individually with dxand dy.

    source
    HOHQMesh.setBackgroundGridSteps!Method
    setBackgroundGridSteps!(proj::Project, N::Array{Int})

    Set how many steps of size setBackgroundGridSpacing in each direction the background grid extends from the lower left.

    source
    HOHQMesh.setMeshFileFormat!Method
    setMeshFileFormat(proj::Project, meshFileFormat::String)

    Set the file format for the mesh file. Acceptable choices are "ISM", "ISM-V2", or "ABAQUS".

    source
    HOHQMesh.setName!Method
    setName(proj::Project,name::String)

    The name of the project is the filename to be used by the mesh, plot, and stats files. It is also the name of the control file the tool will produce.

    source
    HOHQMesh.setPlotFileFormat!Method
    setPlotFileFormat(proj::Project, plotFileFormat::String)

    Set the file format for the plot file. Acceptable choices are "sem", which includes interior nodes and boundary nodes and "skeleton", which includes only the corner nodes.

    source
    HOHQMesh.setRefinementGridSize!Method
    setRefinementGridSize!(r::Dict{String,Any}, h)

    Set the grid size, h for the refinement region. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.setRefinementName!Method
    setRefinementName!(r::Dict{String,Any}, type)

    Set a name for the refinement region.r is the dictionary that represents the refinement region.

    source
    HOHQMesh.setRefinementWidth!Method
    setRefinementWidth!(r::Dict{String,Any}, width)

    Set the width of the refinement region. r is the dictionary that represents the refinement region.

    source
    HOHQMesh.setXEqn!Method
    setXEqn!(parametricEquationCurve, eqn)

    For a parametric equation, set the x-equation.

    source
    HOHQMesh.setYEqn!Method
    setYEqn!(parametricEquationCurve, eqn)

    For a parametric equation, set the y-equation.

    source
    HOHQMesh.setZEqn!Method
    setZEqn!(parametricEquationCurve, eqn)

    For a parametric equation, set the zEqn-equation.

    source
    diff --git a/dev/search/index.html b/dev/search/index.html index 61407efd..7b53bfcc 100644 --- a/dev/search/index.html +++ b/dev/search/index.html @@ -1,2 +1,2 @@ -Search · HOHQMesh.jl

    Loading search...

      +Search · HOHQMesh.jl

      Loading search...

        diff --git a/dev/search_index.js b/dev/search_index.js index c6397b52..3fcb1417 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"contributing/#Contributing","page":"Contributing","title":"Contributing","text":"","category":"section"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"HOHQMesh.jl is an open-source project and we are very happy to accept contributions from the community. Please feel free to open issues or submit patches (preferably as merge requests) any time. For planned larger contributions, it is often beneficial to get in contact with one of the principal developers first (see Authors).","category":"page"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"HOHQMesh.jl and its contributions are licensed under the MIT license (see License). As a contributor, you certify that all your contributions are in conformance with the Developer Certificate of Origin (Version 1.1), which is reproduced below.","category":"page"},{"location":"contributing/#Developer-Certificate-of-Origin-(Version-1.1)","page":"Contributing","title":"Developer Certificate of Origin (Version 1.1)","text":"","category":"section"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"The following text was taken from https://developercertificate.org:","category":"page"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"Developer Certificate of Origin\nVersion 1.1\n\nCopyright (C) 2004, 2006 The Linux Foundation and its contributors.\n1 Letterman Drive\nSuite D4700\nSan Francisco, CA, 94129\n\nEveryone is permitted to copy and distribute verbatim copies of this\nlicense document, but changing it is not allowed.\n\n\nDeveloper's Certificate of Origin 1.1\n\nBy making a contribution to this project, I certify that:\n\n(a) The contribution was created in whole or in part by me and I\n have the right to submit it under the open source license\n indicated in the file; or\n\n(b) The contribution is based upon previous work that, to the best\n of my knowledge, is covered under an appropriate open source\n license and I have the right under that license to submit that\n work with modifications, whether created in whole or in part\n by me, under the same open source license (unless I am\n permitted to submit under a different license), as indicated\n in the file; or\n\n(c) The contribution was provided directly to me by some other\n person who certified (a), (b) or (c) and I have not modified\n it.\n\n(d) I understand and agree that this project and the contribution\n are public and that a record of the contribution (including all\n personal information I submit with it, including my sign-off) is\n maintained indefinitely and may be redistributed consistent with\n this project or the open source license(s) involved.","category":"page"},{"location":"development/#Development","page":"Development","title":"Development","text":"","category":"section"},{"location":"development/#Text-editors","page":"Development","title":"Text editors","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"When writing code, the choice of text editor can have a significant impact on productivity and developer satisfaction. While using the default text editor of the operating system has its own benefits (specifically the lack of an explicit installation procure), usually it makes sense to switch to a more programming-friendly tool. In the following, a few of the many options are listed and discussed:","category":"page"},{"location":"development/#VS-Code","page":"Development","title":"VS Code","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"Visual Studio Code is a modern open source editor with good support for Julia. While Juno had some better support in the past, the developers of Juno and the Julia VS Code plugin are joining forces and concentrating on VS Code since support of Atom has been suspended. Basically, all comments on Juno below also apply to VS Code.","category":"page"},{"location":"development/#Juno","page":"Development","title":"Juno","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"If you are new to programming or do not have a preference for a text editor yet, Juno is a good choice for developing Julia code. It is based on Atom, a sophisticated and widely used editor for software developers, and is enhanced with several Julia-specific features. Furthermore and especially helpful for novice programmers, it has a MATLAB-like appearance with easy and interactive access to the current variables, the help system, and a debugger.","category":"page"},{"location":"development/#Vim-or-Emacs","page":"Development","title":"Vim or Emacs","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"Vim and Emacs are both very popular editors that work great with Julia. One of their advantages is that they are text editors without a GUI and as such 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 corresponding Vim plugin julia-vim or Emacs major mode julia-emacs.","category":"page"},{"location":"development/#Releasing-a-new-version-of-HOHQMesh","page":"Development","title":"Releasing a new version of HOHQMesh","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"Check whether everything is okay, tests pass etc.\nSet the new version number in Project.toml according to the Julian version of semver. Commit and push.\nComment @JuliaRegistrator register on the commit setting the version number.\nJuliaRegistrator will create a PR with the new version in the General registry. Wait for it to be merged.\nIncrement the version number in Project.toml again with suffix -pre. For example, if you have released version v0.2.0, use v0.2.1-pre as new version number.","category":"page"},{"location":"development/#Preview-the-documentation","page":"Development","title":"Preview the documentation","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"You can build the documentation of HOHQMesh.jl locally by running","category":"page"},{"location":"development/","page":"Development","title":"Development","text":"julia --project=docs -e 'using Pkg; Pkg.instantiate(); include(\"docs/make.jl\")'","category":"page"},{"location":"development/","page":"Development","title":"Development","text":"from the HOHQMesh.jl main directory. Then, you can look at the html files generated in docs/build. For PRs triggered from branches inside the HOHQMesh.jl main repository previews of the new documentation are generated at https://trixi-framework.github.io/HOHQMesh.jl/previews/PRXXX, where XXX is the number of the PR. Note, this does not work for PRs from forks for security reasons (since anyone could otherwise push arbitrary stuff, including malicious code).","category":"page"},{"location":"tutorials/straight_outer_boundary/#Straight-sided-outer-boundary","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The purpose of this tutorial is to demonstrate how to create an unstructured mesh on a rectangular domain that contains two circular inner boundaries. Further, we show how to adjust some of the default mesh parameters as well as the output mesh file format. The outer boundary, background grid and mesh will be visualized for quality inspection.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"It provides details and clarification for the script interactive_outer_box_two_circles.jl from the examples folder.","category":"page"},{"location":"tutorials/straight_outer_boundary/#Synopsis","page":"Straight-sided outer boundary","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Query and adjust the RunParameters of a project.\nDefine a rectangular outer boundary and set the background grid.\nVisualize an interactive mesh project.\nAdd circular inner boundary curves.","category":"page"},{"location":"tutorials/straight_outer_boundary/#Initialization","page":"Straight-sided outer boundary","title":"Initialization","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the curves, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We create a new project with the name \"box_two_circles\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting HOHQMesh control file from this tutorial will be named box_two_circles.control. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"box_project = newProject(\"box_two_circles\", \"out\")","category":"page"},{"location":"tutorials/straight_outer_boundary/#Adjusting-project-parameters","page":"Straight-sided outer boundary","title":"Adjusting project parameters","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"When a new project is created it is filled with several default RunParameters such as the polynomial order used to represent curved boundaries or the mesh file format. These RunParameters can be queried and adjusted with appropriate getter/setter pairs, see Controlling the mesh generation for more details.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"For the box_project we first query the current values for the polynomial order and the mesh output format","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"julia> getPolynomialOrder(box_project)\n5\n\njulia> getMeshFileFormat(box_project)\n\"ISM-V2\"","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We change these quantities in the box_project with the corresponding setter functions. For this we will set the polynomial order to be 4 and the mesh file format to be ABAQUS. See the P4est-based mesh section of the Trixi.jl documentation for a detailed overview of this mesh file format.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"setPolynomialOrder!(box_project, 4)\nsetMeshFileFormat!(box_project, \"ABAQUS\")","category":"page"},{"location":"tutorials/straight_outer_boundary/#Add-the-background-grid","page":"Straight-sided outer boundary","title":"Add the background grid","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near any curved boundaries.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The domain for this tutorial is a rectangular box with the bounds 030times015. Because no outer boundary curve is present there are two (equivalent) strategies for us to define the bounds of a rectangular domain and the size of the background grid:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Set the lower left corner point of the domain (x_0 y_0), define the element size in each spatial direction Delta x and Delta y, and the number of steps taken in each direction N_x N_y. The resulting background grid will have the extent x_0 x_0 + N_x Delta x by y_0 y_0 + N_y Delta y. For this example, we set a background grid of Cartesian elements with size one in each dimension with the following commands\nlower_left = [0.0, 0.0, 0.0]\nspacing = [1.0, 1.0, 0.0]\nnum_intervals = [30, 15, 0]\naddBackgroundGrid!(box_project, lower_left, spacing, num_intervals)\nSet the bounding box with extent values ordered as [top, left, bottom, right] and provide the number the number of steps in each direction. To set a background grid of Cartesian elements with size one in each dimension for the rectangular box 030times015 we use\nbounds = [15.0, 0.0, 0.0, 30.0]\nN = [30, 15, 0]\naddBackgroundGrid!(box_project, bounds, N)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Next, we visualize the box_project to ensure that the background grid has been added correctly.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"plotProject!(box_project, GRID)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We use the keyword and GRID to indicate that we want the background grid to be included in the visualization.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: background)","category":"page"},{"location":"tutorials/straight_outer_boundary/#Add-the-inner-boundaries","page":"Straight-sided outer boundary","title":"Add the inner boundaries","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Next, we add the two circular inner boundary curves with different radii.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The first circle will have radius r=2 and be centered at the point (4 4). We define this circular curve with the function newCircularArcCurve as follows","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"circle1 = newCircularArcCurve(\"circle1\", # curve name\n [4.0, 4.0, 0.0], # circle center\n 2.0, # circle radius\n 0.0, # start angle\n 360.0, # end angle\n \"degrees\") # angle units","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We use \"degrees\" to set the angle bounds, but \"radians\" can also be used. The name of the curve stored in the dictionary circle1 is assigned to be \"circle1\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The new circle1 curve is then added to the box_project as an inner boundary curve with","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"addCurveToInnerBoundary!(box_project, circle1, \"inner1\")","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"This inner boundary chain name \"inner1\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that a curve has been added to the project and the plot is updated appropriately, as shown below. The chain for the inner boundary curve is called \"inner1\" and it contains a single curve \"circle1\" labeled in the figure by 1.1.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: first_circle)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"With analogous steps we create another circular curve with radius r=4, centered at (20 9) and add it as a second inner curve to the box_project. Note, for this curve we use radians for the angle units.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"circle2 = newCircularArcCurve(\"circle2\", # curve name\n [20.0, 9.0, 0.0], # circle center\n 4.0, # circle radius\n 0.0, # start angle\n 2.0 * pi, # end angle\n \"radians\") # angle units\naddCurveToInnerBoundary!(box_project, circle2, \"inner2\")","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Again, the box_project detects that a curve has been added to it and the visualization is automatically updated with the second circular curve. The chain for the second inner boundary curve is called \"inner2\" and it contains a single curve \"circle2\" labeled in the figure by 2.1.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: second_circle)","category":"page"},{"location":"tutorials/straight_outer_boundary/#Generate-the-mesh","page":"Straight-sided outer boundary","title":"Generate the mesh","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"With the background grid and all inner boundary curves added to the box_project we can generate the mesh. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"box_two_circles.control: A HOHQMesh control file for the current project.\nbox_two_circles.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nbox_two_circles.inp: A mesh file with format ABAQUS that was set above.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"To do this we execute the command","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"generate_mesh(box_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 3.5553999999999995E-002\n Number of nodes = 498\n Number of Edges = 921\n Number of Elements = 422\n Number of Subdivisions = 0\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.34513058 1.15383206 0.91833833 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00000004 1.71083844 1.08733476 1.00000000 999.99900000 1.00000000\n Condition 1.00000000 1.46558793 1.04922640 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00000006 2.43503343 1.16700825 1.00000000 4.00000000 1.00000000\n Jacobian 0.17863168 1.07210721 0.86801359 0.00000000 999.99900000 1.00000000\n Minimum Angle 50.56155029 89.99999787 83.84466557 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.00000259 136.97479459 96.69930735 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The call to generate_mesh also prints mesh quality statistics to the screen and updates the visualization. The background grid is removed from the visualization when the mesh is generated and the resulting mesh is visualized instead.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: final_circle)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"From a visual inspection we decide that we are satisfied with the mesh quality and resolution near the inner circular boundaries.","category":"page"},{"location":"tutorials/straight_outer_boundary/#Summary","page":"Straight-sided outer boundary","title":"Summary","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Query and adjust the RunParameters of a project.\nDefine a rectangular outer boundary and set the background grid.\nVisualize an interactive mesh project.\nAdd circular inner boundary curves.","category":"page"},{"location":"github-git/#GitHub-and-Git","page":"GitHub & Git","title":"GitHub & Git","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"This page contains information on how to use GitHub and Git when developing HOHQMesh.","category":"page"},{"location":"github-git/#Development-workflow","page":"GitHub & Git","title":"Development workflow","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"For adding modifications to HOHQMesh, we generally follow these steps:","category":"page"},{"location":"github-git/#Create-an-issue-(optional)","page":"GitHub & Git","title":"Create an issue (optional)","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"In many cases it makes sense to start by creating an issue on GitHub. For example, if the implementation approach for a new feature is not yet clear or if there should be a discussion about the desired outcome, it is good practice to first get a consensus on what is the expected result of this modification. A GitHub issue is the place to lead this discussion, as it preserves it in the project and - together with the actual code changes - allows in the future to revisit the reasons for a particular choice of implementation or feature.","category":"page"},{"location":"github-git/#Create-a-branch-and-*immediately*-create-a-pull-request","page":"GitHub & Git","title":"Create a branch and immediately create a pull request","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"All feature development, bug fixes etc. should be developed in a branch and not directly on main. If you do not have write access to the main repository on GitHub, first create a fork of the HOHQMesh.jl repository and clone the fork to your machine. Then, create a branch locally by executing git checkout -b yourbranch, push it to the repository, and create a pull request (PR).","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If you have already cloned HOHQMesh.jl from the main repo to your local machine, you can also work in that clone. You just need to add your fork as additional remote repository and push your new branch there.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"git remote add myfork git@github.com:YOUR_NAME/HOHQMesh.jl.git\n# get latest main from the main repo\ngit checkout main\ngit pull\n# create a new branch for a cool new feature, bug fix, ...\ngit checkout -b YOUR_BRANCH_NAME\n# do some work and push it to your fork\ngit push -u myfork\n# go to https://github.com/trixi-framework/HOHQMesh.jl/pull\n# and create a PR from your new branch","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"info: Why using pull requests?\nImmediately creating a PR for your branch has the benefit that all code discussions can now be held directly next to the corresponding code. Also, the PR allows to easily compare your branch to the upstream branch (usually main) to see what you have changed. Moreover, tests will run automatically.","category":"page"},{"location":"github-git/#Make-changes","page":"GitHub & Git","title":"Make changes","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"With a branch and PR in place, you can now write your code and commit it to your branch. If you request feedback from someone else, make sure to push your branch to the repository such that the others can easily review your changes or dive in and change something themselves.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"warning: Avoid committing unwanted files\nWhen you use git add . or similar catch-all versions, make sure you do not accidentally commit unwanted files (e.g., HOHQMesh output plot and mesh files). If it happens anyways, you can undo the last commit (also multiple times) by running git reset HEAD~ (see also Undo last commit). However, this strategy only works if you have not yet pushed your changes. If you did push your changes, please talk to one of the principal developers on how to proceed.","category":"page"},{"location":"github-git/#Keep-your-branch-in-sync-with-main","page":"GitHub & Git","title":"Keep your branch in sync with main","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"For larger features with longer-living branches, it may make sense to synchronize your branch with the current main, e.g., if there was a bug fix in main that is relevant for you. In this case, perform the following steps to merge the current main to your branch:","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Commit all your local changes to your branch and push it. This allows you to delete your clone in case you make a mistake and need to abort the merge.\nExecute git fetch to get the latest changes from the repository.\nMake sure you are in the correct branch by checking the output of git status or by running git checkout yourbranch.\nMerge main using git merge main. If there were no conflicts, hooray!, you are done. Otherwise you need to resolve your merge conflicts and commit the changes afterwards. A good guide for resolving merge conflicts can be found here.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"In general, always use git merge and not git rebase to get the latest changes from main. It is less error-prone and does not create problems on branches that are worked on collaboratively.","category":"page"},{"location":"github-git/#Prepare-for-review","page":"GitHub & Git","title":"Prepare for review","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If you feel like your branch is ready to be merged to main, prepare it for review. That is, you should","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"merge the current main to your branch\nrun tests if available, but at least ensure that you did not accidentally change the results for one of the existing example elixirs\nproperly comment your code\ndelete old/unused code, especially commented lines (unless they contain helpful code, in which case you should add a comment on why you keep this around)\nremove debug statements\nadd a script interactive_xxx.jl that uses your feature (only relevant for new features within the interactive mesh functionality)","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"After you are confident that your branch is cleaned up properly, commit all changes and push them to the repository.","category":"page"},{"location":"github-git/#Get-reviewed","page":"GitHub & Git","title":"Get reviewed","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Ask one of the principal developers to review your code. This review will be conducted asynchronously, with the reviewer leaving comments and annotations in the PR. In some cases it will be necessary to do multiple rounds of reviews, especially if there are larger changes to be added. Just commit and push your changes to your branch, and the corresponding pull request will be updated automatically.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Please note that a review has nothing to do with the lack of experience of the person developing changes: We try to review all code before it gets added to main, even from the most experienced developers. This is good practice and helps to keep the error rate low while ensuring the the code is developed in a consistent fashion. Furthermore, do not take criticism of your code personally - we just try to keep HOHQMesh as accessible and easy to use for everyone.","category":"page"},{"location":"github-git/#Merge-branch","page":"GitHub & Git","title":"Merge branch","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Once your branch is reviewed and declared ready for merging by the reviewer, make sure that all the latest changes have been pushed. Then, one of the developers will merge your PR. If you are one of the developers, you can also go to the pull request page on GitHub and and click on Merge pull request. Voilá, you are done! Your branch will have been merged to main and the source branch will have been deleted in the GitHub repository (if you are not working in your own fork).","category":"page"},{"location":"github-git/#Update-your-working-copy","page":"GitHub & Git","title":"Update your working copy","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Once you have merged your branch by accepting the PR on GitHub, you should clean up your local working copy of the repository by performing the following steps:","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Update your clone by running git fetch.\nCheck out main using git checkout main.\nDelete merged branch locally with git branch -d yourbranch.\nRemove local references to deleted remote branch by executing git remote prune origin.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"You can now proceed with your next changes by starting again at the top.","category":"page"},{"location":"github-git/#Using-Git","page":"GitHub & Git","title":"Using Git","text":"","category":"section"},{"location":"github-git/#Resources-for-learning-Git","page":"GitHub & Git","title":"Resources for learning Git","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Here are a few resources for learning do use Git that at least one of us found helpful in the past (roughly ordered from novice to advanced to expert):","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Git Handbook by GitHub\nLearn Git Branching","category":"page"},{"location":"github-git/#Tips-and-tricks","page":"GitHub & Git","title":"Tips and tricks","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"This is an unordered collection of different tips and tricks that can be helpful while working with Git. As usual, your mileage might vary.","category":"page"},{"location":"github-git/#Undo-last-commit","page":"GitHub & Git","title":"Undo last commit","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If you made a mistake in your last commit, e.g., by committing an unwanted file, you can undo the latest commit by running","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"git reset HEAD~","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"This only works if you have not yet pushed your branch to the GitHub repository. In this case, please talk to one of the core developers on how to proceed. Especially when you accidentally committed a large file (image, or video), please let us know as fast as possible, since the effort to fix the repository grows considerably over time.","category":"page"},{"location":"github-git/#Remove-large-file-from-repository","page":"GitHub & Git","title":"Remove large file from repository","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If a large file was accidentally committed and pushed to the HOHQMesh repository, please talk to one of the principal developers as soon as possible so that they can fix it.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"danger: Large files\nYou should never try to fix this yourself, as it potentially disrupts/destroys the work of others!","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Based on the instructions found here and here, the following steps need to be taken (as documented for GitLab in issue #33):","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Tell everyone to commit and push their changes to the repository.\nFix the branch in which the file was committed by removing it and committing the removal. This is especially important on main.\nPerform the following steps to clean up the Git repository:\ncd /tmp\n\n# Download bfg-1.13.0.jar from https://rtyley.github.io/bfg-repo-cleaner/\n\n# Get fresh clone of repo (so you can throw it away in case there is a problem)\ngit clone --mirror git@github.com:trixi-framework/HOHQMesh.jl.git\n\n# Clean up repo of all files larger than 10M\njava -jar bfg-1.13.0.jar --strip-blobs-bigger-than 10M HOHQMesh.jl.git\n\n# Enter repo\ncd Trixi.jl.git\n\n# Clean up reflog and force aggressive garbage collection\ngit reflog expire --expire=now --all && git gc --prune=now --aggressive\n\n# Push changes\ngit push\n\n# Delete clone\nrm -rf HOHQMesh.jl.git\nTell everyone to clean up their local working copies by performing the following steps (also do this yourself):\n# Enter repo\ncd HOHQMesh.jl\n\n# Get current changes\ngit fetch\n\n# Check out the fixed branch\ngit checkout branchname\n\n# IMPORTANT: Do a rebase instead of a pull!\ngit rebase\n\n# Clean reflog and force garbage collection\ngit reflog expire --expire=now --all && git gc --prune=now --aggressive\nIMPORTANT: You need to do a git rebase instead of a git pull when updating the fixed branch.","category":"page"},{"location":"interactive-api/#API","page":"API","title":"API","text":"","category":"section"},{"location":"interactive-api/#Project-creation-and-saving","page":"API","title":"Project creation and saving","text":"","category":"section"},{"location":"interactive-api/#New-Project","page":"API","title":"New Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Project] proj = newProject(name::String, folder::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The supplied name will be the default name of the 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.","category":"page"},{"location":"interactive-api/#Opening-an-existing-project-file","page":"API","title":"Opening an existing project file","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"A project can be created from an existing HOHQMesh control file with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Project] proj = openProject(fileName::String, folder::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The supplied fileName will be the name of the project and the generated mesh and plot files will be placed in the supplied folder.","category":"page"},{"location":"interactive-api/#Saving-a-Project","page":"API","title":"Saving a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" saveProject(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"writes a control file to the folder designated when creating the new project. It can be read in again with openProject.","category":"page"},{"location":"interactive-api/#Plotting-a-Project","page":"API","title":"Plotting a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" plotProject!(proj::Project, options)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The plot options are any combination of MODEL, GRID, REFINEMENTS, and MESH. MODEL refers to any inner / outer boundary curves contained in the project. GRID refers to the background grid, which you an view to make sure that it can resolve the boundary curves in the model. REFINEMENTS will show the placement where user defined manual refinement regions are placed. MESH refers to the actual mesh of quadrilateral elements generated by HOHQMesh. Before meshing one probably wants to view MODEL+GRID, and afterwards, MODEL+MESH.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"If the model is modified and you want to re-plot with the new values, invoke","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" updatePlot!(proj::Project, options)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"but generally the plot will be updated automatically as you build the model.","category":"page"},{"location":"interactive-api/#Modifying/editing-a-Project","page":"API","title":"Modifying/editing a Project","text":"","category":"section"},{"location":"interactive-api/#Setting-the-name-of-a-Project","page":"API","title":"Setting the name of a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The project name is the name under which the mesh, plot, statistics and control files will be written. It can be changed at any time with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" setName!(proj::Project,name::String)","category":"page"},{"location":"interactive-api/#Getting-the-current-name-of-a-Project","page":"API","title":"Getting the current name of a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The project name can be fetched and printed to the screen with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] getName(proj::Project)","category":"page"},{"location":"interactive-api/#Controlling-the-mesh-generation","page":"API","title":"Controlling the mesh generation","text":"","category":"section"},{"location":"interactive-api/#Editing-the-RunParameters","page":"API","title":"Editing the RunParameters","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The run parameters can be enquired and set with these getter/setter pairs:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setPolynomialOrder!(proj::Project, p::Int)\n [Return:Int] getPolynomialOrder(proj::Project)\n [Return:nothing] setMeshFileFormat!(proj::Project, meshFileFormat::String)\n [Return:String] getMeshFileFormat(proj::Project)\n [Return:nothing] setPlotFileFormat!(proj::Project, plotFileFormat::String)\n [Return:String] getPlotFileFormat(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"HOHQMesh generates mesh files that contain high-order polynomial interpolations for any curved boundaries in the model. The degree of this polynomial representation is controlled by the above getter/setter pair. The default polynomial order is set to 5.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The available mesh file formats are \"ISM\", \"ISM-V2\", or \"ABAQUS\". See the HOHQMesh documentation, Appendix A or Appendix E, as well as the Trixi.jl documentation, Unstructured quadrilateral mesh or P4est-based mesh, for details and discussions on the latter two mesh file formats.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The plot file (which can be viewed with something like VisIt or ParaView) format is either \"skeleton\" or \"sem\". The former is just a low order finite element representation of the mesh. The latter (which is a much bigger file) includes the interior degrees of freedom.","category":"page"},{"location":"interactive-api/#Changing-the-output-file-names","page":"API","title":"Changing the output file names","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"By default, the mesh, plot and stats files will be written with the name and path supplied when newProject is called. They can be changed/enquired with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setName!(proj::Project,name::String)\n [Return:String] getName(proj::Project)\n [Return:nothing] setFolder!(proj::Project,folder::String)\n [Return:String] getFolder(proj::Project)","category":"page"},{"location":"interactive-api/#Smoothing-operations","page":"API","title":"Smoothing operations","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"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.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To change the defaults, the smoother parameters can be set/enquired with the functions","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setSmoothingStatus!(proj::Project, status::String)\n [Return:String] getSmoothingStatus(proj::Project)\n [Return:nothing] setSmoothingType!(proj::Project, type::String)\n [Return:String] getSmoothingType(proj::Project)\n [Return:nothing] setSmoothingIterations!(proj::Project, iterations::Int)\n [Return:Int] getSmoothingIterations(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The smooth status is either \"ON\" or \"OFF\".","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To remove the smoother altogether, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] removeSpringSmoother!(proj::Project)","category":"page"},{"location":"interactive-api/#Adding-the-background-grid","page":"API","title":"Adding the background grid","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"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 after a new project has been created.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] addBackgroundGrid!(proj::Project,\n x0::Array{Float64},\n dx::Array{Float64},\n N::Array{Int})\n [Return:nothing] addBackgroundGrid!(proj::Project,\n box::Array{Float64},\n N::Array{Int})\n [Return:nothing] addBackgroundGrid!(proj::Project,\n bgSize::Array{Float64})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Use one of the first two if there is no outer boundary present in the model. With the first, a rectangular outer boundary will be created of extent [x0[1], x0[1] + N*dx[1]] by [x0[2], x0[2] + N*dx[2]]. The second lets you set the bounding box = [top, left, bottom, right], and the number of points in each direction. The arrays x0, dx, and N are all vectors [ *, *, * ] giving the x, y, and z components. When an outer boundary is present use the third variant where one only need specify the desired background grid size with the vector bgSize.","category":"page"},{"location":"interactive-api/#Changing-the-background-grid","page":"API","title":"Changing the background grid","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The size of an existing background grid in a Project can be adjusted with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setBackgroundGridSize!(proj::Project,\n dx::Float64,\n dy::Float64)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"If a plot is present it will be updated automatically.","category":"page"},{"location":"interactive-api/#Manual-refinement-regions","page":"API","title":"Manual refinement regions","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"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).","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To create a RefinementCenter,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newRefinementCenter(name::String,\n type::String,\n x0::Array{Float64},\n h::Float64,\n w::Float64)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where name labels the refinement region, the type is either \"smooth\" or \"sharp\", x0 = [x, y, z] is the location of the center, h is the mesh size, and w is the extent of the refinement region. The z component must be zero.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Similarly, one can create a RefinementLine,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newRefinementLine(name::String,\n type::String,\n x0::Array{Float64}, x1::Array{Float64},\n h::Float64,\n w::Float64)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where x0 is the start position and x1 is the end of the line. The name, type, h, and w parameters are the same as for a RefinementCenter.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To add a refinement region to the project,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] addRefinementRegion!(proj::Project, r::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To get a reference to a refinement region with a given name, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] getRefinementRegion(proj::Project, name::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Finally, to get a list of all the refinement regions,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Array{Dict{String,Any}}] array = allRefinementRegions(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"A refinement region can be edited by using the following:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setRefinementType!(r::Dict{String,Any}, type::String)\n [Return:String] getRefinementType(r::Dict{String,Any})\n [Return:nothing] setRefinementLocation!(r::Dict{String,Any}, x::Array{Float64})\n [Return:Array{Float64}] getRefinementLocation(r::Dict{String,Any})\n [Return:nothing] setRefinementGridSize!(r::Dict{String,Any}, h::Float64)\n [Return:Float64] getRefinementGridSize(r::Dict{String,Any})\n [Return:nothing] setRefinementWidth!(r::Dict{String,Any}, w::Float64)\n [Return:Float64] getRefinementWidth(r::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where r is a dictionary returned by newRefinementCenter!, newRefinementLine!, or getRefinementRegion.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To further edit a RefinementLine, use the methods","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setRefinementStart!(r::Dict{String,Any}, x::Array{Float64})\n [Return:Array{Float64}] getRefinementStart(r::Dict{String,Any})\n [Return:nothing] setRefinementEnd!(r::Dict{String,Any}, x::Array{Float64})\n [Return:Array{Float64}] getRefinementEnd(r::Dict{String,Any})","category":"page"},{"location":"interactive-api/#Boundary-curves","page":"API","title":"Boundary curves","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The Project contains a model that contains information about any inner and/or outer boundary curves that a user can add to define a domain to be meshed. Each curve is defined as a \"chain\" that can be built from multiple connected curves. More details on boundary curves and HOHQMesh can be found here.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The domain can have a single outer boundary chain and an arbitrary number of inner boundary chains.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The orientation of any curve chains must be counter-clockwise. This orientation is automatically checked in generate_mesh and a warning is thrown if a user attempts to connect the curve chain in an invalid way.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"See the tutorial Creating and editing curves for a demonstration of defining, constructing, and removing curves from a Project.","category":"page"},{"location":"interactive-api/#Defining-curves","page":"API","title":"Defining curves","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"Four curve types can be added to the outer and inner boundary curve chains. They are","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Parametric equations\nCubic Splines\nLines defined by their end points\nCircular arcs","category":"page"},{"location":"interactive-api/#Parametric-equations","page":"API","title":"Parametric equations","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"Creating a new curve equation","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newParametricEquationCurve(name::String,\n xEqn::String,\n yEqn::String,\n zEqn::String = \"z(t) = 0.0\")","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Returns a new set of parametric equation. Equations must be of the form","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" () = ...","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The name of the function, and the argument are arbitrary. The equation can be any legitimate equation. The constant pi is defined for use. Exponentiation is done with ^. All number literals are interpreted as floating point numbers.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" xEqn = \"x(t) = 4*cos(2*pi*t) - 0.6*cos(8*pi*t)^3\"\n yEqn = \"y(t) = 4*sin(2*pi*t) - 0.5*sin(11*pi*t)^2\"\n zEqn = \"z(t) = 0.0\"\n blob = newParametricEquationCurve(\"Blob\", xEqn, yEqn, zEqn)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The z-Equation is optional, but for now must define zero for z by default.","category":"page"},{"location":"interactive-api/#Cubic-spline-curve","page":"API","title":"Cubic spline curve","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"A cubic spline is defined by an array of knots, t_j, x_j, y_j, z_j. It can either be supplied by a data file whose first line is the number of knots, and succeeding lines define the t, x, y, z values, e.g.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" 9\n 0.000000000000000 -3.50000000000000 3.50000000000000 0.0\n 3.846153846153846E-002 -3.20000000000000 5.00000000000 0.0\n 7.692307692307693E-002 -2.00000000000000 6.00000000000 0.0\n 0.769230769230769 0.000000000000000 -1.00000000000000 0.0\n 0.807692307692308 -1.00000000000000 -1.00000000000000 0.0\n 0.846153846153846 -2.00000000000000 -0.800000000000000 0.0\n 0.884615384615385 -2.50000000000000 0.000000000000000 0.0\n 0.923076923076923 -3.00000000000000 1.00000000000000 0.0\n 1.00000000000000 -3.50000000000000 3.50000000000000 0.0","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"or by constructing the required nKnots x 4 array and supplying it to the new procedure. The respective constructors for a spline curve are","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newSplineCurve(name::String,\n dataFile::String)\n [Return:Dict{String,Any}] newSplineCurve(name::String,\n nKnots::Int,\n data::Matrix{Float64})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"If the spline curve is to be closed. The last data point must be the same as the first.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" spline_data = [ [0.0 1.75 -1.0 0.0]\n [0.25 2.1 -0.5 0.0]\n [0.5 2.7 -1.0 0.0]\n [0.75 0.6 -2.0 0.0]\n [1.0 1.75 -1.0 0.0] ]\n ex_spline = newSplineCurve(\"small_spline\", 5, spline_data)","category":"page"},{"location":"interactive-api/#Line-defined-by-end-points","page":"API","title":"Line defined by end points","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"A straight line is constructed with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newEndPointsLineCurve(name::String,\n xStart::Array{Float64},\n xEnd::Array{Float64})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The xStart and xEnd are arrays of the form [x, y, z]. The z component should be zero and for now is ignored.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" line1 = newEndPointsLineCurve(\"line_segment\", [0.0, -3.0, 0.0], [1.0, 0.0, 0.0])","category":"page"},{"location":"interactive-api/#Circular-arc","page":"API","title":"Circular arc","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newCircularArcCurve(name::String,\n center::Array{Float64},\n radius::Float64,\n startAngle::Float64,\n endAngle::Float64,\n units::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The center is an array of the form [x, y, z]. The units argument defines the start and end angle units. It is either \"degrees\" or \"radians\". That argument is optional, and defaults to \"degrees\".","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" halfCircle = newCircularArcCurve(\"Dome\", [0.0, 0.0, 0.0], 1.0, 0.0, 180.0, \"degrees\")","category":"page"},{"location":"interactive-api/#Adding-and-removing-outer-and-inner-boundaries","page":"API","title":"Adding and removing outer and inner boundaries","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"Adding an outer boundary curve\nUsing the curve creation routines described above, create curves counter-clockwise along the outer boundary and add them to the outer boundary curve using\n[Return:nothing] addCurveToOuterBoundary!(proj::Project,\n crv::Dict{String,Any})\ncrv is the dictionary that represents the curve.\nExample:\ncirc = newCircularArcCurve(\"outerCircle\", [0.0, -1.0, 0.0], 4.0, 0.0, 360.0, \"degrees\")\naddCurveToOuterBoundary!(p, circ)\nAdding an inner boundary curve\nThe syntax is analogous to the creation of an outer boundary curve. Once interior curves are defined they can be added to chain, again in counter-clockwise orientation. Note that the individual pieces of the curve are given a name. The entire chain is also given a name.\n[Return:nothing] addCurveToInnerBoundary!(proj::Project,\n crv::Dict{String,Any},\n chainName::String)\nExample:\nline1 = newEndPointsLineCurve(\"line_segment\", [0.0, -3.0, 0.0], [1.0, 0.0, 0.0])\naddCurveToInnerBoundary!(p, line1, \"interior_curve\")\nTo edit curves they can be accessed by the name:\n[Return:Dict{String,Any}] getInnerBoundaryCurve(proj::Project,\n curveName::String,\n chainName::String)\n[Return:Dict{String,Any}] getOuterBoundaryCurveWithName(proj::Project,\n name::String)\nDeleting boundary curves\nThe entire outer boundary or an entire inner boundary can be removed from the project.\n[Return:nothing] removeOuterBoundary!(proj::Project)\n[Return:nothing] removeInnerBoundary!(proj::Project, chainName::String)\nAlternatively, individual pieces of the boundary curve chains can be removed.\n[Return:nothing] removeOuterBoundaryCurveWithName!(proj::Project, name::String)\n[Return:nothing] removeInnerBoundaryCurve!(proj::Project,\n name::String,\n chainName::String)\nAs in HOHQMesh the project can have only one outer boundary chain, so the removal does not require a specific chainName.","category":"page"},{"location":"interactive-api/#Editing-curves","page":"API","title":"Editing curves","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"You can determine the type of a curve by","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] getCurveType(crv::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"For any of the curves, their name can be changed by","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" setCurveName!(crv::Dict{String,Any}, name::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"and checked by","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" getCurveName(crv::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Otherwise there are special functions to change the parameters of curves","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setXEqn!(crv::Dict{String,Any}, eqn::String)\n [Return:nothing] setYEqn!(crv::Dict{String,Any}, eqn::String)\n [Return:nothing] setZEqn!(crv::Dict{String,Any}, eqn::String)\n [Return:nothing] setStartPoint!(crv::Dict{String,Any}, point::Array{Float64})\n [Return:nothing] setEndPoint!(crv::Dict{String,Any}, point::Array{Float64})\n [Return:nothing] setArcUnits!(arc::Dict{String,Any}, units::String)\n [Return:nothing] setArcCenter!(arc::Dict{String,Any}, point::Array{Float64})\n [Return:nothing] setArcStartAngle!(arc::Dict{String,Any}, angle::Float64)\n [Return:nothing] setArcEndAngle!(arc::Dict{String,Any}, angle::Float64)\n [Return:nothing] setArcRadius!(arc::Dict{String,Any}, radius::Float64)\n\n [Return:String] getXEqn(crv::Dict{String,Any})\n [Return:String] getYEqn(crv::Dict{String,Any})\n [Return:String] getZEqn(crv::Dict{String,Any})\n [Return:Array{Float64}] getStartPoint(crv::Dict{String,Any})\n [Return:Array{Float64}] getEndPoint(crv::Dict{String,Any})\n [Return:String] getArcUnits(arc::Dict{String,Any})\n [Return:Array{Float64}] getArcCenter(arc::Dict{String,Any})\n [Return:Float64] getArcStartAngle(arc::Dict{String,Any})\n [Return:Float64] getArcEndAngle(arc::Dict{String,Any})\n [Return:Float64] getArcRadius(arc::Dict{String,Any})","category":"page"},{"location":"interactive-api/#Undo/redo","page":"API","title":"Undo/redo","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The interactive mesh functionality has unlimited undo/redo for most actions.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"In interactive mode, actions can be undone by the commands","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] undo()\n [Return:String] redo()","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where the return string contains the name of the action performed.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To find out what the next actions are, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] undoActionName()\n [Return:String] redoActionName()","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Finally, to clear the undo stack, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] clearUndoRedo()","category":"page"},{"location":"tutorials/curved_outer_boundary/#Curved-outer-boundary","page":"Curved outer boundary","title":"Curved outer boundary","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The purpose of this tutorial is to demonstrate how to create an unstructured mesh on a domain with a curved outer boundary. This outer boundary curve is defined by parametric equations and contains fine features as well as smooth regions.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The outer boundary, background grid and mesh are visualized for quality inspection. The tutorial also shows how to adjust the background and add a local refinement region in order to better resolve a portion of the curved boundary.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Synopsis","page":"Curved outer boundary","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Define a curved outer boundary using parametric equations.\nAdd and adjust the background grid.\nVisualize an interactive mesh project.\nAdd manual refinement to a local region of the domain.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Initialization","page":"Curved outer boundary","title":"Initialization","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the boundary curve, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"We create a new project with the name \"TheBlob\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting mesh file from this tutorial will be named TheBlob.mesh. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"blob_project = newProject(\"TheBlob\", \"out\")","category":"page"},{"location":"tutorials/curved_outer_boundary/#Add-the-outer-boundary","page":"Curved outer boundary","title":"Add the outer boundary","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The outer boundary curve for the domain of interest in this tutorial is given by the parametric equations","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":" beginaligned\n x(t) = 4cos(2 pi t) - frac35cos^3(8 pi t)02cm\n y(t) = 4sin(2 pi t) - frac12sin^2(11 pi t)02cm\n z(t) = 0\n endaligned\n qquad\n tin01","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Parametric equations in HOHQMesh can be any legitimate equation and use intrinsic functions available in Fortran, e.g., sin, cos, exp. The constant pi is available for use. Exponentiation is done with ^. All number literals are interpreted as floating point numbers.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The following commands create a new curve for the parametric equations above","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"xEqn = \"x(t) = 4 * cos(2 * pi * t) - 0.6 * cos(8 * pi * t)^3\"\nyEqn = \"y(t) = 4 * sin(2 * pi * t) - 0.5 * sin(11* pi * t)^2\"\nzEqn = \"z(t) = 0.0\"\nblob = newParametricEquationCurve(\"Blob\", xEqn, yEqn, zEqn)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The name of this curve is assigned to be \"Blob\". This name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Now that we have created the boundary curve it must be added as an outer boundary in the blob_project.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"addCurveToOuterBoundary!(blob_project, blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/#Add-a-background-grid","page":"Curved outer boundary","title":"Add a background grid","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near sharp features of any curved boundaries.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"For a domain bounded by an outer boundary curve, this background grid is set by indicating the desired element size in the x and y directions. To start, we set the background grid for blob_project to have elements with side length two in each direction","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"addBackgroundGrid!(blob_project, [2.0, 2.0, 0.0])","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"We next visualize the outer boundary curve and background grid with the following","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"plotProject!(blob_project, MODEL+GRID)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Here, we take the sum of the keywords MODEL and GRID in order to simultaneously visualize the curves and background grid. The resulting plot is given below. The chain of outer boundary curves is called \"Outer\" and it contains a single curve \"Blob\" labeled in the figure by O.1.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: coarse_grid)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"From the visualization we see that the background grid is likely too coarse to produce a \"good\" quadrilateral mesh for this domain. We reset the background grid size to have elements with size one half in each direction","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"setBackgroundGridSize!(blob_project, 0.5, 0.5)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Note, that after we execute the command above the visualization updates automatically with the outer boundary curve and the new background grid.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: fine_grid)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The new background grid that gives a finer initial resolution looks suitable to continue to the mesh generation.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Initial-mesh-and-user-adjustments","page":"Curved outer boundary","title":"Initial mesh and user adjustments","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"We next generate the mesh from the information contained in the blob_project. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"TheBlob.control: A HOHQMesh control file for the current project.\nTheBlob.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nTheBlob.mesh: A mesh file with format ISM-V2 (the default format).","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"To do this we execute the command","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"generate_mesh(blob_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.10612399999999998\n Number of nodes = 481\n Number of Edges = 895\n Number of Elements = 417\n Number of Subdivisions = 5\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00025346 0.36181966 0.11936327 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00002883 2.58066393 1.26340310 1.00000000 999.99900000 1.00000000\n Condition 1.00000000 3.11480166 1.18583253 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00006177 4.80707901 1.51313656 1.00000000 4.00000000 1.00000000\n Jacobian 0.00011326 0.28172540 0.10292251 0.00000000 999.99900000 1.00000000\n Minimum Angle 29.30873612 89.99827738 73.08079323 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.00132792 156.87642432 109.37004979 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The call to generate_mesh also prints mesh quality statistics to the screen and updates the visualization. The background grid is removed from the visualization when the mesh is generated.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"note: Mesh visualization\nCurrently, only the \"skeleton\" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: initial_blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the fine features of the curved outer boundary. Although, we see that the mesh near the point (-4 0) is still quite coarse. To remedy this we manually add a RefinementCenter near this region of the domain to force HOHQMesh to increase the resolution in this area. We create and add this refinement region to the current project with","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"center = newRefinementCenter(\"region\", \"smooth\", [-4.0, -0.5, 0.0], 0.4, 1.0)\naddRefinementRegion!(blob_project, center)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Above we create a circular refinement region centered at the point (-4 -05) with a desired resolution size 04 and a radius of 10. Upon adding this refinement region to blob_project, the visualization will update to indicate the location and size of the manual refinement region.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: refinement_blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/#Final-mesh","page":"Curved outer boundary","title":"Final mesh","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"With the refinement region added to the project we can regenerate the mesh. Note, this will create and save new output files TheBlob.control, TheBlob.tec, TheBlob.mesh and update the figure.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"generate_mesh(blob_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.11373499999999999\n Number of nodes = 505\n Number of Edges = 940\n Number of Elements = 438\n Number of Subdivisions = 5\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00025346 0.36181966 0.11412658 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00002884 2.47585614 1.26424390 1.00000000 999.99900000 1.00000000\n Condition 1.00000000 3.11480166 1.18425870 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00006177 4.80707901 1.51413601 1.00000000 4.00000000 1.00000000\n Jacobian 0.00011326 0.28172540 0.09814547 0.00000000 999.99900000 1.00000000\n Minimum Angle 29.30873612 89.99827901 72.79596483 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.00132782 156.87642433 109.63912468 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Note, the circular region indicating the refinement center is removed from the plot when the mesh is generated.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: final_blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Now we decide that we are satisfied with the mesh quality and resolution of the outer boundary curve.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Summary","page":"Curved outer boundary","title":"Summary","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Define a curved outer boundary using parametric equations.\nAdd and adjust the background grid.\nVisualize an interactive mesh project.\nAdd manual refinement to a local region of the domain.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"For completeness, we include a script with all the commands to generate the mesh displayed in the final image. Note, we do not include the plotting in this script.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"# Interactive mesh with a curved outer boundary\n#\n# Create an outer boundary from a set of parametric equations.\n# Add manual refinement in a small region around the point (-4, -0.5).\n#\n# Keywords: outer boundary, parametric equations, refinement center\nusing HOHQMesh\n\n# Instantiate the project\nblob_project = newProject(\"TheBlob\", \"out\")\n\n# Create and add the outer boundary curve\nxEqn = \"x(t) = 4 * cos(2 * pi * t) - 0.6 * cos(8 * pi * t)^3\"\nyEqn = \"y(t) = 4 * sin(2 * pi * t) - 0.5 * sin(11* pi * t)^2\"\nzEqn = \"z(t) = 0.0\"\nblob = newParametricEquationCurve(\"Blob\", xEqn, yEqn, zEqn)\naddCurveToOuterBoundary!(blob_project, blob)\n\n# Add the background grid\naddBackgroundGrid!(blob_project, [0.5, 0.5, 0.0])\n\n# Create and add the refinement region\ncenter = newRefinementCenter(\"region\", \"smooth\", [-4.0, -0.5, 0.0], 0.4, 1.0)\naddRefinementRegion!(blob_project, center)\n\n# Generate the mesh\ngenerate_mesh(blob_project)","category":"page"},{"location":"tutorials/create_edit_curves/#Creating-and-editing-curves","page":"Creating and editing curves","title":"Creating and editing curves","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The purpose of this tutorial is to demonstrate how to inner and outer boundary curve chains. By a \"chain\" we mean a closed curve that is composed of multiple pieces. Each chain can be a combination of different curve types, e.g., a circular arc can connect to a spline. It also shows how to modify, remove, and add new pieces to an existing curve chain. The undo and redo capabilities of the interactive mesh tool are briefly discussed. The outer and inner boundary curves, background grid as well as the mesh will be visualized for quality inspection.","category":"page"},{"location":"tutorials/create_edit_curves/#Synopsis","page":"Creating and editing curves","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Create and edit an outer boundary chain.\nCreate and edit an inner boundary chain.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nDiscuss undo / redo capabilities.\nConstruct and add parametric spline curves.\nConstruct and add a curve from parametric equations.\nConstruct and add straight line segments.\nConstruct and add circular arc segments.","category":"page"},{"location":"tutorials/create_edit_curves/#Initialization","page":"Creating and editing curves","title":"Initialization","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the curves, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We create a new project with the name \"sandbox\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting HOHQMesh control file from this tutorial will be named sandbox.control. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"sandbox_project = newProject(\"sandbox\", \"out\")","category":"page"},{"location":"tutorials/create_edit_curves/#Add-the-outer-boundary-chain","page":"Creating and editing curves","title":"Add the outer boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We first create the outer boundary curve chain that is composed of three pieces","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Straight line segment from (0 -7) to (5 3).\nHalf-circle arc of radius r=5 centered at (0 3).\nStraight line segment from (-5 3) to (0 -7).","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Each segment of the curve is created separately. The straight line segments are made with the function newEndPointsLineCurve and given unique names:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"outer_line1 = newEndPointsLineCurve(\"Line1\", # curve name\n [0.0, -7.0, 0.0], # start point\n [5.0, 3.0, 0.0]) # end point\n\nouter_line2 = newEndPointsLineCurve(\"Line2\", # curve name\n [-5.0, 3.0, 0.0], # start point\n [0.0, -7.0, 0.0]) # end point","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To create the circle arc we use the function newCircularArcCurve where we specify a name for the curve as well as the radius and center of the circle. The arc can have an arbitrary length dictated by the start and end angle, e.g., for a half-circle we take the angle to vary from 0 to 180 degrees.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"outer_arc = newCircularArcCurve(\"Arc\", # curve name\n [0.0, 3.0, 0.0], # center\n 5.0, # radius\n 0.0, # start angle\n 180.0, # end angle\n \"degrees\") # units for angle","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We use \"degrees\" to set the angle bounds, but \"radians\" can also be used. The name of the curve stored in the dictionary outer_arc is assigned to be \"Arc\".","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The curve names \"Line1\", \"Line2\", and \"Arc\" are the labels that HOHQMesh will give to these boundary curve segments in the resulting mesh file.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The three curve segments stored in the variables outer_line1, outer_line2, and outer_arc are then added to the sandbox_project with a counter-clockwise orientation as required by HOHQMesh.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToOuterBoundary!(sandbox_project, outer_line1)\naddCurveToOuterBoundary!(sandbox_project, outer_arc)\naddCurveToOuterBoundary!(sandbox_project, outer_line2)","category":"page"},{"location":"tutorials/create_edit_curves/#Add-a-background-grid","page":"Creating and editing curves","title":"Add a background grid","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near sharp features of any curved boundaries.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"For a domain bounded by an outer boundary curve, this background grid is set by indicating the desired element size in the x and y directions. To start, we set the background grid for sandbox_project to have elements with side length one in each direction","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addBackgroundGrid!(sandbox_project, [1.0, 1.0, 0.0])","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We visualize the outer boundary curve chain and background grid with the following","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"plotProject!(sandbox_project, MODEL+GRID)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Here, we take the sum of the keywords MODEL and GRID in order to simultaneously visualize the outer boundary and background grid. The resulting plot is given below. The chain of outer boundary curves is called \"Outer\" and it contains three curve segments \"Line1\", \"Arc\", and \"Line2\" labeled in the figure by O.1, O.2, and O.3, respectively.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: background_grid)","category":"page"},{"location":"tutorials/create_edit_curves/#Edit-the-outer-boundary-chain","page":"Creating and editing curves","title":"Edit the outer boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Suppose that the domain boundary requires a curved segment instead of the straight line \"Line2\". We will replace this line segment in the outer boundary chain with a cubic spline.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"First, we remove the \"Line2\" curve from the \"Outer\" chain with the command","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"removeOuterBoundaryCurveWithName!(sandbox_project, \"Line2\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"tip: Outer curve removal\nAlternatively, we can remove the curve \"Line2\" using its index in the \"Outer\" boundary chain.removeOuterBoundaryCurveAtIndex!(sandbox_project, 3)This removal strategy is useful when the curves in the boundary chain do not have unique names. Be aware that when curves are removed from a chain it is possible that the indexing of the remaining curves changes.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The plot automatically updates and we see that the outer boundary is open and contains two segments: \"Line1\" and \"Arc\".","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: outer_removal)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Next, we create a parametric cubic spline curve from a given set of data points. In order to make a closed outer boundary chain the cubic spline must begin at the endpoint of the curve \"Arc\" and end at the first point of the curve \"Line1\". This ensures that the new spline curve connects into the boundary curve chain with the correct orientation. To create a parametric spline curve we directly provide data points in the code. These points take the form [t, x, y, z] where t is the parameter variable that varies between 0 and 1. The spline curve constructor newSplineCurve also takes the number of points as an input argument.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"spline_data = [ [0.0 -5.0 3.0 0.0]\n [0.25 -2.0 1.0 0.0]\n [0.5 -4.0 0.5 0.0]\n [0.75 -2.0 -3.0 0.0]\n [1.0 0.0 -7.0 0.0] ]\nouter_spline = newSplineCurve(\"Spline\", 5, spline_data)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Now we add the spline curve outer_spline into the sandbox_project.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToOuterBoundary!(sandbox_project, outer_spline)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The figure updates automatically to display the \"Outer\" boundary chain with the new \"Spline\" curve labeled O.3.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: outer_spline)","category":"page"},{"location":"tutorials/create_edit_curves/#Add-an-inner-boundary-chain","page":"Creating and editing curves","title":"Add an inner boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We create a pill shaped inner boundary curve chain composed of four pieces","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Straight line segment from (1 5) to (1 3).\nHalf-circle arc of radius r=1 centered at (0 3).\nStraight line segment from (-1 3) to (-1 5).\nHalf-circle arc of radius r=1 centered at (0 5).","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Similar to the construction of the \"Outer\" boundary chain, each segment of this inner boundary chain is created separately. The straight line segments are made with the function newEndPointsLineCurve and given unique names:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"inner_line1 = newEndPointsLineCurve(\"Line1\", # curve name\n [1.0, 5.0, 0.0], # start point\n [1.0, 3.0, 0.0]) # end point\n\ninner_line2 = newEndPointsLineCurve(\"Line2\", # curve name\n [-1.0, 3.0, 0.0], # start point\n [-1.0, 5.0, 0.0]) # end point","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To create the circle arcs we use the function newCircularArcCurve where we specify a name for the curve as well as the radius and center of the circle. In order to create an inner curve chain with counter-clockwise orientation the angle for the bottom half-circle arc centered at (0 3) varies from 0 to -180 degrees. The top half-circle arc centered at (0 5) has an angle that varies from 180 to 0 degrees. The construction of the two circle arcs are","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"inner_bottom_arc = newCircularArcCurve(\"BottomArc\", # curve name\n [0.0, 3.0, 0.0], # center\n 1.0, # radius\n 0.0, # start angle\n -pi, # end angle\n \"radians\") # units for angle\n\ninner_top_arc = newCircularArcCurve(\"TopArc\", # curve name\n [0.0, 5.0, 0.0], # center\n 1.0, # radius\n 180.0, # start angle\n 0.0, # end angle\n \"degrees\") # units for angle","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Note, we use \"radians\" to set the angle bounds for inner_bottom_arc and \"degrees\" for the angle bounds of inner_top_arc.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The curve names \"Line1\", \"Line2\", \"BottomArc\", and \"TopArc\" are the labels that HOHQMesh will give to these inner boundary curve segments in the resulting mesh file.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The four curve segments stored in the variables inner_line1, inner_line2, inner_bottom_arc and outer_arc are added to the sandbox_project in counter-clockwise order as required by HOHQMesh.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToInnerBoundary!(sandbox_project, inner_line1, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_bottom_arc, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_line2, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_top_arc, \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"This inner boundary chain name \"inner\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that curves have been added to the sandbox_project and the plot is updated, as shown below. The chain for the inner boundary curve chain is called inner and it contains a four curve segments \"Line1\", \"BottomArc\", \"Line2\", and \"TopArc\" labeled in the figure by 1.1, 1.2, 1.3, and 1.4, respectively.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_pill)","category":"page"},{"location":"tutorials/create_edit_curves/#Generate-the-mesh","page":"Creating and editing curves","title":"Generate the mesh","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We next generate the mesh from the information contained in the sandbox_project. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"sandbox.control: A HOHQMesh control file for the current project.\nsandbox.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nsandbox.mesh: A mesh file with format ISM-V2 (the default format).","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To do this we execute the command","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"generate_mesh(sandbox_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 8.7928000000000006E-002\n Number of nodes = 513\n Number of Edges = 933\n Number of Elements = 422\n Number of Subdivisions = 7\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00003020 1.17336756 0.18813064 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00984888 2.32321419 1.31488869 1.00000000 999.99900000 1.00000000\n Condition 1.00041121 2.42894151 1.21101797 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.01674110 3.74861238 1.59495734 1.00000000 4.00000000 1.00000000\n Jacobian 0.00001734 1.13821390 0.14136293 0.00000000 999.99900000 1.00000000\n Minimum Angle 32.20087774 89.35157729 68.75755243 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.60787193 152.53515465 113.36966060 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The call to generate_mesh also prints mesh quality statistics to the screen and updates the visualization. The background grid is removed from the visualization when the mesh is generated.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"note: Mesh visualization\nCurrently, only the \"skeleton\" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: initial_mesh)","category":"page"},{"location":"tutorials/create_edit_curves/#Delete-the-existing-mesh","page":"Creating and editing curves","title":"Delete the existing mesh","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"In preparation of edits we will make to the inner boundary chain we remove the current mesh from the plot and re-plot the model curves and background grid. Note, this step is not required, but it helps avoid confusion when editing several curves.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"remove_mesh!(sandbox_project)\nupdatePlot!(sandbox_project, MODEL+GRID)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Additionally, the remove_mesh! command deletes the mesh information from the sandbox_project and sandbox.mesh from the out folder. However, the sandbox.control and sandbox.tec files are still present in out directory.","category":"page"},{"location":"tutorials/create_edit_curves/#Edit-an-inner-boundary-chain","page":"Creating and editing curves","title":"Edit an inner boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Suppose that the inner boundary actually requires a curved segment instead of the straight line \"Line1\". We will replace this line segment in the inner boundary chain with an oscillating segment construct from a set of parametric equations. In doing so, it will also be necessary to remove the BottomArc and replace it with a new, wider circular arc segment.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We remove the \"Line1\" curve from the inner chain with the command","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"removeInnerBoundaryCurve!(sandbox_project, \"Line1\", \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"tip: Inner curve removal\nAlternatively, we can remove the curve \"Line1\" using its index in the inner boundary chain.removeInnerBoundaryCurveAtIndex!(sandbox_project, 1, \"inner\")This removal strategy is useful when the curves in the boundary chain do not have unique names. Be aware that when curves are removed from a chain it is possible that the indexing of the remaining curves changes.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"With either removal strategy, the plot automatically updates. We see that the inner boundary is open and contains three segments: \"BottomArc\", \"Line2\", and \"TopArc\". Note that the index of the remaining curves has changed as shown below.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_removal)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"note: Brief note about undo / redo\nThe interactive functionality (globally) carries an operation stack of actions that can be undone (or redone) as the case may be. We can query and print to the REPL the top of the undo stack with undoActionName.undoActionName()\n\"Remove Inner Boundary Curve\"We can undo the removal of the \"Line1\" curve with undoundo()\n\"Undo Remove Inner Boundary Curve\"In addition to reinstating \"Line1\" into the sandbox_project, this undo prints the action that was undone to the REPL and will update the figure.Analogously, there is a redo operation stack. We query and print to the REPL the top the redo stack with redoActionName and can use redo to perform the operation.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The new inner curve segment will be an oscillating line given by the parametric equations","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":" beginaligned\n x(t) = t + 102cm\n y(t) = -2t + 5 - frac32 cos(pi t) sin(pi t)02cm\n z(t) = 0\n endaligned\n qquad\n tin01","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Parametric equations in HOHQMesh can be any legitimate equation and use intrinsic functions available in Fortran, e.g., sin, cos, exp. The constant pi is available for use. The following commands create a new curve for the parametric equations above","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"xEqn = \"x(t) = t + 1\"\nyEqn = \"y(t) = -2 * t + 5 - 1.5 * cos(pi * t) * sin(pi * t)\"\nzEqn = \"z(t) = 0.0\"\ninner_eqn = newParametricEquationCurve(\"wiggleLine\", xEqn, yEqn, zEqn)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The name of this new curve is assigned to be \"wiggleLine\". We add this new curve to the \"inner\" chain.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToInnerBoundary!(sandbox_project, inner_eqn, \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The automatically updated figure now shows:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_open_chain)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We see from the figure that this parametric equation curve starts at the point (15) and, therefore, matches the end point of the existing curve \"TopArc\" present in the \"inner\" chain. However, the parametric equation curve ends at the point (23) which does not match the \"BottomArc\" curve. So, the inner boundary chain remains open.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"warning: Attempt to generate a mesh with an open curve chain\nAn open curve chain is invalid in HOHQMesh. All inner and/or outer curve chains must be closed. If we attempt to send a project that contains an open curve chain to generate_mesh a warning is thrown and no mesh or output files are generated.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To create a closed boundary curve we must remove the \"BottomArc\" curve and replace it with a wider half-circle arc segment. This new half-circle arc must start at the point (2 3) and end at the point (-1 3) to close the inner chain and guarantee the chain is oriented counter-clockwise. So, we first remove the \"BottomArc\" from the \"inner\" chain.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"removeInnerBoundaryCurve!(sandbox_project, \"BottomArc\", \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The figure updates to display the \"inner\" curve chain with three segments. Note that the inner curve chain indexing has, again, been automatically adjusted.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_remove_arc)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"A half-circle arc that joins the points (2 3) and (-1 3) has a radius r=15, is centered at (05 3) and has an angle that vaires from 0 to -180. We construct this circle arc and directly add it to the sandbox_project.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"new_bottom_arc = newCircularArcCurve(\"wideBottomArc\", # curve name\n [0.5, 3.0, 0.0], # center\n 1.5, # radius\n 0.0, # start angle\n -pi, # end angle\n \"radians\") # units for angle\naddCurveToInnerBoundary!(sandbox_project, new_bottom_arc, \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The updated plot now gives the modified, closed inner curve chain that now contains four curve segments \"Line2\", \"TopArc\", \"wiggleLine\", and \"wideBottomArc\" labeled in the figure by 1.1, 1.2, 1.3, and 1.4, respectively.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_modified)","category":"page"},{"location":"tutorials/create_edit_curves/#Regenerate-the-mesh","page":"Creating and editing curves","title":"Regenerate the mesh","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"With the modifications to the inner curve chain complete we can regenerate the mesh. This will create a new sandbox.mesh file and overwrite the existing sandbox.control and sandbox.tec files in the out directory.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"generate_mesh(sandbox_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.13299600000000000\n Number of nodes = 714\n Number of Edges = 1308\n Number of Elements = 596\n Number of Subdivisions = 7\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00003020 1.15662678 0.12823840 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.01082600 3.14765817 1.34292128 1.00000000 999.99900000 1.00000000\n Condition 1.00037252 2.59936116 1.22903490 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.02724726 3.74861238 1.64807401 1.00000000 4.00000000 1.00000000\n Jacobian 0.00001734 1.13150266 0.09438571 0.00000000 999.99900000 1.00000000\n Minimum Angle 31.88018513 89.33451932 67.86550651 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.43850948 157.31718198 114.36070355 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The visualization updates automatically and the background grid is removed after when the mesh is generated.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_modified)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the sharp corners and fine features of the curved inner and outer boundaries. For example, we zoom into sharp corner at the bottom of the domain and see that, although small, the elements in this region maintain a good quadrilateral shape.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: zoom_corner)","category":"page"},{"location":"tutorials/create_edit_curves/#Summary","page":"Creating and editing curves","title":"Summary","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Create and edit an outer boundary chain.\nCreate and edit an inner boundary chain.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nDiscuss undo / redo capabilities.\nConstruct and add parametric spline curves.\nConstruct and add a curve from parametric equations.\nConstruct and add straight line segments.\nConstruct and add circular arc segments.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"For completeness, we include a script with all the commands to generate the mesh displayed in the final image. Note, we do not include the plotting in this script.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"# Interactive mesh with modified outer and inner curve chains\n#\n# Create inner / outer boundary chains composed of the four\n# available HOHQMesh curve types.\n#\n# Keywords: outer boundary, inner boundary, parametric equations,\n# circle arcs, cubic spline, curve removal\nusing HOHQMesh\n\n# Instantiate the project\nsandbox_project = newProject(\"sandbox\", \"out\")\n\n# Add the background grid\naddBackgroundGrid!(sandbox_project, [1.0, 1.0, 0.0])\n\n# Create and add the original outer boundary curves\nouter_line1 = newEndPointsLineCurve(\"Line1\", [0.0, -7.0, 0.0], [5.0, 3.0, 0.0])\nouter_line2 = newEndPointsLineCurve(\"Line2\", [-5.0, 3.0, 0.0], [0.0, -7.0, 0.0])\nouter_arc = newCircularArcCurve(\"Arc\", [0.0, 3.0, 0.0], 5.0, 0.0, 180.0, \"degrees\")\n\naddCurveToOuterBoundary!(sandbox_project, outer_line1)\naddCurveToOuterBoundary!(sandbox_project, outer_arc)\naddCurveToOuterBoundary!(sandbox_project, outer_line2)\n\n# Modify the outer boundary to have a spline instead of a straight line\nremoveOuterBoundaryCurveWithName!(sandbox_project, \"Line2\")\n\nspline_data = [ [0.0 -5.0 3.0 0.0]\n [0.25 -2.0 1.0 0.0]\n [0.5 -4.0 0.5 0.0]\n [0.75 -2.0 -3.0 0.0]\n [1.0 0.0 -7.0 0.0] ]\nouter_spline = newSplineCurve(\"Spline\", 5, spline_data)\naddCurveToOuterBoundary!(sandbox_project, outer_spline)\n\n# Create and add the inner boundary curves\ninner_line1 = newEndPointsLineCurve(\"Line1\", [1.0, 5.0, 0.0], [1.0, 3.0, 0.0])\ninner_line2 = newEndPointsLineCurve(\"Line2\", [-1.0, 3.0, 0.0], [-1.0, 5.0, 0.0])\ninner_bottom_arc = newCircularArcCurve(\"BottomArc\", [0.0, 3.0, 0.0], 1.0, 0.0, -pi, \"radians\")\ninner_top_arc = newCircularArcCurve(\"TopArc\", [0.0, 5.0, 0.0], 1.0, 180.0, 0.0, \"degrees\")\n\naddCurveToInnerBoundary!(sandbox_project, inner_line1, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_bottom_arc, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_line2, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_top_arc, \"inner\")\n\n# Generate a mesh\ngenerate_mesh(sandbox_project)\n\n# Delete the existing mesh before modifying the inner boundary curve chain\nremove_mesh!(sandbox_project)\n\n# Modify the inner boundary curve with an oscillatory line and a new circle arc\nremoveInnerBoundaryCurve!(sandbox_project, \"Line1\", \"inner\")\nremoveInnerBoundaryCurve!(sandbox_project, \"BottomArc\", \"inner\")\n\nxEqn = \"x(t) = t + 1\"\nyEqn = \"y(t) = -2 * t + 5 - 1.5 * cos(pi * t) * sin(pi * t)\"\nzEqn = \"z(t) = 0.0\"\ninner_eqn = newParametricEquationCurve(\"wiggleLine\", xEqn, yEqn, zEqn)\n\nnew_bottom_arc = newCircularArcCurve(\"wideBottomArc\", [0.5, 3.0, 0.0], 1.5, 0.0, -pi, \"radians\")\n\naddCurveToInnerBoundary!(sandbox_project, inner_eqn, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, new_bottom_arc, \"inner\")\n\n# Regenerate the final mesh\ngenerate_mesh(sandbox_project)","category":"page"},{"location":"interactive_overview/#InteractiveTool","page":"Overview","title":"Overview","text":"","category":"section"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"The interactive functionality is an API to generate a quadrilateral (future: hexahedral) 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.","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"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 provides an interactive project that creates an manipulates splines for the inner boundaries before generating the mesh.","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"Below we provide a broad overview of the interactive mesh workflow. Further clarification on this workflow is provided in the Guided tour. Several Tutorials are also available to demonstrate this functionality.","category":"page"},{"location":"interactive_overview/#Workflow-and-basic-moves","page":"Overview","title":"Workflow and basic moves","text":"","category":"section"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"The order of the workflow and basic moves follow a logical pattern: The project must be created first. Curves can be added at any time. The background grid can be added any time to the project. A mesh is usually generated after the model (curves) and background grid are completed.","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"To generate a mesh interactively you","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"Create a project with a user given projectName and folder where any generated files are to be saved\np = newProject(, )\nBoth of these input arguments are strings.\nCreate inner and outer boundary curves from the available types\nc = newEndPointsLineCurve(, startLocation [x, y, z], endLocation [x, y, z]) *Straight Line*\nc = newCircularArcCurve(, center [x, y, z], radius, startAngle, endAngle, units = \"degrees\" or \"radians\") *Circular Arc*\nc = newParametricEquationCurve(, xEqn, yEqn, zEqn) *Parametric equation*\nc = newSplineCurve(, dataFile) *Spline with data from a file*\nc = newSpline(, nKnots, knotsMatrix) *Spline with given knot values*\nSee Defining curves for further details on the different curve type currently supported by HOHQMesh.\nThe generic name for each of these curve creation methods is new!. The generic can be used instead of the longer descriptive name to save typing during interactive sessions, if desired.\nAdd curves to build the model to see what you have added,\naddOuterBoundaryCurve!(p, ) *Add outer boundary curve*\naddInnerBoundaryCurve!(p, , ) *Add curve to an inner boundary*\nFor a single inner / outer boundary curve the command above directly adds the curve into the Project. If the inner / outer boundary curve is a chain of multiple curves then they must be added to the Project in an order which yields a closed curves with counter-clockwise orientation. See the Guided tour for an example of a chain of curves.\nCurves can be added by using the generic add! function instead of the longer descriptive name to save typing during interactive sessions, if desired.\nVisualize the project's model, if desired\nplotProject!(p, MODEL)\nPlots are updated in response to user interactions. However, to update the plot at any time, use\nupdatePlot!(p, options)\nOptions are MODEL, GRID, MESH, and REFINEMENTS. To plot combinations, sum the options, e.g. MODEL+GRID or MODEL+MESH. You normally are not interested in the background grid once the mesh is generated.\nnote: Visualization requirement\nThe interactive functionality uses Makie.jl to visualize the Project information. Therefore, in addition to HOHQMesh.jl a user must load a Makie backend (for example, GLMakie or CairoMakie) if visualization is desired.\nSet the background grid\nWhen no outer boundary curve is present, the background grid can be set with\naddBackgroundGrid!(p, lower left [x,y,z], spacing [dx,dy,dz], num Intervals [nX,nY,nZ])\nOr\naddBackgroundGrid!(p, [top value, left value, bottom value, right value], num Intervals [nX,nY,nZ])\nThe first method creates the rectangular boundary with extent [x0[1], x0[1] + N*dx[1]] by [x0[2], x0[2] + N*dx[2]]. The second method sets a rectangular bounding box with extent [top value, left value, bottom value, right value] and the number of elements in each direction. The first exists for historical reasons; the second is probably the easiest to use.\nWhen an outer boundary is present the background grid can be set as\naddBackgroundGrid!(p, [dx, dy, dz])\nwhere the spacing controls the number of elements in each direction.\nnote: Background grid\nA background grid is required by HOHQMesh. If one is not present in the Project and a user attempts to generate the mesh a warning is thrown.\nAdjust meshing parameters, if desired. For instance, one can adjust the polynomial order in the Project for any curved boundaries by\nsetPolynomialOrder!(p, order)\nThe background grid size can be adjusted where we can set the grid size in the x and y directions, dx and dy, can be set separately\nsetBackgroundGridSize!(p, 0.5, 0.25)\nSee Controlling the mesh generation for details on adjusting parameters already present in the Project.\nGenerate the mesh\ngenerate_mesh(p)\nThe mesh file will be saved in with the name .mesh. A HOHQMesh control file is automatically created from the contents of the Project and is also saved in that folder with the name .control. This control file can be read in again later and modified, remeshed, etc. The function generate_mesh will print the mesh information and statistics, and will plot the mesh as in the figure above, if a plot is otherwise visible. If not, it can always be plotted with the plotProject! command.","category":"page"},{"location":"interactive_overview/#Advanced","page":"Overview","title":"Advanced","text":"","category":"section"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"All objects and information contained in the variable type Project are actually dictionaries of type Dict{String, Any}. Since Julia is not an object oriented language, the parameters and other parts of these internal dictionaries can be accessed and edited directly by key and value. However, if you do that, then certain features like undo/redo and automatic plot updating will not work.","category":"page"},{"location":"testing/#Testing","page":"Testing","title":"Testing","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"During the development of HOHQMesh and its interactive functionality, we rely on continuous testing to ensure that modifications or new features do not break existing functionality or add other errors. In the main HOHQMesh repository, this is facilitated by GitHub Actions, 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. In Trixi and its related repositories, tests are triggered by","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"each git push to main and\neach git push to any pull request.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"Besides checking functionality, we also analyze the Test coverage to ensure that we do not miss important parts during testing.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"note: Test and coverage requirements\nBefore merging a pull request (PR) to main, we require thatthe code passes all functional tests\ncode coverage does not decrease.","category":"page"},{"location":"testing/#Testing-setup","page":"Testing","title":"Testing setup","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"The entry point for all testing is the file test/runtests.jl, which is run by the automated tests and which can be triggered manually by executing","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"julia> using Pkg; Pkg.test(\"HOHQMesh\")","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"in the REPL. Since there already exist many tests, we have split them up into multiple files in the test directory to allow for faster testing of individual parts of the code. Thus in addition to performing all tests, you can also just include one of the files named test_xxx.jl to run only a specific subset, e.g.,","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"julia> # Run all test for the interactive Curve API\n include(joinpath(\"test\", \"test_curve.jl\"))","category":"page"},{"location":"testing/#Adding-new-tests","page":"Testing","title":"Adding new tests","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"We use Julia's built-in unit testing capabilities to configure tests. In general, newly added code must be covered by at least one test, and all new scripts added to the examples/ directory must be used at least once during testing. New tests should be added to the corresponding test/test_xxx.jl file, e.g., a test involving visualization capabilities would go into test/test_visualization.jl. Please study one of the existing tests and stay consistent to the current style when creating new tests.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"Since we want to test as much as possible, we have a lot of tests and frequently create new ones. Therefore, new tests should be as short as reasonably possible, i.e., without being too insensitive to pick up changes or errors in the code.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"When you add new tests, please check whether all CI jobs still take approximately the same time. If the job where you added new tests takes much longer than everything else, please consider moving some tests from one job to another (or report this incident and ask the main developers for help).","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"note: Test duration\nAs a general rule, tests should last no more than 10 seconds when run with a single thread and after compilation (i.e., excluding the first run).","category":"page"},{"location":"testing/#Test-coverage","page":"Testing","title":"Test coverage","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"In addition to ensuring that the code produces the expected results, the automated tests also record the code coverage. The resulting coverage reports, i.e., which lines of code were executed by at least one test and are thus considered \"covered\" by testing, are automatically uploaded to Coveralls for easy analysis. Typically, you see a number of Coveralls results at the bottom of each pull request: One for each parallel job (see Testing setup), which can usually be ignored since they only cover parts of the code by definition, and a cumulative coverage result named coverage/coveralls. The \"Details\" link takes you to a detailed report on which lines of code are covered by tests, which ones are missed, and especially which new lines the pull requests adds to HOHQMesh's code base that are not yet covered by testing.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"note: Coverage requirements\nIn general, we require pull requests to not decrease the overall test coverage percentage in main, with a hard lower bound of 97%.","category":"page"},{"location":"authors/#Authors","page":"Authors","title":"Authors","text":"","category":"section"},{"location":"authors/","page":"Authors","title":"Authors","text":"HOHQMesh.jl is maintained by the Trixi authors. Its development is coordinated by the principal developers who are its main contributors and can be contacted in case of questions about HOHQMesh. In addition, there are contributors who have provided substantial additions or modifications. The HOHQMesh mesh generator itself is developed by David A. Kopriva.","category":"page"},{"location":"authors/#Principal-Developers","page":"Authors","title":"Principal Developers","text":"","category":"section"},{"location":"authors/","page":"Authors","title":"Authors","text":"David A. Kopriva, Florida State University, USA\nAndrew Winters, Linköping University, Sweden","category":"page"},{"location":"authors/#Contributors","page":"Authors","title":"Contributors","text":"","category":"section"},{"location":"authors/","page":"Authors","title":"Authors","text":"The following people contributed major additions or modifications to HOHQMesh and are listed in alphabetical order:","category":"page"},{"location":"authors/","page":"Authors","title":"Authors","text":"David Kopriva\nHendrik Ranocha\nMichael Schlottke-Lakemper\nAndrew Winters","category":"page"},{"location":"reference/#HOHQMesh.jl-API","page":"Reference","title":"HOHQMesh.jl API","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"CurrentModule = HOHQMesh","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"Modules = [HOHQMesh]","category":"page"},{"location":"reference/#HOHQMesh.add!-Tuple{HOHQMesh.Project, Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.add!","text":"add!(proj::Project, crv::Dict{String,Any}, boundaryName::String)\n\nAdd a curve to the inner boundary named boundaryName.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.add!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.add!","text":"add!(proj::Project, obj::Dict{String,Any})\n\nAdd a curve to the outer boundary or a refinement reion to the project\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Array{Float64, N} where N, Array{Float64, N} where N, Array{Int64, N} where N}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid!(proj::Project, x0::Array{Float64}, dx::Array{Float64}, N::Array{Int})\n\nAdd the background grid block using the left corner, x0, the grid size dx, and the number of intervals in each direction. Use this when there is no outer boundary defined in the model. This version mimics HOHQMesh's backgroundGrid block, but the version\n\naddBackgroundGrid!(proj::Project, box::Array{Float64}, N::Array{Int} )\n\nis a lot easier to use.\n\nTODO: Change HOHQMesh and delete this way to specify the domain and use the bounding box one instead.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Array{Float64, N} where N, Array{Int64, N} where N}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid!(proj::Project, box::Array{Float64}, N::Array{Int} )\n\nAdd the background grid block with bounding box = [TOP, LEFT, BOTTOM, RIGHT] and the number of intervals in each diredction. Use this when there is no outer boundary defined in the model.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid(proj::Project, bgSize::Array{Float64})\n\nAdd the background grid block with the grid size to be a 3-vector. Use this when there is an outer boundary defined in the model.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid!(proj::Project, dict::Dict{String,Any})\n\nUsed only for undo/redo.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addCurveToInnerBoundary!-Tuple{HOHQMesh.Project, Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.addCurveToInnerBoundary!","text":"addCurveToInnerBoundary!(proj::Project, crv::Dict{String,Any}, boundaryName::String)\n\nAdd a curve to the inner boundary with name boundaryName. If an inner boundary of that name does not exist, one is created.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addCurveToOuterBoundary!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addCurveToOuterBoundary!","text":"addCurveToOuterBoundary!(proj::Project, crv::Dict{String,Any})\n\nAdd a curve to the outer boundary. The curves must be added in order counter-clockwise\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addInnerBoundaryWithName!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.addInnerBoundaryWithName!","text":"addInnerBoundaryWithName!(proj::Project,name::String)\n\nCreate a new empty inner boundary with the given name.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addObserver-Tuple{Any, String, Any}","page":"Reference","title":"HOHQMesh.addObserver","text":"addObserver(observer::Any, note::String, f::Any)\n\nf is the function to be executed (called) when a notification of name note is given.\n\nThe function called upon notification must have the signature f(observer, sender, args...)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addOuterBoundary!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addOuterBoundary!","text":"addOuterBoundary!(proj::Project, outerBoundary::Dict{String,Any})\n\nAdd an empty outer boundary to the project. There can be only one. This function is only used as part of an undo operation removing the outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addRefinementRegion!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addRefinementRegion!","text":"addRefinementRegion!(proj::Project,r::Dict{String,Any})\n\nAdd the refinement region to the project\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addRefinementRegionPoints!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addRefinementRegionPoints!","text":"addRefinementRegionPoints!(proj::Project, r::Dict{String,Any})\n\nCompute and add to the project the plotting points for the refinement region\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addRunParameters!","page":"Reference","title":"HOHQMesh.addRunParameters!","text":"addRunParameters!(proj::Project,\n plotFormat::String = \"skeleton\",\n meshFileFormat::String = \"ISM-V2\",\n polynomialOrder::Int = 5)\n\nAdd a RUN_PARAMETERS block and set all the parameters in one call.\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.addSpringSmoother!","page":"Reference","title":"HOHQMesh.addSpringSmoother!","text":"addSpringSmoother!(status::String, type::String, nIterations::Int)\n\nStatus is either ON or OFF Type is either LinearSpring or LinearAndCrossbarSpring\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.bboxUnion-Tuple{Array{Float64, N} where N, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.bboxUnion","text":"bboxUnion(box1::Array{Float64}, box2::Array{Float64})\n\nReturns the union of two bounding boxes\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.curveBounds-Tuple{Matrix{Float64}}","page":"Reference","title":"HOHQMesh.curveBounds","text":"curveBounds(crvPoints::Array{Float64,2})\n\nFind the bounds of a single curve, discretized as an array\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.emptyBounds-Tuple{}","page":"Reference","title":"HOHQMesh.emptyBounds","text":"emptyBounds()\n\nReturns an array that will always be ignored when unioned with another bounding box.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.examples_dir-Tuple{}","page":"Reference","title":"HOHQMesh.examples_dir","text":"examples_dir()\n\nReturn the path to the directory with some example mesh setups.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.extract_mesh_file_format-Tuple{Any}","page":"Reference","title":"HOHQMesh.extract_mesh_file_format","text":"extract_mesh_file_format(control_file)\n\nReturn a string with the desired output format of the HOHQMesh generated mesh file. This information is given within the RUN_PARAMETERS of the CONTROL_INPUT block of the control file. See the HOHQMesh documentation for details.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.generate_mesh-Tuple{Any}","page":"Reference","title":"HOHQMesh.generate_mesh","text":"generate_mesh(control_file;\n output_directory=\"out\",\n mesh_filename=nothing, plot_filename=nothing, stats_filename=nothing,\n verbose=false)\n\nGenerate a mesh based on the control_file with the HOHQMesh mesh generator and store resulting files in output_directory.\n\nYou can set the mesh filename, the plot filename, and the statistics filename using the keyword arguments mesh_filename, plot_filename, and stats_filename, respectively. If set to nothing, the filenames for the mesh file, plot file, and statistics file are generated automatically from the control file name. For example, path/to/ControlFile.control will result in output files ControlFile.mesh, ControlFile.tec, and ControlFile.txt.\n\nYou can activate verbose output from HOHQMesh that prints additional messages and debugging mesh information with the keyword argument verbose.\n\nThis function returns the output to stdout of the HOHQMesh binary when generating the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.generate_mesh-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.generate_mesh","text":"generate_mesh(proj::Project)\n\nGenerate a mesh from the information stored in a Project created using the interactive mesh functionality. First a check is made if a background grid exists and all inner/outer boundary curves are valid.\n\nThis function will then make a HOHQMesh control file from the control dictionary proj.controlDict and use it to call the wrapper function that interfaces with HOHQMesh. The resulting mesh and control files will be saved to proj.projectDirectory. Also, if there is an active plot of the mesh project it will update to display the generated mesh.\n\nThis function returns the output to stdout of the HOHQMesh binary when generating the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getAllRefinementRegions-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getAllRefinementRegions","text":"getAllRefinementRegions(proj::Project)\n\nGet the list of refinement regions.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcCenter-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcCenter","text":"getArcCenter(crv::Dict{String,Any}, point::Array{Float64})\n\nGet the center of a circular arc as an array\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcEndAngle-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcEndAngle","text":"getArcEndAngle(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcRadius-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcRadius","text":"getArcRadius(arc::Dict{String,Any}, radius::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcStartAngle-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcStartAngle","text":"getArcStartAngle(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcUnits-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcUnits","text":"getArcUnits(crv::Dict{String,Any}, units::String)\n\nGet the units for the start and end angles of a circular arc curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getBackgroundGridLowerLeft-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getBackgroundGridLowerLeft","text":"getBackgroundGridLowerLeft(proj::Project)\n\nReturns the [x,y] of the lower left point of the background grid.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getBackgroundGridSize-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getBackgroundGridSize","text":"getBackgroundGridSize(proj::Project)\n\nReturns the background grid size array.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getBackgroundGridSteps-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getBackgroundGridSteps","text":"getBackgroundGridSteps(proj::Project)\n\nReturns the [Nx,Ny,Nz] for the background grid.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurve-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.getCurve","text":"getCurve(proj::Project, curveName::String, boundaryName::String)\n\nGet the curve named curveName from the inner boundary named boundaryName\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurve-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getCurve","text":"getCurve(proj::Project, curveName::String)\n\nGet the curve with name curveName from the outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurveName-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getCurveName","text":"getCurveName(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurveType-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getCurveType","text":"getCurveType(crv::Dic{String,Any})\n\nGet the type of the curve, `END_POINTSLINE_CURVE`, `PARAMETRIC_EQUATION_CURVE`,\n`SPLINE_CURVE`, or `CIRCULAR_ARC` as a string.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getEndPoint-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getEndPoint","text":"getEndPoint(crv::Dict{String,Any}, point::Array{Float64})\n\nGet the end point for a line curve as an array.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getInnerBoundary-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getInnerBoundary","text":"getInnerBoundary(proj::Project, name::String)\n\nGet the chain of curves from the inner boundary with name name.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getInnerBoundaryChainWithName-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getInnerBoundaryChainWithName","text":"getInnerBoundaryWithName(proj::Project, name::String)\n\nGet the inner boundary CHAIN with the given name. If one does not exist, it is created.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getInnerBoundaryCurve-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.getInnerBoundaryCurve","text":"\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getMeshFileFormat-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getMeshFileFormat","text":"getMeshFileFormat(proj::Project)\n\nReturns the format in which the mesh will be written.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getName-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getName","text":"getName(proj::Project)\n\nReturns the filename to be used by the mesh, plot, control, and stats files.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getOuterBoundaryChainList-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getOuterBoundaryChainList","text":"getOuterBoundaryChainList(proj::Project)\n\nGet the array of outer boundary curves.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getOuterBoundaryCurveWithName-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getOuterBoundaryCurveWithName","text":"getOuterBoundaryCurveWithName(proj::Project, name::String)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getPlotFileFormat-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getPlotFileFormat","text":"getPlotFileFormat(proj::Project)\n\nReturns the plot file format.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getPolynomialOrder-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getPolynomialOrder","text":"getPolynomialOrder(proj::Project)\n\nReturns the polynomial order for boundary curves in the mesh file.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementEnd-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementEnd","text":"getRefinementEnd(r::Dict{String,Any})\n\nReturn Array{Float64} of the end location of the refinement line\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementGridSize-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementGridSize","text":"getRefinementGridSize(r::Dict{String,Any})\n\nReturns the grid size,h, as Float64. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementLocation-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementLocation","text":"getRefinementLocation(r::Dict{String,Any})\n\nReturn Array{Float64} of the location of the refinement center.r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementName-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementName","text":"getRefinementName(r::Dict{String,Any})\n\nReturn name of the refinement. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementRegion-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.getRefinementRegion","text":"getRefinementRegion(proj::Project, indx)\n\nGet the refinement region with index, indx from the project. Returns nothing if there is none. The return value is a dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementRegion-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getRefinementRegion","text":"(i,r) = getRefinementRegion(project, name)\n\nGet the refinement region with the given name and its location in the list of refinement regions.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementRegionCenter-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementRegionCenter","text":"getRefinementRegionCenter(r::Dict{String,Any})\n\nGet, or compute, the center of the given refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementStart-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementStart","text":"getRefinementStart (r::Dict{String,Any})\n\nReturn Array{Float64} of the start location of the refinement line. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementType-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementType","text":"getRefinementType(r::Dict{String,Any})\n\nReturn the type of refinement, either \"smooth\" or \"sharp\". r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementWidth-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementWidth","text":"getRefinementWidth(r::Dict{String,Any})\n\nReturns the region width,w, as Float64. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSmoothingIterations-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getSmoothingIterations","text":"getSmoothingIterations(proj::Project)\n\nGet the number of iterations to smooth the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSmoothingStatus-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getSmoothingStatus","text":"smoothingStatus(proj::Project)\n\nReturns whether the smoother will be \"ON\" or \"OFF\"\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSmoothingType-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getSmoothingType","text":"getSmoothingType(proj::Project)\n\nReturns either \"LinearSpring\" or \"LinearAndCrossbarSpring\"\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSplineNKnots-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getSplineNKnots","text":"getSplineNKnots(spline::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSplinePoints-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getSplinePoints","text":"getSplinePoints(spline::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getStartPoint-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getStartPoint","text":"getStartPoint(crv::Dict{String,Any}, point::Array{Float64})\n\nGet the start point for a line curve as an array\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getXEqn-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getXEqn","text":"getXEqn(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getYEqn-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getYEqn","text":"getYEqn(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getZEqn-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getZEqn","text":"getZEqn(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.hasBackgroundGrid-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.hasBackgroundGrid","text":"hasBackgroundGrid(proj::Project)\n\nTests to see if the project has a backgroundGrid dictionary defined.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.innerBoundaryIndices-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.innerBoundaryIndices","text":"innerBoundaryIndices(proj::Project, curveName::String)\n\nReturns (curveIndex,chainIndex) for the location of the curve named curveName in it's inner boundary chain.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertInnerBoundaryAtIndex!-Tuple{HOHQMesh.Project, String, Int64, Dict{String, Any}, Vector{Any}, Vector{String}}","page":"Reference","title":"HOHQMesh.insertInnerBoundaryAtIndex!","text":"insertInnerBoundaryAtIndex!(proj::Project, chainName::String, indx::Int, chain::??)\n\nInsert an entire inner boundary. Primarily meant for undo operation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertInnerBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Dict{String, Any}, Int64, String}","page":"Reference","title":"HOHQMesh.insertInnerBoundaryCurveAtIndex!","text":"insertInnerBoundaryCurveAtIndex!(proj::Project, crv::Dict{String,Any},\n indx::Int, boundaryName::String)\n\nInsert a curve crv into an inner boundary chain boundaryName at the specified index indx.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertOuterBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Dict{String, Any}, Int64}","page":"Reference","title":"HOHQMesh.insertOuterBoundaryCurveAtIndex!","text":"insertOuterBoundaryCurveAtIndex!(proj::Project, crv::Dict{String,Any}, indx::Int)\n\nInsert a curve into the outer boundary chain at the specified index.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertRefinementRegion!-Tuple{HOHQMesh.Project, Dict{String, Any}, Int64}","page":"Reference","title":"HOHQMesh.insertRefinementRegion!","text":"insertRefinementRegion!(proj::Project, r::Dict{String,Any}, indx::Int)\n\nUsed by undo()\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.modelChainIsOK-Tuple{Vector{Dict{String, Any}}, String}","page":"Reference","title":"HOHQMesh.modelChainIsOK","text":"modelChainIsOK(chain::Vector{Dict{String, Any}}, chainName::String)\n\nReturns true if the chain of curves is contiguous and closed; false otherwise.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.modelCurvesAreOK-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.modelCurvesAreOK","text":"modelCurvesAreOK(proj::Project)\n\nGo through all curves in the model and make sure they are connected and closed. Also, remove any empty outer / inner boundary chains.\n\nReturns true if all curves are connected and closed, false otherwise.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.new","page":"Reference","title":"HOHQMesh.new","text":"new(name::String,\n center::Array{Float64},\n radius::Float64,\n startAngle::Float64,\n endAngle::Float64,\n units::String)\n\nCreate a new circular arc.\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.new-2","page":"Reference","title":"HOHQMesh.new","text":"new(name::String,\n xEqn::String,\n yEqn::String,\n zEqn::String = \"z(t) = 0.0\" )\n\nCreate a new parametric equation curve.\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.new-Tuple{String, Array{Float64, N} where N, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.new","text":"new(name::String,\n xStart::Array{Float64},\n xEnd::Array{Float64})\n\nCreate a new line defined by its end points.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.new-Tuple{String, Int64, Matrix{Float64}}","page":"Reference","title":"HOHQMesh.new","text":"new(name::String, nKnots::Int, data::Matrix{Float64})\n\nCreate a spline curve from an array of knots\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.new-Tuple{String, String}","page":"Reference","title":"HOHQMesh.new","text":"new(name::String, dataFile::String)\n\nCreate a spline curve from the contents of a data file.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newCircularArcCurve","page":"Reference","title":"HOHQMesh.newCircularArcCurve","text":"newCircularArcCurve(name::String, center::Array{Float64},\n startAngle::Float64, endAngle::Float64,\n units::String)\n\nCreates and returns a new circular arc curve in the form of a Dictionary\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.newEndPointsLineCurve-Tuple{String, Array{Float64, N} where N, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.newEndPointsLineCurve","text":"newEndPointsLineCurve(name::String, xStart::Array{Float64},xEnd::Array[Float64])\n\nCreates and returns a new curve defined by its end points in the form of a Dictionary\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newParametricEquationCurve","page":"Reference","title":"HOHQMesh.newParametricEquationCurve","text":"newParametricEquationCurve(name::String,\n xEqn::String,\n yEqn::String,\n zEqn::String = \"z(t) = 0.0\" )\n\nCreates and returns a new parametricEquationCurve in the form of a Dictionary\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.newProject-Tuple{String, String}","page":"Reference","title":"HOHQMesh.newProject","text":"newProject(name::String, folder::String)\n\nCreate a new project with the given name. That name will be used for the mesh and plot files in the specified folder.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newRefinementCenter-Tuple{String, String, Array{Float64, N} where N, Float64, Float64}","page":"Reference","title":"HOHQMesh.newRefinementCenter","text":"newRefinementCenter(name, type,\n center, meshSize,\n width)\n\nCreate refinement center of type \"smooth\" or \"sharp\" centered at center = [x,y,z] with a mesh size meshSize spread over a radius width.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newRefinementLine-Tuple{String, String, Array{Float64, N} where N, Array{Float64, N} where N, Float64, Float64}","page":"Reference","title":"HOHQMesh.newRefinementLine","text":"newRefinementLine(name, type,\n start, end,\n meshSize,\n width)\n\nCreate refinement line of type \"smooth\" or \"sharp\" between start = [x,y,z] and end = [x,y,z] with a mesh size meshSize spread over a width width.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newSplineCurve-Tuple{String, Int64, Matrix{Float64}}","page":"Reference","title":"HOHQMesh.newSplineCurve","text":"newSplineCurve(name::String, nKnots::Int, data::Array{Float64,4})\n\nReturns a spline curve given the number of knots and the array of knots.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newSplineCurve-Tuple{String, String}","page":"Reference","title":"HOHQMesh.newSplineCurve","text":"newSplineCurve(name::String, dataFile::String)\n\nReturns a spline curve given a data file that contains the number of knots on the first line, and the spline data following that.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.openProject-Tuple{String, String}","page":"Reference","title":"HOHQMesh.openProject","text":"openProject(fileName::String, folder::String)\n\nOpen existing project described in the control File.\n\nfolder = folder the control file is in\nfileName = the name of the file\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.postNotificationWithName-Tuple{Any, String, Tuple}","page":"Reference","title":"HOHQMesh.postNotificationWithName","text":"postNotificationWithName(sender::Any, name::String, userInfo::Tuple)\n\nExecutes the function associated with the observer for the notification note\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.refinementRegionPoints-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.refinementRegionPoints","text":"refinementRegionPoints(r::Dict{String,Any})\n\nReturns Array{Float64,2} being the plotting points of a refinement region\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.remove!-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.remove!","text":"remove!(proj::Project, curveName::String, innerBoundaryName::String)\n\nDelete the curve named curveName from the inner boundary named innerBoundaryName\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.remove!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.remove!","text":"remove!(proj::Project, curveName::String)\n\nDelete the curve named curveName from the outer boundary\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeBackgroundGrid!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeBackgroundGrid!","text":"removeBackgroundGrid!(proj::Project)\n\nRemove the background grid block from the project.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeInnerBoundary!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.removeInnerBoundary!","text":"removeInnerBoundary!(proj::Project, chainName::String)\n\nRemove an entire inner boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeInnerBoundaryCurve!-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.removeInnerBoundaryCurve!","text":"removeInnerBoundaryCurve!(proj::Project, name::String, chainName::String)\n\nRemove the curve with name from an inner boundary chain with chainName.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeInnerBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Int64, String}","page":"Reference","title":"HOHQMesh.removeInnerBoundaryCurveAtIndex!","text":"removeInnerBoundaryCurveAtIndex!(proj::Project, indx::Int, chainName::String)\n\nRemove the curve at index indx from an inner boundary chain with chainName.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeOuterBoundary!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeOuterBoundary!","text":"removeOuterBoundary!(proj::Project)\n\nRemove the outer boundary curve if it exists.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeOuterBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.removeOuterBoundaryCurveAtIndex!","text":"removeOuterBoundaryCurveAtIndex!(proj::Project, indx::Int)\n\nRemove a curve from the outer boundary chain at the specified index.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeOuterBoundaryCurveWithName!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.removeOuterBoundaryCurveWithName!","text":"removeOuterBoundaryCurveWithName!(proj::Project, name::String)\n\nRemove the named curve in the outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeRefinementRegion!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.removeRefinementRegion!","text":"removeRefinementRegion!(proj::Project, name::String)\n\nDelete the named refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeRunParameters!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeRunParameters!","text":"removeRunParameters!(proj::Project)\n\nRemove the run parameters block from the project. This is not undo-able.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeSpringSmoother!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeSpringSmoother!","text":"removeSpringSmoother!(proj::Project)\n\nRemove the background grid block from the project.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.remove_mesh!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.remove_mesh!","text":"remove_mesh!(proj::Project)\n\nRemove the mesh file from proj.projectDirectory and delete the mesh from the plot\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.saveProject-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.saveProject","text":"saveProject(proj::Project)\n\nproj = Project to be saved\n\nSave a project dictionary to the file path specified when the project was created.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcCenter!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setArcCenter!","text":"setArcCenter!(crv::Dict{String,Any}, point::Array{Float64})\n\nSet the center of a circular arc.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcEndAngle!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setArcEndAngle!","text":"setArcEndAngle!(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcRadius!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setArcRadius!","text":"setArcRadius!(arc::Dict{String,Any}, radius::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcStartAngle!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setArcStartAngle!","text":"setArcStartAngle!(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcUnits!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setArcUnits!","text":"setArcUnits(crv::Dict{String,Any}, units::String)\n\nSet the units for the start and end angles of a circular arc curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridLowerLeft!-Tuple{HOHQMesh.Project, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setBackgroundGridLowerLeft!","text":"setBackgroundGridLowerLeft!(proj::Project, x0::Array{Float64})\n\nSet the lower left location of the background grid for problems that have no outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridSize!","page":"Reference","title":"HOHQMesh.setBackgroundGridSize!","text":"setBackgroundGridSpacing!(proj::Project, dx::Float64, dy::Float64, dz::Float64 = 0.0)\n\nUser facing function\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.setBackgroundGridSize!-Tuple{HOHQMesh.Project, Array{Float64, N} where N, String}","page":"Reference","title":"HOHQMesh.setBackgroundGridSize!","text":"setBackgroundGridSize!(proj::Project, dx::Array{Float64}, key::String)\n\nSet the grid size dx of an existing background grid within proj. Here, dx is passed an array.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridSize!-Tuple{HOHQMesh.Project, Float64, Float64, String}","page":"Reference","title":"HOHQMesh.setBackgroundGridSize!","text":"setBackgroundGridSize!(proj::Project, dx::Float64, dy::Float64, key::String)\n\nSet the grid size dx of an existing background grid within proj. Here, the new grid size in either direction is passed individually with dxand dy.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridSteps!-Tuple{HOHQMesh.Project, Array{Int64, N} where N}","page":"Reference","title":"HOHQMesh.setBackgroundGridSteps!","text":"setBackgroundGridSteps!(proj::Project, N::Array{Int})\n\nSet how many steps of size setBackgroundGridSpacing in each direction the background grid extends from the lower left.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setCurveName!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setCurveName!","text":"setCurveName!(curveDict, name)\n\nSet the name of the curve represented by curveDict.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setEndPoint!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setEndPoint!","text":"setEndPoint!(crv::Dict{String,Any}, point::Array{Float64})\n\nSet the end point for a line curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setMeshFileFormat!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setMeshFileFormat!","text":"setMeshFileFormat(proj::Project, meshFileFormat::String)\n\nSet the file format for the mesh file. Acceptable choices are \"ISM\", \"ISM-V2\", or \"ABAQUS\".\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setName!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setName!","text":"setName(proj::Project,name::String)\n\nThe name of the project is the filename to be used by the mesh, plot, and stats files. It is also the name of the control file the tool will produce.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setPlotFileFormat!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setPlotFileFormat!","text":"setPlotFileFormat(proj::Project, plotFileFormat::String)\n\nSet the file format for the plot file. Acceptable choices are \"sem\", which includes interior nodes and boundary nodes and \"skeleton\", which includes only the corner nodes.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setPolynomialOrder!-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.setPolynomialOrder!","text":"setPolynomialOrder(proj::Project, p::Int)\n\nSet the polynomial order for boundary curves in the mesh file to p.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementEnd!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setRefinementEnd!","text":"setRefinementEnd!(refinementRegion, location)\n\nSet the end point location of a refinement line, location = [x, y, z].\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementGridSize!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setRefinementGridSize!","text":"setRefinementGridSize!(r::Dict{String,Any}, h)\n\nSet the grid size, h for the refinement region. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementLocation!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setRefinementLocation!","text":"setRefinementLocation!(refinementCenter, location)\n\nSet the location of a refinement center to location = [x,y,z].\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementName!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setRefinementName!","text":"setRefinementName!(r::Dict{String,Any}, type)\n\nSet a name for the refinement region.r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementStart!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setRefinementStart!","text":"setRefinementStart!(refinementRegion, location)\n\nSet the start point location of a refinement line, location = [x, y, z].\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementType!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setRefinementType!","text":"setRefinementType!(refinementRegion, type)\n\nSet the type, either \"smooth\" or \"sharp\" for the given refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementWidth!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setRefinementWidth!","text":"setRefinementWidth!(r::Dict{String,Any}, width)\n\nSet the width of the refinement region. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSmoothingIterations!-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.setSmoothingIterations!","text":"setSmoothingIterations!(proj::Project, iterations::Int)\n\nSet the number of iterations to smooth the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSmoothingStatus!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setSmoothingStatus!","text":"setSmoothingStatus(proj:Project, status::String)\n\nStatus is either \"ON\" or \"OFF\"\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSmoothingType!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setSmoothingType!","text":"setSmoothingType!(proj:Project, status::String)\n\nType is either LinearSpring or LinearAndCrossbarSpring\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSplineNKnots!-Tuple{Dict{String, Any}, Int64}","page":"Reference","title":"HOHQMesh.setSplineNKnots!","text":"setSplineNKnots!(spline::Dict{String,Any}, nKnots::Int)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSplinePoints!-Tuple{Dict{String, Any}, Matrix{Float64}}","page":"Reference","title":"HOHQMesh.setSplinePoints!","text":"setSplinePoints!(spline::Dict{String,Any},points::Array{Float64,4})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setStartPoint!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setStartPoint!","text":"setStartPoint!(crv::Dict{String,Any}, point::Array{Float64})\n\nSet the start point for a line curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setXEqn!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setXEqn!","text":"setXEqn!(parametricEquationCurve, eqn)\n\nFor a parametric equation, set the x-equation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setYEqn!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setYEqn!","text":"setYEqn!(parametricEquationCurve, eqn)\n\nFor a parametric equation, set the y-equation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setZEqn!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setZEqn!","text":"setZEqn!(parametricEquationCurve, eqn)\n\nFor a parametric equation, set the zEqn-equation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.unRegisterForNotification-Tuple{Any, String}","page":"Reference","title":"HOHQMesh.unRegisterForNotification","text":"unRegisterForNotification(observer::Any, note::String)\n\nRemove the observer from being notified by the notification note\n\n\n\n\n\n","category":"method"},{"location":"tutorials/spline_curves/#Spline-curves","page":"Spline curves","title":"Spline curves","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The purpose of this tutorial is to demonstrate how to create an unstructured mesh on a domain with a curved outer boundary and three inner boundaries. Two of the inner curves are built from cubic splines. The third inner curve is a triangular shape built from a chain of three straight line \"curves\". The outer boundary, inner boundaries, background grid and mesh will be visualized for quality inspection.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"It provides details and clarification for the script interactive_spline_curves.jl from the examples folder.","category":"page"},{"location":"tutorials/spline_curves/#Synopsis","page":"Spline curves","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Create a circular outer boundary curve.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nConstruct and add parametric spline curves.\nConstruct and add an inner boundary chain of straight line segments.","category":"page"},{"location":"tutorials/spline_curves/#Initialization","page":"Spline curves","title":"Initialization","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the curves, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We create a new project with the name \"spline_curves\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting HOHQMesh control file from this tutorial will be named spline_curves.control. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline_project = newProject(\"spline_curves\", \"out\")","category":"page"},{"location":"tutorials/spline_curves/#Add-the-outer-boundary","page":"Spline curves","title":"Add the outer boundary","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The outer boundary curve for this tutorial is a circle of radius r=4 centered at the point (0 -1). We define this circular curve with the function newCircularArcCurve as follows","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"circ = newCircularArcCurve(\"outerCircle\", # curve name\n [0.0, -1.0, 0.0], # circle center\n 4.0, # circle radius\n 0.0, # start angle\n 360.0, # end angle\n \"degrees\") # angle units","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We use \"degrees\" to set the angle bounds, but \"radians\" can also be used. The name of the curve stored in the dictionary circ is assigned to be \"outerCircle\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The new circ curve is then added to the spline_project as an outer boundary curve with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToOuterBoundary!(spline_project, circ)","category":"page"},{"location":"tutorials/spline_curves/#Add-a-background-grid","page":"Spline curves","title":"Add a background grid","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near sharp features of any curved boundaries.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"For a domain bounded by an outer boundary curve, this background grid is set by indicating the desired element size in the x and y directions. To start, we set the background grid for spline_project to have elements with side length 06 in each direction","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addBackgroundGrid!(spline_project, [0.6, 0.6, 0.0])","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We next visualize the outer boundary curve and background grid with the following","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"plotProject!(spline_project, MODEL+GRID)","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Here, we take the sum of the keywords MODEL and GRID in order to simultaneously visualize the outer boundary and background grid. The resulting plot is given below. The chain of outer boundary curves is called \"Outer\" and it contains a single curve \"outerCircle\" labeled in the figure by O.1.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: background_grid)","category":"page"},{"location":"tutorials/spline_curves/#Add-the-inner-boundaries","page":"Spline curves","title":"Add the inner boundaries","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The domain of this tutorial will contain three inner boundary curves:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Cubic spline curve created from data points read in from a file.\nCubic spline curve created from points directly given in the code.\nTriangular shape built from three straight line \"curves\".","category":"page"},{"location":"tutorials/spline_curves/#Cubic-spline-with-data-from-a-file","page":"Spline curves","title":"Cubic spline with data from a file","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"A parametric cubic spline curve can be constructed from a file of data points. The first line of this plain text file must indicate the number of nodes. Then line-by-line the file contains the knots t_j, x_j, y_j, z_j where j indexes the number of nodes. If the spline curve is to be closed. The last data point must be the same as the first. For examples, see the HOHQMesh documentation or open the file test_spline_curve_data.txt in the examples folder","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We create a parametric spline curve from a file with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline1 = newSplineCurve(\"big_spline\", joinpath(@__DIR__, \"examples\", \"test_spline_curve_data.txt\"))","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The name of the curve stored in the dictionary spline1 is assigned to be \"big_spline\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The new spline1 curve is then added to the spline_project as an inner boundary curve with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToInnerBoundary!(spline_project, spline1, \"inner1\")","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"This inner boundary chain name \"inner1\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that a curve has been added to the project and the plot is updated appropriately, as shown below. The chain for the inner boundary curve is called inner1 and it contains a single curve \"big_spline\" labeled in the figure by 1.1.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: one_curve)","category":"page"},{"location":"tutorials/spline_curves/#Cubic-spline-from-data-in-Julia","page":"Spline curves","title":"Cubic spline from data in Julia","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Alternatively, a parametric cubic spline curve can be constructed directly from data points provided in the code. These points take the form [t, x, y, z] where t is the parameter variable that varies between 0 and 1. For the spline construction, the number of points is included as an input argument as well as the actual parametric point data. Again, if the spline curve is to be closed, the first and last data point must match.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Below, we construct another parametric spline using this strategy that consists of five data points","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline_data = [ [0.0 1.75 -1.0 0.0]\n [0.25 2.1 -0.5 0.0]\n [0.5 2.7 -1.0 0.0]\n [0.75 0.6 -2.0 0.0]\n [1.0 1.75 -1.0 0.0] ]\n\nspline2 = newSplineCurve(\"small_spline\", 5, spline_data)","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The name of the curve stored in the dictionary spline2 is assigned to be \"small_spline\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The new spline2 curve is then added to the spline_project as an inner boundary curve with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToInnerBoundary!(spline_project, spline2, \"inner2\")","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"This inner boundary chain name \"inner2\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that a curve has been added to the project and the plot is updated appropriately, as shown below. The chain for the inner boundary curve is called inner2 and it contains a single curve \"small_spline\" labeled in the figure by 2.1.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: two_curves)","category":"page"},{"location":"tutorials/spline_curves/#Triangular-shape","page":"Spline curves","title":"Triangular shape","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Finally, we build a triangular shaped inner boundary curve built from a chain of three straight lines. Each line segment is defined using the function newEndPointsLineCurve. We construct the three line segments that define the edges of a triangular shape with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"edge1 = newEndPointsLineCurve(\"triangle\", # curve name\n [-2.3, -1.0, 0.0], # start point\n [-1.7, -1.0, 0.0]) # end point\n\nedge2 = newEndPointsLineCurve(\"triangle\", # curve name\n [-1.7, -1.0, 0.0], # start point\n [-2.0, -0.4, 0.0]) # end point\n\nedge3 = newEndPointsLineCurve(\"triangle\", # curve name\n [-2.0, -0.4, 0.0], # start point\n [-2.3, -1.0, 0.0]) # end point","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Here, each edge of the curve is given the same name \"triangle\" as this curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The three line segments edge1, edge2, and edge3 are connected in a counter-clockwise orientation as required by HOHQMesh.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToInnerBoundary!(spline_project, edge1, \"inner3\")\naddCurveToInnerBoundary!(spline_project, edge2, \"inner3\")\naddCurveToInnerBoundary!(spline_project, edge3, \"inner3\")","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The inner boundary chain name \"inner3\" is used internally for HOHQMesh. Again, the active visualization automatically detects that new curves have been added to the project and the plot is updated appropriately, as shown below. The chain for the inner triangular boundary is called inner3 and it contains a three curve segments all called \"triangle\" labeled in the figure by 3.1, 3.2, and 3.3.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: three_curves)","category":"page"},{"location":"tutorials/spline_curves/#Generate-the-mesh","page":"Spline curves","title":"Generate the mesh","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"With the background grid, outer boundary curve, and all inner boundary curves added to the spline_project we are ready to generate the mesh. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline_curves.control: A HOHQMesh control file for the current project.\nspline_curves.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nspline_curves.mesh: A mesh file with format ISM-V2 (the default format).","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"To do this we execute the command","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"generate_mesh(spline_project)\n 1 chevron elements removed from mesh.\n 1 chevron elements removed from mesh.\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.29613000000000000\n Number of nodes = 1177\n Number of Edges = 2225\n Number of Elements = 1047\n Number of Subdivisions = 4\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00006214 0.15607014 0.04505181 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00008989 2.78073390 1.23192911 1.00000000 999.99900000 1.00000000\n Condition 1.00000055 3.81350981 1.15526066 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00014319 6.76310951 1.46264239 1.00000000 4.00000000 1.00000000\n Jacobian 0.00001495 0.10424741 0.03955903 0.00000000 999.99900000 1.00000000\n Minimum Angle 37.25504203 89.96195708 74.41060580 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.03105286 157.27881545 107.90994073 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The call to generate_mesh also prints mesh quality statistics to the screen. HOHQMesh also reports mesh clean-up that occurred during the generation process, in this case the removal of \"bad\" chevron shaped elements that were present within the automatic subdivision procedure. The visualization updates automatically and the background grid is removed after when the mesh is generated.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"note: Mesh visualization\nCurrently, only the \"skeleton\" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: final_spline)","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the fine features of the curved inner boundaries, particularly near the sharp angles of the \"big_spline\" curve. We decide that we are satisfied with the overall mesh quality.","category":"page"},{"location":"tutorials/spline_curves/#Summary","page":"Spline curves","title":"Summary","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Create a circular outer boundary curve.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nConstruct and add parametric spline curves.\nConstruct and add an inner boundary chain of straight line segments.","category":"page"},{"location":"tutorials/introduction/#Tutorials","page":"Overview","title":"Tutorials for HOHQMesh.jl","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"The tutorial section for HOHQMesh.jl provides step-by-step commands and accompanying explanations for the major features of the interactive mesh generation tools.","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"For a general overview of the capabilities and features of HOHQMesh to generate quadrilateral and hexahedral meshes we refer to the Pre-made Examples of the HOHQMesh documentation.","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"For more information on how an unstructured mesh generated with HOHQMesh.jl can be used in the simulation framework Trixi.jl see the relevant tutorial.","category":"page"},{"location":"tutorials/introduction/#[Straight-sided-outer-boundary](@ref)","page":"Overview","title":"Straight-sided outer boundary","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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.","category":"page"},{"location":"tutorials/introduction/#Synopsis","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Query and adjust the RunParameters of a project.\nDefine a rectangular outer boundary and set the background grid.\nVisualize an interactive mesh project.\nAdd circular inner boundary curves.","category":"page"},{"location":"tutorials/introduction/#[Curved-outer-boundary](@ref)","page":"Overview","title":"Curved outer boundary","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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.","category":"page"},{"location":"tutorials/introduction/#Synopsis-2","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Define a curved outer boundary using parametric equations.\nAdd and adjust the background grid.\nVisualize an interactive mesh project.\nAdd manual refinement to a local region of the domain.","category":"page"},{"location":"tutorials/introduction/#[Spline-curves](@ref)","page":"Overview","title":"Spline curves","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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\".","category":"page"},{"location":"tutorials/introduction/#Synopsis-3","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Create a circular outer boundary curve.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nConstruct and add parametric spline curves.\nConstruct and add an inner boundary chain of straight line segments.","category":"page"},{"location":"tutorials/introduction/#[Creating-and-editing-curves](@ref)","page":"Overview","title":"Creating and editing curves","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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. There are details for the removal and replacement of a portion of a chain.","category":"page"},{"location":"tutorials/introduction/#Synopsis-4","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Create and edit an outer boundary chain.\nCreate and edit an inner boundary chain.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nDiscuss undo / redo capabilities.\nConstruct and add parametric spline curves.\nConstruct and add a curve from parametric equations.\nConstruct and add straight line segments.\nConstruct and add circular arc segments.","category":"page"},{"location":"guided-tour/#Guided-tour","page":"Guided tour","title":"Guided tour","text":"","category":"section"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"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.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"See the HOHQMesh documentation for more details about its terminology and capabilities.","category":"page"},{"location":"guided-tour/#Mesh-from-a-control-file","page":"Guided tour","title":"Mesh from a control file","text":"","category":"section"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"A first example script reads in an existing control file from the HOHQMesh examples collection and makes it into a Project. To run this example, execute","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"julia> include(joinpath(HOHQMesh.examples_dir(), \"interactive_from_control_file.jl\"))","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"This command will create mesh and plot files in the out directory.","category":"page"},{"location":"guided-tour/#Build-a-mesh-from-scratch","page":"Guided tour","title":"Build a mesh from scratch","text":"","category":"section"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"A second example script interactive_outer_boundary.jl makes a new project consisting of an outer, circular boundary, and an inner boundary in the shape of an ice cream cone. To run this example, execute","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"julia> include(joinpath(HOHQMesh.examples_dir(), \"interactive_outer_boundary.jl\"))","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"For completeness, we provide the example script and walk-through each step in the construction of the Project below.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"using HOHQMesh\n\n# Create a new project with the name \"IceCreamCone\", which will also be the\n# name of the mesh, plot and stats files, written to output folder `out`.\n\np = newProject(\"IceCreamCone\", \"out\")\n\n# Outer boundary for this example mesh is a complete circle. Add it into the project.\n\ncirc = newCircularArcCurve(\"outerCircle\", [0.0, -1.0, 0.0], 4.0, 0.0, 360.0, \"degrees\")\naddCurveToOuterBoundary!(p, circ)\n\n# Inner boundary is three curves. Two straight lines and a circular arc.\n# Note the three curve are connected to ensure a counter-clockwise orientation\n# as required by HOHQMesh\n\n# Create the three interior curves. The individual names of each curve in the inner\n# chain are used internally by HOHQMesh and are output as the given boundary names in\n# the mesh file.\n\ncone1 = newEndPointsLineCurve(\"cone1\", [0.0, -3.0, 0.0], [1.0, 0.0, 0.0])\niceCream = newCircularArcCurve(\"iceCream\", [0.0, 0.0, 0.0], 1.0, 0.0, 180.0, \"degrees\")\ncone2 = newEndPointsLineCurve(\"cone2\", [-1.0, 0.0, 0.0], [0.0, -3.0, 0.0])\n\n# Assemble the three curve in a closed chain oriented counter-clockwise. The chain\n# name `IceCreamCone` is only used internally by HOHQMesh.\n\naddCurveToInnerBoundary!(p, cone1, \"IceCreamCone\")\naddCurveToInnerBoundary!(p, iceCream, \"IceCreamCone\")\naddCurveToInnerBoundary!(p, cone2, \"IceCreamCone\")\n\n# Adjust some `RunParameters` and overwrite the defaults values. In this case, we\n# set a new value for the boundary order polynomial representation and adjust the\n# output mesh file format to be `sem`\n\nsetPolynomialOrder!(p, 4)\nsetPlotFileFormat!(p, \"sem\")\n\n# A background grid is required for the mesh generation. In this example we lay a\n# background grid of Cartesian boxes with size 0.5.\n\naddBackgroundGrid!(p, [0.5, 0.5, 0.0])\n\n# Plot the project model curves and background grid\n\nif isdefined(Main, :Makie)\n plotProject!(p, MODEL+GRID)\n @info \"Press enter to generate the mesh and update the plot.\"\n readline()\n else # Throw an informational message about plotting to the user\n @info \"To visualize the project (boundary curves, background grid, mesh, etc.), include `GLMakie` and run again.\"\n end\n\n# Generate the mesh. This produces the mesh and TecPlot files `AllFeatures.mesh` and `AllFeatures.tec`\n# and save them to the `out` folder. Also, if there is an active plot in the project `p` it is\n# updated with the mesh that was generated.\n\ngenerate_mesh(p)\n\n# After the mesh successfully generates mesh statistics, such as the number of corner nodes,\n# the number of elements etc., are printed to the REPL","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"The first line creates a new project, where the mesh and plot file names will be derived from the project name, \"IceCreamCone\" written to the specified folder.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"To develop the model, one adds curves to the outer boundary or to multiple inner boundaries, if desired. As in HOHQMesh, there are four curve classes currently available:","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Parametric equations\nCubic Splines\nLines defined by their end points\nCircular arcs","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"In the example, the outer boundary is a closed circular arc with center at [0.0, 0.0, 0.0] with radius 4, starting at zero and ending at 360 degrees. It is added to the project with addCurveToOuterBoundary!. You can add any number of curves to the outer boundary.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Similarly, you create curves and add them to as many inner boundaries that you want to have. In the example, there is one inner boundary, \"IceCreamCone\" made up of two straight lines and a half circular arc. Again, they are defined counter-clockwise.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"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\").","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"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 to be specified using","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"addBackgroundGrid!(proj::Project, bgSize::Array{Float64})","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"The example sets the background mesh size to be 0.1 in the x and y directions. The z component is ignored.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"The script finishes by generating the quad mesh and plotting the results, as shown below","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"(Image: iceCreamCone)","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Finally, the script returns the project so that it can be edited further, if desired.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"To save a control file for HOHQMesh, simply invoke","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"saveProject(proj::Project, outFile::String)","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"where outFile is the name of the control file (traditionally with a .control extension). saveProject is automatically called when a mesh is generated.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Note, a third example script interactive_outer_boundary_generic.jl is identical to that which was explained above except that the function calls use the generic versions of functions, e.g., new or add!.","category":"page"},{"location":"license/#License","page":"License","title":"License","text":"","category":"section"},{"location":"license/","page":"License","title":"License","text":"MIT LicenseCopyright (c) 2021-present David Kopriva, Andrew Winters, and Michael Schlottke-LakemperPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","category":"page"},{"location":"CheatSheet/#Commands-Cheat-Sheet","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"This provides a quick reference for the syntax 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 constructs an identical example mesh as shown in the Guided tour using generic function calls.","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"A thorough description of the functions can be found in the API section.","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"The general workflow of the interactive mesh functionality within a REPL session is","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"Create a project\nAdd boundary curves\nAdd a background grid\nAdd manual refinement (if desired)\nGenerate mesh","category":"page"},{"location":"CheatSheet/#Project","page":"Commands Cheat Sheet","title":"Project","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" p = newProject(, )","category":"page"},{"location":"CheatSheet/#cs-plotting","page":"Commands Cheat Sheet","title":"Plotting","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" plotProject!(p, options)\n updatePlot!(p, options)","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"The options are any sum of MODEL, GRID, REFINEMENTS, and MESH.","category":"page"},{"location":"CheatSheet/#Curves","page":"Commands Cheat Sheet","title":"Curves","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" c = new(name, startLocation [x,y,z],endLocation [x,y,z]) *Straight Line*\n c = new(name,center [x,y,z],radius, startAngle, endAngle) *Circular Arc*\n c = new(name, xEqn, yEqn, zEqn) *Parametric equation*\n c = new(name, dataFile) *Spline with data from a file*\n c = new(name, nKnots, knotsMatrix) *Spline with given knot values*","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"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.","category":"page"},{"location":"CheatSheet/#cs-manual-refinement","page":"Commands Cheat Sheet","title":"Manual Refinement","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" r = newRefinementCenter(name, center, gridSize, radius)\n r = newRefinementLine(name, type, startPoint, endPoint, gridSize, width)","category":"page"},{"location":"CheatSheet/#Adding-to-a-Project","page":"Commands Cheat Sheet","title":"Adding to a Project","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" add!(p, c) *Add outer boundary curve*\n add!(p, c, ) *Add curve to an inner boundary*\n add!(p, r) *Add refinement region*\n\n addBackgroundGrid!(p, [top, left, bottom, right], [nX, nY, nZ]) *No outer boundary*\n addBackgroundGrid!(p, [dx, dy, dz]) *If an outer boundary is present*","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"Shown here is the use of the function add!, which is a shortcut to the full functions, e.g. addOuterBoundaryCurve, etc. which have the same arguments.","category":"page"},{"location":"CheatSheet/#Accessing-items","page":"Commands Cheat Sheet","title":"Accessing items","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" crv = getCurve(p, curveName) *Get a curve in the outer boundary*\n crv = getCurve(p, curveName, boundaryName) *Get a curve in an inner boundary*\n indx, chain = getChain(p, boundaryName) *Get a complete inner boundary curve*\n r = getRefinementRegion(p, name)","category":"page"},{"location":"CheatSheet/#Removing-from-Project","page":"Commands Cheat Sheet","title":"Removing from Project","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" removeOuterboundary!(p) *Entire outer boundary curve*\n removeInnerBoundary!(p, innerBoundaryName) *Entire inner boundary curve*\n remove!(p, name) *Curve in outer boundary*\n remove!(p, name, innerBoundaryName) *Curve in inner boundary*\n removeRefinementRegion!(p, name)","category":"page"},{"location":"CheatSheet/#Editing-items","page":"Commands Cheat Sheet","title":"Editing items","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"All items have set/get methods to edit them. Most actions have undo() and redo(). To find out what the next undo/redo actions are, use undoActionName() and redoActionName() to print them to the screen.","category":"page"},{"location":"CheatSheet/#Meshing","page":"Commands Cheat Sheet","title":"Meshing","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" generate_mesh(p)\n remove_mesh!(p)","category":"page"},{"location":"#HOHQMesh.jl","page":"Home","title":"HOHQMesh.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This package is a Julia frontend to the Fortran-based High Order Hex-Quad Mesher (a.k.a. HOHQMesh) created and developed by David A. Kopriva. It augments HOHQMesh with interactive functionality 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. HOHQMesh.jl is available on Linux, MacOS, and Windows.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you have not yet installed Julia, please follow the instructions for your operating system. HOHQMesh.jl works with Julia v1.6 and above.","category":"page"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl is a registered Julia package. Hence, you can install it by executing the following commands in the Julia REPL:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> import Pkg; Pkg.add(\"HOHQMesh\")","category":"page"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl depends on the binary distribution of the HOHQMesh mesh generator, which is available via the Julia package HOHQMesh_jll.jl and which is automatically installed as a dependency.","category":"page"},{"location":"#Usage","page":"Home","title":"Usage","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"In the Julia REPL, you can load HOHQMesh with","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> using HOHQMesh","category":"page"},{"location":"","page":"Home","title":"Home","text":"and then happily generate away!","category":"page"},{"location":"","page":"Home","title":"Home","text":"Two 2D examples GingerbreadMan and NACA0012 and a 3D example Snake (all from HOHQMesh itself) come delivered with this package. You can generate a mesh for them by executing","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> control_file = joinpath(HOHQMesh.examples_dir(), \"GingerbreadMan.control\")\n\njulia> output = generate_mesh(control_file)","category":"page"},{"location":"","page":"Home","title":"Home","text":"You will then find the resulting output files (mesh, plot file, statistics) in the designated output directory, which defaults to out. The GingerbreadMan.control file will yield the following mesh,","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: gingerbreadman_with_edges_400px)","category":"page"},{"location":"","page":"Home","title":"Home","text":"while the 3D file Snake.control produces this mesh:","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: snake_400px)","category":"page"},{"location":"","page":"Home","title":"Home","text":"Examples scripts of interactive mesh generation tools are available in the examples/ subdirectory. These example scripts are prefaced with the phrase interactive_. There is a brief summary at the top of each interactive example script that describes the mesh it will create and the features of HOHQMesh it uses. An example script can be executed from a Julia REPL session with an include(...) statement, e.g.,","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> include(joinpath(HOHQMesh.examples_dir(), \"interactive_outer_box_two_circles.jl\"))","category":"page"},{"location":"","page":"Home","title":"Home","text":"The resulting output mesh and plot files are saved in the output directory out as designated in the example script. Mesh statistics are printed to the screen.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The interactive functionality uses Makie.jl to visualize the boundary curves and mesh from the interactive tool. A Makie backend, such as GLMakie, can be loaded in addition to HOHQMesh","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> using Pkg; Pkg.add(\"GLMakie\")\njulia> using GLMakie","category":"page"},{"location":"","page":"Home","title":"Home","text":"Now, running the example script produces a figure in addition to the mesh and plot files that are saved and the output of mesh statistics to the screen.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: box_two_circles)","category":"page"},{"location":"","page":"Home","title":"Home","text":"Further explanation of the interactive functionality can be found here. Additional examples are available in the Tutorials.","category":"page"},{"location":"#authors-index-md","page":"Home","title":"Authors","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl is maintained by the Trixi authors. Its principal developers are Andrew Winters (Linköping University, Sweden) and David A. Kopriva. The HOHQMesh mesh generator itself is developed by David A. Kopriva.","category":"page"},{"location":"#License-and-contributing","page":"Home","title":"License and contributing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl is licensed under the MIT license (see License). HOHQMesh itself is also available under the MIT license. Since HOHQMesh is an open-source project, we are very happy to accept contributions from the community. Please refer to Contributing for more details. To get in touch with the developers, join us on Slack or create an issue.","category":"page"},{"location":"#Acknowledgements","page":"Home","title":"Acknowledgements","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The authors would like to thank David A. Kopriva for making the sources of HOHQMesh available as open source, and for assisting with making it work with Julia.","category":"page"}] +[{"location":"contributing/#Contributing","page":"Contributing","title":"Contributing","text":"","category":"section"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"HOHQMesh.jl is an open-source project and we are very happy to accept contributions from the community. Please feel free to open issues or submit patches (preferably as merge requests) any time. For planned larger contributions, it is often beneficial to get in contact with one of the principal developers first (see Authors).","category":"page"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"HOHQMesh.jl and its contributions are licensed under the MIT license (see License). As a contributor, you certify that all your contributions are in conformance with the Developer Certificate of Origin (Version 1.1), which is reproduced below.","category":"page"},{"location":"contributing/#Developer-Certificate-of-Origin-(Version-1.1)","page":"Contributing","title":"Developer Certificate of Origin (Version 1.1)","text":"","category":"section"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"The following text was taken from https://developercertificate.org:","category":"page"},{"location":"contributing/","page":"Contributing","title":"Contributing","text":"Developer Certificate of Origin\nVersion 1.1\n\nCopyright (C) 2004, 2006 The Linux Foundation and its contributors.\n1 Letterman Drive\nSuite D4700\nSan Francisco, CA, 94129\n\nEveryone is permitted to copy and distribute verbatim copies of this\nlicense document, but changing it is not allowed.\n\n\nDeveloper's Certificate of Origin 1.1\n\nBy making a contribution to this project, I certify that:\n\n(a) The contribution was created in whole or in part by me and I\n have the right to submit it under the open source license\n indicated in the file; or\n\n(b) The contribution is based upon previous work that, to the best\n of my knowledge, is covered under an appropriate open source\n license and I have the right under that license to submit that\n work with modifications, whether created in whole or in part\n by me, under the same open source license (unless I am\n permitted to submit under a different license), as indicated\n in the file; or\n\n(c) The contribution was provided directly to me by some other\n person who certified (a), (b) or (c) and I have not modified\n it.\n\n(d) I understand and agree that this project and the contribution\n are public and that a record of the contribution (including all\n personal information I submit with it, including my sign-off) is\n maintained indefinitely and may be redistributed consistent with\n this project or the open source license(s) involved.","category":"page"},{"location":"development/#Development","page":"Development","title":"Development","text":"","category":"section"},{"location":"development/#Text-editors","page":"Development","title":"Text editors","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"When writing code, the choice of text editor can have a significant impact on productivity and developer satisfaction. While using the default text editor of the operating system has its own benefits (specifically the lack of an explicit installation procure), usually it makes sense to switch to a more programming-friendly tool. In the following, a few of the many options are listed and discussed:","category":"page"},{"location":"development/#VS-Code","page":"Development","title":"VS Code","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"Visual Studio Code is a modern open source editor with good support for Julia. While Juno had some better support in the past, the developers of Juno and the Julia VS Code plugin are joining forces and concentrating on VS Code since support of Atom has been suspended. Basically, all comments on Juno below also apply to VS Code.","category":"page"},{"location":"development/#Juno","page":"Development","title":"Juno","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"If you are new to programming or do not have a preference for a text editor yet, Juno is a good choice for developing Julia code. It is based on Atom, a sophisticated and widely used editor for software developers, and is enhanced with several Julia-specific features. Furthermore and especially helpful for novice programmers, it has a MATLAB-like appearance with easy and interactive access to the current variables, the help system, and a debugger.","category":"page"},{"location":"development/#Vim-or-Emacs","page":"Development","title":"Vim or Emacs","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"Vim and Emacs are both very popular editors that work great with Julia. One of their advantages is that they are text editors without a GUI and as such 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 corresponding Vim plugin julia-vim or Emacs major mode julia-emacs.","category":"page"},{"location":"development/#Releasing-a-new-version-of-HOHQMesh","page":"Development","title":"Releasing a new version of HOHQMesh","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"Check whether everything is okay, tests pass etc.\nSet the new version number in Project.toml according to the Julian version of semver. Commit and push.\nComment @JuliaRegistrator register on the commit setting the version number.\nJuliaRegistrator will create a PR with the new version in the General registry. Wait for it to be merged.\nIncrement the version number in Project.toml again with suffix -pre. For example, if you have released version v0.2.0, use v0.2.1-pre as new version number.","category":"page"},{"location":"development/#Preview-the-documentation","page":"Development","title":"Preview the documentation","text":"","category":"section"},{"location":"development/","page":"Development","title":"Development","text":"You can build the documentation of HOHQMesh.jl locally by running","category":"page"},{"location":"development/","page":"Development","title":"Development","text":"julia --project=docs -e 'using Pkg; Pkg.instantiate(); include(\"docs/make.jl\")'","category":"page"},{"location":"development/","page":"Development","title":"Development","text":"from the HOHQMesh.jl main directory. Then, you can look at the html files generated in docs/build. For PRs triggered from branches inside the HOHQMesh.jl main repository previews of the new documentation are generated at https://trixi-framework.github.io/HOHQMesh.jl/previews/PRXXX, where XXX is the number of the PR. Note, this does not work for PRs from forks for security reasons (since anyone could otherwise push arbitrary stuff, including malicious code).","category":"page"},{"location":"tutorials/straight_outer_boundary/#Straight-sided-outer-boundary","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The purpose of this tutorial is to demonstrate how to create an unstructured mesh on a rectangular domain that contains two circular inner boundaries. Further, we show how to adjust some of the default mesh parameters as well as the output mesh file format. The outer boundary, background grid and mesh will be visualized for quality inspection.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"It provides details and clarification for the script interactive_outer_box_two_circles.jl from the examples folder.","category":"page"},{"location":"tutorials/straight_outer_boundary/#Synopsis","page":"Straight-sided outer boundary","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Query and adjust the RunParameters of a project.\nDefine a rectangular outer boundary and set the background grid.\nVisualize an interactive mesh project.\nAdd circular inner boundary curves.","category":"page"},{"location":"tutorials/straight_outer_boundary/#Initialization","page":"Straight-sided outer boundary","title":"Initialization","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the curves, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We create a new project with the name \"box_two_circles\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting HOHQMesh control file from this tutorial will be named box_two_circles.control. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"box_project = newProject(\"box_two_circles\", \"out\")","category":"page"},{"location":"tutorials/straight_outer_boundary/#Adjusting-project-parameters","page":"Straight-sided outer boundary","title":"Adjusting project parameters","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"When a new project is created it is filled with several default RunParameters such as the polynomial order used to represent curved boundaries or the mesh file format. These RunParameters can be queried and adjusted with appropriate getter/setter pairs, see Controlling the mesh generation for more details.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"For the box_project we first query the current values for the polynomial order and the mesh output format","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"julia> getPolynomialOrder(box_project)\n5\n\njulia> getMeshFileFormat(box_project)\n\"ISM-V2\"","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We change these quantities in the box_project with the corresponding setter functions. For this we will set the polynomial order to be 4 and the mesh file format to be ABAQUS. See the P4est-based mesh section of the Trixi.jl documentation for a detailed overview of this mesh file format.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"setPolynomialOrder!(box_project, 4)\nsetMeshFileFormat!(box_project, \"ABAQUS\")","category":"page"},{"location":"tutorials/straight_outer_boundary/#Add-the-background-grid","page":"Straight-sided outer boundary","title":"Add the background grid","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near any curved boundaries.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The domain for this tutorial is a rectangular box with the bounds 030times015. Because no outer boundary curve is present there are two (equivalent) strategies for us to define the bounds of a rectangular domain and the size of the background grid:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Set the lower left corner point of the domain (x_0 y_0), define the element size in each spatial direction Delta x and Delta y, and the number of steps taken in each direction N_x N_y. The resulting background grid will have the extent x_0 x_0 + N_x Delta x by y_0 y_0 + N_y Delta y. For this example, we set a background grid of Cartesian elements with size one in each dimension with the following commands\nlower_left = [0.0, 0.0, 0.0]\nspacing = [1.0, 1.0, 0.0]\nnum_intervals = [30, 15, 0]\naddBackgroundGrid!(box_project, lower_left, spacing, num_intervals)\nSet the bounding box with extent values ordered as [top, left, bottom, right] and provide the number the number of steps in each direction. To set a background grid of Cartesian elements with size one in each dimension for the rectangular box 030times015 we use\nbounds = [15.0, 0.0, 0.0, 30.0]\nN = [30, 15, 0]\naddBackgroundGrid!(box_project, bounds, N)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Next, we visualize the box_project to ensure that the background grid has been added correctly.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"plotProject!(box_project, GRID)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We use the keyword and GRID to indicate that we want the background grid to be included in the visualization.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: background)","category":"page"},{"location":"tutorials/straight_outer_boundary/#Add-the-inner-boundaries","page":"Straight-sided outer boundary","title":"Add the inner boundaries","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Next, we add the two circular inner boundary curves with different radii.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The first circle will have radius r=2 and be centered at the point (4 4). We define this circular curve with the function newCircularArcCurve as follows","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"circle1 = newCircularArcCurve(\"circle1\", # curve name\n [4.0, 4.0, 0.0], # circle center\n 2.0, # circle radius\n 0.0, # start angle\n 360.0, # end angle\n \"degrees\") # angle units","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"We use \"degrees\" to set the angle bounds, but \"radians\" can also be used. The name of the curve stored in the dictionary circle1 is assigned to be \"circle1\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The new circle1 curve is then added to the box_project as an inner boundary curve with","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"addCurveToInnerBoundary!(box_project, circle1, \"inner1\")","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"This inner boundary chain name \"inner1\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that a curve has been added to the project and the plot is updated appropriately, as shown below. The chain for the inner boundary curve is called \"inner1\" and it contains a single curve \"circle1\" labeled in the figure by 1.1.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: first_circle)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"With analogous steps we create another circular curve with radius r=4, centered at (20 9) and add it as a second inner curve to the box_project. Note, for this curve we use radians for the angle units.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"circle2 = newCircularArcCurve(\"circle2\", # curve name\n [20.0, 9.0, 0.0], # circle center\n 4.0, # circle radius\n 0.0, # start angle\n 2.0 * pi, # end angle\n \"radians\") # angle units\naddCurveToInnerBoundary!(box_project, circle2, \"inner2\")","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Again, the box_project detects that a curve has been added to it and the visualization is automatically updated with the second circular curve. The chain for the second inner boundary curve is called \"inner2\" and it contains a single curve \"circle2\" labeled in the figure by 2.1.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: second_circle)","category":"page"},{"location":"tutorials/straight_outer_boundary/#Generate-the-mesh","page":"Straight-sided outer boundary","title":"Generate the mesh","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"With the background grid and all inner boundary curves added to the box_project we can generate the mesh. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"box_two_circles.control: A HOHQMesh control file for the current project.\nbox_two_circles.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nbox_two_circles.inp: A mesh file with format ABAQUS that was set above.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"To do this we execute the command","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"generate_mesh(box_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 3.5553999999999995E-002\n Number of nodes = 498\n Number of Edges = 921\n Number of Elements = 422\n Number of Subdivisions = 0\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.34513058 1.15383206 0.91833833 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00000004 1.71083844 1.08733476 1.00000000 999.99900000 1.00000000\n Condition 1.00000000 1.46558793 1.04922640 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00000006 2.43503343 1.16700825 1.00000000 4.00000000 1.00000000\n Jacobian 0.17863168 1.07210721 0.86801359 0.00000000 999.99900000 1.00000000\n Minimum Angle 50.56155029 89.99999787 83.84466557 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.00000259 136.97479459 96.69930735 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"The call to generate_mesh also prints mesh quality statistics to the screen and updates the visualization. The background grid is removed from the visualization when the mesh is generated and the resulting mesh is visualized instead.","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"(Image: final_circle)","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"From a visual inspection we decide that we are satisfied with the mesh quality and resolution near the inner circular boundaries.","category":"page"},{"location":"tutorials/straight_outer_boundary/#Summary","page":"Straight-sided outer boundary","title":"Summary","text":"","category":"section"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/straight_outer_boundary/","page":"Straight-sided outer boundary","title":"Straight-sided outer boundary","text":"Query and adjust the RunParameters of a project.\nDefine a rectangular outer boundary and set the background grid.\nVisualize an interactive mesh project.\nAdd circular inner boundary curves.","category":"page"},{"location":"github-git/#GitHub-and-Git","page":"GitHub & Git","title":"GitHub & Git","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"This page contains information on how to use GitHub and Git when developing HOHQMesh.","category":"page"},{"location":"github-git/#Development-workflow","page":"GitHub & Git","title":"Development workflow","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"For adding modifications to HOHQMesh, we generally follow these steps:","category":"page"},{"location":"github-git/#Create-an-issue-(optional)","page":"GitHub & Git","title":"Create an issue (optional)","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"In many cases it makes sense to start by creating an issue on GitHub. For example, if the implementation approach for a new feature is not yet clear or if there should be a discussion about the desired outcome, it is good practice to first get a consensus on what is the expected result of this modification. A GitHub issue is the place to lead this discussion, as it preserves it in the project and - together with the actual code changes - allows in the future to revisit the reasons for a particular choice of implementation or feature.","category":"page"},{"location":"github-git/#Create-a-branch-and-*immediately*-create-a-pull-request","page":"GitHub & Git","title":"Create a branch and immediately create a pull request","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"All feature development, bug fixes etc. should be developed in a branch and not directly on main. If you do not have write access to the main repository on GitHub, first create a fork of the HOHQMesh.jl repository and clone the fork to your machine. Then, create a branch locally by executing git checkout -b yourbranch, push it to the repository, and create a pull request (PR).","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If you have already cloned HOHQMesh.jl from the main repo to your local machine, you can also work in that clone. You just need to add your fork as additional remote repository and push your new branch there.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"git remote add myfork git@github.com:YOUR_NAME/HOHQMesh.jl.git\n# get latest main from the main repo\ngit checkout main\ngit pull\n# create a new branch for a cool new feature, bug fix, ...\ngit checkout -b YOUR_BRANCH_NAME\n# do some work and push it to your fork\ngit push -u myfork\n# go to https://github.com/trixi-framework/HOHQMesh.jl/pull\n# and create a PR from your new branch","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"info: Why using pull requests?\nImmediately creating a PR for your branch has the benefit that all code discussions can now be held directly next to the corresponding code. Also, the PR allows to easily compare your branch to the upstream branch (usually main) to see what you have changed. Moreover, tests will run automatically.","category":"page"},{"location":"github-git/#Make-changes","page":"GitHub & Git","title":"Make changes","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"With a branch and PR in place, you can now write your code and commit it to your branch. If you request feedback from someone else, make sure to push your branch to the repository such that the others can easily review your changes or dive in and change something themselves.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"warning: Avoid committing unwanted files\nWhen you use git add . or similar catch-all versions, make sure you do not accidentally commit unwanted files (e.g., HOHQMesh output plot and mesh files). If it happens anyways, you can undo the last commit (also multiple times) by running git reset HEAD~ (see also Undo last commit). However, this strategy only works if you have not yet pushed your changes. If you did push your changes, please talk to one of the principal developers on how to proceed.","category":"page"},{"location":"github-git/#Keep-your-branch-in-sync-with-main","page":"GitHub & Git","title":"Keep your branch in sync with main","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"For larger features with longer-living branches, it may make sense to synchronize your branch with the current main, e.g., if there was a bug fix in main that is relevant for you. In this case, perform the following steps to merge the current main to your branch:","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Commit all your local changes to your branch and push it. This allows you to delete your clone in case you make a mistake and need to abort the merge.\nExecute git fetch to get the latest changes from the repository.\nMake sure you are in the correct branch by checking the output of git status or by running git checkout yourbranch.\nMerge main using git merge main. If there were no conflicts, hooray!, you are done. Otherwise you need to resolve your merge conflicts and commit the changes afterwards. A good guide for resolving merge conflicts can be found here.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"In general, always use git merge and not git rebase to get the latest changes from main. It is less error-prone and does not create problems on branches that are worked on collaboratively.","category":"page"},{"location":"github-git/#Prepare-for-review","page":"GitHub & Git","title":"Prepare for review","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If you feel like your branch is ready to be merged to main, prepare it for review. That is, you should","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"merge the current main to your branch\nrun tests if available, but at least ensure that you did not accidentally change the results for one of the existing example elixirs\nproperly comment your code\ndelete old/unused code, especially commented lines (unless they contain helpful code, in which case you should add a comment on why you keep this around)\nremove debug statements\nadd a script interactive_xxx.jl that uses your feature (only relevant for new features within the interactive mesh functionality)","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"After you are confident that your branch is cleaned up properly, commit all changes and push them to the repository.","category":"page"},{"location":"github-git/#Get-reviewed","page":"GitHub & Git","title":"Get reviewed","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Ask one of the principal developers to review your code. This review will be conducted asynchronously, with the reviewer leaving comments and annotations in the PR. In some cases it will be necessary to do multiple rounds of reviews, especially if there are larger changes to be added. Just commit and push your changes to your branch, and the corresponding pull request will be updated automatically.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Please note that a review has nothing to do with the lack of experience of the person developing changes: We try to review all code before it gets added to main, even from the most experienced developers. This is good practice and helps to keep the error rate low while ensuring the the code is developed in a consistent fashion. Furthermore, do not take criticism of your code personally - we just try to keep HOHQMesh as accessible and easy to use for everyone.","category":"page"},{"location":"github-git/#Merge-branch","page":"GitHub & Git","title":"Merge branch","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Once your branch is reviewed and declared ready for merging by the reviewer, make sure that all the latest changes have been pushed. Then, one of the developers will merge your PR. If you are one of the developers, you can also go to the pull request page on GitHub and and click on Merge pull request. Voilá, you are done! Your branch will have been merged to main and the source branch will have been deleted in the GitHub repository (if you are not working in your own fork).","category":"page"},{"location":"github-git/#Update-your-working-copy","page":"GitHub & Git","title":"Update your working copy","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Once you have merged your branch by accepting the PR on GitHub, you should clean up your local working copy of the repository by performing the following steps:","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Update your clone by running git fetch.\nCheck out main using git checkout main.\nDelete merged branch locally with git branch -d yourbranch.\nRemove local references to deleted remote branch by executing git remote prune origin.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"You can now proceed with your next changes by starting again at the top.","category":"page"},{"location":"github-git/#Using-Git","page":"GitHub & Git","title":"Using Git","text":"","category":"section"},{"location":"github-git/#Resources-for-learning-Git","page":"GitHub & Git","title":"Resources for learning Git","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Here are a few resources for learning do use Git that at least one of us found helpful in the past (roughly ordered from novice to advanced to expert):","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Git Handbook by GitHub\nLearn Git Branching","category":"page"},{"location":"github-git/#Tips-and-tricks","page":"GitHub & Git","title":"Tips and tricks","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"This is an unordered collection of different tips and tricks that can be helpful while working with Git. As usual, your mileage might vary.","category":"page"},{"location":"github-git/#Undo-last-commit","page":"GitHub & Git","title":"Undo last commit","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If you made a mistake in your last commit, e.g., by committing an unwanted file, you can undo the latest commit by running","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"git reset HEAD~","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"This only works if you have not yet pushed your branch to the GitHub repository. In this case, please talk to one of the core developers on how to proceed. Especially when you accidentally committed a large file (image, or video), please let us know as fast as possible, since the effort to fix the repository grows considerably over time.","category":"page"},{"location":"github-git/#Remove-large-file-from-repository","page":"GitHub & Git","title":"Remove large file from repository","text":"","category":"section"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"If a large file was accidentally committed and pushed to the HOHQMesh repository, please talk to one of the principal developers as soon as possible so that they can fix it.","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"danger: Large files\nYou should never try to fix this yourself, as it potentially disrupts/destroys the work of others!","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Based on the instructions found here and here, the following steps need to be taken (as documented for GitLab in issue #33):","category":"page"},{"location":"github-git/","page":"GitHub & Git","title":"GitHub & Git","text":"Tell everyone to commit and push their changes to the repository.\nFix the branch in which the file was committed by removing it and committing the removal. This is especially important on main.\nPerform the following steps to clean up the Git repository:\ncd /tmp\n\n# Download bfg-1.13.0.jar from https://rtyley.github.io/bfg-repo-cleaner/\n\n# Get fresh clone of repo (so you can throw it away in case there is a problem)\ngit clone --mirror git@github.com:trixi-framework/HOHQMesh.jl.git\n\n# Clean up repo of all files larger than 10M\njava -jar bfg-1.13.0.jar --strip-blobs-bigger-than 10M HOHQMesh.jl.git\n\n# Enter repo\ncd Trixi.jl.git\n\n# Clean up reflog and force aggressive garbage collection\ngit reflog expire --expire=now --all && git gc --prune=now --aggressive\n\n# Push changes\ngit push\n\n# Delete clone\nrm -rf HOHQMesh.jl.git\nTell everyone to clean up their local working copies by performing the following steps (also do this yourself):\n# Enter repo\ncd HOHQMesh.jl\n\n# Get current changes\ngit fetch\n\n# Check out the fixed branch\ngit checkout branchname\n\n# IMPORTANT: Do a rebase instead of a pull!\ngit rebase\n\n# Clean reflog and force garbage collection\ngit reflog expire --expire=now --all && git gc --prune=now --aggressive\nIMPORTANT: You need to do a git rebase instead of a git pull when updating the fixed branch.","category":"page"},{"location":"interactive-api/#API","page":"API","title":"API","text":"","category":"section"},{"location":"interactive-api/#Project-creation-and-saving","page":"API","title":"Project creation and saving","text":"","category":"section"},{"location":"interactive-api/#New-Project","page":"API","title":"New Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Project] proj = newProject(name::String, folder::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The supplied name will be the default name of the 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.","category":"page"},{"location":"interactive-api/#Opening-an-existing-project-file","page":"API","title":"Opening an existing project file","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"A project can be created from an existing HOHQMesh control file with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Project] proj = openProject(fileName::String, folder::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The supplied fileName will be the name of the project and the generated mesh and plot files will be placed in the supplied folder.","category":"page"},{"location":"interactive-api/#Saving-a-Project","page":"API","title":"Saving a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" saveProject(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"writes a control file to the folder designated when creating the new project. It can be read in again with openProject.","category":"page"},{"location":"interactive-api/#Plotting-a-Project","page":"API","title":"Plotting a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" plotProject!(proj::Project, options)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The plot options are any combination of MODEL, GRID, REFINEMENTS, and MESH. MODEL refers to any inner / outer boundary curves contained in the project. GRID refers to the background grid, which you an view to make sure that it can resolve the boundary curves in the model. REFINEMENTS will show the placement where user defined manual refinement regions are placed. MESH refers to the actual mesh of quadrilateral elements generated by HOHQMesh. Before meshing one probably wants to view MODEL+GRID, and afterwards, MODEL+MESH.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"If the model is modified and you want to re-plot with the new values, invoke","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" updatePlot!(proj::Project, options)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"but generally the plot will be updated automatically as you build the model.","category":"page"},{"location":"interactive-api/#Modifying/editing-a-Project","page":"API","title":"Modifying/editing a Project","text":"","category":"section"},{"location":"interactive-api/#Setting-the-name-of-a-Project","page":"API","title":"Setting the name of a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The project name is the name under which the mesh, plot, statistics and control files will be written. It can be changed at any time with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" setName!(proj::Project,name::String)","category":"page"},{"location":"interactive-api/#Getting-the-current-name-of-a-Project","page":"API","title":"Getting the current name of a Project","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The project name can be fetched and printed to the screen with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] getName(proj::Project)","category":"page"},{"location":"interactive-api/#Controlling-the-mesh-generation","page":"API","title":"Controlling the mesh generation","text":"","category":"section"},{"location":"interactive-api/#Editing-the-RunParameters","page":"API","title":"Editing the RunParameters","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The run parameters can be enquired and set with these getter/setter pairs:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setPolynomialOrder!(proj::Project, p::Int)\n [Return:Int] getPolynomialOrder(proj::Project)\n [Return:nothing] setMeshFileFormat!(proj::Project, meshFileFormat::String)\n [Return:String] getMeshFileFormat(proj::Project)\n [Return:nothing] setPlotFileFormat!(proj::Project, plotFileFormat::String)\n [Return:String] getPlotFileFormat(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"HOHQMesh generates mesh files that contain high-order polynomial interpolations for any curved boundaries in the model. The degree of this polynomial representation is controlled by the above getter/setter pair. The default polynomial order is set to 5.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The available mesh file formats are \"ISM\", \"ISM-V2\", or \"ABAQUS\". See the HOHQMesh documentation, Appendix A or Appendix E, as well as the Trixi.jl documentation, Unstructured quadrilateral mesh or P4est-based mesh, for details and discussions on the latter two mesh file formats.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The plot file (which can be viewed with something like VisIt or ParaView) format is either \"skeleton\" or \"sem\". The former is just a low order finite element representation of the mesh. The latter (which is a much bigger file) includes the interior degrees of freedom.","category":"page"},{"location":"interactive-api/#Changing-the-output-file-names","page":"API","title":"Changing the output file names","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"By default, the mesh, plot and stats files will be written with the name and path supplied when newProject is called. They can be changed/enquired with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setName!(proj::Project,name::String)\n [Return:String] getName(proj::Project)\n [Return:nothing] setFolder!(proj::Project,folder::String)\n [Return:String] getFolder(proj::Project)","category":"page"},{"location":"interactive-api/#Smoothing-operations","page":"API","title":"Smoothing operations","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"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.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To change the defaults, the smoother parameters can be set/enquired with the functions","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setSmoothingStatus!(proj::Project, status::String)\n [Return:String] getSmoothingStatus(proj::Project)\n [Return:nothing] setSmoothingType!(proj::Project, type::String)\n [Return:String] getSmoothingType(proj::Project)\n [Return:nothing] setSmoothingIterations!(proj::Project, iterations::Int)\n [Return:Int] getSmoothingIterations(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The smooth status is either \"ON\" or \"OFF\".","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To remove the smoother altogether, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] removeSpringSmoother!(proj::Project)","category":"page"},{"location":"interactive-api/#Adding-the-background-grid","page":"API","title":"Adding the background grid","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"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 after a new project has been created.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] addBackgroundGrid!(proj::Project,\n x0::Array{Float64},\n dx::Array{Float64},\n N::Array{Int})\n [Return:nothing] addBackgroundGrid!(proj::Project,\n box::Array{Float64},\n N::Array{Int})\n [Return:nothing] addBackgroundGrid!(proj::Project,\n bgSize::Array{Float64})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Use one of the first two if there is no outer boundary present in the model. With the first, a rectangular outer boundary will be created of extent [x0[1], x0[1] + N*dx[1]] by [x0[2], x0[2] + N*dx[2]]. The second lets you set the bounding box = [top, left, bottom, right], and the number of points in each direction. The arrays x0, dx, and N are all vectors [ *, *, * ] giving the x, y, and z components. When an outer boundary is present use the third variant where one only need specify the desired background grid size with the vector bgSize.","category":"page"},{"location":"interactive-api/#Changing-the-background-grid","page":"API","title":"Changing the background grid","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The size of an existing background grid in a Project can be adjusted with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setBackgroundGridSize!(proj::Project,\n dx::Float64,\n dy::Float64)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"If a plot is present it will be updated automatically.","category":"page"},{"location":"interactive-api/#Manual-refinement-regions","page":"API","title":"Manual refinement regions","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"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).","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To create a RefinementCenter,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newRefinementCenter(name::String,\n type::String,\n x0::Array{Float64},\n h::Float64,\n w::Float64)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where name labels the refinement region, the type is either \"smooth\" or \"sharp\", x0 = [x, y, z] is the location of the center, h is the mesh size, and w is the extent of the refinement region. The z component must be zero.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Similarly, one can create a RefinementLine,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newRefinementLine(name::String,\n type::String,\n x0::Array{Float64}, x1::Array{Float64},\n h::Float64,\n w::Float64)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where x0 is the start position and x1 is the end of the line. The name, type, h, and w parameters are the same as for a RefinementCenter.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To add a refinement region to the project,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] addRefinementRegion!(proj::Project, r::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To get a reference to a refinement region with a given name, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] getRefinementRegion(proj::Project, name::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Finally, to get a list of all the refinement regions,","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Array{Dict{String,Any}}] array = allRefinementRegions(proj::Project)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"A refinement region can be edited by using the following:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setRefinementType!(r::Dict{String,Any}, type::String)\n [Return:String] getRefinementType(r::Dict{String,Any})\n [Return:nothing] setRefinementLocation!(r::Dict{String,Any}, x::Array{Float64})\n [Return:Array{Float64}] getRefinementLocation(r::Dict{String,Any})\n [Return:nothing] setRefinementGridSize!(r::Dict{String,Any}, h::Float64)\n [Return:Float64] getRefinementGridSize(r::Dict{String,Any})\n [Return:nothing] setRefinementWidth!(r::Dict{String,Any}, w::Float64)\n [Return:Float64] getRefinementWidth(r::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where r is a dictionary returned by newRefinementCenter!, newRefinementLine!, or getRefinementRegion.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To further edit a RefinementLine, use the methods","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setRefinementStart!(r::Dict{String,Any}, x::Array{Float64})\n [Return:Array{Float64}] getRefinementStart(r::Dict{String,Any})\n [Return:nothing] setRefinementEnd!(r::Dict{String,Any}, x::Array{Float64})\n [Return:Array{Float64}] getRefinementEnd(r::Dict{String,Any})","category":"page"},{"location":"interactive-api/#Boundary-curves","page":"API","title":"Boundary curves","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The Project contains a model that contains information about any inner and/or outer boundary curves that a user can add to define a domain to be meshed. Each curve is defined as a \"chain\" that can be built from multiple connected curves. More details on boundary curves and HOHQMesh can be found here.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The domain can have a single outer boundary chain and an arbitrary number of inner boundary chains.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The orientation of any curve chains must be counter-clockwise. This orientation is automatically checked in generate_mesh and a warning is thrown if a user attempts to connect the curve chain in an invalid way.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"See the tutorial Creating and editing curves for a demonstration of defining, constructing, and removing curves from a Project.","category":"page"},{"location":"interactive-api/#Defining-curves","page":"API","title":"Defining curves","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"Four curve types can be added to the outer and inner boundary curve chains. They are","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Parametric equations\nCubic Splines\nLines defined by their end points\nCircular arcs","category":"page"},{"location":"interactive-api/#Parametric-equations","page":"API","title":"Parametric equations","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"Creating a new curve equation","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newParametricEquationCurve(name::String,\n xEqn::String,\n yEqn::String,\n zEqn::String = \"z(t) = 0.0\")","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Returns a new set of parametric equation. Equations must be of the form","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" () = ...","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The name of the function, and the argument are arbitrary. The equation can be any legitimate equation. The constant pi is defined for use. Exponentiation is done with ^. All number literals are interpreted as floating point numbers.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" xEqn = \"x(t) = 4*cos(2*pi*t) - 0.6*cos(8*pi*t)^3\"\n yEqn = \"y(t) = 4*sin(2*pi*t) - 0.5*sin(11*pi*t)^2\"\n zEqn = \"z(t) = 0.0\"\n blob = newParametricEquationCurve(\"Blob\", xEqn, yEqn, zEqn)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The z-Equation is optional, but for now must define zero for z by default.","category":"page"},{"location":"interactive-api/#Cubic-spline-curve","page":"API","title":"Cubic spline curve","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"A cubic spline is defined by an array of knots, t_j, x_j, y_j, z_j. It can either be supplied by a data file whose first line is the number of knots, and succeeding lines define the t, x, y, z values, e.g.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" 9\n 0.000000000000000 -3.50000000000000 3.50000000000000 0.0\n 3.846153846153846E-002 -3.20000000000000 5.00000000000 0.0\n 7.692307692307693E-002 -2.00000000000000 6.00000000000 0.0\n 0.769230769230769 0.000000000000000 -1.00000000000000 0.0\n 0.807692307692308 -1.00000000000000 -1.00000000000000 0.0\n 0.846153846153846 -2.00000000000000 -0.800000000000000 0.0\n 0.884615384615385 -2.50000000000000 0.000000000000000 0.0\n 0.923076923076923 -3.00000000000000 1.00000000000000 0.0\n 1.00000000000000 -3.50000000000000 3.50000000000000 0.0","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"or by constructing the required nKnots x 4 array and supplying it to the new procedure. The respective constructors for a spline curve are","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newSplineCurve(name::String,\n dataFile::String)\n [Return:Dict{String,Any}] newSplineCurve(name::String,\n nKnots::Int,\n data::Matrix{Float64})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"If the spline curve is to be closed. The last data point must be the same as the first.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" spline_data = [ [0.0 1.75 -1.0 0.0]\n [0.25 2.1 -0.5 0.0]\n [0.5 2.7 -1.0 0.0]\n [0.75 0.6 -2.0 0.0]\n [1.0 1.75 -1.0 0.0] ]\n ex_spline = newSplineCurve(\"small_spline\", 5, spline_data)","category":"page"},{"location":"interactive-api/#Line-defined-by-end-points","page":"API","title":"Line defined by end points","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"A straight line is constructed with","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newEndPointsLineCurve(name::String,\n xStart::Array{Float64},\n xEnd::Array{Float64})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The xStart and xEnd are arrays of the form [x, y, z]. The z component should be zero and for now is ignored.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" line1 = newEndPointsLineCurve(\"line_segment\", [0.0, -3.0, 0.0], [1.0, 0.0, 0.0])","category":"page"},{"location":"interactive-api/#Circular-arc","page":"API","title":"Circular arc","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:Dict{String,Any}] newCircularArcCurve(name::String,\n center::Array{Float64},\n radius::Float64,\n startAngle::Float64,\n endAngle::Float64,\n units::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"The center is an array of the form [x, y, z]. The units argument defines the start and end angle units. It is either \"degrees\" or \"radians\". That argument is optional, and defaults to \"degrees\".","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Example:","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" halfCircle = newCircularArcCurve(\"Dome\", [0.0, 0.0, 0.0], 1.0, 0.0, 180.0, \"degrees\")","category":"page"},{"location":"interactive-api/#Adding-and-removing-outer-and-inner-boundaries","page":"API","title":"Adding and removing outer and inner boundaries","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"Adding an outer boundary curve\nUsing the curve creation routines described above, create curves counter-clockwise along the outer boundary and add them to the outer boundary curve using\n[Return:nothing] addCurveToOuterBoundary!(proj::Project,\n crv::Dict{String,Any})\ncrv is the dictionary that represents the curve.\nExample:\ncirc = newCircularArcCurve(\"outerCircle\", [0.0, -1.0, 0.0], 4.0, 0.0, 360.0, \"degrees\")\naddCurveToOuterBoundary!(p, circ)\nAdding an inner boundary curve\nThe syntax is analogous to the creation of an outer boundary curve. Once interior curves are defined they can be added to chain, again in counter-clockwise orientation. Note that the individual pieces of the curve are given a name. The entire chain is also given a name.\n[Return:nothing] addCurveToInnerBoundary!(proj::Project,\n crv::Dict{String,Any},\n chainName::String)\nExample:\nline1 = newEndPointsLineCurve(\"line_segment\", [0.0, -3.0, 0.0], [1.0, 0.0, 0.0])\naddCurveToInnerBoundary!(p, line1, \"interior_curve\")\nTo edit curves they can be accessed by the name:\n[Return:Dict{String,Any}] getInnerBoundaryCurve(proj::Project,\n curveName::String,\n chainName::String)\n[Return:Dict{String,Any}] getOuterBoundaryCurveWithName(proj::Project,\n name::String)\nDeleting boundary curves\nThe entire outer boundary or an entire inner boundary can be removed from the project.\n[Return:nothing] removeOuterBoundary!(proj::Project)\n[Return:nothing] removeInnerBoundary!(proj::Project, chainName::String)\nAlternatively, individual pieces of the boundary curve chains can be removed.\n[Return:nothing] removeOuterBoundaryCurveWithName!(proj::Project, name::String)\n[Return:nothing] removeInnerBoundaryCurve!(proj::Project,\n name::String,\n chainName::String)\nAs in HOHQMesh the project can have only one outer boundary chain, so the removal does not require a specific chainName.","category":"page"},{"location":"interactive-api/#Editing-curves","page":"API","title":"Editing curves","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"You can determine the type of a curve by","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] getCurveType(crv::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"For any of the curves, their name can be changed by","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" setCurveName!(crv::Dict{String,Any}, name::String)","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"and checked by","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" getCurveName(crv::Dict{String,Any})","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Otherwise there are special functions to change the parameters of curves","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] setXEqn!(crv::Dict{String,Any}, eqn::String)\n [Return:nothing] setYEqn!(crv::Dict{String,Any}, eqn::String)\n [Return:nothing] setZEqn!(crv::Dict{String,Any}, eqn::String)\n [Return:nothing] setStartPoint!(crv::Dict{String,Any}, point::Array{Float64})\n [Return:nothing] setEndPoint!(crv::Dict{String,Any}, point::Array{Float64})\n [Return:nothing] setArcUnits!(arc::Dict{String,Any}, units::String)\n [Return:nothing] setArcCenter!(arc::Dict{String,Any}, point::Array{Float64})\n [Return:nothing] setArcStartAngle!(arc::Dict{String,Any}, angle::Float64)\n [Return:nothing] setArcEndAngle!(arc::Dict{String,Any}, angle::Float64)\n [Return:nothing] setArcRadius!(arc::Dict{String,Any}, radius::Float64)\n\n [Return:String] getXEqn(crv::Dict{String,Any})\n [Return:String] getYEqn(crv::Dict{String,Any})\n [Return:String] getZEqn(crv::Dict{String,Any})\n [Return:Array{Float64}] getStartPoint(crv::Dict{String,Any})\n [Return:Array{Float64}] getEndPoint(crv::Dict{String,Any})\n [Return:String] getArcUnits(arc::Dict{String,Any})\n [Return:Array{Float64}] getArcCenter(arc::Dict{String,Any})\n [Return:Float64] getArcStartAngle(arc::Dict{String,Any})\n [Return:Float64] getArcEndAngle(arc::Dict{String,Any})\n [Return:Float64] getArcRadius(arc::Dict{String,Any})","category":"page"},{"location":"interactive-api/#Undo/redo","page":"API","title":"Undo/redo","text":"","category":"section"},{"location":"interactive-api/","page":"API","title":"API","text":"The interactive mesh functionality has unlimited undo/redo for most actions.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"In interactive mode, actions can be undone by the commands","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] undo()\n [Return:String] redo()","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"where the return string contains the name of the action performed.","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"To find out what the next actions are, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:String] undoActionName()\n [Return:String] redoActionName()","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":"Finally, to clear the undo stack, use","category":"page"},{"location":"interactive-api/","page":"API","title":"API","text":" [Return:nothing] clearUndoRedo()","category":"page"},{"location":"tutorials/curved_outer_boundary/#Curved-outer-boundary","page":"Curved outer boundary","title":"Curved outer boundary","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The purpose of this tutorial is to demonstrate how to create an unstructured mesh on a domain with a curved outer boundary. This outer boundary curve is defined by parametric equations and contains fine features as well as smooth regions.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The outer boundary, background grid and mesh are visualized for quality inspection. The tutorial also shows how to adjust the background and add a local refinement region in order to better resolve a portion of the curved boundary.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Synopsis","page":"Curved outer boundary","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Define a curved outer boundary using parametric equations.\nAdd and adjust the background grid.\nVisualize an interactive mesh project.\nAdd manual refinement to a local region of the domain.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Initialization","page":"Curved outer boundary","title":"Initialization","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the boundary curve, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"We create a new project with the name \"TheBlob\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting mesh file from this tutorial will be named TheBlob.mesh. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"blob_project = newProject(\"TheBlob\", \"out\")","category":"page"},{"location":"tutorials/curved_outer_boundary/#Add-the-outer-boundary","page":"Curved outer boundary","title":"Add the outer boundary","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The outer boundary curve for the domain of interest in this tutorial is given by the parametric equations","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":" beginaligned\n x(t) = 4cos(2 pi t) - frac35cos^3(8 pi t)02cm\n y(t) = 4sin(2 pi t) - frac12sin^2(11 pi t)02cm\n z(t) = 0\n endaligned\n qquad\n tin01","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Parametric equations in HOHQMesh can be any legitimate equation and use intrinsic functions available in Fortran, e.g., sin, cos, exp. The constant pi is available for use. Exponentiation is done with ^. All number literals are interpreted as floating point numbers.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The following commands create a new curve for the parametric equations above","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"xEqn = \"x(t) = 4 * cos(2 * pi * t) - 0.6 * cos(8 * pi * t)^3\"\nyEqn = \"y(t) = 4 * sin(2 * pi * t) - 0.5 * sin(11* pi * t)^2\"\nzEqn = \"z(t) = 0.0\"\nblob = newParametricEquationCurve(\"Blob\", xEqn, yEqn, zEqn)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The name of this curve is assigned to be \"Blob\". This name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Now that we have created the boundary curve it must be added as an outer boundary in the blob_project.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"addCurveToOuterBoundary!(blob_project, blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/#Add-a-background-grid","page":"Curved outer boundary","title":"Add a background grid","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near sharp features of any curved boundaries.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"For a domain bounded by an outer boundary curve, this background grid is set by indicating the desired element size in the x and y directions. To start, we set the background grid for blob_project to have elements with side length two in each direction","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"addBackgroundGrid!(blob_project, [2.0, 2.0, 0.0])","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"We next visualize the outer boundary curve and background grid with the following","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"plotProject!(blob_project, MODEL+GRID)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Here, we take the sum of the keywords MODEL and GRID in order to simultaneously visualize the curves and background grid. The resulting plot is given below. The chain of outer boundary curves is called \"Outer\" and it contains a single curve \"Blob\" labeled in the figure by O.1.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: coarse_grid)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"From the visualization we see that the background grid is likely too coarse to produce a \"good\" quadrilateral mesh for this domain. We reset the background grid size to have elements with size one half in each direction","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"setBackgroundGridSize!(blob_project, 0.5, 0.5)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Note, that after we execute the command above the visualization updates automatically with the outer boundary curve and the new background grid.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: fine_grid)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The new background grid that gives a finer initial resolution looks suitable to continue to the mesh generation.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Initial-mesh-and-user-adjustments","page":"Curved outer boundary","title":"Initial mesh and user adjustments","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"We next generate the mesh from the information contained in the blob_project. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"TheBlob.control: A HOHQMesh control file for the current project.\nTheBlob.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nTheBlob.mesh: A mesh file with format ISM-V2 (the default format).","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"To do this we execute the command","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"generate_mesh(blob_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.10612399999999998\n Number of nodes = 481\n Number of Edges = 895\n Number of Elements = 417\n Number of Subdivisions = 5\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00025346 0.36181966 0.11936327 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00002883 2.58066393 1.26340310 1.00000000 999.99900000 1.00000000\n Condition 1.00000000 3.11480166 1.18583253 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00006177 4.80707901 1.51313656 1.00000000 4.00000000 1.00000000\n Jacobian 0.00011326 0.28172540 0.10292251 0.00000000 999.99900000 1.00000000\n Minimum Angle 29.30873612 89.99827738 73.08079323 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.00132792 156.87642432 109.37004979 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"The call to generate_mesh also prints mesh quality statistics to the screen and updates the visualization. The background grid is removed from the visualization when the mesh is generated.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"note: Mesh visualization\nCurrently, only the \"skeleton\" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: initial_blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the fine features of the curved outer boundary. Although, we see that the mesh near the point (-4 0) is still quite coarse. To remedy this we manually add a RefinementCenter near this region of the domain to force HOHQMesh to increase the resolution in this area. We create and add this refinement region to the current project with","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"center = newRefinementCenter(\"region\", \"smooth\", [-4.0, -0.5, 0.0], 0.4, 1.0)\naddRefinementRegion!(blob_project, center)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Above we create a circular refinement region centered at the point (-4 -05) with a desired resolution size 04 and a radius of 10. Upon adding this refinement region to blob_project, the visualization will update to indicate the location and size of the manual refinement region.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: refinement_blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/#Final-mesh","page":"Curved outer boundary","title":"Final mesh","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"With the refinement region added to the project we can regenerate the mesh. Note, this will create and save new output files TheBlob.control, TheBlob.tec, TheBlob.mesh and update the figure.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"generate_mesh(blob_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.11373499999999999\n Number of nodes = 505\n Number of Edges = 940\n Number of Elements = 438\n Number of Subdivisions = 5\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00025346 0.36181966 0.11412658 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00002884 2.47585614 1.26424390 1.00000000 999.99900000 1.00000000\n Condition 1.00000000 3.11480166 1.18425870 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00006177 4.80707901 1.51413601 1.00000000 4.00000000 1.00000000\n Jacobian 0.00011326 0.28172540 0.09814547 0.00000000 999.99900000 1.00000000\n Minimum Angle 29.30873612 89.99827901 72.79596483 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.00132782 156.87642433 109.63912468 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Note, the circular region indicating the refinement center is removed from the plot when the mesh is generated.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"(Image: final_blob)","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Now we decide that we are satisfied with the mesh quality and resolution of the outer boundary curve.","category":"page"},{"location":"tutorials/curved_outer_boundary/#Summary","page":"Curved outer boundary","title":"Summary","text":"","category":"section"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"Define a curved outer boundary using parametric equations.\nAdd and adjust the background grid.\nVisualize an interactive mesh project.\nAdd manual refinement to a local region of the domain.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"For completeness, we include a script with all the commands to generate the mesh displayed in the final image. Note, we do not include the plotting in this script.","category":"page"},{"location":"tutorials/curved_outer_boundary/","page":"Curved outer boundary","title":"Curved outer boundary","text":"# Interactive mesh with a curved outer boundary\n#\n# Create an outer boundary from a set of parametric equations.\n# Add manual refinement in a small region around the point (-4, -0.5).\n#\n# Keywords: outer boundary, parametric equations, refinement center\nusing HOHQMesh\n\n# Instantiate the project\nblob_project = newProject(\"TheBlob\", \"out\")\n\n# Create and add the outer boundary curve\nxEqn = \"x(t) = 4 * cos(2 * pi * t) - 0.6 * cos(8 * pi * t)^3\"\nyEqn = \"y(t) = 4 * sin(2 * pi * t) - 0.5 * sin(11* pi * t)^2\"\nzEqn = \"z(t) = 0.0\"\nblob = newParametricEquationCurve(\"Blob\", xEqn, yEqn, zEqn)\naddCurveToOuterBoundary!(blob_project, blob)\n\n# Add the background grid\naddBackgroundGrid!(blob_project, [0.5, 0.5, 0.0])\n\n# Create and add the refinement region\ncenter = newRefinementCenter(\"region\", \"smooth\", [-4.0, -0.5, 0.0], 0.4, 1.0)\naddRefinementRegion!(blob_project, center)\n\n# Generate the mesh\ngenerate_mesh(blob_project)","category":"page"},{"location":"tutorials/create_edit_curves/#Creating-and-editing-curves","page":"Creating and editing curves","title":"Creating and editing curves","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The purpose of this tutorial is to demonstrate how to inner and outer boundary curve chains. By a \"chain\" we mean a closed curve that is composed of multiple pieces. Each chain can be a combination of different curve types, e.g., a circular arc can connect to a spline. It also shows how to modify, remove, and add new pieces to an existing curve chain. The undo and redo capabilities of the interactive mesh tool are briefly discussed. The outer and inner boundary curves, background grid as well as the mesh will be visualized for quality inspection.","category":"page"},{"location":"tutorials/create_edit_curves/#Synopsis","page":"Creating and editing curves","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Create and edit an outer boundary chain.\nCreate and edit an inner boundary chain.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nDiscuss undo / redo capabilities.\nConstruct and add parametric spline curves.\nConstruct and add a curve from parametric equations.\nConstruct and add straight line segments.\nConstruct and add circular arc segments.","category":"page"},{"location":"tutorials/create_edit_curves/#Initialization","page":"Creating and editing curves","title":"Initialization","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the curves, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We create a new project with the name \"sandbox\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting HOHQMesh control file from this tutorial will be named sandbox.control. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"sandbox_project = newProject(\"sandbox\", \"out\")","category":"page"},{"location":"tutorials/create_edit_curves/#Add-the-outer-boundary-chain","page":"Creating and editing curves","title":"Add the outer boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We first create the outer boundary curve chain that is composed of three pieces","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Straight line segment from (0 -7) to (5 3).\nHalf-circle arc of radius r=5 centered at (0 3).\nStraight line segment from (-5 3) to (0 -7).","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Each segment of the curve is created separately. The straight line segments are made with the function newEndPointsLineCurve and given unique names:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"outer_line1 = newEndPointsLineCurve(\"Line1\", # curve name\n [0.0, -7.0, 0.0], # start point\n [5.0, 3.0, 0.0]) # end point\n\nouter_line2 = newEndPointsLineCurve(\"Line2\", # curve name\n [-5.0, 3.0, 0.0], # start point\n [0.0, -7.0, 0.0]) # end point","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To create the circle arc we use the function newCircularArcCurve where we specify a name for the curve as well as the radius and center of the circle. The arc can have an arbitrary length dictated by the start and end angle, e.g., for a half-circle we take the angle to vary from 0 to 180 degrees.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"outer_arc = newCircularArcCurve(\"Arc\", # curve name\n [0.0, 3.0, 0.0], # center\n 5.0, # radius\n 0.0, # start angle\n 180.0, # end angle\n \"degrees\") # units for angle","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We use \"degrees\" to set the angle bounds, but \"radians\" can also be used. The name of the curve stored in the dictionary outer_arc is assigned to be \"Arc\".","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The curve names \"Line1\", \"Line2\", and \"Arc\" are the labels that HOHQMesh will give to these boundary curve segments in the resulting mesh file.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The three curve segments stored in the variables outer_line1, outer_line2, and outer_arc are then added to the sandbox_project with a counter-clockwise orientation as required by HOHQMesh.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToOuterBoundary!(sandbox_project, outer_line1)\naddCurveToOuterBoundary!(sandbox_project, outer_arc)\naddCurveToOuterBoundary!(sandbox_project, outer_line2)","category":"page"},{"location":"tutorials/create_edit_curves/#Add-a-background-grid","page":"Creating and editing curves","title":"Add a background grid","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near sharp features of any curved boundaries.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"For a domain bounded by an outer boundary curve, this background grid is set by indicating the desired element size in the x and y directions. To start, we set the background grid for sandbox_project to have elements with side length one in each direction","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addBackgroundGrid!(sandbox_project, [1.0, 1.0, 0.0])","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We visualize the outer boundary curve chain and background grid with the following","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"plotProject!(sandbox_project, MODEL+GRID)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Here, we take the sum of the keywords MODEL and GRID in order to simultaneously visualize the outer boundary and background grid. The resulting plot is given below. The chain of outer boundary curves is called \"Outer\" and it contains three curve segments \"Line1\", \"Arc\", and \"Line2\" labeled in the figure by O.1, O.2, and O.3, respectively.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: background_grid)","category":"page"},{"location":"tutorials/create_edit_curves/#Edit-the-outer-boundary-chain","page":"Creating and editing curves","title":"Edit the outer boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Suppose that the domain boundary requires a curved segment instead of the straight line \"Line2\". We will replace this line segment in the outer boundary chain with a cubic spline.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"First, we remove the \"Line2\" curve from the \"Outer\" chain with the command","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"removeOuterBoundaryCurveWithName!(sandbox_project, \"Line2\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"tip: Outer curve removal\nAlternatively, we can remove the curve \"Line2\" using its index in the \"Outer\" boundary chain.removeOuterBoundaryCurveAtIndex!(sandbox_project, 3)This removal strategy is useful when the curves in the boundary chain do not have unique names. Be aware that when curves are removed from a chain it is possible that the indexing of the remaining curves changes.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The plot automatically updates and we see that the outer boundary is open and contains two segments: \"Line1\" and \"Arc\".","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: outer_removal)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Next, we create a parametric cubic spline curve from a given set of data points. In order to make a closed outer boundary chain the cubic spline must begin at the endpoint of the curve \"Arc\" and end at the first point of the curve \"Line1\". This ensures that the new spline curve connects into the boundary curve chain with the correct orientation. To create a parametric spline curve we directly provide data points in the code. These points take the form [t, x, y, z] where t is the parameter variable that varies between 0 and 1. The spline curve constructor newSplineCurve also takes the number of points as an input argument.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"spline_data = [ [0.0 -5.0 3.0 0.0]\n [0.25 -2.0 1.0 0.0]\n [0.5 -4.0 0.5 0.0]\n [0.75 -2.0 -3.0 0.0]\n [1.0 0.0 -7.0 0.0] ]\nouter_spline = newSplineCurve(\"Spline\", 5, spline_data)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Now we add the spline curve outer_spline into the sandbox_project.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToOuterBoundary!(sandbox_project, outer_spline)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The figure updates automatically to display the \"Outer\" boundary chain with the new \"Spline\" curve labeled O.3.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: outer_spline)","category":"page"},{"location":"tutorials/create_edit_curves/#Add-an-inner-boundary-chain","page":"Creating and editing curves","title":"Add an inner boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We create a pill shaped inner boundary curve chain composed of four pieces","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Straight line segment from (1 5) to (1 3).\nHalf-circle arc of radius r=1 centered at (0 3).\nStraight line segment from (-1 3) to (-1 5).\nHalf-circle arc of radius r=1 centered at (0 5).","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Similar to the construction of the \"Outer\" boundary chain, each segment of this inner boundary chain is created separately. The straight line segments are made with the function newEndPointsLineCurve and given unique names:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"inner_line1 = newEndPointsLineCurve(\"Line1\", # curve name\n [1.0, 5.0, 0.0], # start point\n [1.0, 3.0, 0.0]) # end point\n\ninner_line2 = newEndPointsLineCurve(\"Line2\", # curve name\n [-1.0, 3.0, 0.0], # start point\n [-1.0, 5.0, 0.0]) # end point","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To create the circle arcs we use the function newCircularArcCurve where we specify a name for the curve as well as the radius and center of the circle. In order to create an inner curve chain with counter-clockwise orientation the angle for the bottom half-circle arc centered at (0 3) varies from 0 to -180 degrees. The top half-circle arc centered at (0 5) has an angle that varies from 180 to 0 degrees. The construction of the two circle arcs are","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"inner_bottom_arc = newCircularArcCurve(\"BottomArc\", # curve name\n [0.0, 3.0, 0.0], # center\n 1.0, # radius\n 0.0, # start angle\n -pi, # end angle\n \"radians\") # units for angle\n\ninner_top_arc = newCircularArcCurve(\"TopArc\", # curve name\n [0.0, 5.0, 0.0], # center\n 1.0, # radius\n 180.0, # start angle\n 0.0, # end angle\n \"degrees\") # units for angle","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Note, we use \"radians\" to set the angle bounds for inner_bottom_arc and \"degrees\" for the angle bounds of inner_top_arc.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The curve names \"Line1\", \"Line2\", \"BottomArc\", and \"TopArc\" are the labels that HOHQMesh will give to these inner boundary curve segments in the resulting mesh file.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The four curve segments stored in the variables inner_line1, inner_line2, inner_bottom_arc and outer_arc are added to the sandbox_project in counter-clockwise order as required by HOHQMesh.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToInnerBoundary!(sandbox_project, inner_line1, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_bottom_arc, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_line2, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_top_arc, \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"This inner boundary chain name \"inner\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that curves have been added to the sandbox_project and the plot is updated, as shown below. The chain for the inner boundary curve chain is called inner and it contains a four curve segments \"Line1\", \"BottomArc\", \"Line2\", and \"TopArc\" labeled in the figure by 1.1, 1.2, 1.3, and 1.4, respectively.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_pill)","category":"page"},{"location":"tutorials/create_edit_curves/#Generate-the-mesh","page":"Creating and editing curves","title":"Generate the mesh","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We next generate the mesh from the information contained in the sandbox_project. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"sandbox.control: A HOHQMesh control file for the current project.\nsandbox.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nsandbox.mesh: A mesh file with format ISM-V2 (the default format).","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To do this we execute the command","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"generate_mesh(sandbox_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 8.7928000000000006E-002\n Number of nodes = 513\n Number of Edges = 933\n Number of Elements = 422\n Number of Subdivisions = 7\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00003020 1.17336756 0.18813064 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00984888 2.32321419 1.31488869 1.00000000 999.99900000 1.00000000\n Condition 1.00041121 2.42894151 1.21101797 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.01674110 3.74861238 1.59495734 1.00000000 4.00000000 1.00000000\n Jacobian 0.00001734 1.13821390 0.14136293 0.00000000 999.99900000 1.00000000\n Minimum Angle 32.20087774 89.35157729 68.75755243 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.60787193 152.53515465 113.36966060 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The call to generate_mesh also prints mesh quality statistics to the screen and updates the visualization. The background grid is removed from the visualization when the mesh is generated.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"note: Mesh visualization\nCurrently, only the \"skeleton\" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: initial_mesh)","category":"page"},{"location":"tutorials/create_edit_curves/#Delete-the-existing-mesh","page":"Creating and editing curves","title":"Delete the existing mesh","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"In preparation of edits we will make to the inner boundary chain we remove the current mesh from the plot and re-plot the model curves and background grid. Note, this step is not required, but it helps avoid confusion when editing several curves.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"remove_mesh!(sandbox_project)\nupdatePlot!(sandbox_project, MODEL+GRID)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Additionally, the remove_mesh! command deletes the mesh information from the sandbox_project and sandbox.mesh from the out folder. However, the sandbox.control and sandbox.tec files are still present in out directory.","category":"page"},{"location":"tutorials/create_edit_curves/#Edit-an-inner-boundary-chain","page":"Creating and editing curves","title":"Edit an inner boundary chain","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Suppose that the inner boundary actually requires a curved segment instead of the straight line \"Line1\". We will replace this line segment in the inner boundary chain with an oscillating segment construct from a set of parametric equations. In doing so, it will also be necessary to remove the BottomArc and replace it with a new, wider circular arc segment.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We remove the \"Line1\" curve from the inner chain with the command","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"removeInnerBoundaryCurve!(sandbox_project, \"Line1\", \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"tip: Inner curve removal\nAlternatively, we can remove the curve \"Line1\" using its index in the inner boundary chain.removeInnerBoundaryCurveAtIndex!(sandbox_project, 1, \"inner\")This removal strategy is useful when the curves in the boundary chain do not have unique names. Be aware that when curves are removed from a chain it is possible that the indexing of the remaining curves changes.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"With either removal strategy, the plot automatically updates. We see that the inner boundary is open and contains three segments: \"BottomArc\", \"Line2\", and \"TopArc\". Note that the index of the remaining curves has changed as shown below.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_removal)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"note: Brief note about undo / redo\nThe interactive functionality (globally) carries an operation stack of actions that can be undone (or redone) as the case may be. We can query and print to the REPL the top of the undo stack with undoActionName.undoActionName()\n\"Remove Inner Boundary Curve\"We can undo the removal of the \"Line1\" curve with undoundo()\n\"Undo Remove Inner Boundary Curve\"In addition to reinstating \"Line1\" into the sandbox_project, this undo prints the action that was undone to the REPL and will update the figure.Analogously, there is a redo operation stack. We query and print to the REPL the top the redo stack with redoActionName and can use redo to perform the operation.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The new inner curve segment will be an oscillating line given by the parametric equations","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":" beginaligned\n x(t) = t + 102cm\n y(t) = -2t + 5 - frac32 cos(pi t) sin(pi t)02cm\n z(t) = 0\n endaligned\n qquad\n tin01","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Parametric equations in HOHQMesh can be any legitimate equation and use intrinsic functions available in Fortran, e.g., sin, cos, exp. The constant pi is available for use. The following commands create a new curve for the parametric equations above","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"xEqn = \"x(t) = t + 1\"\nyEqn = \"y(t) = -2 * t + 5 - 1.5 * cos(pi * t) * sin(pi * t)\"\nzEqn = \"z(t) = 0.0\"\ninner_eqn = newParametricEquationCurve(\"wiggleLine\", xEqn, yEqn, zEqn)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The name of this new curve is assigned to be \"wiggleLine\". We add this new curve to the \"inner\" chain.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"addCurveToInnerBoundary!(sandbox_project, inner_eqn, \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The automatically updated figure now shows:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_open_chain)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"We see from the figure that this parametric equation curve starts at the point (15) and, therefore, matches the end point of the existing curve \"TopArc\" present in the \"inner\" chain. However, the parametric equation curve ends at the point (23) which does not match the \"BottomArc\" curve. So, the inner boundary chain remains open.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"warning: Attempt to generate a mesh with an open curve chain\nAn open curve chain is invalid in HOHQMesh. All inner and/or outer curve chains must be closed. If we attempt to send a project that contains an open curve chain to generate_mesh a warning is thrown and no mesh or output files are generated.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"To create a closed boundary curve we must remove the \"BottomArc\" curve and replace it with a wider half-circle arc segment. This new half-circle arc must start at the point (2 3) and end at the point (-1 3) to close the inner chain and guarantee the chain is oriented counter-clockwise. So, we first remove the \"BottomArc\" from the \"inner\" chain.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"removeInnerBoundaryCurve!(sandbox_project, \"BottomArc\", \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The figure updates to display the \"inner\" curve chain with three segments. Note that the inner curve chain indexing has, again, been automatically adjusted.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_remove_arc)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"A half-circle arc that joins the points (2 3) and (-1 3) has a radius r=15, is centered at (05 3) and has an angle that vaires from 0 to -180. We construct this circle arc and directly add it to the sandbox_project.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"new_bottom_arc = newCircularArcCurve(\"wideBottomArc\", # curve name\n [0.5, 3.0, 0.0], # center\n 1.5, # radius\n 0.0, # start angle\n -pi, # end angle\n \"radians\") # units for angle\naddCurveToInnerBoundary!(sandbox_project, new_bottom_arc, \"inner\")","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The updated plot now gives the modified, closed inner curve chain that now contains four curve segments \"Line2\", \"TopArc\", \"wiggleLine\", and \"wideBottomArc\" labeled in the figure by 1.1, 1.2, 1.3, and 1.4, respectively.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_modified)","category":"page"},{"location":"tutorials/create_edit_curves/#Regenerate-the-mesh","page":"Creating and editing curves","title":"Regenerate the mesh","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"With the modifications to the inner curve chain complete we can regenerate the mesh. This will create a new sandbox.mesh file and overwrite the existing sandbox.control and sandbox.tec files in the out directory.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"generate_mesh(sandbox_project)\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.13299600000000000\n Number of nodes = 714\n Number of Edges = 1308\n Number of Elements = 596\n Number of Subdivisions = 7\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00003020 1.15662678 0.12823840 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.01082600 3.14765817 1.34292128 1.00000000 999.99900000 1.00000000\n Condition 1.00037252 2.59936116 1.22903490 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.02724726 3.74861238 1.64807401 1.00000000 4.00000000 1.00000000\n Jacobian 0.00001734 1.13150266 0.09438571 0.00000000 999.99900000 1.00000000\n Minimum Angle 31.88018513 89.33451932 67.86550651 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.43850948 157.31718198 114.36070355 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"The visualization updates automatically and the background grid is removed after when the mesh is generated.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: inner_modified)","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the sharp corners and fine features of the curved inner and outer boundaries. For example, we zoom into sharp corner at the bottom of the domain and see that, although small, the elements in this region maintain a good quadrilateral shape.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"(Image: zoom_corner)","category":"page"},{"location":"tutorials/create_edit_curves/#Summary","page":"Creating and editing curves","title":"Summary","text":"","category":"section"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"Create and edit an outer boundary chain.\nCreate and edit an inner boundary chain.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nDiscuss undo / redo capabilities.\nConstruct and add parametric spline curves.\nConstruct and add a curve from parametric equations.\nConstruct and add straight line segments.\nConstruct and add circular arc segments.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"For completeness, we include a script with all the commands to generate the mesh displayed in the final image. Note, we do not include the plotting in this script.","category":"page"},{"location":"tutorials/create_edit_curves/","page":"Creating and editing curves","title":"Creating and editing curves","text":"# Interactive mesh with modified outer and inner curve chains\n#\n# Create inner / outer boundary chains composed of the four\n# available HOHQMesh curve types.\n#\n# Keywords: outer boundary, inner boundary, parametric equations,\n# circle arcs, cubic spline, curve removal\nusing HOHQMesh\n\n# Instantiate the project\nsandbox_project = newProject(\"sandbox\", \"out\")\n\n# Add the background grid\naddBackgroundGrid!(sandbox_project, [1.0, 1.0, 0.0])\n\n# Create and add the original outer boundary curves\nouter_line1 = newEndPointsLineCurve(\"Line1\", [0.0, -7.0, 0.0], [5.0, 3.0, 0.0])\nouter_line2 = newEndPointsLineCurve(\"Line2\", [-5.0, 3.0, 0.0], [0.0, -7.0, 0.0])\nouter_arc = newCircularArcCurve(\"Arc\", [0.0, 3.0, 0.0], 5.0, 0.0, 180.0, \"degrees\")\n\naddCurveToOuterBoundary!(sandbox_project, outer_line1)\naddCurveToOuterBoundary!(sandbox_project, outer_arc)\naddCurveToOuterBoundary!(sandbox_project, outer_line2)\n\n# Modify the outer boundary to have a spline instead of a straight line\nremoveOuterBoundaryCurveWithName!(sandbox_project, \"Line2\")\n\nspline_data = [ [0.0 -5.0 3.0 0.0]\n [0.25 -2.0 1.0 0.0]\n [0.5 -4.0 0.5 0.0]\n [0.75 -2.0 -3.0 0.0]\n [1.0 0.0 -7.0 0.0] ]\nouter_spline = newSplineCurve(\"Spline\", 5, spline_data)\naddCurveToOuterBoundary!(sandbox_project, outer_spline)\n\n# Create and add the inner boundary curves\ninner_line1 = newEndPointsLineCurve(\"Line1\", [1.0, 5.0, 0.0], [1.0, 3.0, 0.0])\ninner_line2 = newEndPointsLineCurve(\"Line2\", [-1.0, 3.0, 0.0], [-1.0, 5.0, 0.0])\ninner_bottom_arc = newCircularArcCurve(\"BottomArc\", [0.0, 3.0, 0.0], 1.0, 0.0, -pi, \"radians\")\ninner_top_arc = newCircularArcCurve(\"TopArc\", [0.0, 5.0, 0.0], 1.0, 180.0, 0.0, \"degrees\")\n\naddCurveToInnerBoundary!(sandbox_project, inner_line1, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_bottom_arc, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_line2, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, inner_top_arc, \"inner\")\n\n# Generate a mesh\ngenerate_mesh(sandbox_project)\n\n# Delete the existing mesh before modifying the inner boundary curve chain\nremove_mesh!(sandbox_project)\n\n# Modify the inner boundary curve with an oscillatory line and a new circle arc\nremoveInnerBoundaryCurve!(sandbox_project, \"Line1\", \"inner\")\nremoveInnerBoundaryCurve!(sandbox_project, \"BottomArc\", \"inner\")\n\nxEqn = \"x(t) = t + 1\"\nyEqn = \"y(t) = -2 * t + 5 - 1.5 * cos(pi * t) * sin(pi * t)\"\nzEqn = \"z(t) = 0.0\"\ninner_eqn = newParametricEquationCurve(\"wiggleLine\", xEqn, yEqn, zEqn)\n\nnew_bottom_arc = newCircularArcCurve(\"wideBottomArc\", [0.5, 3.0, 0.0], 1.5, 0.0, -pi, \"radians\")\n\naddCurveToInnerBoundary!(sandbox_project, inner_eqn, \"inner\")\naddCurveToInnerBoundary!(sandbox_project, new_bottom_arc, \"inner\")\n\n# Regenerate the final mesh\ngenerate_mesh(sandbox_project)","category":"page"},{"location":"interactive_overview/#InteractiveTool","page":"Overview","title":"Overview","text":"","category":"section"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"The interactive functionality is an API to generate a quadrilateral (future: hexahedral) 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.","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"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 provides an interactive project that creates an manipulates splines for the inner boundaries before generating the mesh.","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"Below we provide a broad overview of the interactive mesh workflow. Further clarification on this workflow is provided in the Guided tour. Several Tutorials are also available to demonstrate this functionality.","category":"page"},{"location":"interactive_overview/#Workflow-and-basic-moves","page":"Overview","title":"Workflow and basic moves","text":"","category":"section"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"The order of the workflow and basic moves follow a logical pattern: The project must be created first. Curves can be added at any time. The background grid can be added any time to the project. A mesh is usually generated after the model (curves) and background grid are completed.","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"To generate a mesh interactively you","category":"page"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"Create a project with a user given projectName and folder where any generated files are to be saved\np = newProject(, )\nBoth of these input arguments are strings.\nCreate inner and outer boundary curves from the available types\nc = newEndPointsLineCurve(, startLocation [x, y, z], endLocation [x, y, z]) *Straight Line*\nc = newCircularArcCurve(, center [x, y, z], radius, startAngle, endAngle, units = \"degrees\" or \"radians\") *Circular Arc*\nc = newParametricEquationCurve(, xEqn, yEqn, zEqn) *Parametric equation*\nc = newSplineCurve(, dataFile) *Spline with data from a file*\nc = newSpline(, nKnots, knotsMatrix) *Spline with given knot values*\nSee Defining curves for further details on the different curve type currently supported by HOHQMesh.\nThe generic name for each of these curve creation methods is new!. The generic can be used instead of the longer descriptive name to save typing during interactive sessions, if desired.\nAdd curves to build the model to see what you have added,\naddOuterBoundaryCurve!(p, ) *Add outer boundary curve*\naddInnerBoundaryCurve!(p, , ) *Add curve to an inner boundary*\nFor a single inner / outer boundary curve the command above directly adds the curve into the Project. If the inner / outer boundary curve is a chain of multiple curves then they must be added to the Project in an order which yields a closed curves with counter-clockwise orientation. See the Guided tour for an example of a chain of curves.\nCurves can be added by using the generic add! function instead of the longer descriptive name to save typing during interactive sessions, if desired.\nVisualize the project's model, if desired\nplotProject!(p, MODEL)\nPlots are updated in response to user interactions. However, to update the plot at any time, use\nupdatePlot!(p, options)\nOptions are MODEL, GRID, MESH, and REFINEMENTS. To plot combinations, sum the options, e.g. MODEL+GRID or MODEL+MESH. You normally are not interested in the background grid once the mesh is generated.\nnote: Visualization requirement\nThe interactive functionality uses Makie.jl to visualize the Project information. Therefore, in addition to HOHQMesh.jl a user must load a Makie backend (for example, GLMakie or CairoMakie) if visualization is desired.\nSet the background grid\nWhen no outer boundary curve is present, the background grid can be set with\naddBackgroundGrid!(p, lower left [x,y,z], spacing [dx,dy,dz], num Intervals [nX,nY,nZ])\nOr\naddBackgroundGrid!(p, [top value, left value, bottom value, right value], num Intervals [nX,nY,nZ])\nThe first method creates the rectangular boundary with extent [x0[1], x0[1] + N*dx[1]] by [x0[2], x0[2] + N*dx[2]]. The second method sets a rectangular bounding box with extent [top value, left value, bottom value, right value] and the number of elements in each direction. The first exists for historical reasons; the second is probably the easiest to use.\nWhen an outer boundary is present the background grid can be set as\naddBackgroundGrid!(p, [dx, dy, dz])\nwhere the spacing controls the number of elements in each direction.\nnote: Background grid\nA background grid is required by HOHQMesh. If one is not present in the Project and a user attempts to generate the mesh a warning is thrown.\nAdjust meshing parameters, if desired. For instance, one can adjust the polynomial order in the Project for any curved boundaries by\nsetPolynomialOrder!(p, order)\nThe background grid size can be adjusted where we can set the grid size in the x and y directions, dx and dy, can be set separately\nsetBackgroundGridSize!(p, 0.5, 0.25)\nSee Controlling the mesh generation for details on adjusting parameters already present in the Project.\nGenerate the mesh\ngenerate_mesh(p)\nThe mesh file will be saved in with the name .mesh. A HOHQMesh control file is automatically created from the contents of the Project and is also saved in that folder with the name .control. This control file can be read in again later and modified, remeshed, etc. The function generate_mesh will print the mesh information and statistics, and will plot the mesh as in the figure above, if a plot is otherwise visible. If not, it can always be plotted with the plotProject! command.","category":"page"},{"location":"interactive_overview/#Advanced","page":"Overview","title":"Advanced","text":"","category":"section"},{"location":"interactive_overview/","page":"Overview","title":"Overview","text":"All objects and information contained in the variable type Project are actually dictionaries of type Dict{String, Any}. Since Julia is not an object oriented language, the parameters and other parts of these internal dictionaries can be accessed and edited directly by key and value. However, if you do that, then certain features like undo/redo and automatic plot updating will not work.","category":"page"},{"location":"testing/#Testing","page":"Testing","title":"Testing","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"During the development of HOHQMesh and its interactive functionality, we rely on continuous testing to ensure that modifications or new features do not break existing functionality or add other errors. In the main HOHQMesh repository, this is facilitated by GitHub Actions, 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. In Trixi and its related repositories, tests are triggered by","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"each git push to main and\neach git push to any pull request.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"Besides checking functionality, we also analyze the Test coverage to ensure that we do not miss important parts during testing.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"note: Test and coverage requirements\nBefore merging a pull request (PR) to main, we require thatthe code passes all functional tests\ncode coverage does not decrease.","category":"page"},{"location":"testing/#Testing-setup","page":"Testing","title":"Testing setup","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"The entry point for all testing is the file test/runtests.jl, which is run by the automated tests and which can be triggered manually by executing","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"julia> using Pkg; Pkg.test(\"HOHQMesh\")","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"in the REPL. Since there already exist many tests, we have split them up into multiple files in the test directory to allow for faster testing of individual parts of the code. Thus in addition to performing all tests, you can also just include one of the files named test_xxx.jl to run only a specific subset, e.g.,","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"julia> # Run all test for the interactive Curve API\n include(joinpath(\"test\", \"test_curve.jl\"))","category":"page"},{"location":"testing/#Adding-new-tests","page":"Testing","title":"Adding new tests","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"We use Julia's built-in unit testing capabilities to configure tests. In general, newly added code must be covered by at least one test, and all new scripts added to the examples/ directory must be used at least once during testing. New tests should be added to the corresponding test/test_xxx.jl file, e.g., a test involving visualization capabilities would go into test/test_visualization.jl. Please study one of the existing tests and stay consistent to the current style when creating new tests.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"Since we want to test as much as possible, we have a lot of tests and frequently create new ones. Therefore, new tests should be as short as reasonably possible, i.e., without being too insensitive to pick up changes or errors in the code.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"When you add new tests, please check whether all CI jobs still take approximately the same time. If the job where you added new tests takes much longer than everything else, please consider moving some tests from one job to another (or report this incident and ask the main developers for help).","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"note: Test duration\nAs a general rule, tests should last no more than 10 seconds when run with a single thread and after compilation (i.e., excluding the first run).","category":"page"},{"location":"testing/#Test-coverage","page":"Testing","title":"Test coverage","text":"","category":"section"},{"location":"testing/","page":"Testing","title":"Testing","text":"In addition to ensuring that the code produces the expected results, the automated tests also record the code coverage. The resulting coverage reports, i.e., which lines of code were executed by at least one test and are thus considered \"covered\" by testing, are automatically uploaded to Coveralls for easy analysis. Typically, you see a number of Coveralls results at the bottom of each pull request: One for each parallel job (see Testing setup), which can usually be ignored since they only cover parts of the code by definition, and a cumulative coverage result named coverage/coveralls. The \"Details\" link takes you to a detailed report on which lines of code are covered by tests, which ones are missed, and especially which new lines the pull requests adds to HOHQMesh's code base that are not yet covered by testing.","category":"page"},{"location":"testing/","page":"Testing","title":"Testing","text":"note: Coverage requirements\nIn general, we require pull requests to not decrease the overall test coverage percentage in main, with a hard lower bound of 97%.","category":"page"},{"location":"authors/#Authors","page":"Authors","title":"Authors","text":"","category":"section"},{"location":"authors/","page":"Authors","title":"Authors","text":"HOHQMesh.jl is maintained by the Trixi authors. Its development is coordinated by the principal developers who are its main contributors and can be contacted in case of questions about HOHQMesh. In addition, there are contributors who have provided substantial additions or modifications. The HOHQMesh mesh generator itself is developed by David A. Kopriva.","category":"page"},{"location":"authors/#Principal-Developers","page":"Authors","title":"Principal Developers","text":"","category":"section"},{"location":"authors/","page":"Authors","title":"Authors","text":"David A. Kopriva, Florida State University, USA\nAndrew Winters, Linköping University, Sweden","category":"page"},{"location":"authors/#Contributors","page":"Authors","title":"Contributors","text":"","category":"section"},{"location":"authors/","page":"Authors","title":"Authors","text":"The following people contributed major additions or modifications to HOHQMesh and are listed in alphabetical order:","category":"page"},{"location":"authors/","page":"Authors","title":"Authors","text":"David Kopriva\nHendrik Ranocha\nMichael Schlottke-Lakemper\nAndrew Winters","category":"page"},{"location":"reference/#HOHQMesh.jl-API","page":"Reference","title":"HOHQMesh.jl API","text":"","category":"section"},{"location":"reference/","page":"Reference","title":"Reference","text":"CurrentModule = HOHQMesh","category":"page"},{"location":"reference/","page":"Reference","title":"Reference","text":"Modules = [HOHQMesh]","category":"page"},{"location":"reference/#HOHQMesh.add!-Tuple{HOHQMesh.Project, Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.add!","text":"add!(proj::Project, crv::Dict{String,Any}, boundaryName::String)\n\nAdd a curve to the inner boundary named boundaryName.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.add!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.add!","text":"add!(proj::Project, obj::Dict{String,Any})\n\nAdd a curve to the outer boundary or a refinement reion to the project\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Array{Float64, N} where N, Array{Float64, N} where N, Array{Int64, N} where N}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid!(proj::Project, x0::Array{Float64}, dx::Array{Float64}, N::Array{Int})\n\nAdd the background grid block using the left corner, x0, the grid size dx, and the number of intervals in each direction. Use this when there is no outer boundary defined in the model. This version mimics HOHQMesh's backgroundGrid block, but the version\n\naddBackgroundGrid!(proj::Project, box::Array{Float64}, N::Array{Int} )\n\nis a lot easier to use.\n\nTODO: Change HOHQMesh and delete this way to specify the domain and use the bounding box one instead.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Array{Float64, N} where N, Array{Int64, N} where N}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid!(proj::Project, box::Array{Float64}, N::Array{Int} )\n\nAdd the background grid block with bounding box = [TOP, LEFT, BOTTOM, RIGHT] and the number of intervals in each diredction. Use this when there is no outer boundary defined in the model.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid(proj::Project, bgSize::Array{Float64})\n\nAdd the background grid block with the grid size to be a 3-vector. Use this when there is an outer boundary defined in the model.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addBackgroundGrid!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addBackgroundGrid!","text":"addBackgroundGrid!(proj::Project, dict::Dict{String,Any})\n\nUsed only for undo/redo.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addCurveToInnerBoundary!-Tuple{HOHQMesh.Project, Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.addCurveToInnerBoundary!","text":"addCurveToInnerBoundary!(proj::Project, crv::Dict{String,Any}, boundaryName::String)\n\nAdd a curve to the inner boundary with name boundaryName. If an inner boundary of that name does not exist, one is created.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addCurveToOuterBoundary!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addCurveToOuterBoundary!","text":"addCurveToOuterBoundary!(proj::Project, crv::Dict{String,Any})\n\nAdd a curve to the outer boundary. The curves must be added in order counter-clockwise\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addInnerBoundaryWithName!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.addInnerBoundaryWithName!","text":"addInnerBoundaryWithName!(proj::Project,name::String)\n\nCreate a new empty inner boundary with the given name.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addObserver-Tuple{Any, String, Any}","page":"Reference","title":"HOHQMesh.addObserver","text":"addObserver(observer::Any, note::String, f::Any)\n\nf is the function to be executed (called) when a notification of name note is given.\n\nThe function called upon notification must have the signature f(observer, sender, args...)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addOuterBoundary!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addOuterBoundary!","text":"addOuterBoundary!(proj::Project, outerBoundary::Dict{String,Any})\n\nAdd an empty outer boundary to the project. There can be only one. This function is only used as part of an undo operation removing the outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addRefinementRegion!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addRefinementRegion!","text":"addRefinementRegion!(proj::Project,r::Dict{String,Any})\n\nAdd the refinement region to the project\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addRefinementRegionPoints!-Tuple{HOHQMesh.Project, Dict{String, Any}}","page":"Reference","title":"HOHQMesh.addRefinementRegionPoints!","text":"addRefinementRegionPoints!(proj::Project, r::Dict{String,Any})\n\nCompute and add to the project the plotting points for the refinement region\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.addRunParameters!","page":"Reference","title":"HOHQMesh.addRunParameters!","text":"addRunParameters!(proj::Project,\n plotFormat::String = \"skeleton\",\n meshFileFormat::String = \"ISM-V2\",\n polynomialOrder::Int = 5)\n\nAdd a RUN_PARAMETERS block and set all the parameters in one call.\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.addSpringSmoother!","page":"Reference","title":"HOHQMesh.addSpringSmoother!","text":"addSpringSmoother!(status::String, type::String, nIterations::Int)\n\nStatus is either ON or OFF Type is either LinearSpring or LinearAndCrossbarSpring\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.bboxUnion-Tuple{Array{Float64, N} where N, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.bboxUnion","text":"bboxUnion(box1::Array{Float64}, box2::Array{Float64})\n\nReturns the union of two bounding boxes\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.curveBounds-Tuple{Matrix{Float64}}","page":"Reference","title":"HOHQMesh.curveBounds","text":"curveBounds(crvPoints::Array{Float64,2})\n\nFind the bounds of a single curve, discretized as an array\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.emptyBounds-Tuple{}","page":"Reference","title":"HOHQMesh.emptyBounds","text":"emptyBounds()\n\nReturns an array that will always be ignored when unioned with another bounding box.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.examples_dir-Tuple{}","page":"Reference","title":"HOHQMesh.examples_dir","text":"examples_dir()\n\nReturn the path to the directory with some example mesh setups.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.extract_mesh_file_format-Tuple{Any}","page":"Reference","title":"HOHQMesh.extract_mesh_file_format","text":"extract_mesh_file_format(control_file)\n\nReturn a string with the desired output format of the HOHQMesh generated mesh file. This information is given within the RUN_PARAMETERS of the CONTROL_INPUT block of the control file. See the HOHQMesh documentation for details.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.generate_mesh-Tuple{Any}","page":"Reference","title":"HOHQMesh.generate_mesh","text":"generate_mesh(control_file;\n output_directory=\"out\",\n mesh_filename=nothing, plot_filename=nothing, stats_filename=nothing,\n verbose=false)\n\nGenerate a mesh based on the control_file with the HOHQMesh mesh generator and store resulting files in output_directory.\n\nYou can set the mesh filename, the plot filename, and the statistics filename using the keyword arguments mesh_filename, plot_filename, and stats_filename, respectively. If set to nothing, the filenames for the mesh file, plot file, and statistics file are generated automatically from the control file name. For example, path/to/ControlFile.control will result in output files ControlFile.mesh, ControlFile.tec, and ControlFile.txt.\n\nYou can activate verbose output from HOHQMesh that prints additional messages and debugging mesh information with the keyword argument verbose.\n\nThis function returns the output to stdout of the HOHQMesh binary when generating the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.generate_mesh-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.generate_mesh","text":"generate_mesh(proj::Project)\n\nGenerate a mesh from the information stored in a Project created using the interactive mesh functionality. First a check is made if a background grid exists and all inner/outer boundary curves are valid.\n\nThis function will then make a HOHQMesh control file from the control dictionary proj.controlDict and use it to call the wrapper function that interfaces with HOHQMesh. The resulting mesh and control files will be saved to proj.projectDirectory. Also, if there is an active plot of the mesh project it will update to display the generated mesh.\n\nThis function returns the output to stdout of the HOHQMesh binary when generating the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getAllRefinementRegions-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getAllRefinementRegions","text":"getAllRefinementRegions(proj::Project)\n\nGet the list of refinement regions.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcCenter-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcCenter","text":"getArcCenter(crv::Dict{String,Any}, point::Array{Float64})\n\nGet the center of a circular arc as an array\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcEndAngle-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcEndAngle","text":"getArcEndAngle(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcRadius-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcRadius","text":"getArcRadius(arc::Dict{String,Any}, radius::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcStartAngle-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcStartAngle","text":"getArcStartAngle(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getArcUnits-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getArcUnits","text":"getArcUnits(crv::Dict{String,Any}, units::String)\n\nGet the units for the start and end angles of a circular arc curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getBackgroundGridLowerLeft-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getBackgroundGridLowerLeft","text":"getBackgroundGridLowerLeft(proj::Project)\n\nReturns the [x,y] of the lower left point of the background grid.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getBackgroundGridSize-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getBackgroundGridSize","text":"getBackgroundGridSize(proj::Project)\n\nReturns the background grid size array.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getBackgroundGridSteps-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getBackgroundGridSteps","text":"getBackgroundGridSteps(proj::Project)\n\nReturns the [Nx,Ny,Nz] for the background grid.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurve-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.getCurve","text":"getCurve(proj::Project, curveName::String, boundaryName::String)\n\nGet the curve named curveName from the inner boundary named boundaryName\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurve-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getCurve","text":"getCurve(proj::Project, curveName::String)\n\nGet the curve with name curveName from the outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurveName-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getCurveName","text":"getCurveName(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getCurveType-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getCurveType","text":"getCurveType(crv::Dic{String,Any})\n\nGet the type of the curve, `END_POINTSLINE_CURVE`, `PARAMETRIC_EQUATION_CURVE`,\n`SPLINE_CURVE`, or `CIRCULAR_ARC` as a string.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getEndPoint-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getEndPoint","text":"getEndPoint(crv::Dict{String,Any}, point::Array{Float64})\n\nGet the end point for a line curve as an array.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getInnerBoundary-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getInnerBoundary","text":"getInnerBoundary(proj::Project, name::String)\n\nGet the chain of curves from the inner boundary with name name.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getInnerBoundaryChainWithName-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getInnerBoundaryChainWithName","text":"getInnerBoundaryWithName(proj::Project, name::String)\n\nGet the inner boundary CHAIN with the given name. If one does not exist, it is created.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getInnerBoundaryCurve-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.getInnerBoundaryCurve","text":"\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getMeshFileFormat-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getMeshFileFormat","text":"getMeshFileFormat(proj::Project)\n\nReturns the format in which the mesh will be written.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getName-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getName","text":"getName(proj::Project)\n\nReturns the filename to be used by the mesh, plot, control, and stats files.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getOuterBoundaryChainList-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getOuterBoundaryChainList","text":"getOuterBoundaryChainList(proj::Project)\n\nGet the array of outer boundary curves.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getOuterBoundaryCurveWithName-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getOuterBoundaryCurveWithName","text":"getOuterBoundaryCurveWithName(proj::Project, name::String)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getPlotFileFormat-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getPlotFileFormat","text":"getPlotFileFormat(proj::Project)\n\nReturns the plot file format.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getPolynomialOrder-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getPolynomialOrder","text":"getPolynomialOrder(proj::Project)\n\nReturns the polynomial order for boundary curves in the mesh file.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementEnd-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementEnd","text":"getRefinementEnd(r::Dict{String,Any})\n\nReturn Array{Float64} of the end location of the refinement line\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementGridSize-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementGridSize","text":"getRefinementGridSize(r::Dict{String,Any})\n\nReturns the grid size,h, as Float64. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementLocation-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementLocation","text":"getRefinementLocation(r::Dict{String,Any})\n\nReturn Array{Float64} of the location of the refinement center.r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementName-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementName","text":"getRefinementName(r::Dict{String,Any})\n\nReturn name of the refinement. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementRegion-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.getRefinementRegion","text":"getRefinementRegion(proj::Project, indx)\n\nGet the refinement region with index, indx from the project. Returns nothing if there is none. The return value is a dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementRegion-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.getRefinementRegion","text":"(i,r) = getRefinementRegion(project, name)\n\nGet the refinement region with the given name and its location in the list of refinement regions.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementRegionCenter-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementRegionCenter","text":"getRefinementRegionCenter(r::Dict{String,Any})\n\nGet, or compute, the center of the given refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementStart-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementStart","text":"getRefinementStart (r::Dict{String,Any})\n\nReturn Array{Float64} of the start location of the refinement line. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementType-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementType","text":"getRefinementType(r::Dict{String,Any})\n\nReturn the type of refinement, either \"smooth\" or \"sharp\". r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getRefinementWidth-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getRefinementWidth","text":"getRefinementWidth(r::Dict{String,Any})\n\nReturns the region width,w, as Float64. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSmoothingIterations-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getSmoothingIterations","text":"getSmoothingIterations(proj::Project)\n\nGet the number of iterations to smooth the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSmoothingStatus-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getSmoothingStatus","text":"smoothingStatus(proj::Project)\n\nReturns whether the smoother will be \"ON\" or \"OFF\"\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSmoothingType-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.getSmoothingType","text":"getSmoothingType(proj::Project)\n\nReturns either \"LinearSpring\" or \"LinearAndCrossbarSpring\"\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSplineNKnots-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getSplineNKnots","text":"getSplineNKnots(spline::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getSplinePoints-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getSplinePoints","text":"getSplinePoints(spline::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getStartPoint-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getStartPoint","text":"getStartPoint(crv::Dict{String,Any}, point::Array{Float64})\n\nGet the start point for a line curve as an array\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getXEqn-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getXEqn","text":"getXEqn(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getYEqn-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getYEqn","text":"getYEqn(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.getZEqn-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.getZEqn","text":"getZEqn(crv::Dict{String,Any})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.hasBackgroundGrid-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.hasBackgroundGrid","text":"hasBackgroundGrid(proj::Project)\n\nTests to see if the project has a backgroundGrid dictionary defined.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.innerBoundaryIndices-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.innerBoundaryIndices","text":"innerBoundaryIndices(proj::Project, curveName::String)\n\nReturns (curveIndex,chainIndex) for the location of the curve named curveName in it's inner boundary chain.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertInnerBoundaryAtIndex!-Tuple{HOHQMesh.Project, String, Int64, Dict{String, Any}, Vector{Any}, Vector{String}}","page":"Reference","title":"HOHQMesh.insertInnerBoundaryAtIndex!","text":"insertInnerBoundaryAtIndex!(proj::Project, chainName::String, indx::Int, chain::??)\n\nInsert an entire inner boundary. Primarily meant for undo operation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertInnerBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Dict{String, Any}, Int64, String}","page":"Reference","title":"HOHQMesh.insertInnerBoundaryCurveAtIndex!","text":"insertInnerBoundaryCurveAtIndex!(proj::Project, crv::Dict{String,Any},\n indx::Int, boundaryName::String)\n\nInsert a curve crv into an inner boundary chain boundaryName at the specified index indx.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertOuterBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Dict{String, Any}, Int64}","page":"Reference","title":"HOHQMesh.insertOuterBoundaryCurveAtIndex!","text":"insertOuterBoundaryCurveAtIndex!(proj::Project, crv::Dict{String,Any}, indx::Int)\n\nInsert a curve into the outer boundary chain at the specified index.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.insertRefinementRegion!-Tuple{HOHQMesh.Project, Dict{String, Any}, Int64}","page":"Reference","title":"HOHQMesh.insertRefinementRegion!","text":"insertRefinementRegion!(proj::Project, r::Dict{String,Any}, indx::Int)\n\nUsed by undo()\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.modelChainIsOK-Tuple{Vector{Dict{String, Any}}, String}","page":"Reference","title":"HOHQMesh.modelChainIsOK","text":"modelChainIsOK(chain::Vector{Dict{String, Any}}, chainName::String)\n\nReturns true if the chain of curves is contiguous and closed; false otherwise.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.modelCurvesAreOK-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.modelCurvesAreOK","text":"modelCurvesAreOK(proj::Project)\n\nGo through all curves in the model and make sure they are connected and closed. Also, remove any empty outer / inner boundary chains.\n\nReturns true if all curves are connected and closed, false otherwise.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.new","page":"Reference","title":"HOHQMesh.new","text":"new(name::String,\n center::Array{Float64},\n radius::Float64,\n startAngle::Float64,\n endAngle::Float64,\n units::String)\n\nCreate a new circular arc.\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.new-2","page":"Reference","title":"HOHQMesh.new","text":"new(name::String,\n xEqn::String,\n yEqn::String,\n zEqn::String = \"z(t) = 0.0\" )\n\nCreate a new parametric equation curve.\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.new-Tuple{String, Array{Float64, N} where N, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.new","text":"new(name::String,\n xStart::Array{Float64},\n xEnd::Array{Float64})\n\nCreate a new line defined by its end points.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.new-Tuple{String, Int64, Matrix{Float64}}","page":"Reference","title":"HOHQMesh.new","text":"new(name::String, nKnots::Int, data::Matrix{Float64})\n\nCreate a spline curve from an array of knots\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.new-Tuple{String, String}","page":"Reference","title":"HOHQMesh.new","text":"new(name::String, dataFile::String)\n\nCreate a spline curve from the contents of a data file.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newCircularArcCurve","page":"Reference","title":"HOHQMesh.newCircularArcCurve","text":"newCircularArcCurve(name::String, center::Array{Float64},\n startAngle::Float64, endAngle::Float64,\n units::String)\n\nCreates and returns a new circular arc curve in the form of a Dictionary\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.newEndPointsLineCurve-Tuple{String, Array{Float64, N} where N, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.newEndPointsLineCurve","text":"newEndPointsLineCurve(name::String, xStart::Array{Float64},xEnd::Array[Float64])\n\nCreates and returns a new curve defined by its end points in the form of a Dictionary\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newParametricEquationCurve","page":"Reference","title":"HOHQMesh.newParametricEquationCurve","text":"newParametricEquationCurve(name::String,\n xEqn::String,\n yEqn::String,\n zEqn::String = \"z(t) = 0.0\" )\n\nCreates and returns a new parametricEquationCurve in the form of a Dictionary\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.newProject-Tuple{String, String}","page":"Reference","title":"HOHQMesh.newProject","text":"newProject(name::String, folder::String)\n\nCreate a new project with the given name. That name will be used for the mesh and plot files in the specified folder.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newRefinementCenter-Tuple{String, String, Array{Float64, N} where N, Float64, Float64}","page":"Reference","title":"HOHQMesh.newRefinementCenter","text":"newRefinementCenter(name, type,\n center, meshSize,\n width)\n\nCreate refinement center of type \"smooth\" or \"sharp\" centered at center = [x,y,z] with a mesh size meshSize spread over a radius width.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newRefinementLine-Tuple{String, String, Array{Float64, N} where N, Array{Float64, N} where N, Float64, Float64}","page":"Reference","title":"HOHQMesh.newRefinementLine","text":"newRefinementLine(name, type,\n start, end,\n meshSize,\n width)\n\nCreate refinement line of type \"smooth\" or \"sharp\" between start = [x,y,z] and end = [x,y,z] with a mesh size meshSize spread over a width width.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newSplineCurve-Tuple{String, Int64, Matrix{Float64}}","page":"Reference","title":"HOHQMesh.newSplineCurve","text":"newSplineCurve(name::String, nKnots::Int, data::Array{Float64,4})\n\nReturns a spline curve given the number of knots and the array of knots.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.newSplineCurve-Tuple{String, String}","page":"Reference","title":"HOHQMesh.newSplineCurve","text":"newSplineCurve(name::String, dataFile::String)\n\nReturns a spline curve given a data file that contains the number of knots on the first line, and the spline data following that.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.openProject-Tuple{String, String}","page":"Reference","title":"HOHQMesh.openProject","text":"openProject(fileName::String, folder::String)\n\nOpen existing project described in the control File.\n\nfolder = folder the control file is in\nfileName = the name of the file\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.postNotificationWithName-Tuple{Any, String, Tuple}","page":"Reference","title":"HOHQMesh.postNotificationWithName","text":"postNotificationWithName(sender::Any, name::String, userInfo::Tuple)\n\nExecutes the function associated with the observer for the notification note\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.refinementRegionPoints-Tuple{Dict{String, Any}}","page":"Reference","title":"HOHQMesh.refinementRegionPoints","text":"refinementRegionPoints(r::Dict{String,Any})\n\nReturns Array{Float64,2} being the plotting points of a refinement region\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.remove!-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.remove!","text":"remove!(proj::Project, curveName::String, innerBoundaryName::String)\n\nDelete the curve named curveName from the inner boundary named innerBoundaryName\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.remove!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.remove!","text":"remove!(proj::Project, curveName::String)\n\nDelete the curve named curveName from the outer boundary\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeBackgroundGrid!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeBackgroundGrid!","text":"removeBackgroundGrid!(proj::Project)\n\nRemove the background grid block from the project.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeInnerBoundary!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.removeInnerBoundary!","text":"removeInnerBoundary!(proj::Project, chainName::String)\n\nRemove an entire inner boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeInnerBoundaryCurve!-Tuple{HOHQMesh.Project, String, String}","page":"Reference","title":"HOHQMesh.removeInnerBoundaryCurve!","text":"removeInnerBoundaryCurve!(proj::Project, name::String, chainName::String)\n\nRemove the curve with name from an inner boundary chain with chainName.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeInnerBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Int64, String}","page":"Reference","title":"HOHQMesh.removeInnerBoundaryCurveAtIndex!","text":"removeInnerBoundaryCurveAtIndex!(proj::Project, indx::Int, chainName::String)\n\nRemove the curve at index indx from an inner boundary chain with chainName.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeOuterBoundary!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeOuterBoundary!","text":"removeOuterBoundary!(proj::Project)\n\nRemove the outer boundary curve if it exists.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeOuterBoundaryCurveAtIndex!-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.removeOuterBoundaryCurveAtIndex!","text":"removeOuterBoundaryCurveAtIndex!(proj::Project, indx::Int)\n\nRemove a curve from the outer boundary chain at the specified index.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeOuterBoundaryCurveWithName!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.removeOuterBoundaryCurveWithName!","text":"removeOuterBoundaryCurveWithName!(proj::Project, name::String)\n\nRemove the named curve in the outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeRefinementRegion!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.removeRefinementRegion!","text":"removeRefinementRegion!(proj::Project, name::String)\n\nDelete the named refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeRunParameters!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeRunParameters!","text":"removeRunParameters!(proj::Project)\n\nRemove the run parameters block from the project. This is not undo-able.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.removeSpringSmoother!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.removeSpringSmoother!","text":"removeSpringSmoother!(proj::Project)\n\nRemove the background grid block from the project.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.remove_mesh!-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.remove_mesh!","text":"remove_mesh!(proj::Project)\n\nRemove the mesh file from proj.projectDirectory and delete the mesh from the plot\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.saveProject-Tuple{HOHQMesh.Project}","page":"Reference","title":"HOHQMesh.saveProject","text":"saveProject(proj::Project)\n\nproj = Project to be saved\n\nSave a project dictionary to the file path specified when the project was created.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcCenter!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setArcCenter!","text":"setArcCenter!(crv::Dict{String,Any}, point::Array{Float64})\n\nSet the center of a circular arc.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcEndAngle!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setArcEndAngle!","text":"setArcEndAngle!(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcRadius!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setArcRadius!","text":"setArcRadius!(arc::Dict{String,Any}, radius::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcStartAngle!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setArcStartAngle!","text":"setArcStartAngle!(arc::Dict{String,Any}, angle::Float64)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setArcUnits!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setArcUnits!","text":"setArcUnits(crv::Dict{String,Any}, units::String)\n\nSet the units for the start and end angles of a circular arc curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridLowerLeft!-Tuple{HOHQMesh.Project, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setBackgroundGridLowerLeft!","text":"setBackgroundGridLowerLeft!(proj::Project, x0::Array{Float64})\n\nSet the lower left location of the background grid for problems that have no outer boundary.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridSize!","page":"Reference","title":"HOHQMesh.setBackgroundGridSize!","text":"setBackgroundGridSpacing!(proj::Project, dx::Float64, dy::Float64, dz::Float64 = 0.0)\n\nUser facing function\n\n\n\n\n\n","category":"function"},{"location":"reference/#HOHQMesh.setBackgroundGridSize!-Tuple{HOHQMesh.Project, Array{Float64, N} where N, String}","page":"Reference","title":"HOHQMesh.setBackgroundGridSize!","text":"setBackgroundGridSize!(proj::Project, dx::Array{Float64}, key::String)\n\nSet the grid size dx of an existing background grid within proj. Here, dx is passed an array.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridSize!-Tuple{HOHQMesh.Project, Float64, Float64, String}","page":"Reference","title":"HOHQMesh.setBackgroundGridSize!","text":"setBackgroundGridSize!(proj::Project, dx::Float64, dy::Float64, key::String)\n\nSet the grid size dx of an existing background grid within proj. Here, the new grid size in either direction is passed individually with dxand dy.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setBackgroundGridSteps!-Tuple{HOHQMesh.Project, Array{Int64, N} where N}","page":"Reference","title":"HOHQMesh.setBackgroundGridSteps!","text":"setBackgroundGridSteps!(proj::Project, N::Array{Int})\n\nSet how many steps of size setBackgroundGridSpacing in each direction the background grid extends from the lower left.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setCurveName!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setCurveName!","text":"setCurveName!(curveDict, name)\n\nSet the name of the curve represented by curveDict.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setEndPoint!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setEndPoint!","text":"setEndPoint!(crv::Dict{String,Any}, point::Array{Float64})\n\nSet the end point for a line curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setMeshFileFormat!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setMeshFileFormat!","text":"setMeshFileFormat(proj::Project, meshFileFormat::String)\n\nSet the file format for the mesh file. Acceptable choices are \"ISM\", \"ISM-V2\", or \"ABAQUS\".\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setName!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setName!","text":"setName(proj::Project,name::String)\n\nThe name of the project is the filename to be used by the mesh, plot, and stats files. It is also the name of the control file the tool will produce.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setPlotFileFormat!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setPlotFileFormat!","text":"setPlotFileFormat(proj::Project, plotFileFormat::String)\n\nSet the file format for the plot file. Acceptable choices are \"sem\", which includes interior nodes and boundary nodes and \"skeleton\", which includes only the corner nodes.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setPolynomialOrder!-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.setPolynomialOrder!","text":"setPolynomialOrder(proj::Project, p::Int)\n\nSet the polynomial order for boundary curves in the mesh file to p.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementEnd!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setRefinementEnd!","text":"setRefinementEnd!(refinementRegion, location)\n\nSet the end point location of a refinement line, location = [x, y, z].\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementGridSize!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setRefinementGridSize!","text":"setRefinementGridSize!(r::Dict{String,Any}, h)\n\nSet the grid size, h for the refinement region. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementLocation!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setRefinementLocation!","text":"setRefinementLocation!(refinementCenter, location)\n\nSet the location of a refinement center to location = [x,y,z].\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementName!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setRefinementName!","text":"setRefinementName!(r::Dict{String,Any}, type)\n\nSet a name for the refinement region.r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementStart!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setRefinementStart!","text":"setRefinementStart!(refinementRegion, location)\n\nSet the start point location of a refinement line, location = [x, y, z].\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementType!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setRefinementType!","text":"setRefinementType!(refinementRegion, type)\n\nSet the type, either \"smooth\" or \"sharp\" for the given refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setRefinementWidth!-Tuple{Dict{String, Any}, Float64}","page":"Reference","title":"HOHQMesh.setRefinementWidth!","text":"setRefinementWidth!(r::Dict{String,Any}, width)\n\nSet the width of the refinement region. r is the dictionary that represents the refinement region.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSmoothingIterations!-Tuple{HOHQMesh.Project, Int64}","page":"Reference","title":"HOHQMesh.setSmoothingIterations!","text":"setSmoothingIterations!(proj::Project, iterations::Int)\n\nSet the number of iterations to smooth the mesh.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSmoothingStatus!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setSmoothingStatus!","text":"setSmoothingStatus(proj:Project, status::String)\n\nStatus is either \"ON\" or \"OFF\"\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSmoothingType!-Tuple{HOHQMesh.Project, String}","page":"Reference","title":"HOHQMesh.setSmoothingType!","text":"setSmoothingType!(proj:Project, status::String)\n\nType is either LinearSpring or LinearAndCrossbarSpring\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSplineNKnots!-Tuple{Dict{String, Any}, Int64}","page":"Reference","title":"HOHQMesh.setSplineNKnots!","text":"setSplineNKnots!(spline::Dict{String,Any}, nKnots::Int)\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setSplinePoints!-Tuple{Dict{String, Any}, Matrix{Float64}}","page":"Reference","title":"HOHQMesh.setSplinePoints!","text":"setSplinePoints!(spline::Dict{String,Any},points::Array{Float64,4})\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setStartPoint!-Tuple{Dict{String, Any}, Array{Float64, N} where N}","page":"Reference","title":"HOHQMesh.setStartPoint!","text":"setStartPoint!(crv::Dict{String,Any}, point::Array{Float64})\n\nSet the start point for a line curve.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setXEqn!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setXEqn!","text":"setXEqn!(parametricEquationCurve, eqn)\n\nFor a parametric equation, set the x-equation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setYEqn!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setYEqn!","text":"setYEqn!(parametricEquationCurve, eqn)\n\nFor a parametric equation, set the y-equation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.setZEqn!-Tuple{Dict{String, Any}, String}","page":"Reference","title":"HOHQMesh.setZEqn!","text":"setZEqn!(parametricEquationCurve, eqn)\n\nFor a parametric equation, set the zEqn-equation.\n\n\n\n\n\n","category":"method"},{"location":"reference/#HOHQMesh.unRegisterForNotification-Tuple{Any, String}","page":"Reference","title":"HOHQMesh.unRegisterForNotification","text":"unRegisterForNotification(observer::Any, note::String)\n\nRemove the observer from being notified by the notification note\n\n\n\n\n\n","category":"method"},{"location":"tutorials/spline_curves/#Spline-curves","page":"Spline curves","title":"Spline curves","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The purpose of this tutorial is to demonstrate how to create an unstructured mesh on a domain with a curved outer boundary and three inner boundaries. Two of the inner curves are built from cubic splines. The third inner curve is a triangular shape built from a chain of three straight line \"curves\". The outer boundary, inner boundaries, background grid and mesh will be visualized for quality inspection.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"It provides details and clarification for the script interactive_spline_curves.jl from the examples folder.","category":"page"},{"location":"tutorials/spline_curves/#Synopsis","page":"Spline curves","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"This tutorial demonstrates how to:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Create a circular outer boundary curve.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nConstruct and add parametric spline curves.\nConstruct and add an inner boundary chain of straight line segments.","category":"page"},{"location":"tutorials/spline_curves/#Initialization","page":"Spline curves","title":"Initialization","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"From a Julia REPL we load the HOHQMesh package as well as GLMakie, a backend of Makie.jl, to visualize the curves, mesh, etc. from the interactive tool.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"julia> using GLMakie, HOHQMesh","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Now we are ready to interactively generate unstructured quadrilateral meshes!","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We create a new project with the name \"spline_curves\" and assign \"out\" to be the folder where any output files from the mesh generation process will be saved. By default, the output files created by HOHQMesh will carry the same name as the project. For example, the resulting HOHQMesh control file from this tutorial will be named spline_curves.control. If the folder out does not exist, it will be created automatically in the current file path.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline_project = newProject(\"spline_curves\", \"out\")","category":"page"},{"location":"tutorials/spline_curves/#Add-the-outer-boundary","page":"Spline curves","title":"Add the outer boundary","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The outer boundary curve for this tutorial is a circle of radius r=4 centered at the point (0 -1). We define this circular curve with the function newCircularArcCurve as follows","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"circ = newCircularArcCurve(\"outerCircle\", # curve name\n [0.0, -1.0, 0.0], # circle center\n 4.0, # circle radius\n 0.0, # start angle\n 360.0, # end angle\n \"degrees\") # angle units","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We use \"degrees\" to set the angle bounds, but \"radians\" can also be used. The name of the curve stored in the dictionary circ is assigned to be \"outerCircle\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The new circ curve is then added to the spline_project as an outer boundary curve with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToOuterBoundary!(spline_project, circ)","category":"page"},{"location":"tutorials/spline_curves/#Add-a-background-grid","page":"Spline curves","title":"Add a background grid","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"HOHQMesh requires a background grid for the mesh generation process. This background grid sets the base resolution of the desired mesh. HOHQMesh will automatically subdivide from this background grid near sharp features of any curved boundaries.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"For a domain bounded by an outer boundary curve, this background grid is set by indicating the desired element size in the x and y directions. To start, we set the background grid for spline_project to have elements with side length 06 in each direction","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addBackgroundGrid!(spline_project, [0.6, 0.6, 0.0])","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We next visualize the outer boundary curve and background grid with the following","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"plotProject!(spline_project, MODEL+GRID)","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Here, we take the sum of the keywords MODEL and GRID in order to simultaneously visualize the outer boundary and background grid. The resulting plot is given below. The chain of outer boundary curves is called \"Outer\" and it contains a single curve \"outerCircle\" labeled in the figure by O.1.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: background_grid)","category":"page"},{"location":"tutorials/spline_curves/#Add-the-inner-boundaries","page":"Spline curves","title":"Add the inner boundaries","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The domain of this tutorial will contain three inner boundary curves:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Cubic spline curve created from data points read in from a file.\nCubic spline curve created from points directly given in the code.\nTriangular shape built from three straight line \"curves\".","category":"page"},{"location":"tutorials/spline_curves/#Cubic-spline-with-data-from-a-file","page":"Spline curves","title":"Cubic spline with data from a file","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"A parametric cubic spline curve can be constructed from a file of data points. The first line of this plain text file must indicate the number of nodes. Then line-by-line the file contains the knots t_j, x_j, y_j, z_j where j indexes the number of nodes. If the spline curve is to be closed. The last data point must be the same as the first. For examples, see the HOHQMesh documentation or open the file test_spline_curve_data.txt in the examples folder","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"We create a parametric spline curve from a file with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline1 = newSplineCurve(\"big_spline\", joinpath(@__DIR__, \"examples\", \"test_spline_curve_data.txt\"))","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The name of the curve stored in the dictionary spline1 is assigned to be \"big_spline\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The new spline1 curve is then added to the spline_project as an inner boundary curve with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToInnerBoundary!(spline_project, spline1, \"inner1\")","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"This inner boundary chain name \"inner1\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that a curve has been added to the project and the plot is updated appropriately, as shown below. The chain for the inner boundary curve is called inner1 and it contains a single curve \"big_spline\" labeled in the figure by 1.1.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: one_curve)","category":"page"},{"location":"tutorials/spline_curves/#Cubic-spline-from-data-in-Julia","page":"Spline curves","title":"Cubic spline from data in Julia","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Alternatively, a parametric cubic spline curve can be constructed directly from data points provided in the code. These points take the form [t, x, y, z] where t is the parameter variable that varies between 0 and 1. For the spline construction, the number of points is included as an input argument as well as the actual parametric point data. Again, if the spline curve is to be closed, the first and last data point must match.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Below, we construct another parametric spline using this strategy that consists of five data points","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline_data = [ [0.0 1.75 -1.0 0.0]\n [0.25 2.1 -0.5 0.0]\n [0.5 2.7 -1.0 0.0]\n [0.75 0.6 -2.0 0.0]\n [1.0 1.75 -1.0 0.0] ]\n\nspline2 = newSplineCurve(\"small_spline\", 5, spline_data)","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The name of the curve stored in the dictionary spline2 is assigned to be \"small_spline\". This curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The new spline2 curve is then added to the spline_project as an inner boundary curve with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToInnerBoundary!(spline_project, spline2, \"inner2\")","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"This inner boundary chain name \"inner2\" is used internally by HOHQMesh. The visualization of the background grid automatically detects that a curve has been added to the project and the plot is updated appropriately, as shown below. The chain for the inner boundary curve is called inner2 and it contains a single curve \"small_spline\" labeled in the figure by 2.1.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: two_curves)","category":"page"},{"location":"tutorials/spline_curves/#Triangular-shape","page":"Spline curves","title":"Triangular shape","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Finally, we build a triangular shaped inner boundary curve built from a chain of three straight lines. Each line segment is defined using the function newEndPointsLineCurve. We construct the three line segments that define the edges of a triangular shape with","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"edge1 = newEndPointsLineCurve(\"triangle\", # curve name\n [-2.3, -1.0, 0.0], # start point\n [-1.7, -1.0, 0.0]) # end point\n\nedge2 = newEndPointsLineCurve(\"triangle\", # curve name\n [-1.7, -1.0, 0.0], # start point\n [-2.0, -0.4, 0.0]) # end point\n\nedge3 = newEndPointsLineCurve(\"triangle\", # curve name\n [-2.0, -0.4, 0.0], # start point\n [-2.3, -1.0, 0.0]) # end point","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Here, each edge of the curve is given the same name \"triangle\" as this curve name is also the label that HOHQMesh will give to this boundary curve in the resulting mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The three line segments edge1, edge2, and edge3 are connected in a counter-clockwise orientation as required by HOHQMesh.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"addCurveToInnerBoundary!(spline_project, edge1, \"inner3\")\naddCurveToInnerBoundary!(spline_project, edge2, \"inner3\")\naddCurveToInnerBoundary!(spline_project, edge3, \"inner3\")","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The inner boundary chain name \"inner3\" is used internally for HOHQMesh. Again, the active visualization automatically detects that new curves have been added to the project and the plot is updated appropriately, as shown below. The chain for the inner triangular boundary is called inner3 and it contains a three curve segments all called \"triangle\" labeled in the figure by 3.1, 3.2, and 3.3.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: three_curves)","category":"page"},{"location":"tutorials/spline_curves/#Generate-the-mesh","page":"Spline curves","title":"Generate the mesh","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"With the background grid, outer boundary curve, and all inner boundary curves added to the spline_project we are ready to generate the mesh. This will output the following files to the out folder:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"spline_curves.control: A HOHQMesh control file for the current project.\nspline_curves.tec: A TecPlot formatted file to visualize the mesh with other software, e.g., ParaView.\nspline_curves.mesh: A mesh file with format ISM-V2 (the default format).","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"To do this we execute the command","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"generate_mesh(spline_project)\n 1 chevron elements removed from mesh.\n 1 chevron elements removed from mesh.\n\n *******************\n 2D Mesh Statistics:\n *******************\n Total time = 0.29613000000000000\n Number of nodes = 1177\n Number of Edges = 2225\n Number of Elements = 1047\n Number of Subdivisions = 4\n\n Mesh Quality:\n Measure Minimum Maximum Average Acceptable Low Acceptable High Reference\n Signed Area 0.00006214 0.15607014 0.04505181 0.00000000 999.99900000 1.00000000\n Aspect Ratio 1.00008989 2.78073390 1.23192911 1.00000000 999.99900000 1.00000000\n Condition 1.00000055 3.81350981 1.15526066 1.00000000 4.00000000 1.00000000\n Edge Ratio 1.00014319 6.76310951 1.46264239 1.00000000 4.00000000 1.00000000\n Jacobian 0.00001495 0.10424741 0.03955903 0.00000000 999.99900000 1.00000000\n Minimum Angle 37.25504203 89.96195708 74.41060580 40.00000000 90.00000000 90.00000000\n Maximum Angle 90.03105286 157.27881545 107.90994073 90.00000000 135.00000000 90.00000000\n Area Sign 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000 1.00000000","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"The call to generate_mesh also prints mesh quality statistics to the screen. HOHQMesh also reports mesh clean-up that occurred during the generation process, in this case the removal of \"bad\" chevron shaped elements that were present within the automatic subdivision procedure. The visualization updates automatically and the background grid is removed after when the mesh is generated.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"note: Mesh visualization\nCurrently, only the \"skeleton\" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"(Image: final_spline)","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the fine features of the curved inner boundaries, particularly near the sharp angles of the \"big_spline\" curve. We decide that we are satisfied with the overall mesh quality.","category":"page"},{"location":"tutorials/spline_curves/#Summary","page":"Spline curves","title":"Summary","text":"","category":"section"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"In this tutorial we demonstrated how to:","category":"page"},{"location":"tutorials/spline_curves/","page":"Spline curves","title":"Spline curves","text":"Create a circular outer boundary curve.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nConstruct and add parametric spline curves.\nConstruct and add an inner boundary chain of straight line segments.","category":"page"},{"location":"tutorials/introduction/#Tutorials","page":"Overview","title":"Tutorials for HOHQMesh.jl","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"The tutorial section for HOHQMesh.jl provides step-by-step commands and accompanying explanations for the major features of the interactive mesh generation tools.","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"For a general overview of the capabilities and features of HOHQMesh to generate quadrilateral and hexahedral meshes we refer to the Pre-made Examples of the HOHQMesh documentation.","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"For more information on how an unstructured mesh generated with HOHQMesh.jl can be used in the simulation framework Trixi.jl see the relevant tutorial.","category":"page"},{"location":"tutorials/introduction/#[Straight-sided-outer-boundary](@ref)","page":"Overview","title":"Straight-sided outer boundary","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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.","category":"page"},{"location":"tutorials/introduction/#Synopsis","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Query and adjust the RunParameters of a project.\nDefine a rectangular outer boundary and set the background grid.\nVisualize an interactive mesh project.\nAdd circular inner boundary curves.","category":"page"},{"location":"tutorials/introduction/#[Curved-outer-boundary](@ref)","page":"Overview","title":"Curved outer boundary","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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.","category":"page"},{"location":"tutorials/introduction/#Synopsis-2","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Define a curved outer boundary using parametric equations.\nAdd and adjust the background grid.\nVisualize an interactive mesh project.\nAdd manual refinement to a local region of the domain.","category":"page"},{"location":"tutorials/introduction/#[Spline-curves](@ref)","page":"Overview","title":"Spline curves","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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\".","category":"page"},{"location":"tutorials/introduction/#Synopsis-3","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Create a circular outer boundary curve.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nConstruct and add parametric spline curves.\nConstruct and add an inner boundary chain of straight line segments.","category":"page"},{"location":"tutorials/introduction/#[Creating-and-editing-curves](@ref)","page":"Overview","title":"Creating and editing curves","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"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. There are details for the removal and replacement of a portion of a chain.","category":"page"},{"location":"tutorials/introduction/#Synopsis-4","page":"Overview","title":"Synopsis","text":"","category":"section"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Demonstrates how to:","category":"page"},{"location":"tutorials/introduction/","page":"Overview","title":"Overview","text":"Create and edit an outer boundary chain.\nCreate and edit an inner boundary chain.\nAdd the background grid when an outer boundary curve is present.\nVisualize an interactive mesh project.\nDiscuss undo / redo capabilities.\nConstruct and add parametric spline curves.\nConstruct and add a curve from parametric equations.\nConstruct and add straight line segments.\nConstruct and add circular arc segments.","category":"page"},{"location":"guided-tour/#Guided-tour","page":"Guided tour","title":"Guided tour","text":"","category":"section"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"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.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"See the HOHQMesh documentation for more details about its terminology and capabilities.","category":"page"},{"location":"guided-tour/#Mesh-from-a-control-file","page":"Guided tour","title":"Mesh from a control file","text":"","category":"section"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"A first example script reads in an existing control file from the HOHQMesh examples collection and makes it into a Project. To run this example, execute","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"julia> include(joinpath(HOHQMesh.examples_dir(), \"interactive_from_control_file.jl\"))","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"This command will create mesh and plot files in the out directory.","category":"page"},{"location":"guided-tour/#Build-a-mesh-from-scratch","page":"Guided tour","title":"Build a mesh from scratch","text":"","category":"section"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"A second example script interactive_outer_boundary.jl makes a new project consisting of an outer, circular boundary, and an inner boundary in the shape of an ice cream cone. To run this example, execute","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"julia> include(joinpath(HOHQMesh.examples_dir(), \"interactive_outer_boundary.jl\"))","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"For completeness, we provide the example script and walk-through each step in the construction of the Project below.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"using HOHQMesh\n\n# Create a new project with the name \"IceCreamCone\", which will also be the\n# name of the mesh, plot and stats files, written to output folder `out`.\n\np = newProject(\"IceCreamCone\", \"out\")\n\n# Outer boundary for this example mesh is a complete circle. Add it into the project.\n\ncirc = newCircularArcCurve(\"outerCircle\", [0.0, -1.0, 0.0], 4.0, 0.0, 360.0, \"degrees\")\naddCurveToOuterBoundary!(p, circ)\n\n# Inner boundary is three curves. Two straight lines and a circular arc.\n# Note the three curve are connected to ensure a counter-clockwise orientation\n# as required by HOHQMesh\n\n# Create the three interior curves. The individual names of each curve in the inner\n# chain are used internally by HOHQMesh and are output as the given boundary names in\n# the mesh file.\n\ncone1 = newEndPointsLineCurve(\"cone1\", [0.0, -3.0, 0.0], [1.0, 0.0, 0.0])\niceCream = newCircularArcCurve(\"iceCream\", [0.0, 0.0, 0.0], 1.0, 0.0, 180.0, \"degrees\")\ncone2 = newEndPointsLineCurve(\"cone2\", [-1.0, 0.0, 0.0], [0.0, -3.0, 0.0])\n\n# Assemble the three curve in a closed chain oriented counter-clockwise. The chain\n# name `IceCreamCone` is only used internally by HOHQMesh.\n\naddCurveToInnerBoundary!(p, cone1, \"IceCreamCone\")\naddCurveToInnerBoundary!(p, iceCream, \"IceCreamCone\")\naddCurveToInnerBoundary!(p, cone2, \"IceCreamCone\")\n\n# Adjust some `RunParameters` and overwrite the defaults values. In this case, we\n# set a new value for the boundary order polynomial representation and adjust the\n# output mesh file format to be `sem`\n\nsetPolynomialOrder!(p, 4)\nsetPlotFileFormat!(p, \"sem\")\n\n# A background grid is required for the mesh generation. In this example we lay a\n# background grid of Cartesian boxes with size 0.5.\n\naddBackgroundGrid!(p, [0.5, 0.5, 0.0])\n\n# Plot the project model curves and background grid\n\nif isdefined(Main, :Makie)\n plotProject!(p, MODEL+GRID)\n @info \"Press enter to generate the mesh and update the plot.\"\n readline()\n else # Throw an informational message about plotting to the user\n @info \"To visualize the project (boundary curves, background grid, mesh, etc.), include `GLMakie` and run again.\"\n end\n\n# Generate the mesh. This produces the mesh and TecPlot files `AllFeatures.mesh` and `AllFeatures.tec`\n# and save them to the `out` folder. Also, if there is an active plot in the project `p` it is\n# updated with the mesh that was generated.\n\ngenerate_mesh(p)\n\n# After the mesh successfully generates mesh statistics, such as the number of corner nodes,\n# the number of elements etc., are printed to the REPL","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"The first line creates a new project, where the mesh and plot file names will be derived from the project name, \"IceCreamCone\" written to the specified folder.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"To develop the model, one adds curves to the outer boundary or to multiple inner boundaries, if desired. As in HOHQMesh, there are four curve classes currently available:","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Parametric equations\nCubic Splines\nLines defined by their end points\nCircular arcs","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"In the example, the outer boundary is a closed circular arc with center at [0.0, 0.0, 0.0] with radius 4, starting at zero and ending at 360 degrees. It is added to the project with addCurveToOuterBoundary!. You can add any number of curves to the outer boundary.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Similarly, you create curves and add them to as many inner boundaries that you want to have. In the example, there is one inner boundary, \"IceCreamCone\" made up of two straight lines and a half circular arc. Again, they are defined counter-clockwise.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"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\").","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"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 to be specified using","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"addBackgroundGrid!(proj::Project, bgSize::Array{Float64})","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"The example sets the background mesh size to be 0.1 in the x and y directions. The z component is ignored.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"The script finishes by generating the quad mesh and plotting the results, as shown below","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"(Image: iceCreamCone)","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Finally, the script returns the project so that it can be edited further, if desired.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"To save a control file for HOHQMesh, simply invoke","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"saveProject(proj::Project, outFile::String)","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"where outFile is the name of the control file (traditionally with a .control extension). saveProject is automatically called when a mesh is generated.","category":"page"},{"location":"guided-tour/","page":"Guided tour","title":"Guided tour","text":"Note, a third example script interactive_outer_boundary_generic.jl is identical to that which was explained above except that the function calls use the generic versions of functions, e.g., new or add!.","category":"page"},{"location":"license/#License","page":"License","title":"License","text":"","category":"section"},{"location":"license/","page":"License","title":"License","text":"MIT LicenseCopyright (c) 2021-present David Kopriva, Andrew Winters, and Michael Schlottke-LakemperPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.","category":"page"},{"location":"CheatSheet/#Commands-Cheat-Sheet","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"This provides a quick reference for the syntax 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 constructs an identical example mesh as shown in the Guided tour using generic function calls.","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"A thorough description of the functions can be found in the API section.","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"The general workflow of the interactive mesh functionality within a REPL session is","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"Create a project\nAdd boundary curves\nAdd a background grid\nAdd manual refinement (if desired)\nGenerate mesh","category":"page"},{"location":"CheatSheet/#Project","page":"Commands Cheat Sheet","title":"Project","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" p = newProject(, )","category":"page"},{"location":"CheatSheet/#cs-plotting","page":"Commands Cheat Sheet","title":"Plotting","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" plotProject!(p, options)\n updatePlot!(p, options)","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"The options are any sum of MODEL, GRID, REFINEMENTS, and MESH.","category":"page"},{"location":"CheatSheet/#Curves","page":"Commands Cheat Sheet","title":"Curves","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" c = new(name, startLocation [x,y,z],endLocation [x,y,z]) *Straight Line*\n c = new(name,center [x,y,z],radius, startAngle, endAngle) *Circular Arc*\n c = new(name, xEqn, yEqn, zEqn) *Parametric equation*\n c = new(name, dataFile) *Spline with data from a file*\n c = new(name, nKnots, knotsMatrix) *Spline with given knot values*","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"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.","category":"page"},{"location":"CheatSheet/#cs-manual-refinement","page":"Commands Cheat Sheet","title":"Manual Refinement","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" r = newRefinementCenter(name, type, center, gridSize, radius)\n r = newRefinementLine(name, type, startPoint, endPoint, gridSize, width)","category":"page"},{"location":"CheatSheet/#Adding-to-a-Project","page":"Commands Cheat Sheet","title":"Adding to a Project","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" add!(p, c) *Add outer boundary curve*\n add!(p, c, ) *Add curve to an inner boundary*\n add!(p, r) *Add refinement region*\n\n addBackgroundGrid!(p, [top, left, bottom, right], [nX, nY, nZ]) *No outer boundary*\n addBackgroundGrid!(p, [dx, dy, dz]) *If an outer boundary is present*","category":"page"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"Shown here is the use of the function add!, which is a shortcut to the full functions, e.g. addOuterBoundaryCurve, etc. which have the same arguments.","category":"page"},{"location":"CheatSheet/#Accessing-items","page":"Commands Cheat Sheet","title":"Accessing items","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" crv = getCurve(p, curveName) *Get a curve in the outer boundary*\n crv = getCurve(p, curveName, boundaryName) *Get a curve in an inner boundary*\n indx, chain = getChain(p, boundaryName) *Get a complete inner boundary curve*\n r = getRefinementRegion(p, name)","category":"page"},{"location":"CheatSheet/#Removing-from-Project","page":"Commands Cheat Sheet","title":"Removing from Project","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" removeOuterboundary!(p) *Entire outer boundary curve*\n removeInnerBoundary!(p, innerBoundaryName) *Entire inner boundary curve*\n remove!(p, name) *Curve in outer boundary*\n remove!(p, name, innerBoundaryName) *Curve in inner boundary*\n removeRefinementRegion!(p, name)","category":"page"},{"location":"CheatSheet/#Editing-items","page":"Commands Cheat Sheet","title":"Editing items","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":"All items have set/get methods to edit them. Most actions have undo() and redo(). To find out what the next undo/redo actions are, use undoActionName() and redoActionName() to print them to the screen.","category":"page"},{"location":"CheatSheet/#Meshing","page":"Commands Cheat Sheet","title":"Meshing","text":"","category":"section"},{"location":"CheatSheet/","page":"Commands Cheat Sheet","title":"Commands Cheat Sheet","text":" generate_mesh(p)\n remove_mesh!(p)","category":"page"},{"location":"#HOHQMesh.jl","page":"Home","title":"HOHQMesh.jl","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"This package is a Julia frontend to the Fortran-based High Order Hex-Quad Mesher (a.k.a. HOHQMesh) created and developed by David A. Kopriva. It augments HOHQMesh with interactive functionality 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. HOHQMesh.jl is available on Linux, MacOS, and Windows.","category":"page"},{"location":"#Installation","page":"Home","title":"Installation","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"If you have not yet installed Julia, please follow the instructions for your operating system. HOHQMesh.jl works with Julia v1.6 and above.","category":"page"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl is a registered Julia package. Hence, you can install it by executing the following commands in the Julia REPL:","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> import Pkg; Pkg.add(\"HOHQMesh\")","category":"page"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl depends on the binary distribution of the HOHQMesh mesh generator, which is available via the Julia package HOHQMesh_jll.jl and which is automatically installed as a dependency.","category":"page"},{"location":"#Usage","page":"Home","title":"Usage","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"In the Julia REPL, you can load HOHQMesh with","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> using HOHQMesh","category":"page"},{"location":"","page":"Home","title":"Home","text":"and then happily generate away!","category":"page"},{"location":"","page":"Home","title":"Home","text":"Two 2D examples GingerbreadMan and NACA0012 and a 3D example Snake (all from HOHQMesh itself) come delivered with this package. You can generate a mesh for them by executing","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> control_file = joinpath(HOHQMesh.examples_dir(), \"GingerbreadMan.control\")\n\njulia> output = generate_mesh(control_file)","category":"page"},{"location":"","page":"Home","title":"Home","text":"You will then find the resulting output files (mesh, plot file, statistics) in the designated output directory, which defaults to out. The GingerbreadMan.control file will yield the following mesh,","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: gingerbreadman_with_edges_400px)","category":"page"},{"location":"","page":"Home","title":"Home","text":"while the 3D file Snake.control produces this mesh:","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: snake_400px)","category":"page"},{"location":"","page":"Home","title":"Home","text":"Examples scripts of interactive mesh generation tools are available in the examples/ subdirectory. These example scripts are prefaced with the phrase interactive_. There is a brief summary at the top of each interactive example script that describes the mesh it will create and the features of HOHQMesh it uses. An example script can be executed from a Julia REPL session with an include(...) statement, e.g.,","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> include(joinpath(HOHQMesh.examples_dir(), \"interactive_outer_box_two_circles.jl\"))","category":"page"},{"location":"","page":"Home","title":"Home","text":"The resulting output mesh and plot files are saved in the output directory out as designated in the example script. Mesh statistics are printed to the screen.","category":"page"},{"location":"","page":"Home","title":"Home","text":"The interactive functionality uses Makie.jl to visualize the boundary curves and mesh from the interactive tool. A Makie backend, such as GLMakie, can be loaded in addition to HOHQMesh","category":"page"},{"location":"","page":"Home","title":"Home","text":"julia> using Pkg; Pkg.add(\"GLMakie\")\njulia> using GLMakie","category":"page"},{"location":"","page":"Home","title":"Home","text":"Now, running the example script produces a figure in addition to the mesh and plot files that are saved and the output of mesh statistics to the screen.","category":"page"},{"location":"","page":"Home","title":"Home","text":"(Image: box_two_circles)","category":"page"},{"location":"","page":"Home","title":"Home","text":"Further explanation of the interactive functionality can be found here. Additional examples are available in the Tutorials.","category":"page"},{"location":"#authors-index-md","page":"Home","title":"Authors","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl is maintained by the Trixi authors. Its principal developers are Andrew Winters (Linköping University, Sweden) and David A. Kopriva. The HOHQMesh mesh generator itself is developed by David A. Kopriva.","category":"page"},{"location":"#License-and-contributing","page":"Home","title":"License and contributing","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"HOHQMesh.jl is licensed under the MIT license (see License). HOHQMesh itself is also available under the MIT license. Since HOHQMesh is an open-source project, we are very happy to accept contributions from the community. Please refer to Contributing for more details. To get in touch with the developers, join us on Slack or create an issue.","category":"page"},{"location":"#Acknowledgements","page":"Home","title":"Acknowledgements","text":"","category":"section"},{"location":"","page":"Home","title":"Home","text":"The authors would like to thank David A. Kopriva for making the sources of HOHQMesh available as open source, and for assisting with making it work with Julia.","category":"page"}] } diff --git a/dev/testing/index.html b/dev/testing/index.html index c51be3b3..ffb05505 100644 --- a/dev/testing/index.html +++ b/dev/testing/index.html @@ -1,3 +1,3 @@ Testing · HOHQMesh.jl

        Testing

        During the development of HOHQMesh and its interactive functionality, we rely on continuous testing to ensure that modifications or new features do not break existing functionality or add other errors. In the main HOHQMesh repository, this is facilitated by GitHub Actions, 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. In Trixi 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 to ensure that we do not miss important parts during testing.

        Test and coverage requirements

        Before merging a pull request (PR) to main, we require that

        • the code passes all functional tests
        • code coverage does not decrease.

        Testing setup

        The entry point for all testing is the file test/runtests.jl, which is run by the automated tests and which can be triggered manually by executing

        julia> using Pkg; Pkg.test("HOHQMesh")

        in the REPL. Since there already exist many tests, we have split them up into multiple files in the test directory to allow for faster testing of individual parts of the code. Thus in addition to performing all tests, you can also just include one of the files named test_xxx.jl to run only a specific subset, e.g.,

        julia> # Run all test for the interactive Curve API
        -       include(joinpath("test", "test_curve.jl"))

        Adding new tests

        We use Julia's built-in unit testing capabilities to configure tests. In general, newly added code must be covered by at least one test, and all new scripts added to the examples/ directory must be used at least once during testing. New tests should be added to the corresponding test/test_xxx.jl file, e.g., a test involving visualization capabilities would go into test/test_visualization.jl. Please study one of the existing tests and stay consistent to the current style when creating new tests.

        Since we want to test as much as possible, we have a lot of tests and frequently create new ones. Therefore, new tests should be as short as reasonably possible, i.e., without being too insensitive to pick up changes or errors in the code.

        When you add new tests, please check whether all CI jobs still take approximately the same time. If the job where you added new tests takes much longer than everything else, please consider moving some tests from one job to another (or report this incident and ask the main developers for help).

        Test duration

        As a general rule, tests should last no more than 10 seconds when run with a single thread and after compilation (i.e., excluding the first run).

        Test coverage

        In addition to ensuring that the code produces the expected results, the automated tests also record the code coverage. The resulting coverage reports, i.e., which lines of code were executed by at least one test and are thus considered "covered" by testing, are automatically uploaded to Coveralls for easy analysis. Typically, you see a number of Coveralls results at the bottom of each pull request: One for each parallel job (see Testing setup), which can usually be ignored since they only cover parts of the code by definition, and a cumulative coverage result named coverage/coveralls. The "Details" link takes you to a detailed report on which lines of code are covered by tests, which ones are missed, and especially which new lines the pull requests adds to HOHQMesh's code base that are not yet covered by testing.

        Coverage requirements

        In general, we require pull requests to not decrease the overall test coverage percentage in main, with a hard lower bound of 97%.

        + include(joinpath("test", "test_curve.jl"))

        Adding new tests

        We use Julia's built-in unit testing capabilities to configure tests. In general, newly added code must be covered by at least one test, and all new scripts added to the examples/ directory must be used at least once during testing. New tests should be added to the corresponding test/test_xxx.jl file, e.g., a test involving visualization capabilities would go into test/test_visualization.jl. Please study one of the existing tests and stay consistent to the current style when creating new tests.

        Since we want to test as much as possible, we have a lot of tests and frequently create new ones. Therefore, new tests should be as short as reasonably possible, i.e., without being too insensitive to pick up changes or errors in the code.

        When you add new tests, please check whether all CI jobs still take approximately the same time. If the job where you added new tests takes much longer than everything else, please consider moving some tests from one job to another (or report this incident and ask the main developers for help).

        Test duration

        As a general rule, tests should last no more than 10 seconds when run with a single thread and after compilation (i.e., excluding the first run).

        Test coverage

        In addition to ensuring that the code produces the expected results, the automated tests also record the code coverage. The resulting coverage reports, i.e., which lines of code were executed by at least one test and are thus considered "covered" by testing, are automatically uploaded to Coveralls for easy analysis. Typically, you see a number of Coveralls results at the bottom of each pull request: One for each parallel job (see Testing setup), which can usually be ignored since they only cover parts of the code by definition, and a cumulative coverage result named coverage/coveralls. The "Details" link takes you to a detailed report on which lines of code are covered by tests, which ones are missed, and especially which new lines the pull requests adds to HOHQMesh's code base that are not yet covered by testing.

        Coverage requirements

        In general, we require pull requests to not decrease the overall test coverage percentage in main, with a hard lower bound of 97%.

        diff --git a/dev/tutorials/create_edit_curves/index.html b/dev/tutorials/create_edit_curves/index.html index ec97fde1..e9d87c8a 100644 --- a/dev/tutorials/create_edit_curves/index.html +++ b/dev/tutorials/create_edit_curves/index.html @@ -163,4 +163,4 @@ addCurveToInnerBoundary!(sandbox_project, new_bottom_arc, "inner") # Regenerate the final mesh -generate_mesh(sandbox_project) +generate_mesh(sandbox_project) diff --git a/dev/tutorials/curved_outer_boundary/index.html b/dev/tutorials/curved_outer_boundary/index.html index 5f601de3..3fbd0750 100644 --- a/dev/tutorials/curved_outer_boundary/index.html +++ b/dev/tutorials/curved_outer_boundary/index.html @@ -75,4 +75,4 @@ addRefinementRegion!(blob_project, center) # Generate the mesh -generate_mesh(blob_project) +generate_mesh(blob_project) diff --git a/dev/tutorials/introduction/index.html b/dev/tutorials/introduction/index.html index dbecd321..8497d516 100644 --- a/dev/tutorials/introduction/index.html +++ b/dev/tutorials/introduction/index.html @@ -1,2 +1,2 @@ -Overview · HOHQMesh.jl

        Tutorials for HOHQMesh.jl

        The tutorial section for HOHQMesh.jl provides step-by-step commands and accompanying explanations for the major features of the interactive mesh generation tools.

        For a general overview of the capabilities and features of HOHQMesh to generate quadrilateral and hexahedral meshes we refer to the Pre-made Examples of the HOHQMesh documentation.

        For more information on how an unstructured mesh generated with HOHQMesh.jl can be used in the simulation framework Trixi.jl see the relevant tutorial.

        Straight-sided outer boundary

        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

        Demonstrates how to:

        • Query and adjust the RunParameters of a project.
        • Define a rectangular outer boundary and set the background grid.
        • Visualize an interactive mesh project.
        • Add circular inner boundary curves.

        Curved outer boundary

        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

        Demonstrates how to:

        • Define a curved outer boundary using parametric equations.
        • Add and adjust the background grid.
        • Visualize an interactive mesh project.
        • Add manual refinement to a local region of the domain.

        Spline 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

        Demonstrates how to:

        • Create a circular outer boundary curve.
        • Add the background grid when an outer boundary curve is present.
        • Visualize an interactive mesh project.
        • Construct and add parametric spline curves.
        • Construct and add an inner boundary chain of straight line segments.

        Creating and editing curves

        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. There are details for the removal and replacement of a portion of a chain.

        Synopsis

        Demonstrates how to:

        • Create and edit an outer boundary chain.
        • Create and edit an inner boundary chain.
        • Add the background grid when an outer boundary curve is present.
        • Visualize an interactive mesh project.
        • Discuss undo / redo capabilities.
        • Construct and add parametric spline curves.
        • Construct and add a curve from parametric equations.
        • Construct and add straight line segments.
        • Construct and add circular arc segments.
        +Overview · HOHQMesh.jl

        Tutorials for HOHQMesh.jl

        The tutorial section for HOHQMesh.jl provides step-by-step commands and accompanying explanations for the major features of the interactive mesh generation tools.

        For a general overview of the capabilities and features of HOHQMesh to generate quadrilateral and hexahedral meshes we refer to the Pre-made Examples of the HOHQMesh documentation.

        For more information on how an unstructured mesh generated with HOHQMesh.jl can be used in the simulation framework Trixi.jl see the relevant tutorial.

        Straight-sided outer boundary

        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

        Demonstrates how to:

        • Query and adjust the RunParameters of a project.
        • Define a rectangular outer boundary and set the background grid.
        • Visualize an interactive mesh project.
        • Add circular inner boundary curves.

        Curved outer boundary

        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

        Demonstrates how to:

        • Define a curved outer boundary using parametric equations.
        • Add and adjust the background grid.
        • Visualize an interactive mesh project.
        • Add manual refinement to a local region of the domain.

        Spline 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

        Demonstrates how to:

        • Create a circular outer boundary curve.
        • Add the background grid when an outer boundary curve is present.
        • Visualize an interactive mesh project.
        • Construct and add parametric spline curves.
        • Construct and add an inner boundary chain of straight line segments.

        Creating and editing curves

        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. There are details for the removal and replacement of a portion of a chain.

        Synopsis

        Demonstrates how to:

        • Create and edit an outer boundary chain.
        • Create and edit an inner boundary chain.
        • Add the background grid when an outer boundary curve is present.
        • Visualize an interactive mesh project.
        • Discuss undo / redo capabilities.
        • Construct and add parametric spline curves.
        • Construct and add a curve from parametric equations.
        • Construct and add straight line segments.
        • Construct and add circular arc segments.
        diff --git a/dev/tutorials/spline_curves/index.html b/dev/tutorials/spline_curves/index.html index d1fbc198..fba2b44d 100644 --- a/dev/tutorials/spline_curves/index.html +++ b/dev/tutorials/spline_curves/index.html @@ -44,4 +44,4 @@ 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 - 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. HOHQMesh also reports mesh clean-up that occurred during the generation process, in this case the removal of "bad" chevron shaped elements that were present within the automatic subdivision procedure. The visualization updates automatically and the background grid is removed after when the mesh is generated.

        Mesh visualization

        Currently, only the "skeleton" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.

        final_spline

        Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the fine features of the curved inner boundaries, particularly near the sharp angles of the "big_spline" curve. We decide that we are satisfied with the overall mesh quality.

        Summary

        In this tutorial we demonstrated how to:

        • Create a circular outer boundary curve.
        • Add the background grid when an outer boundary curve is present.
        • Visualize an interactive mesh project.
        • Construct and add parametric spline curves.
        • Construct and add an inner boundary chain of straight line segments.
        + 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. HOHQMesh also reports mesh clean-up that occurred during the generation process, in this case the removal of "bad" chevron shaped elements that were present within the automatic subdivision procedure. The visualization updates automatically and the background grid is removed after when the mesh is generated.

        Mesh visualization

        Currently, only the "skeleton" of the mesh is visualized. Thus, the high-order curved boundary information is not seen in the plot but this information is present in the generated mesh file.

        final_spline

        Inspecting the mesh we see that the automatic subdivision in HOHQMesh does well to capture the fine features of the curved inner boundaries, particularly near the sharp angles of the "big_spline" curve. We decide that we are satisfied with the overall mesh quality.

        Summary

        In this tutorial we demonstrated how to:

        • Create a circular outer boundary curve.
        • Add the background grid when an outer boundary curve is present.
        • Visualize an interactive mesh project.
        • Construct and add parametric spline curves.
        • Construct and add an inner boundary chain of straight line segments.
        diff --git a/dev/tutorials/straight_outer_boundary/index.html b/dev/tutorials/straight_outer_boundary/index.html index 1e99d006..6d403fff 100644 --- a/dev/tutorials/straight_outer_boundary/index.html +++ b/dev/tutorials/straight_outer_boundary/index.html @@ -40,4 +40,4 @@ 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 - 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 visualization. The background grid is removed from the visualization when the mesh is generated and the resulting mesh is visualized instead.

        final_circle

        From a visual inspection we decide that we are satisfied with the mesh quality and resolution near the inner circular boundaries.

        Summary

        In this tutorial we demonstrated how to:

        • Query and adjust the RunParameters of a project.
        • Define a rectangular outer boundary and set the background grid.
        • Visualize an interactive mesh project.
        • Add circular inner boundary curves.
        + 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 visualization. The background grid is removed from the visualization when the mesh is generated and the resulting mesh is visualized instead.

        final_circle

        From a visual inspection we decide that we are satisfied with the mesh quality and resolution near the inner circular boundaries.

        Summary

        In this tutorial we demonstrated how to:

        • Query and adjust the RunParameters of a project.
        • Define a rectangular outer boundary and set the background grid.
        • Visualize an interactive mesh project.
        • Add circular inner boundary curves.