This is a MuPIF module (Multi-Physics Integration Framework)
Bases: mupif.api.api.API
Represents an axis aligned bounding box - a rectange in 2d and prism in 3d. Its geometry is described using two points - lover left and upper right. The bounding box class provides fast and efficient methods for testing whether point is inside and whether intersection with other bbox exist.
Bases: mupif.cell.Cell
Unstructured 3d tetrahedral element with linear interpolation
Representation of computational cell. It is an attribute of a domain.
It is asumed, that cell can return its vertices, they can be either attributes of a cell (unstructured grids) or verices can be generated based on cell number and domain (structured grids). In the latter case, the derived class is to be created to handle this correctly.
Bases: mupif.cell.Cell
Unstructured 2d quad element with linear interpolation
Bases: mupif.cell.Cell
Unstructured 3d tetrahedral element with linear interpolation
Bases: mupif.cell.Cell
Unstructured 2d triangular element with linear interpolation
Representation of field. Field is generraly a mapping, that assigns a value to points in space. The field values stored in self.__values numpy array. The index is either vertex or cell id. In case of cell-based fields, the value may be list (or tuple) containing values of individual IPs. Then a dictionary with mapping from cell, IP to array index needs to be established.
Returns the value associated to given component (vertex or cell IP). The component is a tuple: (vertexID,) or (CellID, IPID)
Merges the receiver with given field together. The both fields should be on different parts of the domain (can also overlap), but should refer to same underlying discretization, otherwise unpredictable results can occur.
Sets the value associated to given component (vertex or cell IP). The componentID is a tuple: (vertexID,) or (CellID, IPID)
ToDo: If mesh has mapping attached (it is a mesh view) then we have to remember value locally and record change. The source field values are updated after commit() method is invoked.
Datermines the physical meaning of field values
Represent the supported values of FieldType.
Represent the supported values of Field value types.
Bases: mupif.field.Field
Field view represents a subset of master feild, defined by mesh view and its mapping context.
A Localizer is an abstract class representing an algorithm used to partition space and quicly localize the contained objects.
Returns the list of all objects for which the functor is satisfied. The functor is a class with two methods: giveBBox() which returns an initial functor bbox evaluate(obj) which should return true if functor is satisfied for given object.
Bases: object
Abstract representation of a computaional domain. Described using computational cells and vertices, determining the cell geometry. Derived classes represent structured, unstructred FE grids, FV grids, etc.
Mesh is assumed to provide a suitable instance of cell and vertex localizers.
Returns local cell number corresponding to given label. If no label corresponds, thows an exception
This will return a copy of the receiver. DeepCopy will not work, as individual cells contain mesh link attributes, leading to underliing mesh duplication in every cell!
Class representing iterator on Mesh components (vertices, cells).
Bases: mupif.mesh.Mesh
Represents unstructured mesh. Maintains the list of vertices and cells.
Returns local cell number corresponding to given label. If no label corresponds, thows an exception
This will return a copy of the receiver. DeepCopy will not work, as individual cells contain mesh link attributes, leading to underliing mesh duplication in every cell!
Bases: mupif.mesh.Mesh
Mesh view represents a subset of master mesh, defined by mapping context.
Defines Octree Octant: a cell containing either terminal data or its child octants.
Adds those managed objects into itemList for which functor.evaluate returned Trues. The functor should also provide its BBox to exclude remote octants from the search.
Adds those managed object into itemList which bbox intersects with given bbox. Note: an object can be included several times, as can be assigned to several octants.
Bases: mupif.localizer.Localizer
An octree is used to partition space by recursively subdividing the root cell (square or cube) into octants. Each terminal octant contains the objects within the octant. Each object that can be inserted is assumed to provide following methods: - giveBBox - returning its bounding box
Octree mask is a tuple containing 0 or 1 values. If corresponding mask value is nonzero, receiver is subdivided in corresponding direction. The mask allows to create ocrtrees for various 2d and 1d settings
Bases: mupif.transferoperator.TransferOperator
Uses source cell interpolation to determine target data at vertices
Bases: mupif.viewcontext.ExplicitViewContext
This view context is defined by given BBox. It will contain all elements hit by given BBox and corresponding nodes.
Bases: mupif.viewcontext.ViewContext
This view context is defined by (explicitly given) dictionary.
Returns the master cell number corresponding to given local number (id)
Determines the mapping between master domain and associated view. Defines the local numbering of mapped vertices and cells, provides mapping method between local component number (vertex or cell number) and corresponding global number. This class is supposed to be an abstract class, derived classes are assumed to define mapping.
To be more general, the mapping should be also capable to map also element edges and surfaces, as well to adress components on remote/distrubuted nodes. This info can be returned as a tuple, containing all information. At present DataRecord is assumed to have following format: (number,)
Returns the master cell info (number, etc.) corresponding to given local number (id)
Returns the master cell number corresponding to given local number (id)
Returns the master vertex info (including number, etc) corresponding to given local number (id)