tum-pbs / PhiFlow

A differentiable PDE solving framework for machine learning
MIT License
1.43k stars 193 forks source link

Phiflow grid to Pytorch tensor/model #82

Closed muacq closed 1 year ago

muacq commented 1 year ago

Hi, I have encountered several problems while combining PhiFlow with Pytorch:

When combining PhiFlow with the self-defined PyTorch model, how to gracefully input PhiFlow grid data, and output grid data (with/without the same layout)?

Looking forward to your reply!

holl- commented 1 year ago

Sorry for the late response.

muacq commented 1 year ago

Thanks for your reply! I have another question...Where can I see all solver's names supported by PhiFlow? I just found some names in the demo code like: 'auto', 'CG', 'CG-adaptive', 'CG-native', 'direct', 'GMres', 'lGMres', 'biCG', 'CGS', 'QMR', 'GCrotMK' Is there a Jacobian or Gauss-Seidel solver?

holl- commented 1 year ago

Only 'CG' and 'CG-adaptive' (and soon biCG) are currently supported by all backends. If you use NumPy, you can also use the ones you mentioned but they won't work with TensorFlow or PyTorch.

muacq commented 1 year ago

Got it, Thanks for your reply!