Comments (4)
Under further investigation, it appears that there is a term Laplacian(Ta)
where Ta
is a z-dependent NCC which is not being evaluated correctly. In commit ff3aea3 it is evaluated correctly, but in f263415 it is zero. Here's a simple code snippet which illustrates the problem:
import numpy as np
import dedalus.public as d3
coords = d3.CartesianCoordinates('x', 'z')
dist = d3.Distributor(coords, dtype=np.float64)
xbasis = d3.RealFourier(coords['x'], size=16, bounds=(0, 1), dealias=3/2)
zbasis = d3.ChebyshevT(coords['z'], size=16, bounds=(0, 1), dealias=3/2)
rhoa = dist.Field(name='rhoa', bases=(zbasis)) # isentropic density profile
Ta = np.exp(rhoa)
Lapa = d3.lap(Ta)
print(Lapa)
For ff3aea3 it returns Lap(exp(rhoa)) -- this is the desired behavior
For f263415 it returns 0
from dedalus.
Actually turns out the commit that causes the shift from Lap(exp(rhoa)) to 0 is 191879c, the commit before f263415.
from dedalus.
The issue with 191879c is this code here in the Laplacian _preprocess_args method:
elif not isinstance(coordsys, coords.DirectProduct) and operand.domain.get_basis(coordsys) is None:
raise SkipDispatchException(output=0)
Since rhoa is a function of z only, rhoa.domain.get_basis(coordsys) returns None.
Presumably we want to be able to take the laplacian of variables which do not depend on all of the coordinates in a coordinatesystem?
from dedalus.
I verified that if I comment out those two lines in Laplacian _preprocess_args, the script acts as expected.
To summarize, it appears that 1218c62 introduced a bug in CartesianGradient which was fixed in f263415. However, the previous commit (191879c) introduced this "bug" into Laplacian.
We should carefully consider how Laplacian should act on fields which are constant in certain directions.
from dedalus.
Related Issues (20)
- Feature request: a method to toggle Dedalus output (e.g. to toggle Simulation stop time reached) HOT 1
- Overflow in 2D, flat and periodic active nematic simulation HOT 3
- NCC parsing error with operator tree
- CFL not working with half-dimensional simulations HOT 3
- Installation currently requires Cython<3 HOT 2
- EVPs: set_state() in multi-d problems runs into Nyquist mode zeroing HOT 1
- v2 master doesn not compile with cython >=3.0 HOT 2
- Simple change in boundary conditions breaks code HOT 1
- Error in running tutorials of dedalus HOT 1
- Issues with Testing After Upgrading to Dedalus v3: 'No module named 'dedalus.core.transposes' HOT 1
- dist.remedy_scales broken for ndarrays HOT 1
- Incorrect conversion for cartesian NCC HOT 3
- Inquiry about CUDA Acceleration for Dedalus HOT 2
- A brief guide to compile from source on apple silicon (M1, M2, M3)
- LBVP gets stuck at the build_solver stage HOT 1
- local_group_arrays HOT 1
- changing scales in output for vector fields causes simulations to crash
- Energy Spectrum for Rayleigh Bénard Convection HOT 1
- Oscillations on energy spectrum tail (high frequencies) for 2D Rayleigh-Benard convection HOT 1
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 dedalus.