Git Product home page Git Product logo

Comments (2)

ReubenHill avatar ReubenHill commented on September 4, 2024

Also get the loopy error for

V = FunctionSpace(m, 'BDM', 2)

and get the wrong answer for Regge:

from firedrake import *
import numpy as np

m = UnitIcosahedralSphereMesh(refinement_level=2, name='immersedsphere')
m.init_cell_orientations(SpatialCoordinate(m))
V = FunctionSpace(m, 'Regge', 2)
x = SpatialCoordinate(m)
expr = outer(x, x)
f = Function(V).interpolate(expr)
point = m.coordinates.dat.data_ro[0]  # array([-0.52573111, 0.85065081, 0.0])
f.at(point)
# array([[ 1.39627448e-02,  1.20021295e-02, -1.68957223e-17],
#        [ 1.20021295e-02,  1.03168192e-02, -1.40488013e-17],
#        [-1.55534977e-17, -1.33695127e-17, -1.52575501e-17]])
np.outer(point, point)
# array([[ 0.2763932, -0.4472136, -0.       ],
#        [-0.4472136,  0.7236068,  0.       ],
#        [-0.       ,  0.       ,  0.       ]])
assert np.allclose(f.at(point), np.outer(point, point))  # fails

from firedrake.

ReubenHill avatar ReubenHill commented on September 4, 2024

Update: N1curl/N2curl result is not necessarily wrong. We need a complete polynomial space for point evaluation to give an the naively expected result. A plane in R^3 (at z=0) with N1curl (degree 2), N2curl (degree 1) BDM (degree 1), RT (degree 2) should all give us the answer we expect in the test above.

Other issues need to be debugged.

from firedrake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.