Class BasisFunc#
Defined in File BF_Py.py
Inheritance Relationships#
Base Type#
public ABC
Derived Types#
public tfc.utils.BF.BF_Py.CP
(Class CP)public tfc.utils.BF.BF_Py.ELM
(Class ELM)public tfc.utils.BF.BF_Py.FS
(Class FS)public tfc.utils.BF.BF_Py.HoPphy
(Class HoPphy)public tfc.utils.BF.BF_Py.HoPpro
(Class HoPpro)public tfc.utils.BF.BF_Py.LaP
(Class LaP)public tfc.utils.BF.BF_Py.LeP
(Class LeP)public tfc.utils.BF.BF_Py.nBasisFunc
(Class nBasisFunc)
Class Documentation#
- tfc.utils.BF.BF_Py.BasisFunc : public ABC
Python implementation of the basis function classes. These are an alternative to the C++ versions. They can not be JIT-ed, but they do support alternative types, e.g., single float, complex, etc. Even though they cannnot be JIT-ed, they can often be used in JIT functions, if their arguments can be removed from said functions. For example, when solving an ODE, oftentimes the basis functions can be treated as compile time constants. This can be done using `pejit`: see `pejit` for more details.
Subclassed by tfc.utils.BF.BF_Py.CP, tfc.utils.BF.BF_Py.ELM, tfc.utils.BF.BF_Py.FS, tfc.utils.BF.BF_Py.HoPphy, tfc.utils.BF.BF_Py.HoPpro, tfc.utils.BF.BF_Py.LaP, tfc.utils.BF.BF_Py.LeP, tfc.utils.BF.BF_Py.nBasisFunc
Public Functions
- __init__(self, Number x0, Number xf, npt.NDArray nC, uint m, Number z0=0, Number zf=float("inf"))#
Initialize the basis class. Parameters ---------- x0 : Number Start of the problem domain. xf : Number End of the problem domain. nC : npt.NDArray Basis functions to be removed m : uint Number of basis functions. z0 : Number Start of the basis function domain. zf : Number End of the basis function domain.
- H(self, npt.NDArray x, uint d=0, bool full=False)#
Returns the basis function matrix for the x with a derivative of order d. Parameters ---------- x : NDArray Input array. Values to calculate the basis function for. d : uint Order of the derivative full : bool Whether to return the full basis function set, or remove the columns associated with self._nC. Returns ------- H : NDArray The basis function values.
- c(self)#
Return the constants that map the problem domain to the basis function domain. Returns ------- float The constant that maps the problem domain to the basis function domain.