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

scipy bandaid #106

Merged
merged 6 commits into from
Jan 9, 2025
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
13 changes: 10 additions & 3 deletions optimism/test/test_PatchTestPou.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,23 @@
import jax.numpy as np
import numpy as onp

import unittest
from . import MeshFixture

from optimism import FunctionSpace
from optimism.material import LinearElastic as MatModel
#from optimism.material import Neohookean as MatModel
from optimism import Mesh
from optimism import Mechanics
from optimism.EquationSolver import newton_solve
from optimism import QuadratureRule
from . import MeshFixture
from optimism.TensorMath import tensor_2D_to_3D
import metis

import sys
haveMetis = 'metis' in sys.modules
skipMessage = 'metis not installed, PatchTestQuadraticElements disabled'
if(haveMetis):
import metis

E = 1.0
nu = 0.3
Expand Down Expand Up @@ -177,6 +184,7 @@ def write_output(self, Uu, Ubc, step):
writer.write()


@unittest.skipIf(not haveMetis, skipMessage)
def test_dirichlet_patch_test_with_quadratic_elements(self):
ebcs = [FunctionSpace.EssentialBC(nodeSet='all_boundary', component=0),
FunctionSpace.EssentialBC(nodeSet='all_boundary', component=1)]
Expand Down Expand Up @@ -243,5 +251,4 @@ def energy_density(gradu):


if __name__ == '__main__':
import unittest
unittest.main()
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@
'jax[cpu]==0.4.28',
'jaxtyping',
'matplotlib', # this is not strictly necessary
'metis',
'netcdf4',
'scipy',],
'scipy<1.15.0'],
#tests_require=[], # could put chex and pytest here
extras_require={'sparse': ['scikit-sparse'],
'test': ['pytest', 'pytest-cov', 'pytest-xdist'],
Expand Down
Loading