def testDirections(self): n = 4 d1 = pcb.cubeDirections(n) self.assertEqual(len(d1), n*n) d1r = pcb.cubeRotations(d1) self.assertEqual(len(d1r), 6 * n * n) d2 = pcb.circleDirections(n) self.assertEqual(len(d2), n)
from pypwdg.core.evaluation import Evaluator, EvalElementError from pypwdg.output.vtk_output import VTKStructuredPoints from pypwdg.output.vtk_output import VTKGrid from pypwdg.mesh.meshutils import MeshQuadratures from pypwdg.core.vandermonde import LocalVandermondes mesh_dict=gmsh_reader('../../examples/3D/scattmesh.msh') mesh=gmshMesh(mesh_dict,dim=3) boundaryentities = [82, 83] Nq = 16 Np = 3 dirs = cubeRotations(cubeDirections(Np)) quad=trianglequadrature(Nq) elttobasis = [[PlaneWaves(dirs, k)]] * mesh.nelements params={'alpha':.5, 'beta':.5,'delta':.5} l_coeffs=[-1j*k, 1] r_coeffs=[-1j*k, 1] bnddata={82:zero_impedance(k), 83:dirichlet(g) } mqs = MeshQuadratures(mesh, quad) lv = LocalVandermondes(mesh, elttobasis, mqs, usecache=False) bndvs=[]