Giter VIP home page Giter VIP logo

Comments (4)

ruboerner avatar ruboerner commented on September 26, 2024
Bildschirmfoto 2024-03-15 um 14 00 29

from gimli.

carsten-forty2 avatar carsten-forty2 commented on September 26, 2024

I can confirm the issue.

A quick test with the new fea implementation (yet unpublished) shows the resulting field need to be exact and mesh independend due to the bilinear field characteristics:

image

Its a little unclear where this comes from and when I will have time to fix it. In the meantime you can set the Dirichlet values to the nodes directly which seems to work as expected.

def BCN(node):
    return (-X * node.x() -Y * node.y())
bc={'Node': [[b.node(0).id(), BCN(b.node(0))] for b in mesh.findBoundaryByMarker(1,5)]}
uh = pg.solve(mesh, a=[[1, 1]], bc=bc, verbose=True)
u = (-pg.x(mesh) - pg.y(mesh))
print('normL2(u-uh):', pg.solver.normL2(u-uh, mesh))

image

Also there seems an issue with the showMesh keyword argument in the current release which I need to fix.

Many thanks for reporting,
Carsten

Edit: Added the code for normL2 calculation
Edit 2: The workarround only works for p=1 meshes, for p=2 also the middle node (b.node(2)) need to be considered.

from gimli.

carsten-forty2 avatar carsten-forty2 commented on September 26, 2024

The problem comes from the numbering directions of the boundary nodes. Not every node(0) is connected to node(1) from its neighbour, some are screwed due to triangle. So if you assign the value for one boundary to its node(0) might lead to wrong assigments. This is unfortunately broken be 'very old design' and I'm unsure if this can be fixed with moderate afford. Until the new implementation comes online, the little bit unconveniant direct node assignment will work.

from gimli.

ruboerner avatar ruboerner commented on September 26, 2024

Hi @carsten-forty2,

thanks for the quick and insightful response!

The news about a re-implementation of the FE code basis is great!

Cheers,
Ralph

from gimli.

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.