fix connection issue

This commit is contained in:
giovanni
2025-07-29 13:36:50 +02:00
committed by Giovanni Canali
parent 09596a912c
commit 4ad939fdb9
7 changed files with 78 additions and 61 deletions

View File

@@ -31,15 +31,9 @@ class DummyTimeProblem(TimeDependentProblem):
# define problems
problem = Poisson()
problem.discretise_domain(10)
inverse_problem = InversePoisson()
inverse_problem = InversePoisson(load=True, data_size=0.01)
inverse_problem.discretise_domain(10)
# reduce the number of data points to speed up testing
if hasattr(inverse_problem.conditions, "data"):
data_condition = inverse_problem.conditions["data"]
data_condition.input = data_condition.input[:10]
data_condition.target = data_condition.target[:10]
# add input-output condition to test supervised learning
input_pts = torch.rand(10, len(problem.input_variables))
input_pts = LabelTensor(input_pts, problem.input_variables)