Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SolvePdeFft ¶
Solves Laplace U = F with Neumann boundary conditions if adjust_bound is true then boundary values in F are modified so that the equation has a solution, if adjust_bound is set to false then F is not modified and the equation might not have a solution but an approximate solution with a minimum error is then calculated. note, input data F might be modified
Types ¶
type FftwPlan ¶
type FftwPlan struct {
// contains filtered or unexported fields
}
FftwPlan wraps the fftw3 library for use in Golang, specifically as needed to solve a particular PDE as per the fattal02 implementation in PFSTMO.
There are some golang bindings for FFTW3 around, but none that exposed the function fftw_plan_r2r_2d() that fattal02 was using. But cgo is awesome and easy so we just wrapped the FFTW3 lib directly.
In your OS, install a C buildchain and the FFTW3 dev library:
$ sudo apt-get install build-essential $ sudo apt-get install libfftw3-dev
If you run into precision issues, because your underlying C platform doesn't think a C++ 'double' is the same as a Golang float64, read https://www.fftw.org/fftw3_doc/Precision.html and make changes to the library namein LDFLAGS, and all the `fftw_` prefixes to C types and functions in this file.