lululxvi / deepxde

A library for scientific machine learning and physics-informed learning
https://deepxde.readthedocs.io
GNU Lesser General Public License v2.1
2.75k stars 756 forks source link

Understanding geomtime and num_domain #1343

Open ryabs07 opened 1 year ago

ryabs07 commented 1 year ago

Hi all, I wanted to understand the working methodology of geomtime and num_domain. Say, I have a scaled spatial domain in x-direction from 0 to 1 and scaled time domain from 0 to 1:

geom = dde.geometry.Interval(0, 1)
timedomain = dde.geometry.TimeDomain(0, 1)
geomtime = dde.geometry.GeometryXTime(geom, timedomain)

And i train it with 40,000 points in domain:

 data = dde.data.TimePDE(
 geomtime, pde, [ic_h, ic_u], num_domain=40000, num_initial=2000)

My question is: does the num_domain parameter, set to 40000 in this case, mean that the PINN is trained with 200 points in the x-domain and 200 points in the time domain (assuming uniform sampling by default)? Furthermore, if I were to perform inference using more points than the number used during training, for example, 400 points in the x-domain and 300 points in the time domain, would this lead to a decrease in the efficiency of the PINN during inference?

I would greatly appreciate any insights or guidance on this matter. Thank you!

Best regards, Rabs

lululxvi commented 1 year ago

My question is: does the num_domain parameter, set to 40000 in this case, mean that the PINN is trained with 200 points in the x-domain and 200 points in the time domain (assuming uniform sampling by default)?

No. It is 40000 points in the x-t domain.

Furthermore, if I were to perform inference using more points than the number used during training, for example, 400 points in the x-domain and 300 points in the time domain, would this lead to a decrease in the efficiency of the PINN during inference?

No. It is totally fine.