Skip to content
Snippets Groups Projects
Commit 9a744f4c authored by Andreas Dedner's avatar Andreas Dedner
Browse files

make all demos work again - or deactivate

fixed some bugs
parent d59bec9d
No related branches found
No related tags found
1 merge request!140Feature/add python bindings
......@@ -24,7 +24,7 @@ try:
self.method_ = method
self.vertices_ = numpy.array(vertices)
# here an error will occur if the method is invalid - how to catch?
self.quadrature_ = getattr(quad,method)(order)
self.quadrature_ = getattr(quad,method)
try:
self.points_ = transform.transform(self.quadrature_.points.T, self.vertices_)
except ValueError:
......@@ -63,23 +63,23 @@ try:
if gt.isLine:
vertices = [0,1]
quad = qp.line_segment
from quadpy.ncube import tools as transform
from quadpy.ncube import transform
elif gt.isTriangle:
vertices = [[0.0, 0.0], [1.0, 0.0], [0.0, 1.0]]
quad = qp.triangle
from quadpy.nsimplex import tools as transform
from quadpy.nsimplex import transform
elif gt.isQuadrilateral:
vertices = qp.quadrilateral.rectangle_points([0.0, 1.0], [0.0, 1.0])
quad = qp.quadrilateral
from quadpy.ncube import tools as transform
from quadpy.ncube import transform
elif gt.isTetrahedron:
vertices = [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]
quad = qp.tetrahedron
from quadpy.nsimplex import tools as transform
from quadpy.nsimplex import transform
elif gt.isHexahedron:
vertices = qp.hexahedron.cube_points([0.0, 1.0], [0.0, 1.0], [0.0, 1.0])
quad = qp.hexahedron
from quadpy.ncube import tools as transform
from quadpy.ncube import transform
elif gt.isPyramid:
vertices = [[0.0, 0.0, 0.0], [1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [1.0, 1.0, 0.0] [0.0, 0.0, 1.0]]
quad = qp.pyramid
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment