Gridap.CellData

Gridap.CellData — Module

Exported names

CellDatum, CellDof, CellField, CellPoint, CellQuadrature, CellState, DiracDelta, DomainContribution, DomainStyle, GenericCellField, Integrand, Interpolable, KDTreeSearch, Measure, MomentBasedMeasure, MomentBasedQuadrature, PatchMeasure, PatchQuadrature, PhysicalDomain, ReferenceDomain, SkeletonCellFieldPair, add_contribution!, attach_constraints_cols, attach_constraints_rows, attach_dirichlet, change_domain, compute_cell_points_from_vector_of_points, cross, d_0form, d_1form, det, dot, double_contraction, get_ad_level, get_cell_measure, get_cell_points, get_contribution, get_data, get_domains, get_normal_vector, get_physical_coordinate, get_tangent_vector, get_triangulation, gradient, identity_constraints, inner, jump, make_inverse_table, mean, num_domains, outer, symmetric_part, test_cell_datum, tr, update_state!, ×, ∇, ∇∇, ∫, ⊗, ⊙, ⋅, ⋅², ⋅¹,

source
Gridap.CellData.CellDatum — Type
abstract type CellDatum <: GridapType

Data associated with the cells of a Triangulation. CellDatum objects behave as if they are defined in the physical space of the triangulation. But in some cases they are implemented as reference quantities plus some transformation to the physical domain.

source
Gridap.CellData.CellPoint — Type

A single point or an array of points on the cells of a Triangulation CellField objects can be evaluated efficiently at CellPoint instances.

source
Gridap.CellData.CompositeMeasure — Type
struct CompositeMeasure <: Measure
  ttrian :: Triangulation
  itrian :: Triangulation
  quad   :: CellQuadrature
end

Measure such that the integration and target triangulations are different.

  • ttrian: Target triangulation, where the domain contribution lives.
  • itrian: Integration triangulation, where the integration takes place.
  • quad : ::CellQuadrature, defined in itrian
source
Gridap.CellData.DiracDelta — Method
DiracDelta{D}(model::DiscreteModel, degree; tags)
DiracDelta{0}(model::DiscreteModel; tags)
DiracDelta{D}(model::DiscreteModel, labeling::FaceLabeling, degree; tags)
DiracDelta{0}(model::DiscreteModel, labeling::FaceLabeling; tags)
DiracDelta{D}(model::DiscreteModel, face_to_bgface::AbstractVector{<:Integer}, degree)
DiracDelta{D}(model::DiscreteModel, bgface_to_mask::AbstractVector{Bool}, degree)
DiracDelta(   model::DiscreteModel{D}, p::Point{D,T}; searchmethod=KDTreeSearch())
DiracDelta(   model::DiscreteModel{D}, pvec::Vector{Point{D,T}}; searchmethod=KDTreeSearch())

where degree isa Integer.

source
Gridap.CellData.DomainStyle — Type
abstract type DomainStyle

Trait that signals if a <:CellDatum type is implemented in the physical or the reference domain, the possible values are ReferenceDomain() and PhysicalDomain().

source
Gridap.CellData.KDTreeSearch — Type
KDTreeSearch(; num_nearest_vertices=Gridap.Helpers.default_num_nearest_vertices, tol=1.e-10)

Point-to-cell search method locating a point by inspecting the cells around its num_nearest_vertices closest mesh vertices, found with a KD-tree. tol is the tolerance used to decide whether the point lies inside a cell.

Increase num_nearest_vertices when a point that is known to lie in the mesh is not found, which can happen near non-convex boundaries and for stretched cells.

source
Gridap.CellData.SkeletonCellFieldPair — Type
struct SkeletonCellFieldPair{...}

SkeletonCellFieldPair is a special construct for allowing uh.plus and uh.minus to be two different CellFields. In particular, it is useful when we need one of the CellFields to be the dualized version of the other for performing ForwardDiff AD of a skeleton integration DomainContribution wrt to the degrees of freedom of the CellField, plus and minus sensitivities done separately, so as to restrict the interaction between the dual numbers.

It takes in two CellFields and stores plus version of CellFieldAt of the first CellField and minus version of CellFieldAt of the second the CellField. SkeletonCellFieldPair is associated with same triangulation as that of the CellFields (we check if the triangulations of both CellFields match)

SkeletonCellFieldPair is an internal convenience artifact/construct to aid in dualizing plus and minus side around a skeleton face separately to perform the sensitivity of degrees of freedom of cells sharing the skeleton face, without the interaction dual numbers of the two cells. The user doesn't have to deal with this construct anywhere when performing AD of functionals involving integration over skeleton faces using the public API.

source
Gridap.CellData.MomentBasedMeasure — Method
MomentBasedMeasure(trian::Triangulation, meas::Measure, degree; T=Float64, space=:Q)
MomentBasedMeasure(trian::Triangulation, fmeas::Measure, patches, degree; kwargs...)

Returns a measure on trian where each cell carries a moment-based quadrature (see MomentBasedQuadratureMap), exact for the polynomial space space ∈ (:P,:Q) of order degree. Two constructors are provided:

  • If a meas::Measure is given, that can integrate polynomials on each cell of trian, the moment-based quadrature is constructed directly from it.

  • Alternatively, one can provide a measure fmeas on a fine triangulation along with patches, providing how the cells of trian are built from the fine cells of fmeas. patches is either a PatchTopology whose patches are the cells of the background model of trian (agglomeration), or a table ctface_to_ftfaces giving, for each cell of trian, the fine cells of fmeas it is built from (e.g. the sub-cells of a cut cell). The moments are then computed by gathering the quadratures of fmeas on the fine cells within each cell of trian (see PatchQuadrature).

source
Gridap.CellData.PatchMeasure — Method
PatchMeasure(ctrian::Triangulation, fmeas::Measure, ptopo::PatchTopology)
PatchMeasure(ctrian::Triangulation, fmeas::Measure, ctface_to_ftfaces)

Returns a measure on ctrian obtained by gathering, for each cell of ctrian, the quadrature points of fmeas on the fine cells it contains. See PatchQuadrature.

source
Gridap.CellData.PatchQuadrature — Method
PatchQuadrature(ctrian::Triangulation, fquads::CellQuadrature, ctface_to_ftfaces)

Returns a CellQuadrature on ctrian where each cell c carries the quadrature points and weights of fquads on the cells ctface_to_ftfaces[c] of get_triangulation(fquads), in the physical domain. Both cells are indexed by triangulation (not model) ids.

source
Gridap.CellData.PatchQuadrature — Method
PatchQuadrature(ctrian::Triangulation, fquads::CellQuadrature, ptopo::PatchTopology)

Same as PatchQuadrature(ctrian, fquads, ctface_to_ftfaces), with the table built from ptopo. The cells of the background model of ctrian are the patches of ptopo, and the cells of the background model of get_triangulation(fquads) are the cells of ptopo. Fine cells that are not in the fine triangulation are skipped.

source
Gridap.CellData.distance — Method
distance(poly::ExtrusionPolytope, inv_cmap::Field, x::Point)

Calculate distance from point x to a polytope. The polytope is given by its type poly and by the inverse cell map, i.e. by the map from the physical to the reference space.

Positive distances are outside the polytope, negative distances are inside the polytope.

The distance is measured in an unspecified norm, currently the L∞ norm.

source
Gridap.CellData.get_data — Method
get_data(a::CellDatum)

Get the stored array of cell-wise data. It can be defined in the physical or the reference domain.

source
Gridap.CellData.jump — Method
jump(a::CellField)
jump(a::SkeletonPair{<:CellField})

Jump operator at interior facets of the supporting Triangulation, defined by jump(a n) = ⟦a n⟧ = a⁺n⁺ + a⁻n⁻, where n is an oriented normal field to the interior facets, n⁺ = -n⁻ are the normal pointing into the element on the + and - side of the facets, and a⁺/a⁻ are the restrictions of a to each element respectively.

source
Gridap.Fields.gradient — Method
gradient(a::CellField, Val(N))

N-th gradient of a, gradient(a,Val(N))[i₁,…,i_N,c…] = ∂_{i₁}⋯∂_{i_N} a_c. The reference derivatives are computed by the fields themselves or, by default, by forward-mode automatic differentiation; the pushforward to the physical domain is implemented for affine cell maps.

source
Gridap.Fields.integrate — Method
integrate(integrand, dΩ::Measure)
integrate(integrand, dΩ::CellQuadrature)
(integrand::Integrand) * dΩ
∫(quantity) * dΩ
∫(quantity)dΩ

High level integral definition API, the integrand can be created using ∫.

source
Gridap.ReferenceFEs.MomentBasedQuadrature — Method
MomentBasedQuadrature(trian::Triangulation, quad::CellQuadrature, degree; T=Float64, space=:Q)

Returns a CellQuadrature on trian where each cell carries a moment-based quadrature, with moments computed with quad. The result lives in the same domain as quad: if quad is in the physical domain, the polynomial space is defined on the physical bounding box of each cell. Otherwise, it is defined on the bounding box of the cell polytope.

source