Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

silence warnings #14

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/example2.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

solver(b, u)

u_global = dmConst.augmentWithBoundaryData(u, g_interp)
u_global = u.augmentWithBoundaryData(g_interp)

plt.figure().gca().set_title('Numerical solution, constant kernel')
u_global.plot()
Expand Down
1 change: 0 additions & 1 deletion drivers/runNonlocal.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
###################################################################################

from mpi4py import MPI
import numpy as np
from PyNucleus import driver, DIRICHLET, NEUMANN
from PyNucleus.nl import (nonlocalPoissonProblem,
discretizedNonlocalProblem)
Expand Down
4 changes: 1 addition & 3 deletions fem/PyNucleus_fem/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
from PyNucleus_base.factory import factory
from . functions import (simpleAnisotropy, simpleAnisotropy2, inclusions, inclusionsHong,
motorPermeability)
from . functions import (function,
vectorFunction,
_rhsFunSin1D, _solSin1D, _rhsFunSin2D, _cos1D, _cos2D, _rhsCos2D, _grad_cos2d_n,
from . functions import (_rhsFunSin1D, _solSin1D, _rhsFunSin2D, _cos1D, _cos2D, _rhsCos2D, _grad_cos2d_n,
_rhsFunSin3D, _solSin2D, _solSin3D, Lambda, constant,
monomial,
complexLambda,
Expand Down
1 change: 0 additions & 1 deletion fem/PyNucleus_fem/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from . meshCy import (meshBase,
boundaryVertices,
boundaryEdges,
boundaryFaces,
boundaryFacesWithOrientation,
boundaryVerticesFromBoundaryEdges,
boundaryEdgesFromBoundaryFaces,
Expand Down
1 change: 0 additions & 1 deletion multilevelSolver/PyNucleus_multilevelSolver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,3 @@

solverFactory.register('mg', multigrid, isMultilevelSolver=True)
solverFactory.register('complex_mg', Complexmultigrid, isMultilevelSolver=True)

1 change: 0 additions & 1 deletion multilevelSolver/PyNucleus_multilevelSolver/connectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from mpi4py import MPI
import logging
import numpy as np
from copy import deepcopy
from PyNucleus_base.myTypes import REAL, INDEX, TAG
from PyNucleus_base import uninitialized
from . levels import meshLevel, algebraicLevel
Expand Down
1 change: 0 additions & 1 deletion multilevelSolver/PyNucleus_multilevelSolver/geometricMG.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from __future__ import division
import logging
import numpy as np
from PyNucleus_base.ip_norm import norm_serial as norm
from PyNucleus_base.utilsFem import getLoggingTimer
from PyNucleus_base import REAL, INDEX, uninitialized
from PyNucleus_fem import P1_DoFMap
Expand Down
1 change: 0 additions & 1 deletion nl/PyNucleus_nl/discretizedProblems.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from PyNucleus_multilevelSolver import hierarchyManager
from copy import copy
from . helpers import paramsForFractionalHierarchy
from . fractionalOrders import singleVariableUnsymmetricFractionalOrder
from . kernelsCy import FRACTIONAL
from . nonlocalProblems import (DIRICHLET,
NEUMANN, HOMOGENEOUS_NEUMANN,
Expand Down
3 changes: 2 additions & 1 deletion nl/PyNucleus_nl/nonlocalLaplacianBase.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ from libc.math cimport (sin, cos, sinh, cosh, tanh, sqrt, atan2,
log, ceil,
fabs as abs, M_PI as pi, pow,
tgamma as gamma)
from scipy.special import factorial
from PyNucleus_base.myTypes import INDEX, REAL, COMPLEX, ENCODE, BOOL
from PyNucleus_base import uninitialized
from PyNucleus_base.blas cimport mydot
Expand Down Expand Up @@ -58,7 +59,7 @@ cdef class PermutationIndexer:

self.factorials = np.zeros((N), dtype=INDEX)
for i in range(N):
self.factorials[i] = np.math.factorial(N-1-i)
self.factorials[i] = factorial(N-1-i, True)
self.lehmer = np.zeros(N, dtype=INDEX)

cdef INDEX_t rank(self, INDEX_t[::1] perm):
Expand Down
4 changes: 2 additions & 2 deletions nl/PyNucleus_nl/nonlocalLaplacianBase_{SCALAR}.pxi
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ cdef class {SCALAR_label}double_local_matrix_t:
REAL_t eps = 1e-10
INDEX_t dim = self.DoFMap.mesh.manifold_dim

perms = uninitialized((np.math.factorial(dim+1), dim+1), dtype=INDEX)
surface_perms = uninitialized((np.math.factorial(dim), dim), dtype=INDEX)
perms = uninitialized((factorial(dim+1, True), dim+1), dtype=INDEX)
surface_perms = uninitialized((factorial(dim, True), dim), dtype=INDEX)

from itertools import permutations

Expand Down
1 change: 1 addition & 0 deletions tests/test_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ def idfuncFractional(param):
mesh1d = meshFactory('interval', a=-1, b=1, hTarget=1e-2)
dm1d = dofmapFactory('P1', mesh1d, -1)


@pytest.fixture(scope='module', params=[
# 1d kernels
(1, fractionalOrderFactory('const', 0.25), np.inf, True, None, 0),
Expand Down
Loading