Coder Social home page Coder Social logo

trixi-framework / smesh.jl Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 227 KB

Smesh.jl is a lightweight wrapper of the Fortran package smesh for generation and handling of unstructured meshes

Home Page: https://trixi-framework.github.io/Smesh.jl/

License: MIT License

Julia 100.00%

smesh.jl's People

Contributors

bennibolm avatar dependabot[bot] avatar sloede avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

bennibolm

smesh.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

Providing some basic visualization tools

We could add some basic visualization routines using Plots.jl (and create a documentation section about it).

For instance, this is what I use right now:

Plotting only the points:

scatter(data_points[1, :], data_points[2, :], legend=false, title="points")

points

Adding triangulation to the plot:

for element in axes(vertices, 2)
    v1 = vertices[1, element]
    v2 = vertices[2, element]
    v3 = vertices[3, element]
    x1 = data_points[:, v1]
    x2 = data_points[:, v2]
    x3 = data_points[:, v3]
    plot!(p, [x1[1], x2[1]], [x1[2], x2[2]])
    plot!(p, [x2[1], x3[1]], [x2[2], x3[2]])
    plot!(p, [x3[1], x1[1]], [x3[2], x1[2]])
end
plot!(title = "triangles")

points_triangles

Data points and polygons (here with :centroids):

p1 = scatter(data_points[1, :], data_points[2, :], legend=false)
for element_vor in axes(voronoi_vertices_interval, 2)
    vertex_first = voronoi_vertices_interval[1, element_vor]
    vertex_last = voronoi_vertices_interval[2, element_vor]
    for i in vertex_first:(vertex_last-1)
        v1 = voronoi_vertices[i]
        v2 = voronoi_vertices[i + 1]
        x1 = voronoi_vertices_coordinates[:, v1]
        x2 = voronoi_vertices_coordinates[:, v2]
        plot!(p1, [x1[1], x2[1]], [x1[2], x2[2]])
    end
    v1 = voronoi_vertices[vertex_last]
    v2 = voronoi_vertices[vertex_first]
    x1 = voronoi_vertices_coordinates[:, v1]
    x2 = voronoi_vertices_coordinates[:, v2]
    plot!(p1, [x1[1], x2[1]], [x1[2], x2[2]], title="mesh type: $mesh_type")
end

polgonmesh

The variables names are chosen as in the elixirs.

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.