Comments (6)
Hm, so I was looking at this at well. And initially I was blaming the vertical velocity solver as well, but note that the uv_3d
does not come out the same either (look at L2 error uv), whereas that should be just the result of a projection of a constant ufl expression. And indeed if I print out the values of uv_3d they come out as:
[[1.00829158 0.30248748 0. ]
[1.00829158 0.30248748 0. ]
[1.00825087 0.30247526 0. ]
...
[1.01373007 0.30411902 0. ]
[0.99114942 0.29734483 0. ]
[0.99114942 0.29734483 0. ]]
from thetis.
So I suspect something to do with the recent supermesh merge?
from thetis.
I imagine the way I rewrote projection.py screwed something up?
from thetis.
I see, it indeed looks like the projection is broken on a deformed mesh. Here's a MFE
from firedrake import *
mesh2d = RectangleMesh(4, 4, 15e3, 10e3)
n_layers = 4
mesh = ExtrudedMesh(mesh2d, n_layers, 1/n_layers)
mesh.coordinates.dat.data[:, 2] *= 1 + mesh.coordinates.dat.data[:, 0]
fs_v = VectorFunctionSpace(mesh, 'DG', 1)
uv_expr = as_vector([Constant(1.0), Constant(0.3), Constant(0)])
uv = Function(fs_v, name='uv').project(uv_expr)
l2_err_uv = errornorm(uv_expr, uv)/assemble(Constant(1.0, domain=mesh2d)*dx)
print('L2 error uv {:.6e}'.format(l2_err_uv))
assert l2_err_uv < 1e-15
from thetis.
Ufl change is merged. So hopefully this is fixed.
from thetis.
Yes, all tests pass now.
from thetis.
Related Issues (20)
- forcing.py, name 'PETSc' is not defined HOT 5
- Better logging HOT 1
- grid_tpxo9.nc download link error HOT 2
- Create bathymetry mesh + refinement options HOT 16
- import fails without ipython_genutils HOT 2
- Error with Irksome when installing thetis
- Install fails on Mac M1 due to missing dependency on Proj HOT 2
- NameError: name 'RectangleMesh' is not defined HOT 9
- North Sea 2d model HOT 1
- Issue installing qmesh HOT 4
- tohoku bathymetry checkpoint needs updating HOT 1
- Error with new checkpointing HOT 1
- Southern hemisphere UTM zones unaccounted for? HOT 2
- Soft dependency on Goalie to avoid duplication
- Fix sizes of team photos on webpage HOT 1
- Firedrake outputs API has changed
- Allow Thetis to start from a non-zero time
- Remove unnecessary directory level in vtu output
- Using other than CAT1 to control HobbyPCB Amps Band Switching HOT 2
- Allow single timestep control over Thetis run 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 thetis.