From aabebecf71eab6353e1d3d6f1e1ee51314820d78 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Sun, 1 Oct 2023 09:37:54 +0000 Subject: [PATCH] build based on 158455b --- dev/CheatSheet/index.html | 2 +- dev/authors/index.html | 2 +- dev/contributing/index.html | 2 +- dev/development/index.html | 2 +- dev/github-git/index.html | 2 +- dev/guided-tour/index.html | 2 +- dev/index.html | 2 +- dev/interactive-api/index.html | 2 +- dev/interactive_overview/index.html | 2 +- dev/license/index.html | 2 +- dev/reference/index.html | 28 +++++++++---------- dev/search/index.html | 2 +- dev/testing/index.html | 2 +- dev/tutorials/create_edit_curves/index.html | 2 +- .../curved_outer_boundary/index.html | 2 +- dev/tutorials/introduction/index.html | 2 +- dev/tutorials/spline_curves/index.html | 2 +- .../straight_outer_boundary/index.html | 2 +- 18 files changed, 31 insertions(+), 31 deletions(-) diff --git a/dev/CheatSheet/index.html b/dev/CheatSheet/index.html index 166a295f..2c1f4fd3 100644 --- a/dev/CheatSheet/index.html +++ b/dev/CheatSheet/index.html @@ -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 442a011c..bfd079f2 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 21b7d5d1..ba2911ad 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 9367405c..99617126 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 ca705c6b..08c29207 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 cda6a37f..ae9c5aee 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 099039dd..e0f7ca26 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 5905815c..afffb2ad 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 f5a517f1..6f482763 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 0a447ab9..25fbc91c 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 f8fc6ca8..daf95bdf 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 sizemeshSizespread over a radiuswidth`.

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

    Create refinement center of type "smooth" or "sharp" centered at center = [x,y,z]with a mesh sizemeshSizespread over a radiuswidth`.

    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 c6e54f9c..6a98dc9e 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/testing/index.html b/dev/testing/index.html index 43c70052..9323d432 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 f91f9403..0f701bf4 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 513b9a5d..4a6198b9 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 ffd62dec..17000fe2 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 4f5c1240..9e246286 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:

        + 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:

        diff --git a/dev/tutorials/straight_outer_boundary/index.html b/dev/tutorials/straight_outer_boundary/index.html index 9b3e87da..6f8846b2 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:

        + 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: