Update Laplace class and add unit tests (#645)
This commit is contained in:
@@ -5,7 +5,7 @@ from pina.problem import SpatialProblem, TimeDependentProblem
|
||||
|
||||
@pytest.mark.parametrize("c", [1.5, 3])
|
||||
def test_constructor(c):
|
||||
print(f"Testing with c = {c} (type: {type(c)})")
|
||||
|
||||
problem = AdvectionProblem(c=c)
|
||||
problem.discretise_domain(n=10, mode="random", domains="all")
|
||||
assert problem.are_all_domains_discretised
|
||||
@@ -14,5 +14,6 @@ def test_constructor(c):
|
||||
assert hasattr(problem, "conditions")
|
||||
assert isinstance(problem.conditions, dict)
|
||||
|
||||
# Should fail if c is not a float or int
|
||||
with pytest.raises(ValueError):
|
||||
AdvectionProblem(c="a")
|
||||
AdvectionProblem(c="invalid")
|
||||
|
||||
Reference in New Issue
Block a user