Assorted Function and Types
This page contains several types and functions that are used throughout the physics modules. Many of these are defined in ODLCommonTools
Abstract Functor Types
Abstract types are provided for commonly used Functors:
ODLCommonTools.BCType
— Type.Abstract supertype of all boundary condition functors
ODLCommonTools.BCType_revm
— Type.Abstract supertype of all boundary condition functors that compute the reverse mode with respect to the metrics
ODLCommonTools.SRCType
— Type.Abstract supertype of all source term functors
ODLCommonTools.FluxType
— Type.Abstract supertype of all numerical flux functions used by standard DG face integrals
ODLCommonTools.FluxType_revm
— Type.Abstract supertype of all numerical flux functions used by standard DG face integral that compute the reverse mode with respect to the metrics
Boundaries and Interfaces
All physics modules need to apply boundary conditions and all DG schemes and some CG schemes need to do face integrals. The types and functions described here assist in identifying them. PDESolver does not track the faces of elements directly, instead it tracks the element the face belongs to and the local face number, that is, the index of the face in the list of all faces that belong to the element. Using this representation, every interior face has two representations because it is part of two elements.
ODLCommonTools.Boundary
— Type.ODLCommonTools.Boundary
Used to identify boundary faces in a finite-element grid.
Fields
element
: index of the element to which the boundary face belongsface
: the face index of the boundary (local index to the element)
Example
To mark face 2 of element 7 to be a boundary face, use Boundary(7,2)
ODLCommonTools.Interface
— Type.ODLCommonTools.Interface
Used to identify interfaces between elements in a finite-element grid.
Fields
elementL
: index of the so-called left element in the pairelementR
: index of the so-called right element in the pairfaceL
: the face index of the interface with respect to the left elementfaceR
: the face index of the interface with respect to the right elementorient
: orientation of the 'right' element relative to the 'left'
Example
Consider an interface between elements 2 and 5. Suppose the interface is on face 1 of element 2 and face 3 of element 5. Furthermore, suppose element 5 has orientation 1 relative to element 1 (defintion of orientation TBD). This can be indicated as Interface(2,5,1,3,1)
ODLCommonTools.getElementL
— Function.This function returns either the element
field of a Boundary or the elementL
field of an interface.
ODLCommonTools.getFaceL
— Function.This function returns either the face
field of a Boundary or the faceL
field of an Interface
Base.show
— Method.Show method for Boundary objects
Base.show
— Method.Show method for Interface objects
Functionals
ODLCommonTools.AbstractFunctional
Abstract datatype for optimization related data structures. All data types corresponding to optimization problems should be a subtype of this.
Static Parameters
Topt
Abstract type for integral objective functions. Any integral objective function should be a subtype of this, which is a subtype ofi AbstractFunctional
.
Static Parameters
Topt