Skip to content

Commit afebb82

Browse files
committed
Condition notation updates in tutorials
1 parent f26b667 commit afebb82

File tree

5 files changed

+62
-245
lines changed

5 files changed

+62
-245
lines changed

tutorials/tutorial10/tutorial.ipynb

Lines changed: 16 additions & 17 deletions
Large diffs are not rendered by default.

tutorials/tutorial4/tutorial.ipynb

Lines changed: 34 additions & 212 deletions
Large diffs are not rendered by default.

tutorials/tutorial5/tutorial.ipynb

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,10 @@
196196
],
197197
"source": [
198198
"class NeuralOperatorSolver(AbstractProblem):\n",
199-
" input_variables = k_train.labels[3]['dof']\n",
200-
" output_variables = u_train.labels[3]['dof']\n",
201-
" domains = {\n",
202-
" 'pts': k_train\n",
203-
" }\n",
204-
" conditions = {'data' : Condition(domain='pts', #not among allowed pairs!!!\n",
205-
" output_points=u_train)}\n",
206-
"\n",
199+
" input_variables = k_train.full_labels[3]['dof']\n",
200+
" output_variables = u_train.full_labels[3]['dof']\n",
201+
" conditions = {'data' : Condition(input=k_train, \n",
202+
" target=u_train)}\n",
207203
"# make problem\n",
208204
"problem = NeuralOperatorSolver()"
209205
]
@@ -298,8 +294,8 @@
298294
"name": "stdout",
299295
"output_type": "stream",
300296
"text": [
301-
"Final error training 56.05%\n",
302-
"Final error testing 55.95%\n"
297+
"Final error training 55.97%\n",
298+
"Final error testing 55.82%\n"
303299
]
304300
}
305301
],
@@ -412,8 +408,8 @@
412408
"name": "stdout",
413409
"output_type": "stream",
414410
"text": [
415-
"Final error training 7.48%\n",
416-
"Final error testing 7.73%\n"
411+
"Final error training 9.43%\n",
412+
"Final error testing 9.40%\n"
417413
]
418414
}
419415
],
@@ -462,7 +458,7 @@
462458
"name": "python",
463459
"nbconvert_exporter": "python",
464460
"pygments_lexer": "ipython3",
465-
"version": "3.12.3"
461+
"version": "3.12.7"
466462
}
467463
},
468464
"nbformat": 4,

tutorials/tutorial7/tutorial.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
" 'phys_cond': Condition(domain=CartesianDomain({'x': [x_min, x_max], 'y': [y_min, y_max]\n",
204204
" }),\n",
205205
" equation=Equation(laplace_equation)),\n",
206-
" 'data': Condition(input_points=data_input.extract(['x', 'y']), output_points=data_output)\n",
206+
" 'data': Condition(input=data_input.extract(['x', 'y']), target=data_output)\n",
207207
" }\n",
208208
"\n",
209209
"problem = Poisson()"

tutorials/tutorial8/tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@
157157
},
158158
{
159159
"cell_type": "code",
160-
"execution_count": 4,
160+
"execution_count": null,
161161
"id": "55cef553-7495-401d-9d17-1acff8ec5953",
162162
"metadata": {},
163163
"outputs": [],
@@ -167,7 +167,7 @@
167167
" parameter_domain = CartesianDomain({'mu': [0, 100]})\n",
168168
"\n",
169169
" conditions = {\n",
170-
" 'io': Condition(input_points=p_train, output_points=u_train)\n",
170+
" 'io': Condition(input=p_train, target=u_train)\n",
171171
" }\n",
172172
"\n",
173173
"poisson_problem = SnapshotProblem()"

0 commit comments

Comments
 (0)