# yt.utilities.lib.element_mappings module¶

This file contains coordinate mappings between physical coordinates and those defined on unit elements, as well as doing the corresponding intracell interpolation on finite element data.

class yt.utilities.lib.element_mappings.ElementSampler

Bases: object

This is a base class for sampling the value of a finite element solution at an arbitrary point inside a mesh element. In general, this will be done by transforming the requested physical coordinate into a mapped coordinate system, sampling the solution in mapped coordinates, and returning the result. This is not to be used directly; use one of the subclasses instead.

class yt.utilities.lib.element_mappings.NonlinearSolveSampler2D

This is a base class for handling element samplers that require a nonlinear solve to invert the mapping between coordinate systems. To do this, we perform Newton-Raphson iteration using a specified system of equations with an analytic Jacobian matrix. This solver is hard-coded for 2D for reasons of efficiency. This is not to be used directly, use one of the subclasses instead.

class yt.utilities.lib.element_mappings.NonlinearSolveSampler3D

This is a base class for handling element samplers that require a nonlinear solve to invert the mapping between coordinate systems. To do this, we perform Newton-Raphson iteration using a specified system of equations with an analytic Jacobian matrix. This solver is hard-coded for 3D for reasons of efficiency. This is not to be used directly, use one of the subclasses instead.

class yt.utilities.lib.element_mappings.P1Sampler1D

This implements sampling inside a linear, 1D element.

class yt.utilities.lib.element_mappings.P1Sampler2D

This implements sampling inside a linear, triangular mesh element. This mapping is linear and can be inverted easily. Note that this implementation uses triangular (or barycentric) coordinates.

class yt.utilities.lib.element_mappings.P1Sampler3D

This implements sampling inside a linear, tetrahedral mesh element. This mapping is linear and can be inverted easily.

class yt.utilities.lib.element_mappings.Q1Sampler2D

This implements sampling inside a 2D, linear, quadrilateral mesh element.

class yt.utilities.lib.element_mappings.Q1Sampler3D

This implements sampling inside a 3D, linear, hexahedral mesh element.

class yt.utilities.lib.element_mappings.Q2Sampler2D

class yt.utilities.lib.element_mappings.S2Sampler3D

This implements sampling inside a 3D, 20-node hexahedral mesh element.

class yt.utilities.lib.element_mappings.T2Sampler2D

This implements sampling inside a 2D, quadratic, triangular mesh element. Note that this implementation uses canonical coordinates.

class yt.utilities.lib.element_mappings.Tet2Sampler3D

This implements sampling inside a 3D, quadratic, tetrahedral mesh element. Note that this implementation uses canonical coordinates.

class yt.utilities.lib.element_mappings.W1Sampler3D

This implements sampling inside a 3D, linear, wedge mesh element.

yt.utilities.lib.element_mappings.test_hex20_sampler()
yt.utilities.lib.element_mappings.test_hex_sampler()
yt.utilities.lib.element_mappings.test_linear1D_sampler()
yt.utilities.lib.element_mappings.test_quad2_sampler()
yt.utilities.lib.element_mappings.test_quad_sampler()
yt.utilities.lib.element_mappings.test_tet2_sampler()
yt.utilities.lib.element_mappings.test_tetra_sampler()
yt.utilities.lib.element_mappings.test_tri2_sampler()
yt.utilities.lib.element_mappings.test_tri_sampler()
yt.utilities.lib.element_mappings.test_wedge_sampler()