https://github.com/ferrite-fem/ferritegmsh.jl

https://github.com/ferrite-fem/ferritegmsh.jl

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 8 committers (12.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

ferrite gmsh hacktoberfest julia

Keywords from Contributors

finite-elements julialang project-assistant project-management science-research setup-tool simulations automatic-differentiation cfd symmetric-tensors
Last synced: 4 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: Ferrite-FEM
  • License: mit
  • Language: Julia
  • Default Branch: master
  • Homepage:
  • Size: 86.9 KB
Statistics
  • Stars: 17
  • Watchers: 5
  • Forks: 7
  • Open Issues: 11
  • Releases: 6
Topics
ferrite gmsh hacktoberfest julia
Created about 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

FerriteGmsh.jl

FerriteGmsh tries to simplify the conversion from a gmsh mesh to a Ferrite mesh.

Installation

]add FerriteGmsh

Example

Imgur

The above example is taken from the test_mixed_grid.jl file which can be found in the test folder.

This package offers two workflows. The user can either load an already defined geometry by a .msh,.geo file or use it in an interactive way. The first approach can be achieved by

```julia using FerriteGmsh

togrid("meshfile.msh") togrid("meshfile.geo") #gets meshed automatically ```

while the latter is done by

```julia using FerriteGmsh

gmsh.initialize() dim = Int64(gmsh.model.getDimension()) facedim = dim - 1

do stuff to describe your gmsh model

renumber the gmsh entities, such that the final used entities start by index 1

this step is crucial, because Ferrite.jl uses the implicit entity index based on an array index

and thus, need to start at 1

gmsh.model.mesh.renumberNodes() gmsh.model.mesh.renumberElements()

transfer the gmsh information

nodes = tonodes() elements, gmshelementidx = toelements(dim) cellsets = tocellsets(dim, gmshelementidx)

"Domain" is the name of a PhysicalGroup and saves all cells that define the computational domain

domaincellset = cellsets["Domain"] elements = elements[collect(domaincellset)]

boundarydict = toboundary(facedim) facesets = tofacetsets(boundarydict, elements) gmsh.finalize()

Grid(elements, nodes, facesets=facesets, cellsets=cellsets) ```

Elements numbering & Supported elements

Ferrite might have a different element node-numbering scheme if compared to Gmsh. For correct portability of a mesh from Gmsh, it is important to transform Gmsh numbering in the one that Ferrite is expecting. Having the same numbering is important because the numbering provides information about which basis function is placed at each position, as well as the orientation of the elements.

By default FerriteGmsh supports all Ferrite elements in which the numbering is the same to the one used in Gmsh.

To check the numbering used in Ferrite, we could for example generate a grid with a single element, for a QuadraticQuadrilateral that would be:

julia using Ferrite grid = generate_grid(QuadraticQuadrilateral,(1,1))

Accessing the cells of that element:

julia julia> grid.cells 1-element Vector{QuadraticQuadrilateral}: QuadraticQuadrilateral((1, 3, 9, 7, 2, 6, 8, 4, 5)) where the numbers refers to the global nodes ids, which can be easily visualized in the following manner using the package FerriteViz.

```julia using Ferrite using FerriteViz

grid = generate_grid(QuadraticQuadrilateral,(1,1))

FerriteViz.wireframe(grid,markersize=14,strokewidth=20,textsize = 25, nodelabels=true,celllabels=true) ``` Imgur

The Ferrite numbering (1, 3, 9, 7, 2, 6, 8, 4, 5) would have to match the numbering of Gmsh (see gmsh docs).

In the particular case of the QuadraticQuadrilateral, the numbering used in Ferrite and the numbering used in Gmsh matches, then as it was anticipated this type of element would be supported through the default method for translate_elements.

If the numbering does not match like for example in the QuadraticTetrahedron an specific method for the function translate_elements has to be created. In this method, the correct numbering is specified.

Elements supported (summary):

With the elements supported by default and specific translate_elements methods (for QuadraticTetrahedron and 3D Serendipity), all the linear and quadratic elements available in Ferrite are already supported by FerriteGmsh.

Owner

  • Name: Ferrite-FEM
  • Login: Ferrite-FEM
  • Kind: organization

GitHub Events

Total
  • Issues event: 1
  • Watch event: 3
  • Issue comment event: 16
  • Pull request event: 4
  • Fork event: 2
Last Year
  • Issues event: 1
  • Watch event: 3
  • Issue comment event: 16
  • Pull request event: 4
  • Fork event: 2

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 66
  • Total Committers: 8
  • Avg Commits per committer: 8.25
  • Development Distribution Score (DDS): 0.364
Past Year
  • Commits: 2
  • Committers: 1
  • Avg Commits per committer: 2.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Maximilian Köhler m****r@r****e 42
Fredrik Ekre e****k@g****m 12
Dennis Ogiermann t****l@u****m 3
Knut Andreas Meyer k****m@g****m 3
Sebastian Pech s****h@m****m 2
github-actions[bot] 4****]@u****m 2
Vyom Patel 4****m@u****m 1
victorjesusamoresmedianero 6****o@u****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 11
  • Total pull requests: 39
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 2 months
  • Total issue authors: 8
  • Total pull request authors: 10
  • Average comments per issue: 4.0
  • Average comments per pull request: 0.79
  • Merged pull requests: 26
  • Bot issues: 0
  • Bot pull requests: 2
Past Year
  • Issues: 1
  • Pull requests: 10
  • Average time to close issues: N/A
  • Average time to close pull requests: about 11 hours
  • Issue authors: 1
  • Pull request authors: 4
  • Average comments per issue: 11.0
  • Average comments per pull request: 1.7
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • koehlerson (3)
  • fredrikekre (2)
  • zkk960317 (1)
  • KnutAM (1)
  • termi-official (1)
  • Drachta (1)
  • JuliaTagBot (1)
  • yujingll (1)
Pull Request Authors
  • KnutAM (9)
  • fredrikekre (9)
  • koehlerson (8)
  • termi-official (5)
  • sebastianpech (5)
  • kimauth (4)
  • github-actions[bot] (2)
  • patelvyom (2)
  • ranocha (2)
  • victorjesusamoresmedianero (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels
hacktoberfest-accepted (1)

Packages

  • Total packages: 1
  • Total downloads:
    • julia 31 total
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 6
juliahub.com: FerriteGmsh
  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 31 Total
Rankings
Dependent repos count: 9.9%
Average: 31.7%
Stargazers count: 37.7%
Dependent packages count: 38.9%
Forks count: 40.4%
Last synced: 5 months ago

Dependencies

.github/workflows/CI.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • julia-actions/julia-buildpkg v1 composite
  • julia-actions/julia-runtest v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CompatHelper.yml actions
.github/workflows/TagBot.yml actions
  • JuliaRegistries/TagBot v1 composite