warp.fem#
Finite Element Method (FEM) toolkit for solving differential equations.
This module provides tools for solving physical systems described as partial differential equations (PDEs) using finite-element-based Galerkin methods. It supports diffusion, convection, fluid flow, and elasticity problems with various FEM formulations and discretization schemes.
The core workflow involves defining geometries (grids, meshes, NanoVDB volumes), function
spaces with shape functions, integration domains, and using the integrate() function
with integrand()-decorated kernels to build linear and bilinear forms for solving
linear systems.
- Usage:
This module must be explicitly imported:
import warp.fem
See also
FEM Toolkit for comprehensive documentation and examples.
Submodules#
These modules are automatically available when you import warp.fem.
API#
Adaptive sparse grid. |
|
Interface class for defining shape functions over a geometry. |
|
A Domain containing boundary sides of the geometry or geometry partition. |
|
Geometry partition based on a subset of cells. |
|
A Domain containing all cells of the geometry or geometry partition. |
|
alias of |
|
Explicitly-valued field defined over a partition of a discrete function space. |
|
Base class for mapping node degrees of freedom to function values. |
|
Tag for domain-like integrand arguments |
|
Enumeration of reference element types. |
|
Choice of basis function to equip individual elements. |
|
alias of |
|
Type of geometry elements. |
|
Geometry partition defined by an explicit cell selection mask. |
|
Quadrature using explicit per-cell points and weights. |
|
Tag for field-like integrand arguments |
|
Base class for integrable fields. |
|
A Domain containing frontier sides of the geometry partition (sides shared with at least another partition). |
|
Interface class for function spaces, i.e. geometry + interpolation basis. |
|
Interface class for discrete geometries |
|
Interface class for domains, i.e. (partial) views of elements in a |
|
Base class for fields defined over a geometry. |
|
Base class for geometry partitions, i.e. subset of cells and sides. |
|
Two-dimensional regular grid geometry. |
|
Three-dimensional regular grid geometry. |
|
Hexahedral mesh geometry. |
|
Field defined from an arbitrary function over a domain. |
|
An integrand is a device function containing arbitrary expressions over |
|
Geometry partition that uniformly divides cells by index range. |
|
Sparse grid geometry. |
|
Quadrature using space node points as quadrature points |
|
alias of |
|
Field defined as the map of a |
|
Provide syntactic sugar over |
|
Particle-based quadrature formula, using a global set of points unevenly spread out over geometry elements. |
|
Unstructured basis space with radial basis kernel functions. |
|
Polynomial family defining interpolation nodes over an interval. |
|
Two-dimensional quadrilateral mesh. |
|
Three-dimensional quadrilateral mesh. |
|
Interface class for quadrature rules. |
|
alias of |
|
Regular quadrature formula, using a constant set of quadrature points per element. |
|
Per-sample point context for evaluating fields and related operators in integrands. |
|
Base class for defining shape-function-based basis spaces. |
|
Interface class for defining scalar-valued shape functions over a single element. |
|
A Domain containing all (interior and boundary) sides of the geometry or geometry partition. |
|
Orthonormal isomorphism from R^{n (n-1)} to nxn skew-symmetric tensors, using usual L2 norm for vectors and half Frobenius norm, (tau : tau)/2 for tensors. |
|
Partition of a function space over a geometry partition. |
|
Restriction of a space partition to a given |
|
Interface class for defining the topology of a function space. |
|
Restriction of domain to a subset of its elements. |
|
Orthonormal isomorphism from R^{n (n+1)} to nxn symmetric tensors, using usual L2 norm for vectors and half Frobenius norm, (tau : tau)/2 for tensors. |
|
alias of |
|
Shared pool of temporary arrays that will be persisted and reused across invocations of |
|
Tetrahedral mesh geometry. |
|
2D Triangular mesh geometry |
|
3D Triangular mesh geometry |
|
Field defined as a constant value over a domain. |
|
Symmetric part of the (inner) gradient of the field at |
|
Constructs a |
|
Constructs a |
|
Return a copy of the |
|
Average between inner and outer element values. |
|
Borrow and return a temporary array with specified attributes from a shared pool. |
|
Borrow and return a temporary array with the same attributes as another array or temporary. |
|
Convert a domain defined on geometry sides to a domain defined of cells. |
|
Skew part of the (inner) gradient of the field at |
|
Evaluate the gradient of the domain position with respect to the element reference space at the sample point |
|
Polynomial degree of a field. |
|
Evaluate the field divergence at a sample point |
|
Evaluate the field divergence at a sample point |
|
Compute the coordinates of the closest point to a world position within a given element. |
|
Return the coordinates in an element reference system corresponding to a work position. |
|
Return the index in the geometry of the |
|
Return the index of the passed cell in the domain's geometry partition, or |
|
Evaluate the field gradient at a sample point |
|
Average between inner and outer element gradients. |
|
Jump between inner and outer element gradients on an interior side. |
|
Evaluate the field gradient at a sample point |
|
Evaluate the field at a sample point |
|
Decorator for functions to be integrated (or interpolated) using |
|
Integrates a constant, linear or bilinear form, and returns a scalar, array, or sparse matrix, respectively. |
|
Interpolates a function at a finite set of sample points and optionally assigns the result to a discrete field, raw warp array, or sparse matrix. |
|
Jump between inner and outer element values on an interior side. |
|
Look up the sample point corresponding to a world position |
|
Constructs a function space from a scalar-valued basis space and a value type, such that all degrees of freedom of the value type are stored at each of the basis nodes. |
|
Constructs a contravariant function space from a vector-valued basis space |
|
Constructs a covariant function space from a vector-valued basis space |
|
Constructs a zero-initialized discrete field over a function space or partition |
|
Makes a space topology from a geometry and an element-based shape function. |
|
Equip a reference element with a shape function basis. |
|
Return a |
|
Equips a geometry with a polynomial basis. |
|
Equips a geometry with a collocated, polynomial function space. |
|
Restricts a discrete field to a subset of elements. |
|
Compute the subset of nodes from a function space topology that touch a geometry partition |
|
Restricts a function space partition to a Domain, i.e. a subset of its elements. |
|
Constructs a test field over a function space or its restriction |
|
Constructs a trial field over a function space or partition |
|
Return the measure (volume, area, or length) determinant of an element at a sample point |
|
Return the maximum ratio between the measure of this element and that of higher-dimensional neighbors. |
|
Return the number of nodes associated to the field |
|
Return the index in the function space of a local node of the field |
|
Return the inner element weight associated to a local node of the field |
|
Return the gradient (w.r.t world coordinates) of the inner element weight associated to a local node of the field |
|
Return the outer element weight associated to a local node of the field |
|
Return the gradient (w.r.t world coordinates) of the outer element weight associated to a local node of the field |
|
For a NodalField f, returns the index of a given node in the fields's space partition, or |
|
Evaluate the element normal at the sample point |
|
Scale projector so that it becomes idempotent, and apply the same scaling to fixed_value if provided |
|
Evaluate the field at a sample point |
|
Look up the sample point corresponding to a world position |
|
Evaluate the world position of the sample point |
|
Projects both the left-hand-side and right-hand-side of a linear system to enforce Dirichlet boundary conditions |
|
Projects the right-hand-side of a linear system to enforce Dirichlet boundary conditions |
|
Projects the right-hand-side of a linear system to enforce Dirichlet boundary conditions |
|
Globally sets the default |
|
Convert a |
|
Convert a |
|
Convert a |
|
Constant indicating an invalid element index. |
|
Constant indicating an invalid node index. |
|
Constant indicating an invalid quadrature point index. |
|
Constant indicating an invalid element coordinate. |