File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python3
2+ # -*- coding: utf-8 -*-
3+ """
4+ Created on Fri Jan 20 14:52:18 2023
5+
6+ @author: telu
7+ """
8+ import pytest
9+ import numpy as np
10+
11+ from pySDC .core .Lagrange import LagrangeApproximation
12+
13+ # Pre-compute reference integration matrix
14+ nNodes = 5
15+ approx = LagrangeApproximation (np .linspace (0 , 1 , nNodes ))
16+ nIntegPoints = 13
17+ tEndVals = np .linspace (0 , 1 , nIntegPoints )
18+ integMatRef = approx .getIntegrationMatrix ([(0 , t ) for t in tEndVals ])
19+
20+
21+ @pytest .mark .base
22+ @pytest .mark .parametrize ("numQuad" , ["LEGENDRE_NUMPY" , "LEGENDRE_SCIPY" ])
23+ def test_numericalQuadrature (numQuad ):
24+ integMat = approx .getIntegrationMatrix ([(0 , t ) for t in tEndVals ], numQuad = numQuad )
25+ assert np .allclose (integMat , integMatRef )
You can’t perform that action at this time.
0 commit comments