diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index c5fb0428..62a23836 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-09T19:13:39","documenter_version":"1.1.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-10-10T20:01:30","documenter_version":"1.1.0"}} \ No newline at end of file diff --git a/dev/geo_and_meshes/index.html b/dev/geo_and_meshes/index.html index 8d9b6167..559f7541 100644 --- a/dev/geo_and_meshes/index.html +++ b/dev/geo_and_meshes/index.html @@ -13,26 +13,26 @@ msh = gmsh_ext.import_mesh(Ω;dim=3) gmsh.finalize()
Info    : Meshing 1D...
 Info    : [ 40%] Meshing curve 2 (Circle)
-Info    : Done meshing 1D (Wall 0.000199502s, CPU 0.000198s)
+Info    : Done meshing 1D (Wall 0.000183899s, CPU 0.000181s)
 Info    : Meshing 2D...
 Info    : Meshing surface 1 (Sphere, Frontal-Delaunay)
-Info    : Done meshing 2D (Wall 0.0125892s, CPU 0.012564s)
+Info    : Done meshing 2D (Wall 0.0121862s, CPU 0.01218s)
 Info    : Meshing 3D...
 Info    : 3D Meshing 1 volume with 1 connected component
 Info    : Tetrahedrizing 160 nodes...
-Info    : Done tetrahedrizing 168 nodes (Wall 0.00205342s, CPU 0.002053s)
+Info    : Done tetrahedrizing 168 nodes (Wall 0.00216339s, CPU 0.002164s)
 Info    : Reconstructing mesh...
 Info    :  - Creating surface mesh
 Info    :  - Identifying boundary edges
 Info    :  - Recovering boundary
-Info    : Done reconstructing mesh (Wall 0.00378845s, CPU 0.003785s)
+Info    : Done reconstructing mesh (Wall 0.00401418s, CPU 0.004011s)
 Info    : Found volume 1
 Info    : It. 0 - 0 nodes created - worst tet radius 3.49551 (nodes removed 0 0)
 Info    : 3D refinement terminated (204 nodes total):
 Info    :  - 0 Delaunay cavities modified for star shapeness
 Info    :  - 0 nodes could not be inserted
-Info    :  - 698 tetrahedra created in 0.00281923 sec. (247584 tets/s)
-Info    : Done meshing 3D (Wall 0.0182627s, CPU 0.006299s)
+Info    :  - 698 tetrahedra created in 0.00288538 sec. (241908 tets/s)
+Info    : Done meshing 3D (Wall 0.0175882s, CPU 0.01364s)
 Info    : Optimizing mesh...
 Info    : Optimizing volume 1
 Info    : Optimization starts (volume = 4.04051) with worst = 0.0215055 / average = 0.737765:
@@ -46,7 +46,7 @@
 Info    : 0.70 < quality < 0.80 :       221 elements
 Info    : 0.80 < quality < 0.90 :       206 elements
 Info    : 0.90 < quality < 1.00 :        66 elements
-Info    : 16 edge swaps, 3 node relocations (volume = 4.04051): worst = 0.306908 / average = 0.754398 (Wall 0.000369205s, CPU 0.000361s)
+Info    : 16 edge swaps, 3 node relocations (volume = 4.04051): worst = 0.306908 / average = 0.754398 (Wall 0.000373798s, CPU 0.000366s)
 Info    : No ill-shaped tets in the mesh :-)
 Info    : 0.00 < quality < 0.10 :         0 elements
 Info    : 0.10 < quality < 0.20 :         0 elements
@@ -58,7 +58,7 @@
 Info    : 0.70 < quality < 0.80 :       219 elements
 Info    : 0.80 < quality < 0.90 :       209 elements
 Info    : 0.90 < quality < 1.00 :        72 elements
-Info    : Done optimizing mesh (Wall 0.000953711s, CPU 0.000933s)
+Info    : Done optimizing mesh (Wall 0.000960195s, CPU 0.000939s)
 Info    : 204 nodes 1011 elements
using CairoMakie
 Γ = Inti.external_boundary(Ω)
 poly(view(msh,Γ);strokewidth=1,color=:lightgray, transparency=true)
Example block output

You can also plot the volume mesh (see the Documentation of Makie.poly for more details on possible arguments):

poly(view(msh,Ω);strokewidth=1,color=:lightgray, transparency=true)
Example block output

Two-dimensional meshes are very similar:

    using Inti
@@ -74,4 +74,4 @@
     Ω   = gmsh_ext.import_domain(;dim=2)
     msh = gmsh_ext.import_mesh(Ω;dim=2)
     gmsh.finalize()
-    poly(view(msh,Ω);strokewidth=2)
Example block output + poly(view(msh,Ω);strokewidth=2)Example block output diff --git a/dev/index.html b/dev/index.html index 4a6863e0..4a4d9e1d 100644 --- a/dev/index.html +++ b/dev/index.html @@ -1,2 +1,2 @@ -Home · Inti.jl
+Home · Inti.jl
diff --git a/dev/references/index.html b/dev/references/index.html index 9ab8f894..e95332ab 100644 --- a/dev/references/index.html +++ b/dev/references/index.html @@ -1,5 +1,5 @@ -References · Inti.jl

References

Inti

Inti.ENTITIESConstant
const ENTITIES

Global dictionary storing the used entity tags (the value) for a given dimension (the key).

source
Inti.TAGSConstant
const TAGS::Dict{Int,Vector{Int}}

Global dictionary storing the used entity tags (the value) for a given dimension (the key).

source
Inti.AbstractEntityType
abstract type AbstractEntity

Entity of geometrical nature. Identifiable throught its (dim,tag) key.

source
Inti.AbstractMeshType
abstract type AbstractMesh{N,T}

An abstract mesh structure in dimension N with primite data of type T (e.g. Float64 for double precision representation).

Concrete subtypes of AbstractMesh should implement ElementIterator for accessing the mesh elements.

See also: LagrangeMesh

source
Inti.ElementIteratorType
struct ElementIterator{E,M}

Iterator for all elements of type E on a mesh of type M.

Besides the methods listed in the iterator iterface of Julia, some functions also require the getindex(iter,i::Int) method for accessing the i-th element directly.

source
Inti.FejerType
struct Fejer{N}

N-point Fejer's first quadrature rule for integrating a function over [0,1]. Exactly integrates all polynomials of degree ≤ N-1.

using Inti
+References · Inti.jl

References

Inti

Inti.ENTITIESConstant
const ENTITIES

Global dictionary storing the used entity tags (the value) for a given dimension (the key).

source
Inti.TAGSConstant
const TAGS::Dict{Int,Vector{Int}}

Global dictionary storing the used entity tags (the value) for a given dimension (the key).

source
Inti.AbstractEntityType
abstract type AbstractEntity

Entity of geometrical nature. Identifiable throught its (dim,tag) key.

source
Inti.AbstractMeshType
abstract type AbstractMesh{N,T}

An abstract mesh structure in dimension N with primite data of type T (e.g. Float64 for double precision representation).

Concrete subtypes of AbstractMesh should implement ElementIterator for accessing the mesh elements.

See also: LagrangeMesh

source
Inti.ElementIteratorType
struct ElementIterator{E,M}

Iterator for all elements of type E on a mesh of type M.

Besides the methods listed in the iterator iterface of Julia, some functions also require the getindex(iter,i::Int) method for accessing the i-th element directly.

source
Inti.FejerType
struct Fejer{N}

N-point Fejer's first quadrature rule for integrating a function over [0,1]. Exactly integrates all polynomials of degree ≤ N-1.

using Inti
 
 q = Inti.Fejer(;order=10)
 
@@ -7,14 +7,14 @@
 
 # output
 
-true
source
Inti.GaussType
struct Gauss{D,N} <: ReferenceQuadrature{D}

Tabulated N-point symmetric Gauss quadrature rule for integration over D.

source
Inti.LagrangeElementType
struct LagrangeElement{D,Np,T} <: ReferenceInterpolant{D,T}

A polynomial p : D → T uniquely defined by its Np values on the Np reference nodes of D.

The return type T should be a vector space (i.e. support addition and multiplication by scalars). For istance, T could be a number or a vector, but not a Tuple.

source
Inti.LagrangeMeshType
struct LagrangeMesh{N,T} <: AbstractMesh{N,T}

Data structure representing a generic mesh in an ambient space of dimension N, with data of type T.

The LagrangeMesh can, in principle, store elements of any type. Those are given as a key in the elements dictionary, and the value is a data structure which is capable of reconstructing the elements. For example, for a Lagrange element described by p nodes, the value is a p×Nel matrix of integer, where each columns is a list of tags for the nodes of the element. The nodes are stored in the nodes field.

source
Inti.QuadratureMethod
Quadrature(msh::AbstractMesh,etype2qrule::Dict)
-Quadrature(msh::AbstractMesh;qorder)

Construct a Quadrature of msh, where for each element type E of msh the reference quadrature q = etype2qrule[E] is used. If an order keyword is passed, a default quadrature of the desired order is used for each element type usig _qrule_for_reference_shape.

For co-dimension 1 elements, the normal vector is computed and stored in the QuadratureNodes.

source
Inti.QuadratureNodeType
QuadratureNode{N,T<:Real}

A point in ℝᴺ with a weight for performing numerical integration. A QuadratureNode can optionally store a normal vector.

source
Inti.ReferenceCubeType
const ReferenceCube = ReferenceHyperCube{3}

Singleton type representing the unit cube [0,1]³.

source
Inti.ReferenceHyperCubeType
struct ReferenceHyperCube{N} <: ReferenceShape{N}

Singleton type representing the axis-aligned hypercube in N dimensions with the lower corner at the origin and the upper corner at (1,1,…,1).

source
Inti.ReferenceInterpolantType
abstract type ReferenceInterpolant{D,T}

Interpolanting function mapping points on the domain D<:ReferenceShape (of singleton type) to a value of type T.

Instances el of ReferenceInterpolant are expected to implement:

  • el(x̂): evaluate the interpolation scheme at the (reference) coordinate x̂ ∈ D.
  • jacobian(el,x̂) : evaluate the jacobian matrix of the interpolation at the (reference) coordinate x ∈ D.
Note

For performance reasons, both el(x̂) and jacobian(el,x̂) should take as input a StaticVector and output a static vector or static array.

source
Inti.ReferenceLineType
const ReferenceLine = ReferenceHyperCube{1}

Singleton type representing the [0,1] segment.

source
Inti.ReferenceQuadratureType
abstract type ReferenceQuadrature{D}

A quadrature rule for integrating a function over the domain D <: ReferenceShape.

Calling x,w = q() returns the nodes x, given as SVectors, and weights w, for performing integration over domain(q).

source
Inti.ReferenceShapeType
abstract type ReferenceShape

A fixed reference domain/shape. Used mostly for defining more complex shapes as transformations mapping an ReferenceShape to some region of ℜᴹ.

See e.g. ReferenceLine or ReferenceTriangle for some examples of concrete subtypes.

source
Inti.ReferenceSimplexType
struct ReferenceSimplex{N}

Singleton type representing the N-simplex with N+1 vertices (0,...,0),(0,...,0,1),(0,...,0,1,0),(1,0,...,0)

source
Inti.ReferenceSquareType
const ReferenceSquare = ReferenceHyperCube{2}

Singleton type representing the unit square [0,1]².

source
Inti.ReferenceTetrahedronType
struct ReferenceTetrahedron

Singleton type representing the tetrahedron with vertices (0,0,0),(0,0,1),(0,1,0),(1,0,0)

source
Inti.SubMeshType
struct SubMesh{N,T} <: AbstractMesh{N,T}

Create a view of a parent LagrangeMesh over a given domain.

A submesh implements the interface for AbstractMesh; therefore you can iterate over elements of the submesh just like you would with a mesh.

source
Inti.TensorProductQuadratureType
TensorProductQuadrature{N,Q}

A tensor-product of one-dimension quadrature rules. Integrates over [0,1]^N.

Examples

qx = Fejer(10)
+true
source
Inti.GaussType
struct Gauss{D,N} <: ReferenceQuadrature{D}

Tabulated N-point symmetric Gauss quadrature rule for integration over D.

source
Inti.LagrangeElementType
struct LagrangeElement{D,Np,T} <: ReferenceInterpolant{D,T}

A polynomial p : D → T uniquely defined by its Np values on the Np reference nodes of D.

The return type T should be a vector space (i.e. support addition and multiplication by scalars). For istance, T could be a number or a vector, but not a Tuple.

source
Inti.LagrangeMeshType
struct LagrangeMesh{N,T} <: AbstractMesh{N,T}

Data structure representing a generic mesh in an ambient space of dimension N, with data of type T.

The LagrangeMesh can, in principle, store elements of any type. Those are given as a key in the elements dictionary, and the value is a data structure which is capable of reconstructing the elements. For example, for a Lagrange element described by p nodes, the value is a p×Nel matrix of integer, where each columns is a list of tags for the nodes of the element. The nodes are stored in the nodes field.

source
Inti.QuadratureMethod
Quadrature(msh::AbstractMesh,etype2qrule::Dict)
+Quadrature(msh::AbstractMesh;qorder)

Construct a Quadrature of msh, where for each element type E of msh the reference quadrature q = etype2qrule[E] is used. If an order keyword is passed, a default quadrature of the desired order is used for each element type usig _qrule_for_reference_shape.

For co-dimension 1 elements, the normal vector is computed and stored in the QuadratureNodes.

source
Inti.QuadratureNodeType
QuadratureNode{N,T<:Real}

A point in ℝᴺ with a weight for performing numerical integration. A QuadratureNode can optionally store a normal vector.

source
Inti.ReferenceCubeType
const ReferenceCube = ReferenceHyperCube{3}

Singleton type representing the unit cube [0,1]³.

source
Inti.ReferenceHyperCubeType
struct ReferenceHyperCube{N} <: ReferenceShape{N}

Singleton type representing the axis-aligned hypercube in N dimensions with the lower corner at the origin and the upper corner at (1,1,…,1).

source
Inti.ReferenceInterpolantType
abstract type ReferenceInterpolant{D,T}

Interpolanting function mapping points on the domain D<:ReferenceShape (of singleton type) to a value of type T.

Instances el of ReferenceInterpolant are expected to implement:

  • el(x̂): evaluate the interpolation scheme at the (reference) coordinate x̂ ∈ D.
  • jacobian(el,x̂) : evaluate the jacobian matrix of the interpolation at the (reference) coordinate x ∈ D.
Note

For performance reasons, both el(x̂) and jacobian(el,x̂) should take as input a StaticVector and output a static vector or static array.

source
Inti.ReferenceLineType
const ReferenceLine = ReferenceHyperCube{1}

Singleton type representing the [0,1] segment.

source
Inti.ReferenceQuadratureType
abstract type ReferenceQuadrature{D}

A quadrature rule for integrating a function over the domain D <: ReferenceShape.

Calling x,w = q() returns the nodes x, given as SVectors, and weights w, for performing integration over domain(q).

source
Inti.ReferenceShapeType
abstract type ReferenceShape

A fixed reference domain/shape. Used mostly for defining more complex shapes as transformations mapping an ReferenceShape to some region of ℜᴹ.

See e.g. ReferenceLine or ReferenceTriangle for some examples of concrete subtypes.

source
Inti.ReferenceSimplexType
struct ReferenceSimplex{N}

Singleton type representing the N-simplex with N+1 vertices (0,...,0),(0,...,0,1),(0,...,0,1,0),(1,0,...,0)

source
Inti.ReferenceSquareType
const ReferenceSquare = ReferenceHyperCube{2}

Singleton type representing the unit square [0,1]².

source
Inti.ReferenceTetrahedronType
struct ReferenceTetrahedron

Singleton type representing the tetrahedron with vertices (0,0,0),(0,0,1),(0,1,0),(1,0,0)

source
Inti.SubMeshType
struct SubMesh{N,T} <: AbstractMesh{N,T}

Create a view of a parent LagrangeMesh over a given domain.

A submesh implements the interface for AbstractMesh; therefore you can iterate over elements of the submesh just like you would with a mesh.

source
Inti.TensorProductQuadratureType
TensorProductQuadrature{N,Q}

A tensor-product of one-dimension quadrature rules. Integrates over [0,1]^N.

Examples

qx = Fejer(10)
 qy = TrapezoidalOpen(15)
-q  = TensorProductQuadrature(qx,qy)
source
Base.:==Method
==(e1::AbstractEntity,e2::AbstractEntity)

Two entities are considered equal geometric_dimension(e1)==geometric_dimension(e2) and tag(e1)=tag(e2).

Notice that this implies dim and tag of an entity should uniquely define it, and therefore global variables like TAGS are needed to make sure newly created AbstractEntity have a new (dim,tag) identifier.

source
Base.iterateFunction
iterate(Ω::Domain)

Iterating over a domain means iterating over its entities.

source
Inti._integration_measureMethod
_integration_measure(J::AbstractMatrix)

Given the Jacobian matrix J of a transformation f : ℝᴹ → ℝᴺ, compute the integration measure √det(JᵀJ).

source
Inti._normalMethod
_normal(jac::SMatrix{M,N})

Given a an M by N matrix representing the jacobian of a codimension one object, compute the normal vector.

source
Inti.ambient_dimensionFunction
ambient_dimension(x)

Dimension of the ambient space where x lives. For geometrical objects this can differ from its geometric_dimension; for example a triangle in ℝ³ has ambient dimension 3 but geometric dimension 2, while a curve in ℝ³ has ambient dimension 3 but geometric dimension 1.

source
Inti.boundaryMethod
boundary(e::AbstractEntity)

A vector of entities of dimension dim-1 that form the boundary of e.

source
Inti.degreeMethod
degree(el::LagrangeElement)
-degree(el::Type{<:LagrangeElement})

The polynomial degree el.

source
Inti.dom2eltMethod
dom2elt(m::LagrangeMesh,Ω,E)

Compute the element indices idxs of the elements of type E composing Ω, so that elements(m)[idxs] gives all the elements of type E meshing Ω.

source
Inti.domainFunction
domain(f)

Given a function-like object f: Ω → R, return Ω.

source
Inti.domainMethod
domain(q::ReferenceQuadrature)

The domain of integratino for quadrature rule q.

source
Inti.elementsMethod
elements(msh::AbstractMesh,E::DataType)

Return an iterator for all elements of type E on a mesh msh.

source
Inti.geometric_dimensionFunction
geometric_dimension(x)

NNumber of degrees of freedom necessary to locally represent the geometrical object. For example, lines have geometric dimension of 1 (whether in ℝ² or in ℝ³), while surfaces have geometric dimension of 2.

source
Inti.imageFunction
image(f)

Given a function-like object f: Ω → R, return f(Ω).

source
Inti.integrateMethod
integrate(f,quad::Quadrature)

Compute ∑ᵢ f(qᵢ)wᵢ, where the qᵢ are the quadrature nodes of quad, and wᵢ are the quadrature weights.

Note that you must define f(::QuadratureNode): use q.coords and q.normal if you need to access the coordinate or normal vector at que quadrature node.

source
Inti.integrateMethod
integrate(f,q::ReferenceQuadrature)
-integrate(f,x,w)

Integrate the function f using the quadrature rule q. This is simply sum(f.(x) .* w), where x and w are the quadrature nodes and weights, respectively.

The function f should take an SVector as input.

source
Inti.interface_methodMethod
interface_method(x)

A method of an abstract type for which concrete subtypes are expected to provide an implementation.

source
Inti.internal_boundaryMethod
internal_boundary(Ω::Domain)

Return the internal boundaries of a Domain. These are entities in skeleton(Ω) which appear at least twice as a boundary of entities in Ω.

source
Inti.jacobianMethod
jacobian(f,x)

Given a (possibly vector-valued) functor f : 𝐑ᵐ → 𝐅ⁿ, return the n × m matrix Aᵢⱼ = ∂fᵢ/∂xⱼ.Both x and f(x) are expected to be of SVector type.

source
Inti.keyMethod
key(e::AbstractEntity)

The (dim,tag) pair used as a key to identify geometrical entities.

source
Inti.new_tagMethod
new_tag(dim)

Generate a unique tag for an AbstractEntity of dimension dim.

The implementation consists of adding one to the maximum value of TAGS[dim]

See also: TAGS.

source
Inti.orderMethod
order(q::ReferenceQuadrature)

A quadrature of order p integrates all polynomials of degree ≤ p.

source
Inti.qcoordsMethod
qcoords(q)

Return the coordinate of the quadrature nodes associated with q.

source
Inti.reference_nodesMethod
reference_nodes(el::LagrangeElement)
-reference_nodes(::Type{<:LagrangeElement})

Return the reference nodes on domain(el) used for the polynomial interpolation. The function values on these nodes completely determines the interpolating polynomial.

We use the same convention as gmsh for defining the reference nodes and their order (see node ordering on gmsh documentation).

source
Inti.return_typeMethod
return_type(f[,args...])

The type returned by f(args...), where args is a tuple of types. Falls back to Base.promote_op by default.

A functors of type T with a knonw return type should extend return_type(::T,args...) to avoid relying on promote_op.

source
Inti.skeletonMethod
skeleton(Ω::Domain)

Return all the boundaries of the domain, i.e. the domain's skeleton.

source
Inti.svectorMethod
svector(f,n)

Create an SVector of length n, computing each element as f(i), where i is the index of the element.

source
Inti.tagMethod
tag(::AbstractEntity)

Integer tag used to idetify geometrical entities.

source

IntiGmshExtension

IntiGmshExt._domain_to_mesh!Method
_domain_to_mesh!(msh, Ω::Domain)

Recursively populate the dictionaries etype2mat and ent2tag in msh for the entities in Ω. After all entities have been processed, the function recurses on the skeleton of Ω.

source
IntiGmshExt._ent_to_mesh!Method
_ent_to_mesh!(elements, ent2tag, ω::ElementaryEntity)

For each element type used to mesh ω:

  • push into elements::Dict the pair etype=>ntags;
  • push into ent2tag::Dict the pair etype=>etags;

where:

  • etype::DataType determines the type of the element (see _type_tag_to_etype);
  • ntags::Matrix{Int} gives the indices of the nodes defining those elements;
  • etags::Vector{Int} gives the indices of those elements in elements.
source
IntiGmshExt._import_domain!Function
_import_domain!(Ω::Domain,[model;dim=3])

Like import_domain, but appends entities to Ω instead of creating a new domain.

Note

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt._import_mesh!Method
_import_mesh!(msh,Ω)

Similar to import_mesh, but append information to msh instead of creating a new mesh.

Danger

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt.import_domainFunction
import_domain([model;dim=3])

Construct a Domain from the gmsh model with all entities of dimension dim; by defaul the current gmsh model is used.

Note

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt.import_meshMethod
import_mesh(Ω;[dim=3])

Create a LagrangeMesh for the entities in Ω. Passing dim=2 will create a two-dimensional mesh by projecting the original mesh onto the x,y plane.

Danger

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt.read_geoMethod
read_geo(fname::String;dim=3)

Read a .geo file and generate a Domain with all entities of dimension dim.

Danger

This function assumes that gmsh has been initialized, and does not handle its finalization.

source

IntiMakieExtension

IntiVTKExtension

IntiVTKExt.etype_to_vtk_cell_typeConstant
const etype_to_vtk_cell_type

Dictionary mapping internal element types to a tuple containing: - the corresponding WriteVTK cell types (following the convention chosen by VTK, see below); - the indices in the elements column that defines the element. This is because we want to support the export of more than just the flat elements available in the VTK specification, hence which may require a conversion of some sort.

See VTK specification [Fig. 2] on http://www.vtk.org/VTK/img/file-formats.pdf

  • VTK_VERTEX (=1)
  • VTKPOLYVERTEX (=2)
  • VTK_LINE (=3)
  • VTKPOLYLINE (=4)
  • VTK_TRIANGLE (=5)
  • VTKTRIANGLESTRIP (=6)
  • VTK_POLYGON (=7)
  • VTK_PIXEL (=8)
  • VTK_QUAD (=9)
  • VTK_TETRA (=10)
  • VTK_VOXEL (=11)
  • VTK_HEXAHEDRON (=12)
  • VTK_WEDGE (=13)
  • VTK_PYRAMID (=14)
source
IntiVTKExt._vtk_cellsFunction
_vtk_cells(mesh::LagrangeMesh, E::DataType)
-_vtk_cells(mesh::LagrangeMesh, Ω::Domain)

Creates the vector of all elements contained in the mesh in the format required by WriteVTK for a particular element type E<:AbstractElement or a Domain instance.

source
IntiVTKExt.mesh_fileMethod
mesh_file(mesh::LagrangeMesh[, Ω::Domain], name::String)

Creates a VTK file (.vtu) with name name containing the mesh information. It is possible to export only a Domain (i.e. only a part of the mesh).

Note that all the heavy lifting is done by the package WriteVTK. We refer to its documentation for more information.

Warning: the output is not an actual file (on disk). To save it, simply write:

mesh_file(mesh, "my_mesh") |> vtk_save

(Noting that you will need to be using WriteVTK to do so)

To add some data (scalar or vector values at the mesh nodes or mesh cells) for visualization purposes, you can do for instance:

vtkfile = mesh_file(mesh, name)
+q  = TensorProductQuadrature(qx,qy)
source
Inti.VioreanuRokhlinType
struct VioreanuRokhlin{D,N} <: ReferenceQuadrature{D}

Tabulated N-point Vioreanu-Rokhlin quadrature rule for integration over D.

source
Base.:==Method
==(e1::AbstractEntity,e2::AbstractEntity)

Two entities are considered equal geometric_dimension(e1)==geometric_dimension(e2) and tag(e1)=tag(e2).

Notice that this implies dim and tag of an entity should uniquely define it, and therefore global variables like TAGS are needed to make sure newly created AbstractEntity have a new (dim,tag) identifier.

source
Base.iterateFunction
iterate(Ω::Domain)

Iterating over a domain means iterating over its entities.

source
Inti._integration_measureMethod
_integration_measure(J::AbstractMatrix)

Given the Jacobian matrix J of a transformation f : ℝᴹ → ℝᴺ, compute the integration measure √det(JᵀJ).

source
Inti._normalMethod
_normal(jac::SMatrix{M,N})

Given a an M by N matrix representing the jacobian of a codimension one object, compute the normal vector.

source
Inti.ambient_dimensionFunction
ambient_dimension(x)

Dimension of the ambient space where x lives. For geometrical objects this can differ from its geometric_dimension; for example a triangle in ℝ³ has ambient dimension 3 but geometric dimension 2, while a curve in ℝ³ has ambient dimension 3 but geometric dimension 1.

source
Inti.boundaryMethod
boundary(e::AbstractEntity)

A vector of entities of dimension dim-1 that form the boundary of e.

source
Inti.degreeMethod
degree(el::LagrangeElement)
+degree(el::Type{<:LagrangeElement})

The polynomial degree el.

source
Inti.dom2eltMethod
dom2elt(m::LagrangeMesh,Ω,E)

Compute the element indices idxs of the elements of type E composing Ω, so that elements(m)[idxs] gives all the elements of type E meshing Ω.

source
Inti.domainFunction
domain(f)

Given a function-like object f: Ω → R, return Ω.

source
Inti.domainMethod
domain(q::ReferenceQuadrature)

The domain of integratino for quadrature rule q.

source
Inti.elementsMethod
elements(msh::AbstractMesh,E::DataType)

Return an iterator for all elements of type E on a mesh msh.

source
Inti.geometric_dimensionFunction
geometric_dimension(x)

NNumber of degrees of freedom necessary to locally represent the geometrical object. For example, lines have geometric dimension of 1 (whether in ℝ² or in ℝ³), while surfaces have geometric dimension of 2.

source
Inti.imageFunction
image(f)

Given a function-like object f: Ω → R, return f(Ω).

source
Inti.integrateMethod
integrate(f,quad::Quadrature)

Compute ∑ᵢ f(qᵢ)wᵢ, where the qᵢ are the quadrature nodes of quad, and wᵢ are the quadrature weights.

Note that you must define f(::QuadratureNode): use q.coords and q.normal if you need to access the coordinate or normal vector at que quadrature node.

source
Inti.integrateMethod
integrate(f,q::ReferenceQuadrature)
+integrate(f,x,w)

Integrate the function f using the quadrature rule q. This is simply sum(f.(x) .* w), where x and w are the quadrature nodes and weights, respectively.

The function f should take an SVector as input.

source
Inti.interface_methodMethod
interface_method(x)

A method of an abstract type for which concrete subtypes are expected to provide an implementation.

source
Inti.internal_boundaryMethod
internal_boundary(Ω::Domain)

Return the internal boundaries of a Domain. These are entities in skeleton(Ω) which appear at least twice as a boundary of entities in Ω.

source
Inti.jacobianMethod
jacobian(f,x)

Given a (possibly vector-valued) functor f : 𝐑ᵐ → 𝐅ⁿ, return the n × m matrix Aᵢⱼ = ∂fᵢ/∂xⱼ.Both x and f(x) are expected to be of SVector type.

source
Inti.keyMethod
key(e::AbstractEntity)

The (dim,tag) pair used as a key to identify geometrical entities.

source
Inti.new_tagMethod
new_tag(dim)

Generate a unique tag for an AbstractEntity of dimension dim.

The implementation consists of adding one to the maximum value of TAGS[dim]

See also: TAGS.

source
Inti.orderMethod
order(q::ReferenceQuadrature)

A quadrature of order p (sometimes called degree of precision) integrates all polynomials of degree ≤ p but not ≤ p + 1.

source
Inti.qcoordsMethod
qcoords(q)

Return the coordinate of the quadrature nodes associated with q.

source
Inti.reference_nodesMethod
reference_nodes(el::LagrangeElement)
+reference_nodes(::Type{<:LagrangeElement})

Return the reference nodes on domain(el) used for the polynomial interpolation. The function values on these nodes completely determines the interpolating polynomial.

We use the same convention as gmsh for defining the reference nodes and their order (see node ordering on gmsh documentation).

source
Inti.return_typeMethod
return_type(f[,args...])

The type returned by f(args...), where args is a tuple of types. Falls back to Base.promote_op by default.

A functors of type T with a knonw return type should extend return_type(::T,args...) to avoid relying on promote_op.

source
Inti.skeletonMethod
skeleton(Ω::Domain)

Return all the boundaries of the domain, i.e. the domain's skeleton.

source
Inti.svectorMethod
svector(f,n)

Create an SVector of length n, computing each element as f(i), where i is the index of the element.

source
Inti.tagMethod
tag(::AbstractEntity)

Integer tag used to idetify geometrical entities.

source

IntiGmshExtension

IntiGmshExt._domain_to_mesh!Method
_domain_to_mesh!(msh, Ω::Domain)

Recursively populate the dictionaries etype2mat and ent2tag in msh for the entities in Ω. After all entities have been processed, the function recurses on the skeleton of Ω.

source
IntiGmshExt._ent_to_mesh!Method
_ent_to_mesh!(elements, ent2tag, ω::ElementaryEntity)

For each element type used to mesh ω:

  • push into elements::Dict the pair etype=>ntags;
  • push into ent2tag::Dict the pair etype=>etags;

where:

  • etype::DataType determines the type of the element (see _type_tag_to_etype);
  • ntags::Matrix{Int} gives the indices of the nodes defining those elements;
  • etags::Vector{Int} gives the indices of those elements in elements.
source
IntiGmshExt._import_domain!Function
_import_domain!(Ω::Domain,[model;dim=3])

Like import_domain, but appends entities to Ω instead of creating a new domain.

Note

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt._import_mesh!Method
_import_mesh!(msh,Ω)

Similar to import_mesh, but append information to msh instead of creating a new mesh.

Danger

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt.import_domainFunction
import_domain([model;dim=3])

Construct a Domain from the gmsh model with all entities of dimension dim; by defaul the current gmsh model is used.

Note

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt.import_meshMethod
import_mesh(Ω;[dim=3])

Create a LagrangeMesh for the entities in Ω. Passing dim=2 will create a two-dimensional mesh by projecting the original mesh onto the x,y plane.

Danger

This function assumes that gmsh has been initialized, and does not handle its finalization.

source
IntiGmshExt.read_geoMethod
read_geo(fname::String;dim=3)

Read a .geo file and generate a Domain with all entities of dimension dim.

Danger

This function assumes that gmsh has been initialized, and does not handle its finalization.

source

IntiMakieExtension

IntiVTKExtension

IntiVTKExt.etype_to_vtk_cell_typeConstant
const etype_to_vtk_cell_type

Dictionary mapping internal element types to a tuple containing: - the corresponding WriteVTK cell types (following the convention chosen by VTK, see below); - the indices in the elements column that defines the element. This is because we want to support the export of more than just the flat elements available in the VTK specification, hence which may require a conversion of some sort.

See VTK specification [Fig. 2] on http://www.vtk.org/VTK/img/file-formats.pdf

  • VTK_VERTEX (=1)
  • VTKPOLYVERTEX (=2)
  • VTK_LINE (=3)
  • VTKPOLYLINE (=4)
  • VTK_TRIANGLE (=5)
  • VTKTRIANGLESTRIP (=6)
  • VTK_POLYGON (=7)
  • VTK_PIXEL (=8)
  • VTK_QUAD (=9)
  • VTK_TETRA (=10)
  • VTK_VOXEL (=11)
  • VTK_HEXAHEDRON (=12)
  • VTK_WEDGE (=13)
  • VTK_PYRAMID (=14)
source
IntiVTKExt._vtk_cellsFunction
_vtk_cells(mesh::LagrangeMesh, E::DataType)
+_vtk_cells(mesh::LagrangeMesh, Ω::Domain)

Creates the vector of all elements contained in the mesh in the format required by WriteVTK for a particular element type E<:AbstractElement or a Domain instance.

source
IntiVTKExt.mesh_fileMethod
mesh_file(mesh::LagrangeMesh[, Ω::Domain], name::String)

Creates a VTK file (.vtu) with name name containing the mesh information. It is possible to export only a Domain (i.e. only a part of the mesh).

Note that all the heavy lifting is done by the package WriteVTK. We refer to its documentation for more information.

Warning: the output is not an actual file (on disk). To save it, simply write:

mesh_file(mesh, "my_mesh") |> vtk_save

(Noting that you will need to be using WriteVTK to do so)

To add some data (scalar or vector values at the mesh nodes or mesh cells) for visualization purposes, you can do for instance:

vtkfile = mesh_file(mesh, name)
 vtkfile["my_point_data", VTKPointData()] = pdata
 vtkfile["my_cell_data", VTKCellData()] = cdata
 vtk_save(vtkfile)

It is possible also to export a partition Ωs::Vector{Domain} using Multiblock files (.vtm), for instance like so

vtmfile = vtk_multiblock(name)
@@ -22,4 +22,4 @@
     vtkfile = mesh_file(mesh, Ω, name)
     vtkfile["my_point_data", VTKPointData()] = pdata
 end
-vtk_save(vtmfile)

To save a sequence of solutions (time steps, iterations), simply append the number of the element to the file name. Paraview will recognize the sequence automatically.

source
+vtk_save(vtmfile)

To save a sequence of solutions (time steps, iterations), simply append the number of the element to the file name. Paraview will recognize the sequence automatically.

source
diff --git a/dev/search_index.js b/dev/search_index.js index f8fc913b..f19d5e7b 100644 --- a/dev/search_index.js +++ b/dev/search_index.js @@ -1,3 +1,3 @@ var documenterSearchIndex = {"docs": -[{"location":"references/","page":"References","title":"References","text":"CurrentModule = Inti","category":"page"},{"location":"references/#References","page":"References","title":"References","text":"","category":"section"},{"location":"references/#Inti","page":"References","title":"Inti","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti]","category":"page"},{"location":"references/#Inti.ENTITIES","page":"References","title":"Inti.ENTITIES","text":"const ENTITIES\n\nGlobal dictionary storing the used entity tags (the value) for a given dimension (the key).\n\n\n\n\n\n","category":"constant"},{"location":"references/#Inti.TAGS","page":"References","title":"Inti.TAGS","text":"const TAGS::Dict{Int,Vector{Int}}\n\nGlobal dictionary storing the used entity tags (the value) for a given dimension (the key).\n\n\n\n\n\n","category":"constant"},{"location":"references/#Inti.AbstractEntity","page":"References","title":"Inti.AbstractEntity","text":"abstract type AbstractEntity\n\nEntity of geometrical nature. Identifiable throught its (dim,tag) key.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.AbstractMesh","page":"References","title":"Inti.AbstractMesh","text":"abstract type AbstractMesh{N,T}\n\nAn abstract mesh structure in dimension N with primite data of type T (e.g. Float64 for double precision representation).\n\nConcrete subtypes of AbstractMesh should implement ElementIterator for accessing the mesh elements.\n\nSee also: LagrangeMesh\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Domain","page":"References","title":"Inti.Domain","text":"struct Domain\n\nRepresents a physical domain as a union of AbstractEntity objects.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ElementIterator","page":"References","title":"Inti.ElementIterator","text":"struct ElementIterator{E,M}\n\nIterator for all elements of type E on a mesh of type M.\n\nBesides the methods listed in the iterator iterface of Julia, some functions also require the getindex(iter,i::Int) method for accessing the i-th element directly.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Fejer","page":"References","title":"Inti.Fejer","text":"struct Fejer{N}\n\nN-point Fejer's first quadrature rule for integrating a function over [0,1]. Exactly integrates all polynomials of degree ≤ N-1.\n\nusing Inti\n\nq = Inti.Fejer(;order=10)\n\nInti.integrate(cos,q) ≈ sin(1) - sin(0)\n\n# output\n\ntrue\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Gauss","page":"References","title":"Inti.Gauss","text":"struct Gauss{D,N} <: ReferenceQuadrature{D}\n\nTabulated N-point symmetric Gauss quadrature rule for integration over D.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeCube","page":"References","title":"Inti.LagrangeCube","text":"const LagrangeSquare = LagrangeElement{ReferenceSquare}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeElement","page":"References","title":"Inti.LagrangeElement","text":"struct LagrangeElement{D,Np,T} <: ReferenceInterpolant{D,T}\n\nA polynomial p : D → T uniquely defined by its Np values on the Np reference nodes of D.\n\nThe return type T should be a vector space (i.e. support addition and multiplication by scalars). For istance, T could be a number or a vector, but not a Tuple.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeLine","page":"References","title":"Inti.LagrangeLine","text":"const LagrangeLine = LagrangeElement{ReferenceLine}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeMesh","page":"References","title":"Inti.LagrangeMesh","text":"struct LagrangeMesh{N,T} <: AbstractMesh{N,T}\n\nData structure representing a generic mesh in an ambient space of dimension N, with data of type T.\n\nThe LagrangeMesh can, in principle, store elements of any type. Those are given as a key in the elements dictionary, and the value is a data structure which is capable of reconstructing the elements. For example, for a Lagrange element described by p nodes, the value is a p×Nel matrix of integer, where each columns is a list of tags for the nodes of the element. The nodes are stored in the nodes field.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeSquare","page":"References","title":"Inti.LagrangeSquare","text":"const LagrangeSquare = LagrangeElement{ReferenceSquare}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeTetrahedron","page":"References","title":"Inti.LagrangeTetrahedron","text":"const LagrangeTetrahedron = LagrangeElement{ReferenceTetrahedron}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeTriangle","page":"References","title":"Inti.LagrangeTriangle","text":"const LagrangeTriangle = LagrangeElement{ReferenceTriangle}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Quadrature","page":"References","title":"Inti.Quadrature","text":"struct Quadrature{N,T} <: AbstractVector{QuadratureNode{N,T}}\n\nA collection of QuadratureNodes used to integrate over an AbstractMesh.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Quadrature-Union{Tuple{T}, Tuple{N}, Tuple{Inti.AbstractMesh{N, T}, Dict}} where {N, T}","page":"References","title":"Inti.Quadrature","text":"Quadrature(msh::AbstractMesh,etype2qrule::Dict)\nQuadrature(msh::AbstractMesh;qorder)\n\nConstruct a Quadrature of msh, where for each element type E of msh the reference quadrature q = etype2qrule[E] is used. If an order keyword is passed, a default quadrature of the desired order is used for each element type usig _qrule_for_reference_shape.\n\nFor co-dimension 1 elements, the normal vector is computed and stored in the QuadratureNodes.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.QuadratureNode","page":"References","title":"Inti.QuadratureNode","text":"QuadratureNode{N,T<:Real}\n\nA point in ℝᴺ with a weight for performing numerical integration. A QuadratureNode can optionally store a normal vector.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceCube","page":"References","title":"Inti.ReferenceCube","text":"const ReferenceCube = ReferenceHyperCube{3}\n\nSingleton type representing the unit cube [0,1]³.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceHyperCube","page":"References","title":"Inti.ReferenceHyperCube","text":"struct ReferenceHyperCube{N} <: ReferenceShape{N}\n\nSingleton type representing the axis-aligned hypercube in N dimensions with the lower corner at the origin and the upper corner at (1,1,…,1).\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceInterpolant","page":"References","title":"Inti.ReferenceInterpolant","text":"abstract type ReferenceInterpolant{D,T}\n\nInterpolanting function mapping points on the domain D<:ReferenceShape (of singleton type) to a value of type T.\n\nInstances el of ReferenceInterpolant are expected to implement:\n\nel(x̂): evaluate the interpolation scheme at the (reference) coordinate x̂ ∈ D.\njacobian(el,x̂) : evaluate the jacobian matrix of the interpolation at the (reference) coordinate x ∈ D.\n\nnote: Note\nFor performance reasons, both el(x̂) and jacobian(el,x̂) should take as input a StaticVector and output a static vector or static array.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceLine","page":"References","title":"Inti.ReferenceLine","text":"const ReferenceLine = ReferenceHyperCube{1}\n\nSingleton type representing the [0,1] segment.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceQuadrature","page":"References","title":"Inti.ReferenceQuadrature","text":"abstract type ReferenceQuadrature{D}\n\nA quadrature rule for integrating a function over the domain D <: ReferenceShape.\n\nCalling x,w = q() returns the nodes x, given as SVectors, and weights w, for performing integration over domain(q).\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceShape","page":"References","title":"Inti.ReferenceShape","text":"abstract type ReferenceShape\n\nA fixed reference domain/shape. Used mostly for defining more complex shapes as transformations mapping an ReferenceShape to some region of ℜᴹ.\n\nSee e.g. ReferenceLine or ReferenceTriangle for some examples of concrete subtypes.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceSimplex","page":"References","title":"Inti.ReferenceSimplex","text":"struct ReferenceSimplex{N}\n\nSingleton type representing the N-simplex with N+1 vertices (0,...,0),(0,...,0,1),(0,...,0,1,0),(1,0,...,0)\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceSquare","page":"References","title":"Inti.ReferenceSquare","text":"const ReferenceSquare = ReferenceHyperCube{2}\n\nSingleton type representing the unit square [0,1]².\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceTetrahedron","page":"References","title":"Inti.ReferenceTetrahedron","text":"struct ReferenceTetrahedron\n\nSingleton type representing the tetrahedron with vertices (0,0,0),(0,0,1),(0,1,0),(1,0,0)\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceTriangle","page":"References","title":"Inti.ReferenceTriangle","text":"struct ReferenceTriangle\n\nSingleton type representing the triangle with vertices (0,0),(1,0),(0,1)\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.SubMesh","page":"References","title":"Inti.SubMesh","text":"struct SubMesh{N,T} <: AbstractMesh{N,T}\n\nCreate a view of a parent LagrangeMesh over a given domain.\n\nA submesh implements the interface for AbstractMesh; therefore you can iterate over elements of the submesh just like you would with a mesh.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.TensorProductQuadrature","page":"References","title":"Inti.TensorProductQuadrature","text":"TensorProductQuadrature{N,Q}\n\nA tensor-product of one-dimension quadrature rules. Integrates over [0,1]^N.\n\nExamples\n\nqx = Fejer(10)\nqy = TrapezoidalOpen(15)\nq = TensorProductQuadrature(qx,qy)\n\n\n\n\n\n","category":"type"},{"location":"references/#Base.:==-Tuple{Inti.AbstractEntity, Inti.AbstractEntity}","page":"References","title":"Base.:==","text":"==(e1::AbstractEntity,e2::AbstractEntity)\n\nTwo entities are considered equal geometric_dimension(e1)==geometric_dimension(e2) and tag(e1)=tag(e2).\n\nNotice that this implies dim and tag of an entity should uniquely define it, and therefore global variables like TAGS are needed to make sure newly created AbstractEntity have a new (dim,tag) identifier.\n\n\n\n\n\n","category":"method"},{"location":"references/#Base.iterate","page":"References","title":"Base.iterate","text":"iterate(Ω::Domain)\n\nIterating over a domain means iterating over its entities.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti._get_gauss_qcoords_and_qweights-Tuple{Type{<:Inti.ReferenceShape}, Any}","page":"References","title":"Inti._get_gauss_qcoords_and_qweights","text":"_get_gauss_and_qweights(R::Type{<:ReferenceShape{D}}, N) where D\n\nReturns the N-point symmetric gaussian qnodes and qweights (x, w) for integration over R.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti._integration_measure-Tuple{AbstractMatrix}","page":"References","title":"Inti._integration_measure","text":"_integration_measure(J::AbstractMatrix)\n\nGiven the Jacobian matrix J of a transformation f : ℝᴹ → ℝᴺ, compute the integration measure √det(JᵀJ).\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti._normal-Union{Tuple{StaticArraysCore.SMatrix{N, M}}, Tuple{M}, Tuple{N}} where {N, M}","page":"References","title":"Inti._normal","text":"_normal(jac::SMatrix{M,N})\n\nGiven a an M by N matrix representing the jacobian of a codimension one object, compute the normal vector.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti._qrule_for_reference_shape-Tuple{Any, Any}","page":"References","title":"Inti._qrule_for_reference_shape","text":"_qrule_for_reference_shape(ref,order)\n\nGiven a reference shape and a desired quadrature order, return an appropiate quadrature rule.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.ambient_dimension","page":"References","title":"Inti.ambient_dimension","text":"ambient_dimension(x)\n\nDimension of the ambient space where x lives. For geometrical objects this can differ from its geometric_dimension; for example a triangle in ℝ³ has ambient dimension 3 but geometric dimension 2, while a curve in ℝ³ has ambient dimension 3 but geometric dimension 1.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.boundary-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.boundary","text":"boundary(e::AbstractEntity)\n\nA vector of entities of dimension dim-1 that form the boundary of e.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.clear_entities!-Tuple{}","page":"References","title":"Inti.clear_entities!","text":"clear_entities!()\n\nEmpty the global variables used to keep track of the various entities created.\n\nSee also: ENTITIES, TAGS\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.degree-Union{Tuple{Type{Inti.LagrangeElement{D, Np}}}, Tuple{Np}, Tuple{D}} where {D, Np}","page":"References","title":"Inti.degree","text":"degree(el::LagrangeElement)\ndegree(el::Type{<:LagrangeElement})\n\nThe polynomial degree el.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.dom2elt-Tuple{Inti.LagrangeMesh, Inti.Domain, DataType}","page":"References","title":"Inti.dom2elt","text":"dom2elt(m::LagrangeMesh,Ω,E)\n\nCompute the element indices idxs of the elements of type E composing Ω, so that elements(m)[idxs] gives all the elements of type E meshing Ω.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.domain","page":"References","title":"Inti.domain","text":"domain(f)\n\nGiven a function-like object f: Ω → R, return Ω.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.domain-Union{Tuple{Inti.ReferenceQuadrature{D}}, Tuple{D}} where D","page":"References","title":"Inti.domain","text":"domain(q::ReferenceQuadrature)\n\nThe domain of integratino for quadrature rule q.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.element_types-Tuple{Inti.LagrangeMesh}","page":"References","title":"Inti.element_types","text":"element_types(msh::AbstractMesh)\n\nReturn the element types present in the msh.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.elements-Tuple{Inti.AbstractMesh, DataType}","page":"References","title":"Inti.elements","text":"elements(msh::AbstractMesh,E::DataType)\n\nReturn an iterator for all elements of type E on a mesh msh.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.entities-Tuple{Inti.Domain}","page":"References","title":"Inti.entities","text":"entities(Ω::Domain)\n\nReturn all entities making up a domain.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.external_boundary-Tuple{Inti.Domain}","page":"References","title":"Inti.external_boundary","text":"external_boundary(Ω::Domain)\n\nReturn the external boundaries inside a domain. These are entities in the skeleton of Ω which are not in the internal boundaries of Ω.\n\nSee also: internal_boundary, skeleton.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.geometric_dimension","page":"References","title":"Inti.geometric_dimension","text":"geometric_dimension(x)\n\nNNumber of degrees of freedom necessary to locally represent the geometrical object. For example, lines have geometric dimension of 1 (whether in ℝ² or in ℝ³), while surfaces have geometric dimension of 2.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.get_gmsh_extension-Tuple{}","page":"References","title":"Inti.get_gmsh_extension","text":"get_gmsh_extension()\n\nGet the Gmsh extension, if available.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.get_makie_extension-Tuple{}","page":"References","title":"Inti.get_makie_extension","text":"get_makie_extension()\n\nGet the Makie extension, if available.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.get_vtk_extension-Tuple{}","page":"References","title":"Inti.get_vtk_extension","text":"get_vtk_extension()\n\nGet the VTK extension, if available.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.global_add_entity!-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.global_add_entity!","text":"global_add_entity!(ent::AbstractEntity)\n\nAdd ent to the global dictionary ENTITIES and update TAGS with its (dim,tag) key. This function should be called by the inner constructor of every AbstractEntity.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.image","page":"References","title":"Inti.image","text":"image(f)\n\nGiven a function-like object f: Ω → R, return f(Ω).\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.integrate-Tuple{Any, Inti.Quadrature}","page":"References","title":"Inti.integrate","text":"integrate(f,quad::Quadrature)\n\nCompute ∑ᵢ f(qᵢ)wᵢ, where the qᵢ are the quadrature nodes of quad, and wᵢ are the quadrature weights.\n\nNote that you must define f(::QuadratureNode): use q.coords and q.normal if you need to access the coordinate or normal vector at que quadrature node.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.integrate-Tuple{Any, Inti.ReferenceQuadrature}","page":"References","title":"Inti.integrate","text":"integrate(f,q::ReferenceQuadrature)\nintegrate(f,x,w)\n\nIntegrate the function f using the quadrature rule q. This is simply sum(f.(x) .* w), where x and w are the quadrature nodes and weights, respectively.\n\nThe function f should take an SVector as input.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.interface_method-Tuple{DataType}","page":"References","title":"Inti.interface_method","text":"interface_method(x)\n\nA method of an abstract type for which concrete subtypes are expected to provide an implementation.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.internal_boundary-Tuple{Inti.Domain}","page":"References","title":"Inti.internal_boundary","text":"internal_boundary(Ω::Domain)\n\nReturn the internal boundaries of a Domain. These are entities in skeleton(Ω) which appear at least twice as a boundary of entities in Ω.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.jacobian-Tuple{Any, Any}","page":"References","title":"Inti.jacobian","text":"jacobian(f,x)\n\nGiven a (possibly vector-valued) functor f : 𝐑ᵐ → 𝐅ⁿ, return the n × m matrix Aᵢⱼ = ∂fᵢ/∂xⱼ.Both x and f(x) are expected to be of SVector type.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.key-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.key","text":"key(e::AbstractEntity)\n\nThe (dim,tag) pair used as a key to identify geometrical entities.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.new_tag-Tuple{Integer}","page":"References","title":"Inti.new_tag","text":"new_tag(dim)\n\nGenerate a unique tag for an AbstractEntity of dimension dim.\n\nThe implementation consists of adding one to the maximum value of TAGS[dim]\n\nSee also: TAGS.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.order-Union{Tuple{Inti.Fejer{N}}, Tuple{N}} where N","page":"References","title":"Inti.order","text":"order(q::ReferenceQuadrature)\n\nA quadrature of order p integrates all polynomials of degree ≤ p.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.qcoords-Tuple{Inti.ReferenceQuadrature}","page":"References","title":"Inti.qcoords","text":"qcoords(q)\n\nReturn the coordinate of the quadrature nodes associated with q.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.qweights-Tuple{Inti.ReferenceQuadrature}","page":"References","title":"Inti.qweights","text":"qweights(q)\n\nReturn the quadrature weights associated with q.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.reference_nodes-Tuple{Inti.LagrangeElement}","page":"References","title":"Inti.reference_nodes","text":"reference_nodes(el::LagrangeElement)\nreference_nodes(::Type{<:LagrangeElement})\n\nReturn the reference nodes on domain(el) used for the polynomial interpolation. The function values on these nodes completely determines the interpolating polynomial.\n\nWe use the same convention as gmsh for defining the reference nodes and their order (see node ordering on gmsh documentation).\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.return_type-Tuple{Any, Vararg{Any}}","page":"References","title":"Inti.return_type","text":"return_type(f[,args...])\n\nThe type returned by f(args...), where args is a tuple of types. Falls back to Base.promote_op by default.\n\nA functors of type T with a knonw return type should extend return_type(::T,args...) to avoid relying on promote_op.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.skeleton-Tuple{Inti.Domain}","page":"References","title":"Inti.skeleton","text":"skeleton(Ω::Domain)\n\nReturn all the boundaries of the domain, i.e. the domain's skeleton.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.standard_basis_vector-Union{Tuple{N}, Tuple{Any, Val{N}}} where N","page":"References","title":"Inti.standard_basis_vector","text":"standard_basis_vector(k, ::Val{N})\n\nCreate an SVector of length N with a 1 in the kth position and zeros elsewhere.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.svector-Tuple{Any, Any}","page":"References","title":"Inti.svector","text":"svector(f,n)\n\nCreate an SVector of length n, computing each element as f(i), where i is the index of the element.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.tag-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.tag","text":"tag(::AbstractEntity)\n\nInteger tag used to idetify geometrical entities.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExtension","page":"References","title":"IntiGmshExtension","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti.get_gmsh_extension()]","category":"page"},{"location":"references/#IntiGmshExt.GmshEntity","page":"References","title":"IntiGmshExt.GmshEntity","text":"struct GmshEntity <: AbstractEntity\n\nConcrete type of AbstractEntity generated using the gmsh API.\n\n\n\n\n\n","category":"type"},{"location":"references/#IntiGmshExt._domain_to_mesh!-Tuple{Any, Inti.Domain, Any}","page":"References","title":"IntiGmshExt._domain_to_mesh!","text":"_domain_to_mesh!(msh, Ω::Domain)\n\nRecursively populate the dictionaries etype2mat and ent2tag in msh for the entities in Ω. After all entities have been processed, the function recurses on the skeleton of Ω.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._ent_to_mesh!-Tuple{Any, Any, IntiGmshExt.GmshEntity, Any}","page":"References","title":"IntiGmshExt._ent_to_mesh!","text":"_ent_to_mesh!(elements, ent2tag, ω::ElementaryEntity)\n\nFor each element type used to mesh ω:\n\npush into elements::Dict the pair etype=>ntags;\npush into ent2tag::Dict the pair etype=>etags;\n\nwhere:\n\netype::DataType determines the type of the element (see _type_tag_to_etype);\nntags::Matrix{Int} gives the indices of the nodes defining those elements;\netags::Vector{Int} gives the indices of those elements in elements.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._fill_entity_boundary!-Tuple{Any, Any}","page":"References","title":"IntiGmshExt._fill_entity_boundary!","text":"_fill_entity_boundary!\n\nUse the gmsh API to add the boundary of an ElementaryEntity.\n\nThis is a helper function, and should not be called by itself.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._import_domain!","page":"References","title":"IntiGmshExt._import_domain!","text":"_import_domain!(Ω::Domain,[model;dim=3])\n\nLike import_domain, but appends entities to Ω instead of creating a new domain.\n\nnote: Note\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiGmshExt._import_mesh!-Tuple{Inti.LagrangeMesh, Inti.Domain}","page":"References","title":"IntiGmshExt._import_mesh!","text":"_import_mesh!(msh,Ω)\n\nSimilar to import_mesh, but append information to msh instead of creating a new mesh.\n\ndanger: Danger\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._type_tag_to_etype-Tuple{Any}","page":"References","title":"IntiGmshExt._type_tag_to_etype","text":"_type_tag_to_etype(tag)\n\nMapping of gmsh element types, encoded as an integer, to the internal equivalent of those.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt.import_domain","page":"References","title":"IntiGmshExt.import_domain","text":"import_domain([model;dim=3])\n\nConstruct a Domain from the gmsh model with all entities of dimension dim; by defaul the current gmsh model is used.\n\nnote: Note\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiGmshExt.import_mesh-Tuple{Inti.Domain}","page":"References","title":"IntiGmshExt.import_mesh","text":"import_mesh(Ω;[dim=3])\n\nCreate a LagrangeMesh for the entities in Ω. Passing dim=2 will create a two-dimensional mesh by projecting the original mesh onto the x,y plane.\n\ndanger: Danger\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt.model_summary","page":"References","title":"IntiGmshExt.model_summary","text":"model_summary([model])\n\nPrint a summary of the gmsh model to the console; by defaul the current model is used.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiGmshExt.read_geo-Tuple{Any}","page":"References","title":"IntiGmshExt.read_geo","text":"read_geo(fname::String;dim=3)\n\nRead a .geo file and generate a Domain with all entities of dimension dim.\n\ndanger: Danger\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiMakieExtension","page":"References","title":"IntiMakieExtension","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti.get_makie_extension()]","category":"page"},{"location":"references/#IntiVTKExtension","page":"References","title":"IntiVTKExtension","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti.get_vtk_extension()]","category":"page"},{"location":"references/#IntiVTKExt.etype_to_vtk_cell_type","page":"References","title":"IntiVTKExt.etype_to_vtk_cell_type","text":"const etype_to_vtk_cell_type\n\nDictionary mapping internal element types to a tuple containing: - the corresponding WriteVTK cell types (following the convention chosen by VTK, see below); - the indices in the elements column that defines the element. This is because we want to support the export of more than just the flat elements available in the VTK specification, hence which may require a conversion of some sort.\n\nSee VTK specification [Fig. 2] on http://www.vtk.org/VTK/img/file-formats.pdf\n\nVTK_VERTEX (=1)\nVTKPOLYVERTEX (=2)\nVTK_LINE (=3)\nVTKPOLYLINE (=4)\nVTK_TRIANGLE (=5)\nVTKTRIANGLESTRIP (=6)\nVTK_POLYGON (=7)\nVTK_PIXEL (=8)\nVTK_QUAD (=9)\nVTK_TETRA (=10)\nVTK_VOXEL (=11)\nVTK_HEXAHEDRON (=12)\nVTK_WEDGE (=13)\nVTK_PYRAMID (=14)\n\n\n\n\n\n","category":"constant"},{"location":"references/#IntiVTKExt._vtk_cells","page":"References","title":"IntiVTKExt._vtk_cells","text":"_vtk_cells(mesh::LagrangeMesh, E::DataType)\n_vtk_cells(mesh::LagrangeMesh, Ω::Domain)\n\nCreates the vector of all elements contained in the mesh in the format required by WriteVTK for a particular element type E<:AbstractElement or a Domain instance.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiVTKExt._vtk_points-Tuple{Inti.LagrangeMesh}","page":"References","title":"IntiVTKExt._vtk_points","text":"_vtk_points(mesh::LagrangeMesh)\n\nCreates the matrix of nodes in the format required by WriteVTK.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiVTKExt.mesh_file-Tuple{Inti.LagrangeMesh, String}","page":"References","title":"IntiVTKExt.mesh_file","text":"mesh_file(mesh::LagrangeMesh[, Ω::Domain], name::String)\n\nCreates a VTK file (.vtu) with name name containing the mesh information. It is possible to export only a Domain (i.e. only a part of the mesh).\n\nNote that all the heavy lifting is done by the package WriteVTK. We refer to its documentation for more information.\n\nWarning: the output is not an actual file (on disk). To save it, simply write:\n\nmesh_file(mesh, \"my_mesh\") |> vtk_save\n\n(Noting that you will need to be using WriteVTK to do so)\n\nTo add some data (scalar or vector values at the mesh nodes or mesh cells) for visualization purposes, you can do for instance:\n\nvtkfile = mesh_file(mesh, name)\nvtkfile[\"my_point_data\", VTKPointData()] = pdata\nvtkfile[\"my_cell_data\", VTKCellData()] = cdata\nvtk_save(vtkfile)\n\nIt is possible also to export a partition Ωs::Vector{Domain} using Multiblock files (.vtm), for instance like so\n\nvtmfile = vtk_multiblock(name)\nfor (Ω, pdata) in zip(Ωs, pdatas)\n vtkfile = mesh_file(mesh, Ω, name)\n vtkfile[\"my_point_data\", VTKPointData()] = pdata\nend\nvtk_save(vtmfile)\n\nTo save a sequence of solutions (time steps, iterations), simply append the number of the element to the file name. Paraview will recognize the sequence automatically.\n\n\n\n\n\n","category":"method"},{"location":"geo_and_meshes/#geometry-and-meshes-section","page":"Meshing","title":"Geometry and meshes","text":"","category":"section"},{"location":"geo_and_meshes/#Overview","page":"Meshing","title":"Overview","text":"","category":"section"},{"location":"geo_and_meshes/#gmsh-section","page":"Meshing","title":"Gmsh","text":"","category":"section"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"using Inti\nusing Gmsh\n\ngmsh_ext = Inti.get_gmsh_extension()\ngmsh.initialize()\ngmsh.model.add(\"Sphere\")\ngmsh.model.occ.addSphere(0,0,0,1)\ngmsh.model.occ.synchronize()\ngmsh.model.mesh.generate(3)\nents = gmsh.model.getEntities()\nΩ = gmsh_ext.import_domain(;dim=3)\nmsh = gmsh_ext.import_mesh(Ω;dim=3)\ngmsh.finalize()","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"You can take views of the mesh msh by passing a domain to the view function\nYou can plot a msh if you have a Makie backend (e.g. GLMakie)","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"using CairoMakie\nΓ = Inti.external_boundary(Ω)\npoly(view(msh,Γ);strokewidth=1,color=:lightgray, transparency=true)","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"You can also plot the volume mesh (see the Documentation of Makie.poly for more details on possible arguments):","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"poly(view(msh,Ω);strokewidth=1,color=:lightgray, transparency=true)","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"Two-dimensional meshes are very similar:","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":" using Inti\n using Gmsh\n using CairoMakie\n gmsh_ext = Inti.get_gmsh_extension()\n gmsh.initialize()\n gmsh.option.setNumber(\"General.Verbosity\", 2)\n gmsh.model.add(\"Disk\")\n gmsh.model.occ.addDisk(0,0,0,1,1)\n gmsh.model.occ.synchronize()\n gmsh.model.mesh.generate(2)\n Ω = gmsh_ext.import_domain(;dim=2)\n msh = gmsh_ext.import_mesh(Ω;dim=2)\n gmsh.finalize()\n poly(view(msh,Ω);strokewidth=2)","category":"page"},{"location":"","page":"Home","title":"Home","text":"CurrentModule = Inti","category":"page"},{"location":"#Inti","page":"Home","title":"Inti","text":"","category":"section"}] +[{"location":"references/","page":"References","title":"References","text":"CurrentModule = Inti","category":"page"},{"location":"references/#References","page":"References","title":"References","text":"","category":"section"},{"location":"references/#Inti","page":"References","title":"Inti","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti]","category":"page"},{"location":"references/#Inti.ENTITIES","page":"References","title":"Inti.ENTITIES","text":"const ENTITIES\n\nGlobal dictionary storing the used entity tags (the value) for a given dimension (the key).\n\n\n\n\n\n","category":"constant"},{"location":"references/#Inti.TAGS","page":"References","title":"Inti.TAGS","text":"const TAGS::Dict{Int,Vector{Int}}\n\nGlobal dictionary storing the used entity tags (the value) for a given dimension (the key).\n\n\n\n\n\n","category":"constant"},{"location":"references/#Inti.AbstractEntity","page":"References","title":"Inti.AbstractEntity","text":"abstract type AbstractEntity\n\nEntity of geometrical nature. Identifiable throught its (dim,tag) key.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.AbstractMesh","page":"References","title":"Inti.AbstractMesh","text":"abstract type AbstractMesh{N,T}\n\nAn abstract mesh structure in dimension N with primite data of type T (e.g. Float64 for double precision representation).\n\nConcrete subtypes of AbstractMesh should implement ElementIterator for accessing the mesh elements.\n\nSee also: LagrangeMesh\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Domain","page":"References","title":"Inti.Domain","text":"struct Domain\n\nRepresents a physical domain as a union of AbstractEntity objects.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ElementIterator","page":"References","title":"Inti.ElementIterator","text":"struct ElementIterator{E,M}\n\nIterator for all elements of type E on a mesh of type M.\n\nBesides the methods listed in the iterator iterface of Julia, some functions also require the getindex(iter,i::Int) method for accessing the i-th element directly.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Fejer","page":"References","title":"Inti.Fejer","text":"struct Fejer{N}\n\nN-point Fejer's first quadrature rule for integrating a function over [0,1]. Exactly integrates all polynomials of degree ≤ N-1.\n\nusing Inti\n\nq = Inti.Fejer(;order=10)\n\nInti.integrate(cos,q) ≈ sin(1) - sin(0)\n\n# output\n\ntrue\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Gauss","page":"References","title":"Inti.Gauss","text":"struct Gauss{D,N} <: ReferenceQuadrature{D}\n\nTabulated N-point symmetric Gauss quadrature rule for integration over D.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeCube","page":"References","title":"Inti.LagrangeCube","text":"const LagrangeSquare = LagrangeElement{ReferenceSquare}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeElement","page":"References","title":"Inti.LagrangeElement","text":"struct LagrangeElement{D,Np,T} <: ReferenceInterpolant{D,T}\n\nA polynomial p : D → T uniquely defined by its Np values on the Np reference nodes of D.\n\nThe return type T should be a vector space (i.e. support addition and multiplication by scalars). For istance, T could be a number or a vector, but not a Tuple.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeLine","page":"References","title":"Inti.LagrangeLine","text":"const LagrangeLine = LagrangeElement{ReferenceLine}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeMesh","page":"References","title":"Inti.LagrangeMesh","text":"struct LagrangeMesh{N,T} <: AbstractMesh{N,T}\n\nData structure representing a generic mesh in an ambient space of dimension N, with data of type T.\n\nThe LagrangeMesh can, in principle, store elements of any type. Those are given as a key in the elements dictionary, and the value is a data structure which is capable of reconstructing the elements. For example, for a Lagrange element described by p nodes, the value is a p×Nel matrix of integer, where each columns is a list of tags for the nodes of the element. The nodes are stored in the nodes field.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeSquare","page":"References","title":"Inti.LagrangeSquare","text":"const LagrangeSquare = LagrangeElement{ReferenceSquare}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeTetrahedron","page":"References","title":"Inti.LagrangeTetrahedron","text":"const LagrangeTetrahedron = LagrangeElement{ReferenceTetrahedron}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.LagrangeTriangle","page":"References","title":"Inti.LagrangeTriangle","text":"const LagrangeTriangle = LagrangeElement{ReferenceTriangle}\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Quadrature","page":"References","title":"Inti.Quadrature","text":"struct Quadrature{N,T} <: AbstractVector{QuadratureNode{N,T}}\n\nA collection of QuadratureNodes used to integrate over an AbstractMesh.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.Quadrature-Union{Tuple{T}, Tuple{N}, Tuple{Inti.AbstractMesh{N, T}, Dict}} where {N, T}","page":"References","title":"Inti.Quadrature","text":"Quadrature(msh::AbstractMesh,etype2qrule::Dict)\nQuadrature(msh::AbstractMesh;qorder)\n\nConstruct a Quadrature of msh, where for each element type E of msh the reference quadrature q = etype2qrule[E] is used. If an order keyword is passed, a default quadrature of the desired order is used for each element type usig _qrule_for_reference_shape.\n\nFor co-dimension 1 elements, the normal vector is computed and stored in the QuadratureNodes.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.QuadratureNode","page":"References","title":"Inti.QuadratureNode","text":"QuadratureNode{N,T<:Real}\n\nA point in ℝᴺ with a weight for performing numerical integration. A QuadratureNode can optionally store a normal vector.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceCube","page":"References","title":"Inti.ReferenceCube","text":"const ReferenceCube = ReferenceHyperCube{3}\n\nSingleton type representing the unit cube [0,1]³.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceHyperCube","page":"References","title":"Inti.ReferenceHyperCube","text":"struct ReferenceHyperCube{N} <: ReferenceShape{N}\n\nSingleton type representing the axis-aligned hypercube in N dimensions with the lower corner at the origin and the upper corner at (1,1,…,1).\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceInterpolant","page":"References","title":"Inti.ReferenceInterpolant","text":"abstract type ReferenceInterpolant{D,T}\n\nInterpolanting function mapping points on the domain D<:ReferenceShape (of singleton type) to a value of type T.\n\nInstances el of ReferenceInterpolant are expected to implement:\n\nel(x̂): evaluate the interpolation scheme at the (reference) coordinate x̂ ∈ D.\njacobian(el,x̂) : evaluate the jacobian matrix of the interpolation at the (reference) coordinate x ∈ D.\n\nnote: Note\nFor performance reasons, both el(x̂) and jacobian(el,x̂) should take as input a StaticVector and output a static vector or static array.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceLine","page":"References","title":"Inti.ReferenceLine","text":"const ReferenceLine = ReferenceHyperCube{1}\n\nSingleton type representing the [0,1] segment.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceQuadrature","page":"References","title":"Inti.ReferenceQuadrature","text":"abstract type ReferenceQuadrature{D}\n\nA quadrature rule for integrating a function over the domain D <: ReferenceShape.\n\nCalling x,w = q() returns the nodes x, given as SVectors, and weights w, for performing integration over domain(q).\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceShape","page":"References","title":"Inti.ReferenceShape","text":"abstract type ReferenceShape\n\nA fixed reference domain/shape. Used mostly for defining more complex shapes as transformations mapping an ReferenceShape to some region of ℜᴹ.\n\nSee e.g. ReferenceLine or ReferenceTriangle for some examples of concrete subtypes.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceSimplex","page":"References","title":"Inti.ReferenceSimplex","text":"struct ReferenceSimplex{N}\n\nSingleton type representing the N-simplex with N+1 vertices (0,...,0),(0,...,0,1),(0,...,0,1,0),(1,0,...,0)\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceSquare","page":"References","title":"Inti.ReferenceSquare","text":"const ReferenceSquare = ReferenceHyperCube{2}\n\nSingleton type representing the unit square [0,1]².\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceTetrahedron","page":"References","title":"Inti.ReferenceTetrahedron","text":"struct ReferenceTetrahedron\n\nSingleton type representing the tetrahedron with vertices (0,0,0),(0,0,1),(0,1,0),(1,0,0)\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.ReferenceTriangle","page":"References","title":"Inti.ReferenceTriangle","text":"struct ReferenceTriangle\n\nSingleton type representing the triangle with vertices (0,0),(1,0),(0,1)\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.SubMesh","page":"References","title":"Inti.SubMesh","text":"struct SubMesh{N,T} <: AbstractMesh{N,T}\n\nCreate a view of a parent LagrangeMesh over a given domain.\n\nA submesh implements the interface for AbstractMesh; therefore you can iterate over elements of the submesh just like you would with a mesh.\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.TensorProductQuadrature","page":"References","title":"Inti.TensorProductQuadrature","text":"TensorProductQuadrature{N,Q}\n\nA tensor-product of one-dimension quadrature rules. Integrates over [0,1]^N.\n\nExamples\n\nqx = Fejer(10)\nqy = TrapezoidalOpen(15)\nq = TensorProductQuadrature(qx,qy)\n\n\n\n\n\n","category":"type"},{"location":"references/#Inti.VioreanuRokhlin","page":"References","title":"Inti.VioreanuRokhlin","text":"struct VioreanuRokhlin{D,N} <: ReferenceQuadrature{D}\n\nTabulated N-point Vioreanu-Rokhlin quadrature rule for integration over D.\n\n\n\n\n\n","category":"type"},{"location":"references/#Base.:==-Tuple{Inti.AbstractEntity, Inti.AbstractEntity}","page":"References","title":"Base.:==","text":"==(e1::AbstractEntity,e2::AbstractEntity)\n\nTwo entities are considered equal geometric_dimension(e1)==geometric_dimension(e2) and tag(e1)=tag(e2).\n\nNotice that this implies dim and tag of an entity should uniquely define it, and therefore global variables like TAGS are needed to make sure newly created AbstractEntity have a new (dim,tag) identifier.\n\n\n\n\n\n","category":"method"},{"location":"references/#Base.iterate","page":"References","title":"Base.iterate","text":"iterate(Ω::Domain)\n\nIterating over a domain means iterating over its entities.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti._get_gauss_qcoords_and_qweights-Tuple{Type{<:Inti.ReferenceShape}, Any}","page":"References","title":"Inti._get_gauss_qcoords_and_qweights","text":"_get_gauss_and_qweights(R::Type{<:ReferenceShape{D}}, N) where D\n\nReturns the N-point symmetric gaussian qnodes and qweights (x, w) for integration over R.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti._get_vioreanurokhlin_qcoords_and_qweights-Tuple{Type{<:Inti.ReferenceShape}, Any}","page":"References","title":"Inti._get_vioreanurokhlin_qcoords_and_qweights","text":"_get_vioreanurokhlin_qcoords_and_qweights(R::Type{<:ReferenceShape{D}}, N) where D\n\nReturns the N-point Vioreanu-Rokhlin qnodes and qweights (x, w) for integration over R.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti._integration_measure-Tuple{AbstractMatrix}","page":"References","title":"Inti._integration_measure","text":"_integration_measure(J::AbstractMatrix)\n\nGiven the Jacobian matrix J of a transformation f : ℝᴹ → ℝᴺ, compute the integration measure √det(JᵀJ).\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti._normal-Union{Tuple{StaticArraysCore.SMatrix{N, M}}, Tuple{M}, Tuple{N}} where {N, M}","page":"References","title":"Inti._normal","text":"_normal(jac::SMatrix{M,N})\n\nGiven a an M by N matrix representing the jacobian of a codimension one object, compute the normal vector.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti._qrule_for_reference_shape-Tuple{Any, Any}","page":"References","title":"Inti._qrule_for_reference_shape","text":"_qrule_for_reference_shape(ref,order)\n\nGiven a reference shape and a desired quadrature order, return an appropiate quadrature rule.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.ambient_dimension","page":"References","title":"Inti.ambient_dimension","text":"ambient_dimension(x)\n\nDimension of the ambient space where x lives. For geometrical objects this can differ from its geometric_dimension; for example a triangle in ℝ³ has ambient dimension 3 but geometric dimension 2, while a curve in ℝ³ has ambient dimension 3 but geometric dimension 1.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.boundary-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.boundary","text":"boundary(e::AbstractEntity)\n\nA vector of entities of dimension dim-1 that form the boundary of e.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.clear_entities!-Tuple{}","page":"References","title":"Inti.clear_entities!","text":"clear_entities!()\n\nEmpty the global variables used to keep track of the various entities created.\n\nSee also: ENTITIES, TAGS\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.degree-Union{Tuple{Type{Inti.LagrangeElement{D, Np}}}, Tuple{Np}, Tuple{D}} where {D, Np}","page":"References","title":"Inti.degree","text":"degree(el::LagrangeElement)\ndegree(el::Type{<:LagrangeElement})\n\nThe polynomial degree el.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.dom2elt-Tuple{Inti.LagrangeMesh, Inti.Domain, DataType}","page":"References","title":"Inti.dom2elt","text":"dom2elt(m::LagrangeMesh,Ω,E)\n\nCompute the element indices idxs of the elements of type E composing Ω, so that elements(m)[idxs] gives all the elements of type E meshing Ω.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.domain","page":"References","title":"Inti.domain","text":"domain(f)\n\nGiven a function-like object f: Ω → R, return Ω.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.domain-Union{Tuple{Inti.ReferenceQuadrature{D}}, Tuple{D}} where D","page":"References","title":"Inti.domain","text":"domain(q::ReferenceQuadrature)\n\nThe domain of integratino for quadrature rule q.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.element_types-Tuple{Inti.LagrangeMesh}","page":"References","title":"Inti.element_types","text":"element_types(msh::AbstractMesh)\n\nReturn the element types present in the msh.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.elements-Tuple{Inti.AbstractMesh, DataType}","page":"References","title":"Inti.elements","text":"elements(msh::AbstractMesh,E::DataType)\n\nReturn an iterator for all elements of type E on a mesh msh.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.entities-Tuple{Inti.Domain}","page":"References","title":"Inti.entities","text":"entities(Ω::Domain)\n\nReturn all entities making up a domain.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.external_boundary-Tuple{Inti.Domain}","page":"References","title":"Inti.external_boundary","text":"external_boundary(Ω::Domain)\n\nReturn the external boundaries inside a domain. These are entities in the skeleton of Ω which are not in the internal boundaries of Ω.\n\nSee also: internal_boundary, skeleton.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.geometric_dimension","page":"References","title":"Inti.geometric_dimension","text":"geometric_dimension(x)\n\nNNumber of degrees of freedom necessary to locally represent the geometrical object. For example, lines have geometric dimension of 1 (whether in ℝ² or in ℝ³), while surfaces have geometric dimension of 2.\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.get_gmsh_extension-Tuple{}","page":"References","title":"Inti.get_gmsh_extension","text":"get_gmsh_extension()\n\nGet the Gmsh extension, if available.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.get_makie_extension-Tuple{}","page":"References","title":"Inti.get_makie_extension","text":"get_makie_extension()\n\nGet the Makie extension, if available.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.get_vtk_extension-Tuple{}","page":"References","title":"Inti.get_vtk_extension","text":"get_vtk_extension()\n\nGet the VTK extension, if available.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.global_add_entity!-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.global_add_entity!","text":"global_add_entity!(ent::AbstractEntity)\n\nAdd ent to the global dictionary ENTITIES and update TAGS with its (dim,tag) key. This function should be called by the inner constructor of every AbstractEntity.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.image","page":"References","title":"Inti.image","text":"image(f)\n\nGiven a function-like object f: Ω → R, return f(Ω).\n\n\n\n\n\n","category":"function"},{"location":"references/#Inti.integrate-Tuple{Any, Inti.Quadrature}","page":"References","title":"Inti.integrate","text":"integrate(f,quad::Quadrature)\n\nCompute ∑ᵢ f(qᵢ)wᵢ, where the qᵢ are the quadrature nodes of quad, and wᵢ are the quadrature weights.\n\nNote that you must define f(::QuadratureNode): use q.coords and q.normal if you need to access the coordinate or normal vector at que quadrature node.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.integrate-Tuple{Any, Inti.ReferenceQuadrature}","page":"References","title":"Inti.integrate","text":"integrate(f,q::ReferenceQuadrature)\nintegrate(f,x,w)\n\nIntegrate the function f using the quadrature rule q. This is simply sum(f.(x) .* w), where x and w are the quadrature nodes and weights, respectively.\n\nThe function f should take an SVector as input.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.interface_method-Tuple{DataType}","page":"References","title":"Inti.interface_method","text":"interface_method(x)\n\nA method of an abstract type for which concrete subtypes are expected to provide an implementation.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.internal_boundary-Tuple{Inti.Domain}","page":"References","title":"Inti.internal_boundary","text":"internal_boundary(Ω::Domain)\n\nReturn the internal boundaries of a Domain. These are entities in skeleton(Ω) which appear at least twice as a boundary of entities in Ω.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.jacobian-Tuple{Any, Any}","page":"References","title":"Inti.jacobian","text":"jacobian(f,x)\n\nGiven a (possibly vector-valued) functor f : 𝐑ᵐ → 𝐅ⁿ, return the n × m matrix Aᵢⱼ = ∂fᵢ/∂xⱼ.Both x and f(x) are expected to be of SVector type.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.key-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.key","text":"key(e::AbstractEntity)\n\nThe (dim,tag) pair used as a key to identify geometrical entities.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.new_tag-Tuple{Integer}","page":"References","title":"Inti.new_tag","text":"new_tag(dim)\n\nGenerate a unique tag for an AbstractEntity of dimension dim.\n\nThe implementation consists of adding one to the maximum value of TAGS[dim]\n\nSee also: TAGS.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.order-Union{Tuple{Inti.Fejer{N}}, Tuple{N}} where N","page":"References","title":"Inti.order","text":"order(q::ReferenceQuadrature)\n\nA quadrature of order p (sometimes called degree of precision) integrates all polynomials of degree ≤ p but not ≤ p + 1.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.qcoords-Tuple{Inti.ReferenceQuadrature}","page":"References","title":"Inti.qcoords","text":"qcoords(q)\n\nReturn the coordinate of the quadrature nodes associated with q.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.qweights-Tuple{Inti.ReferenceQuadrature}","page":"References","title":"Inti.qweights","text":"qweights(q)\n\nReturn the quadrature weights associated with q.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.reference_nodes-Tuple{Inti.LagrangeElement}","page":"References","title":"Inti.reference_nodes","text":"reference_nodes(el::LagrangeElement)\nreference_nodes(::Type{<:LagrangeElement})\n\nReturn the reference nodes on domain(el) used for the polynomial interpolation. The function values on these nodes completely determines the interpolating polynomial.\n\nWe use the same convention as gmsh for defining the reference nodes and their order (see node ordering on gmsh documentation).\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.return_type-Tuple{Any, Vararg{Any}}","page":"References","title":"Inti.return_type","text":"return_type(f[,args...])\n\nThe type returned by f(args...), where args is a tuple of types. Falls back to Base.promote_op by default.\n\nA functors of type T with a knonw return type should extend return_type(::T,args...) to avoid relying on promote_op.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.skeleton-Tuple{Inti.Domain}","page":"References","title":"Inti.skeleton","text":"skeleton(Ω::Domain)\n\nReturn all the boundaries of the domain, i.e. the domain's skeleton.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.standard_basis_vector-Union{Tuple{N}, Tuple{Any, Val{N}}} where N","page":"References","title":"Inti.standard_basis_vector","text":"standard_basis_vector(k, ::Val{N})\n\nCreate an SVector of length N with a 1 in the kth position and zeros elsewhere.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.svector-Tuple{Any, Any}","page":"References","title":"Inti.svector","text":"svector(f,n)\n\nCreate an SVector of length n, computing each element as f(i), where i is the index of the element.\n\n\n\n\n\n","category":"method"},{"location":"references/#Inti.tag-Tuple{Inti.AbstractEntity}","page":"References","title":"Inti.tag","text":"tag(::AbstractEntity)\n\nInteger tag used to idetify geometrical entities.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExtension","page":"References","title":"IntiGmshExtension","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti.get_gmsh_extension()]","category":"page"},{"location":"references/#IntiGmshExt.GmshEntity","page":"References","title":"IntiGmshExt.GmshEntity","text":"struct GmshEntity <: AbstractEntity\n\nConcrete type of AbstractEntity generated using the gmsh API.\n\n\n\n\n\n","category":"type"},{"location":"references/#IntiGmshExt._domain_to_mesh!-Tuple{Any, Inti.Domain, Any}","page":"References","title":"IntiGmshExt._domain_to_mesh!","text":"_domain_to_mesh!(msh, Ω::Domain)\n\nRecursively populate the dictionaries etype2mat and ent2tag in msh for the entities in Ω. After all entities have been processed, the function recurses on the skeleton of Ω.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._ent_to_mesh!-Tuple{Any, Any, IntiGmshExt.GmshEntity, Any}","page":"References","title":"IntiGmshExt._ent_to_mesh!","text":"_ent_to_mesh!(elements, ent2tag, ω::ElementaryEntity)\n\nFor each element type used to mesh ω:\n\npush into elements::Dict the pair etype=>ntags;\npush into ent2tag::Dict the pair etype=>etags;\n\nwhere:\n\netype::DataType determines the type of the element (see _type_tag_to_etype);\nntags::Matrix{Int} gives the indices of the nodes defining those elements;\netags::Vector{Int} gives the indices of those elements in elements.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._fill_entity_boundary!-Tuple{Any, Any}","page":"References","title":"IntiGmshExt._fill_entity_boundary!","text":"_fill_entity_boundary!\n\nUse the gmsh API to add the boundary of an ElementaryEntity.\n\nThis is a helper function, and should not be called by itself.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._import_domain!","page":"References","title":"IntiGmshExt._import_domain!","text":"_import_domain!(Ω::Domain,[model;dim=3])\n\nLike import_domain, but appends entities to Ω instead of creating a new domain.\n\nnote: Note\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiGmshExt._import_mesh!-Tuple{Inti.LagrangeMesh, Inti.Domain}","page":"References","title":"IntiGmshExt._import_mesh!","text":"_import_mesh!(msh,Ω)\n\nSimilar to import_mesh, but append information to msh instead of creating a new mesh.\n\ndanger: Danger\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt._type_tag_to_etype-Tuple{Any}","page":"References","title":"IntiGmshExt._type_tag_to_etype","text":"_type_tag_to_etype(tag)\n\nMapping of gmsh element types, encoded as an integer, to the internal equivalent of those.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt.import_domain","page":"References","title":"IntiGmshExt.import_domain","text":"import_domain([model;dim=3])\n\nConstruct a Domain from the gmsh model with all entities of dimension dim; by defaul the current gmsh model is used.\n\nnote: Note\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiGmshExt.import_mesh-Tuple{Inti.Domain}","page":"References","title":"IntiGmshExt.import_mesh","text":"import_mesh(Ω;[dim=3])\n\nCreate a LagrangeMesh for the entities in Ω. Passing dim=2 will create a two-dimensional mesh by projecting the original mesh onto the x,y plane.\n\ndanger: Danger\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiGmshExt.model_summary","page":"References","title":"IntiGmshExt.model_summary","text":"model_summary([model])\n\nPrint a summary of the gmsh model to the console; by defaul the current model is used.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiGmshExt.read_geo-Tuple{Any}","page":"References","title":"IntiGmshExt.read_geo","text":"read_geo(fname::String;dim=3)\n\nRead a .geo file and generate a Domain with all entities of dimension dim.\n\ndanger: Danger\nThis function assumes that gmsh has been initialized, and does not handle its finalization.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiMakieExtension","page":"References","title":"IntiMakieExtension","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti.get_makie_extension()]","category":"page"},{"location":"references/#IntiVTKExtension","page":"References","title":"IntiVTKExtension","text":"","category":"section"},{"location":"references/","page":"References","title":"References","text":"Modules = [Inti.get_vtk_extension()]","category":"page"},{"location":"references/#IntiVTKExt.etype_to_vtk_cell_type","page":"References","title":"IntiVTKExt.etype_to_vtk_cell_type","text":"const etype_to_vtk_cell_type\n\nDictionary mapping internal element types to a tuple containing: - the corresponding WriteVTK cell types (following the convention chosen by VTK, see below); - the indices in the elements column that defines the element. This is because we want to support the export of more than just the flat elements available in the VTK specification, hence which may require a conversion of some sort.\n\nSee VTK specification [Fig. 2] on http://www.vtk.org/VTK/img/file-formats.pdf\n\nVTK_VERTEX (=1)\nVTKPOLYVERTEX (=2)\nVTK_LINE (=3)\nVTKPOLYLINE (=4)\nVTK_TRIANGLE (=5)\nVTKTRIANGLESTRIP (=6)\nVTK_POLYGON (=7)\nVTK_PIXEL (=8)\nVTK_QUAD (=9)\nVTK_TETRA (=10)\nVTK_VOXEL (=11)\nVTK_HEXAHEDRON (=12)\nVTK_WEDGE (=13)\nVTK_PYRAMID (=14)\n\n\n\n\n\n","category":"constant"},{"location":"references/#IntiVTKExt._vtk_cells","page":"References","title":"IntiVTKExt._vtk_cells","text":"_vtk_cells(mesh::LagrangeMesh, E::DataType)\n_vtk_cells(mesh::LagrangeMesh, Ω::Domain)\n\nCreates the vector of all elements contained in the mesh in the format required by WriteVTK for a particular element type E<:AbstractElement or a Domain instance.\n\n\n\n\n\n","category":"function"},{"location":"references/#IntiVTKExt._vtk_points-Tuple{Inti.LagrangeMesh}","page":"References","title":"IntiVTKExt._vtk_points","text":"_vtk_points(mesh::LagrangeMesh)\n\nCreates the matrix of nodes in the format required by WriteVTK.\n\n\n\n\n\n","category":"method"},{"location":"references/#IntiVTKExt.mesh_file-Tuple{Inti.LagrangeMesh, String}","page":"References","title":"IntiVTKExt.mesh_file","text":"mesh_file(mesh::LagrangeMesh[, Ω::Domain], name::String)\n\nCreates a VTK file (.vtu) with name name containing the mesh information. It is possible to export only a Domain (i.e. only a part of the mesh).\n\nNote that all the heavy lifting is done by the package WriteVTK. We refer to its documentation for more information.\n\nWarning: the output is not an actual file (on disk). To save it, simply write:\n\nmesh_file(mesh, \"my_mesh\") |> vtk_save\n\n(Noting that you will need to be using WriteVTK to do so)\n\nTo add some data (scalar or vector values at the mesh nodes or mesh cells) for visualization purposes, you can do for instance:\n\nvtkfile = mesh_file(mesh, name)\nvtkfile[\"my_point_data\", VTKPointData()] = pdata\nvtkfile[\"my_cell_data\", VTKCellData()] = cdata\nvtk_save(vtkfile)\n\nIt is possible also to export a partition Ωs::Vector{Domain} using Multiblock files (.vtm), for instance like so\n\nvtmfile = vtk_multiblock(name)\nfor (Ω, pdata) in zip(Ωs, pdatas)\n vtkfile = mesh_file(mesh, Ω, name)\n vtkfile[\"my_point_data\", VTKPointData()] = pdata\nend\nvtk_save(vtmfile)\n\nTo save a sequence of solutions (time steps, iterations), simply append the number of the element to the file name. Paraview will recognize the sequence automatically.\n\n\n\n\n\n","category":"method"},{"location":"geo_and_meshes/#geometry-and-meshes-section","page":"Meshing","title":"Geometry and meshes","text":"","category":"section"},{"location":"geo_and_meshes/#Overview","page":"Meshing","title":"Overview","text":"","category":"section"},{"location":"geo_and_meshes/#gmsh-section","page":"Meshing","title":"Gmsh","text":"","category":"section"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"using Inti\nusing Gmsh\n\ngmsh_ext = Inti.get_gmsh_extension()\ngmsh.initialize()\ngmsh.model.add(\"Sphere\")\ngmsh.model.occ.addSphere(0,0,0,1)\ngmsh.model.occ.synchronize()\ngmsh.model.mesh.generate(3)\nents = gmsh.model.getEntities()\nΩ = gmsh_ext.import_domain(;dim=3)\nmsh = gmsh_ext.import_mesh(Ω;dim=3)\ngmsh.finalize()","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"You can take views of the mesh msh by passing a domain to the view function\nYou can plot a msh if you have a Makie backend (e.g. GLMakie)","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"using CairoMakie\nΓ = Inti.external_boundary(Ω)\npoly(view(msh,Γ);strokewidth=1,color=:lightgray, transparency=true)","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"You can also plot the volume mesh (see the Documentation of Makie.poly for more details on possible arguments):","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"poly(view(msh,Ω);strokewidth=1,color=:lightgray, transparency=true)","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":"Two-dimensional meshes are very similar:","category":"page"},{"location":"geo_and_meshes/","page":"Meshing","title":"Meshing","text":" using Inti\n using Gmsh\n using CairoMakie\n gmsh_ext = Inti.get_gmsh_extension()\n gmsh.initialize()\n gmsh.option.setNumber(\"General.Verbosity\", 2)\n gmsh.model.add(\"Disk\")\n gmsh.model.occ.addDisk(0,0,0,1,1)\n gmsh.model.occ.synchronize()\n gmsh.model.mesh.generate(2)\n Ω = gmsh_ext.import_domain(;dim=2)\n msh = gmsh_ext.import_mesh(Ω;dim=2)\n gmsh.finalize()\n poly(view(msh,Ω);strokewidth=2)","category":"page"},{"location":"","page":"Home","title":"Home","text":"CurrentModule = Inti","category":"page"},{"location":"#Inti","page":"Home","title":"Inti","text":"","category":"section"}] }