Next: Package FL.PROBLEM, Previous: Package FL.FUNCTION, Up: Reference manual
This module contains the definitions of meshes and
routines for mesh management. The meshes allowed in Femlisp are more
general than those of most other software for solving PDEs. In Femlisp,
both mesh, domain and problem definitions are defined over an underlying
abstraction, the so-called <skeleton>. A <skeleton>
captures the mathematical idea of a "cell complex" which builds a
topological space by mapping from standard cells <cell>. Now, a
<skeleton> can be seen as mapping the cells of such a cell complex
to arbitrary values. Then, a <domain> is a <skeleton>
where each cell (which we call "patch" in this case) is mapped to
geometric properties, and a <mesh> is a <skeleton> where
each cell is mapped to the patch to which it belongs.
The basic entities are the class <cell>, the subclass
<simplex> which in turn contains subclasses for arbitrarily
dimensional simplices generated on demand, and the subclass
<product-cell> containing arbitrary products of simplices, e.g. square
or cube.
Meshes can be refined either uniformly or locally using the Freudenthal algorithm as presented in JBey_2000a and generalized to product elements. When local refinement is used, hanging nodes may occur. In contrast to most other finite element software, in Femlisp the difference of refinement levels of adjacent cells may be arbitrarily large. Up to now, anisotropic refinement of product cells has not yet been implemented.
This cell is only fuzzily defined. Its use is mostly for defining domains by their boundary. The slot
midpointcan be useful for the graphical output of the cell, the slotholescontains a list of points lying inside holes. This is intended as help for triangulation programs.Superclasses: <STANDARD-CELL>
Direct slots:
- DIMENSION: NIL
- MIDPOINT: NIL
- HOLES: NIL
A
<domain>is a special<skeleton>. We call its cells patches, and the properties of a patch carries geometric information. Properties supported up to now are:
IDENTIFIED: list of identified patchesEXTENSION: extenderMETRIC: metric tensor functionVOLUME: volume functionMetric and volume should be functions depending on keyword arguments like
:LOCALand:GLOBALand allowing arbitrary other keys.Superclasses: <SKELETON> PROPERTY-MIXIN
Direct slots:
- BOUNDARY: A skeleton containing all boundary patches which is used for classification of patches.
- CLASSIFIERS: A list of functions of two arguments -patch and classifications so far- which are called from the right to classify the patch.
Hierarchical-meshes are those meshes which will be used most often, because they remember the refinement history and therefore allow for refinement and coarsening. The slot levels is an array of skeletons containing the cells for different levels.
Superclasses: <MESH>
Direct slots:
- LEVELS: NIL
A mixin which distinguishes cells which are mapped by a special mapping.
Direct slots:
- MAPPING: NIL
A <mesh> is a special <skeleton> mapping cells to property lists with properties of the cell. The most important property of a cell is its patch in the domain. Another one could be a list of possibly identified cells. The slot parametric determines which kind of cell mappings are used for approximating the domain. These can be the nonlinear mappings used in the domain definition, but also arbitrary approximations, to those mappings, e.g. isoparametric mappings. The special value NIL means that multilinear mappings are used for all cells outside the boundaries.
Superclasses: <SKELETON>
Direct slots:
- DOMAIN: The domain of the mesh.
- PARAMETRIC: NIL
A skeleton is a vector of hash-tables containing the cells of a certain dimension as keys. The information stored in the values is different depending on the subclass derived from skeleton.
Direct slots:
- DIM: NIL
- ETABLES: NIL
Returns an identification list for the boundaries of the cells in identifications.
Generates a box domain for the given dimensions. Here, dimensions is expected to be a list of 2-element lists denoting the interval along the respective axis. The algorithm works by copying the unit cube and modifying the coordinates of the vertices of the copy.
Transforms a product-cell into a degenerated cube with the same vertices.
Returns the cells of skel of highest dimension in form of a list.
Returns a function which compares two vectors lexicographically.
Copies a mesh. Properties copied are only patch and identification. If necessary, one might add further properties to be copied as a keyword argument.
Returns a list of corners of the cell, i.e. the global positions of the cell's vertices.
Makes domain-cube —which should be a cube in a domain— extensible in the given direction.
Returns a property list of characteristics. The property curved means that curved patches exist. The property exact is set to t if the domain mappings are exact. Otherwise, only the boundary of the domain should be assumed to be provided in an exact form.
Loop through a skeleton. If looping-var is an atom, it loops through all cells, otherwise it loops through cells and properties.
If domain is an integer, return the corresponding n-cube-domain, if domain is a domain return it unchanged, otherwise signal an error.
Returns the reference product-cell for the given factor dimensions.
Extends a mesh on all extensible cells for which test —if provided— yields T.
Returns a list of cells contained in skel and satisfying test.
Finds the refinement rule for cell defined by the id. This id can be a number (position of the rule, T (meaning 0), or some symbol which is contained in the names of some rule. Two values are returned: the rule and its position in the refinement-rule vector.
This computes a local coordinate which solves the Ausgleichsproblem of mapping to a point as near as possible to global-pos. It involves more computational work than global->local. As a second value, the distance to global-pos is returned.
Mainly useful for finite element evaluation: from the local position, the value of a fe function can be obtained by interpolation. This is done by a Newton iteration, which converges in one step for linear mappings.
Sorts the cells up to the given level (defaulting to the last level) hierarchically for use in something similar to the nested disection method. Returns a list of the sorted cells.
Returns a list of cells in skel which are identified with cell.
This routines identifies boundary cells in skel which correspond to boundary cells in the unit cube. Warning: exact arithmetic is used to recognize identified cells. This should work for skeletons derived from the unit cell, but may create problems in other situations.
Creates a cell of type cell-class with corners given by corners. corners->cell has to be an equalp hash-table mapping corners to the corresponding cell. It is updated by this function.
Checks if global-pos is inside the interior of the cell. It calls coordinates-inside? which is defined for every cell class.
Generates all identifications of the skeleton from the identifications of some higher-dimensional cells.
Checks if key1 occurs as subcell of key2. The keys can be either cells or identifications.
Creates an L-domain by cutting out a small cube of the uniform refinement of the unit cube.
Computes the gradient for a multilinear interpolation from the vertices.
local->Dglobal checks if a mapping is given for the cell. If yes, then the gradient of this mapping is evaluated (if available). If no, then the function l2Dg is called which gives the gradient for a multilinear interpolation from the cell's corners.
local->global checks if a mapping is given for the cell. If yes, then this mapping is evaluated. If no, then the function l2g is called which should do a multilinear interpolation from the cell's corners.
Creates a cell of class CELL-CLASS having the given CORNERS.
Creates a cell of class CELL-CLASS having the given VERTICES.
Transforms a domain which is specified sufficiently well into a mesh.
Short form of creating a simplex given its boundary. An alternative is creating it from its vertices, see the functions MAKE-CELL-FROM-VERTICES and INSERT-CELL-FROM-CORNERS.
Computes a meshsize. Please refer to the method documentations for the exact definition.
Generates an n-dimensional cell domain which is a n-dimensional unit cube with its opposite sides identified.
Returns an LEVEL times refined skeleton of REFCELL. It is partially memoized, see the documentation of *REFCELL-REFINEMENT-MEMOIZE-DEPTH*.
Refines skel either locally or globally depending on the
indicator.
Returns the refinement of cell in skeleton as two values: the rule and the children.
Returns the refined boundary subcells of unrefined cells in a skeleton. Those cells are found as all refined cells which are not part of the domain boundary. At the moment, this is a global operation. Later on, it should probably be localized.
Rule for refining reference cells. Those rules are stored in the refine-info slot of the cell class.
Direct slots:
- NAMES: Names identifying the rule.
- REFCELL: Reference cell for this refinement rule.
- BOUNDARY-REFINEMENT-RULES: Refinement rules for the sides required by this rule.
- REFINEMENT-INFO: Vector of refinement information for the children.
Generates a product-cell domain for the given factor dimensions.
Adds skel-2 to skel-1 destructively for skel-1. Overlaying cells are identified. override is a list of properties which are copied from skel-2 on the overlap. active-skel-1 is used for hierarchical-meshes for selecting a level to which skel-2 is added. This function returns three values: the first is skel-1, the second is skel-2, the third is a hash-table mapping overlapping cells from skel-2 to their counterpart in skel-1.
Loops through a skeleton applying func. When direction is :down then loops with dimension of the cells decreasing, otherwise increasing.
Removes a cell from a skeleton such that the rest remains a skeleton. Warning: does not handle identifications yet.
Sorts a cell list lexicographically by the coordinates of their midpoint.
Creates a uniform mesh consisting of N_1 x ... x N_dim cells on a box domain.
Extension function replacing an original-cell with a replacement.
Create a uniform box skeleton consisting of N_1 x ... x N_dim cubes of dimensions h_1 x ... x h_dim.
Returns a vector of all children of the subcells of cell in skeleton.
Returns a vector containing all subcells of a given cell. The code is special to each class and often automatically generated by
generate-subcell-access-code.
This function returns the surface cells of a locally refined hierarchical-mesh structure.
This function returns the surface cells of highest dimension of a locally refined hierarchical-mesh structure.
Triangulate domain by successively building a mesh on the domain skeleton starting from the 0-dimensional patches.
Creates a uniform mesh consisting of N_1 x ... x N_dim cells on a box domain.