diff --git a/contrib/meshgen11_dealii/CMakeLists.txt b/contrib/meshgen11_dealii/CMakeLists.txt index 2c8f2f2f4b31150fafb21bdbfb0a47f7c89e3384..b7c9ea92ec7f201ec81e7b0e7109cbb65043027a 100644 --- a/contrib/meshgen11_dealii/CMakeLists.txt +++ b/contrib/meshgen11_dealii/CMakeLists.txt @@ -69,7 +69,7 @@ else() COMPILE_FLAGS "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}" ) SET_PROPERTY(TARGET meshgen11 APPEND_STRING PROPERTY - LINK_FLAGS " ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" + LINK_FLAGS " ${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}} $ENV{DEAL_II_LINKER_FLAGS}" ) SET_PROPERTY(TARGET meshgen11 APPEND PROPERTY COMPILE_DEFINITIONS "${DEAL_II_USER_DEFINITIONS};${DEAL_II_USER_DEFINITIONS_${_build}}" diff --git a/contrib/meshgen11_dealii/meshgen.cpp b/contrib/meshgen11_dealii/meshgen.cpp index b7cdcef2fd7f9c9ee51364a1e1aae28e4de5a5b8..90289920ea5f2fbbe3d61a71f08a9356d734f66e 100644 --- a/contrib/meshgen11_dealii/meshgen.cpp +++ b/contrib/meshgen11_dealii/meshgen.cpp @@ -145,9 +145,9 @@ public: d::GridGenerator::hyper_cube(triangulation, box_a, box_b); // initial number of levels must be compatible - assert(level > self.min_grid_level); - assert(level <= self.max_grid_level + 1); - assert(std::pow(std::pow(2, dimension), level - 1) <= self.max_n_cells); + assert(level > min_grid_level); + assert(level <= max_grid_level + 1); + assert(std::pow(std::pow(2, dimension), level - 1) <= max_n_cells); if (level > 1) { triangulation.refine_global(level - 1); @@ -168,9 +168,9 @@ public: d::GridGenerator::hyper_cube(triangulation, box_a, box_b); // initial number of levels must be compatible - assert(level > self.min_grid_level); - assert(level <= self.max_grid_level + 1); - assert(std::pow(std::pow(2, dimension), level - 1) <= self.max_n_cells); + assert(level > min_grid_level); + assert(level <= max_grid_level + 1); + assert(std::pow(std::pow(2, dimension), level - 1) <= max_n_cells); if (level > 1) { triangulation.refine_global(level - 1); diff --git a/examples/volume_potential_2d.py b/examples/volume_potential_2d.py index 5eed2addfc66c2e1401fc89f70273b9ebb65d281..9fa3476deed99c80ab3de35fce50a238934c2ee1 100644 --- a/examples/volume_potential_2d.py +++ b/examples/volume_potential_2d.py @@ -29,7 +29,7 @@ import logging logger = logging.getLogger(__name__) -if 0: +if 1: # verbose logging.basicConfig(level=logging.INFO) else: @@ -322,7 +322,7 @@ def main(): import time queue.finish() - t0 = time.clock() + t0 = time.process_time() pot, = drive_volume_fmm( trav, @@ -333,7 +333,7 @@ def main(): ) queue.finish() - t1 = time.clock() + t1 = time.process_time() print("Finished in %.2f seconds." % (t1 - t0)) print("(%e points per second)" % ( diff --git a/examples/volume_potential_3d.py b/examples/volume_potential_3d.py index 2997e85b7cbe6fb323f85ff67d25c528f2badb32..3317e42d5f85787291534172cd99cb51d002741c 100644 --- a/examples/volume_potential_3d.py +++ b/examples/volume_potential_3d.py @@ -334,7 +334,7 @@ def main(): import time queue.finish() - t0 = time.clock() + t0 = time.process_time() pot, = drive_volume_fmm( trav, @@ -344,7 +344,7 @@ def main(): direct_evaluation=force_direct_evaluation, list1_only=False) - t1 = time.clock() + t1 = time.process_time() print("Finished in %.2f seconds." % (t1 - t0)) print("(%e points per second)" % ( diff --git a/test/test_singular_integral_2d.py b/test/test_singular_integral_2d.py index 09dcf9d5f0da3adbd2f6de362bfd29c03b98db8c..59d905130080f5335ff2a645064188608efd8d1a 100644 --- a/test/test_singular_integral_2d.py +++ b/test/test_singular_integral_2d.py @@ -69,7 +69,7 @@ def test_quadrature_2d_box(): def test_affine_mapping(): tria1 = ((1, 1), (2, 3), (0, 4)) tria2 = ((0, 0), (1, 0), (0, 1)) - mp, J, imp, iJ = sint.solve_affine_map_2d(tria1, tria2) + mp, J, imp, iJ = sint.solve_affine_map_2d(tria1, tria2) # noqa: N806 assert np.isclose(J * iJ, 1) for i in range(3): assert np.allclose(mp(tria1[i]), tria2[i]) @@ -99,7 +99,7 @@ def test_is_in_r(): def test_tria2rect_map(): - t2r, J_t2r, r2t, J_r2t = sint.tria2rect_map_2d() + t2r, J_t2r, r2t, J_r2t = sint.tria2rect_map_2d() # noqa: N806 assert np.allclose(t2r((0, 0)), (0, 0)) assert np.allclose(t2r((1, 0)), (1, 0)) assert np.allclose(t2r((0, 1)), (1, np.pi / 2)) @@ -110,7 +110,7 @@ def test_tria2rect_map(): def test_tria2rect_jacobian(): - t2r, J_t2r, r2t, J_r2t = sint.tria2rect_map_2d() + t2r, J_t2r, r2t, J_r2t = sint.tria2rect_map_2d() # noqa: N806 p1 = (0.1, 0.1) assert np.isclose(J_t2r(p1) * J_r2t(t2r(p1)), 1) assert np.isclose(J_r2t(p1) * J_t2r(r2t(p1)), 1) diff --git a/volumential/function_extension.py b/volumential/function_extension.py index 1612d60542dff04ca789a5a4a4fc7216496c4e3e..00a31ee7209b8c6f58a38e76f03710ffad3f4f1e 100644 --- a/volumential/function_extension.py +++ b/volumential/function_extension.py @@ -424,6 +424,7 @@ def compute_biharmonic_extension(queue, target_discr, """Biharmoc extension. Currently only support interior domains in 2D (i.e., extension is on the exterior). """ + # pylint: disable=invalid-unary-operand-type dim = 2 queue = setup_command_queue(queue=queue) qbx_forced_limit = 1