Skip to content

A framework for learning functional mappings between function spaces to solve parametric PDEs

License

Notifications You must be signed in to change notification settings

jkosata/OperatorLearning.jl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OperatorLearning.jl

Stable Dev Build Status

A Package that provides Layers for the learning of (nonlinear) operators in order to solve parametric PDEs.

For now, this package contains the Fourier Neural Operator originally proposed by Li et al.

I decided to implement this method in Julia because coding up a layer using PyTorch in Python is rather cumbersome in comparison and Julia as a whole simply runs at comparable or faster speed than Python. Please do check out the original work at GitHub as well.

The implementation of the layers is influenced heavily by the basic layers provided in the Flux.jl package.

Installation

Simply install by running in a REPL:

pkg> add OperatorLearning

Usage/Examples

The basic workflow is more or less in line with the layer architectures that Flux provides, i.e. you construct individual layers, chain them if desired and pass the inputs as arguments to the layers.

The Fourier Layer performs a linear transform as well as convolution (linear transform in fourier space), adds them and passes it through the activation. Additionally, higher Fourier modes are filtered out in the convolution path where you can specify the amount of modes to be kept.

The syntax for a single Fourier Layer is:

using OperatorLearning
using Flux

# Input = 101, Output = 101, Batch size = 200, Grid points = 100, Fourier modes = 16
# Activation: sigmoid (you need to import Flux in your Script to access the activations)
model = FourierLayer(101, 101, 200, 100, 16, σ)

# Same as above, but perform strict convolution in Fourier Space
model = FourierLayer(101, 101, 200, 100, 16, σ; bias_fourier=false)

To see a full implementation, check the Burgers equation example at examples/burgers.jl.

License

MIT

ToDos

  • 1D Fourier Layer
  • 2D / 3D Fourier Layer
  • DeepONet
  • Physics informed Loss

Contributing

Contributions are always welcome!

References

About

A framework for learning functional mappings between function spaces to solve parametric PDEs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Julia 100.0%