Comments (3)
Yes, this change plus adding the code to "enforce" the boundary conditions appears to fix the bug. The fractional indices are truncated in two places - the advection code and in bounce_immersed_particle
. I've fixed them both but not done any tests with an immersed boundary. I'll open a PR and you can take a look.
from oceananigans.jl.
Thank you for opening this @Jamie-Hilditch ! Of course we want to advect particles in Flat
geometries :-D
I think this is a bug because apparently there is some attempt to support Flat
, since
calls these functions
Something must have broken when we changed fractional_indices
...
We may want
# Deal with `nothing` indices, which are output by `fractional_indices` in `Flat` domains
@inline truncate_index(::Nothing) = 1
@inline truncate_index(i) = Base.unsafe_trunc(Int, i)
and then
fi, fj, fk = fractional_indices(X, grid, c, c, c)
i = truncate_index(fi)
j = truncate_index(fj)
k = truncate_index(fk)
Does this solve the problem? (I'm also suggesting a small change in notation to clarify the difference between a "fractional index" and a truncated index.)
@Jamie-Hilditch if you like, you can contribute this change --- or I can add it. Up to you, let us know.
from oceananigans.jl.
@Jamie-Hilditch great!
We could also change the name of enforce_boundary_conditions
or whatever it is now to make it more accurate 😄
from oceananigans.jl.
Related Issues (20)
- Implementing AB2 for variable time-step size HOT 10
- Some problems with `ImmersedBoundaryGrids` HOT 6
- Can't interpolate between any old `OrthogonalSphericalShellGrid` and a `LatitudeLongitudeGrid`
- Should tests be run with `julia --check-bounds=yes`? HOT 2
- Out of bounds error in `auto_extension` if output writer filename is 4 characters or shorter HOT 1
- Reductions with `FieldTimeSeries` on an `ImmersedBoundaryGrid` are very slow HOT 3
- Update Buildkite version on Tartarus and Sverdrup HOT 4
- A couple of issues with reductions over `FieldTimeSeries`
- Diffusive fluxes and advective fluxes have different units HOT 1
- Performance benchmarks section of the README wrongly says we don't support `Distributed` HOT 5
- `LagrangianParticle`s not working with `ImmersedGrid`s HOT 2
- Regression test for CATKE
- CUDA scalar operations error on GPU in `show` functions HOT 1
- `λnodes` and `φnodes` not defined for immersed lat-lon grids HOT 2
- `cell_diffusion_timescale` is not defined for `CATKEVerticalDiffusivity` HOT 1
- Automatically retry jobs on Buildkite
- Interface to build and output boundary conditions HOT 3
- Error when constructing a `NetCDFOutputWriter` with an immersed lat-lon grid HOT 1
- Possible memory leak from `NetCDFOutputWriter` HOT 7
- Out of memory error with Docs tests HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oceananigans.jl.