Neighborhoods
The Neighborhood concept represents the differential geometric notion of the derivative of a chart in a point of its parameter domain. Not only can it be queried for the parametric and Cartesian coordinates of the input and output point respectively, it also contains information on tangents and Jacobian determinants. For the special case where the dimension of the range manifold is one less than that of the surrounding space, access is provided to the unit normal.
This concept is an enriched point concept and should allow the construction of the majority of kernels encountered in finite and boundary element methods.
CompScienceMeshes.parametric
— Functionparametric(neighborhood) -> point
Return the parameters where neighborhood
is located.
CompScienceMeshes.cartesian
— Functioncartesian(neighborhood) -> point
Return the cartesian coordinates of the point where neighborhood
is located.
CompScienceMeshes.jacobian
— FunctionA number defines a neighborhood in euclidian space
CompScienceMeshes.tangents
— Functiontangents(splx)
Returns a matrix whose columns are the tangents of the simplex splx
.
tangents(neighborhod, i) -> tangent_i
Return the i-th tangent vector at the neighborhood.
CompScienceMeshes.normal
— Functionnormal(neighborhood)
Return the normal at a neighborhood on a surface.
In addition to this interface, a neighborhood has appropriate methods for getindex
defined, so that it can be used with any function that expects a tuple of coordinates. In other words, a neighborhood is a model for Point.
Numerical Quadrature
This package provides a number of routines that aim to facilitate numerical quadrature over charts. In addition, it includes a default set of quadrature rules for segments (1D) and triangles (2D).
CompScienceMeshes.quadpoints
— Functionpw = quadpoints(chart, rule)
Returns a collection of (point, weight) tuples corresponding to the numerical quadrature rule
defined on the domain of chart
. The weights returned take into account the Jacobian determinant resulting from mapping from the reference domain to the configuration space.
Functions can be integrated like:
PW = quadpoints(chart, rule)
I = sum(pw[2]*f(pw[1]) for pw in PW)
quadpoints(refspace, charts, rules)
Computed a matrix of vectors containing (weight, point, value) triples that can be used in numerical integration over the elements described by the charts. Internally, this method used quadpoints(chart, rule)
to retrieve the points and weights for a certain quadrature rule over chart
.