Spectral ND¶
-
SpectralToolbox.SpectralND.
MultiIndex
(d, N)[source]¶ MultiIndex(): generates the multi index ordering for the construction of multidimensional Generalized Vandermonde matrices
- Syntax:
IDX = MultiIndex(d,N)
- Input:
d
= (int) dimension of the simplexN
= (int) the maximum value of the sum of the indeces
- OUTPUT:
IDX
= (2d-array,int) array containing the ordered multi indeces
-
class
SpectralToolbox.SpectralND.
PolyND
(polys)[source]¶ Bases:
object
Initialization of the N-dimensional Polynomial instance
- Syntax:
p = PolyND(polys)
- Input:
polys
= (list,Spectral1D.Poly1D) list of polynomial instances of the classSpectral1D.Poly1D
See also
Spectral1D.Poly1D
-
GaussLobattoQuadrature
(Ns, norm=True, warnings=True)[source]¶ GaussLobattoQuadrature(): computes the tensor product of the Guass Lobatto Points and weights
- Syntax:
(x,w) = GaussLobattoQuadrature(Ns,[norm=True],[warnings=True])
- Input:
Ns
= (list,int) n-dimensional list with the order of approximation of each polynomialnorm
= (optional,boolean) whether the weights will be normalized or notwarnings
= (optional,boolean) set whether to ask for confirmation when it is required to allocate more then 100Mb of memory
- Output:
x
= tensor product of the collocation pointsw
= tensor product of the weights
Warning
The lengths of
Ns
has to be conform to the number of polynomials with which you have instantiatedPolyND
-
GaussQuadrature
(Ns, norm=True, warnings=True)[source]¶ GaussQuadrature(): computes the tensor product of the Guass Points and weights
- Syntax:
(x,w) = GaussQuadrature(Ns, [norm=True],[warnings=True])
- Input:
Ns
= (list,int) n-dimensional list with the order of approximation of each polynomialnorm
= (optional,boolean) whether the weights will be normalized or notwarnings
= (optional,boolean) set whether to ask for confirmation when it is required to allocate more then 100Mb of memory
- Output:
x
= tensor product of the collocation pointsw
= tensor product of the weights
Warning
The lengths of
Ns
has to be conform to the number of polynomials with which you have instantiatedPolyND
-
GradVandermonde
(rs, Ns, ks=None, norms=None, usekron=True, output=True, warnings=True)[source]¶ GradVandermonde(): initialize the tensor product of the k-th gradient of the modal basis.
- Syntax:
V = GradVandermonde(r,N,k,[norms=None],[usekron=True],[output=True],[warnings=True])
- Input:
rs
= (list of 1d-array,float)n
-dimensional list of set of points on which to evaluate the polynomials (by default they are not the kron product of the points. Seeusekron
option)Ns
= (list,int) n-dimensional list with the maximum orders of approximation of each polynomialks
= (list,int) n-dimensional list with derivative orders [default=0]norms
= (default=None,list,boolean) n-dimensional list of boolean, True -> orthonormal, False -> orthogonal, None -> all orthonormalusekron
= (optional,boolean) set whether to apply the kron product of the single dimensional Vandermonde matrices or to multiply column-wise. kron(rs) and usekron==False is equal to rs and usekron==Trueoutput
= (optional,boolean) set whether to print out information about memory allocationwarnings
= (optional,boolean) set whether to ask for confirmation when it is required to allocate more then 100Mb of memory
- OUTPUT:
V
= Tensor product of the Generalized Vandermonde matrices
Warning
The lengths of
Ns
,rs
,ks
,norms
has to be conform to the number of polynomials with which you have instantiatedPolyND
-
GradVandermondePascalSimplex
(rs, N, ks=None, norms=None, usekron=True, output=True, warnings=True)[source]¶ GradVandermondePascalSimplex(): initialize k-th gradient of the modal basis up to the total order N
- Syntax:
V = GradVandermonde(r,N,k,[norms=None],[output=True],[warnings=True])
- Input:
rs
= (list of 1d-array,float)n
-dimensional list of set of points on which to evaluate the polynomials (by default they are not the kron product of the points. Seeusekron
option)N
= (int) the maximum orders of the polynomial basisks
= (list,int) n-dimensional list with derivative orders [default=0]norms
= (default=None,list,boolean) n-dimensional list of boolean, True -> orthonormal, False -> orthogonal, None -> all orthonormalusekron
= (optional,boolean) set whether to apply the kron product of the single dimensional Vandermonde matrices or to multiply column-wise. kron(rs) and usekron==False is equal to rs and usekron==Trueoutput
= (optional,boolean) set whether to print out information about memory allocationwarnings
= (optional,boolean) set whether to ask for confirmation when it is required to allocate more then 100Mb of memory
- OUTPUT:
V
= Generalized Vandermonde matrix up to the N-th order
Warning
The lengths of
rs
,ks
,norms
has to be conform to the number of polynomials with which you have instantiatedPolyND
-
Quadrature
(Ns, quadTypes=None, norm=True, warnings=True)[source]¶ GaussQuadrature(): computes the tensor product of the Guass Points and weights
- Syntax:
(x,w) = GaussQuadrature(Ns, [quadTypes=None], [norm=True],[warnings=True])
- Input:
Ns
= (list,int) n-dimensional list with the order of approximation of each polynomialquadTypes
= (list,``Spectral1D.AVAIL_QUADPOINTS``) n-dimensional list of quadrature point types chosen among Gauss, Gauss-Radau, Gauss-Lobatto (using the definition inSpectral1D
). If None, Gauss points will be generated by defaultnorm
= (optional,boolean) whether the weights will be normalized or notwarnings
= (optional,boolean) set whether to ask for confirmation when it is required to allocate more then 100Mb of memory
- Output:
x
= tensor product of the collocation pointsw
= tensor product of the weights
Warning
The lengths of
Ns
has to be conform to the number of polynomials with which you have instantiatedPolyND
-
ch
= <logging.StreamHandler object>¶
-
formatter
= <logging.Formatter object>¶
-
logger
= <logging.Logger object>¶