Skip to content

Instantly share code, notes, and snippets.

View amartinhuertas's full-sized avatar

Alberto F. Martin amartinhuertas

View GitHub Profile
@amartinhuertas
amartinhuertas / mwe_grad_perp.jl
Last active September 21, 2021 01:57
Minimal Gridap working code used to evaluate equivalence among R J^{-T} and 1/sqrt(det(g)) J R
using Gridap
# Distorted mesh
function rndm(p::Point)
r, s = p
x = r + 0.1*sin(2π*r)*sin(2π*s)
y = s + 0.1*sin(2π*r)*sin(2π*s)
Point(x,y)
end
@amartinhuertas
amartinhuertas / assemble_L2MM_invL2MM.jl
Last active September 21, 2021 01:59
Efficient assembly of L2 Mass Matrix and its inverse using Gridap/GridapGeoScience Tools
using Gridap
using GridapGeosciences
order=1
degree=4
model = CubedSphereDiscreteModel(1; radius=rₑ)
# Forward integration of the shallow water equations