You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
depending on the nature of the problem. Below is an example: ### Simple
32
-
Ordinary Differential Equation Consider the following:
31
+
depending on the nature of the problem. Below is an example:
32
+
33
+
Simple Ordinary Differential Equation
34
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
+
36
+
Consider the following:
33
37
34
38
.. math::
35
39
@@ -83,25 +87,19 @@ will inherit from both ``SpatialProblem`` and ``TimeDependentProblem``:
83
87
# other stuff ...
84
88
85
89
86
-
.. parsed-literal::
87
-
88
-
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
89
-
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
90
-
91
-
92
90
where we have included the ``temporal_domain`` variable, indicating the
93
91
time domain wanted for the solution.
94
92
95
93
In summary, using **PINA**, we can initialize a problem with a class
96
94
which inherits from different base classes: ``SpatialProblem``,
97
95
``TimeDependentProblem``, ``ParametricProblem``, and so on depending on
98
96
the type of problem we are considering. Here are some examples (more on
99
-
the official documentation):\* ``SpatialProblem`` :math:`\rightarrow` a
100
-
differential equation with spatial variable(s) \*
101
-
``TimeDependentProblem`` :math:`\rightarrow` a time-dependent
102
-
differential equation \* ``ParametricProblem`` :math:`\rightarrow` a
:math:`\rightarrow` any **PINA** problem inherits from here
97
+
the official documentation):
98
+
99
+
* ``SpatialProblem`` :math:`\rightarrow` a differential equation with spatial variable(s) ``spatial_domain``
100
+
* ``TimeDependentProblem`` :math:`\rightarrow` a time-dependent differential equation with temporal variable(s) ``temporal_domain``
101
+
* ``ParametricProblem`` :math:`\rightarrow` a parametrized differential equation with parametric variable(s) ``parameter_domain``
102
+
* ``AbstractProblem`` :math:`\rightarrow` any **PINA** problem inherits from here
105
103
106
104
Write the problem class
107
105
~~~~~~~~~~~~~~~~~~~~~~~
@@ -300,31 +298,6 @@ If you want to track the metric by yourself without a logger, use
300
298
# train
301
299
trainer.train()
302
300
303
-
304
-
.. parsed-literal::
305
-
306
-
GPU available: False, used: False
307
-
TPU available: False, using: 0 TPU cores
308
-
IPU available: False, using: 0 IPUs
309
-
HPU available: False, using: 0 HPUs
310
-
/Users/alessio/opt/anaconda3/envs/pina/lib/python3.11/site-packages/pytorch_lightning/trainer/connectors/logger_connector/logger_connector.py:67: Starting from v1.9.0, `tensorboardX` has been removed as a dependency of the `pytorch_lightning` package, due to potential conflicts with other packages in the ML ecosystem. For this reason, `logger=True` will use `CSVLogger` as the default logger, unless the `tensorboard` or `tensorboardX` packages are found. Please `pip install lightning[extra]` or one of them to enable TensorBoard support by default
After the training we can inspect trainer logged metrics (by default
329
302
**PINA** logs mean square error residual loss). The logged metrics can
330
303
be accessed online using one of the ``Lightinig`` loggers. The final
@@ -355,11 +328,6 @@ quatitative plots of the solution.
355
328
pl.plot(solver=pinn)
356
329
357
330
358
-
.. parsed-literal::
359
-
360
-
Intel MKL WARNING: Support of Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) enabled only processors has been deprecated. Intel oneAPI Math Kernel Library 2025.0 will require Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.
u(x, y, t) = 0\quad\text{on } \Gamma_1\cup\Gamma_2\cup\Gamma_3\cup\Gamma_4,
34
+
\end{cases}
35
+
\end{equation}
35
36
36
37
where :math:`D` is a square domain :math:`[0,1]^2`, and
37
38
:math:`\Gamma_i`, with :math:`i=1,...,4`, are the boundaries of the
@@ -136,20 +137,6 @@ approximately 3 minutes.
136
137
trainer = Trainer(pinn, max_epochs=1000, accelerator='cpu', enable_model_summary=False) # we train on CPU and avoid model summary at beginning of training (optional)
Copy file name to clipboardExpand all lines: docs/source/_rst/tutorials/tutorial4/tutorial.rst
-24Lines changed: 0 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -415,15 +415,6 @@ juts 1 epoch using Adam optimizer with a :math:`0.001` learning rate.
415
415
running_loss = 0.0
416
416
417
417
418
-
419
-
.. parsed-literal::
420
-
421
-
/u/d/dcoscia/.local/lib/python3.9/site-packages/torch/autograd/__init__.py:200: UserWarning: CUDA initialization: CUDA unknown error - this may be due to an incorrectly set up environment, e.g. changing env variable CUDA_VISIBLE_DEVICES after program start. Setting the available devices to be zero. (Triggered internally at ../c10/cuda/CUDAFunctions.cpp:109.)
422
-
Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass
0 commit comments