2from numpy.polynomial.legendre
import leggauss
3from scipy.interpolate
import lagrange
5from petsc.matrixgenerators
import MatrixGeneratorBase
10 use this class to pre-generate matrices to be used
11 in Peano as far as possible.
16 unknowns_per_cell_dof):
20 super( DgGenerator, self ).
__init__(dimensions,
22 unknowns_per_cell_dof,
23 unknowns_per_cell_dof)
27 needs to be scaled by h**2
29 dim = self.celldofs * self.unknowns_per_cell_dof
30 output = np.eye(dim,dim)
40 needs to be scaled 0.5*h, that is why we use factor=2.0 as evaluateIntegral2d() has coeff. 0.25 as default,
43 dim = self.celldofs * self.unknowns_per_cell_dof
44 output = np.eye(dim,dim)
57 faceDim = self.facedofs * self.unknowns_per_face_dof * 2 * self.dimensions * 2
58 cellDim = self.celldofs * self.unknowns_per_cell_dof
59 return np.eye(faceDim,cellDim)
62 dim = self.facedofs * self.unknowns_per_face_dof * 2
63 return np.eye(dim,dim)
use this class to pre-generate matrices to be used in Peano as far as possible.
getCellCellMassMatrix(self)
needs to be scaled by h**2
getCellCellSystemMatrix(self)
needs to be scaled 0.5*h, that is why we use factor=2.0 as evaluateIntegral2d() has coeff.
getCellToFaceMatrix(self)
__init__(self, dimensions, poly_degree, unknowns_per_cell_dof)