-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad Dof-Ordering when using FerriteMeshParser in Ferrite#master #49
Comments
It seems like this only happens when using SubDofHandlers. I'll quickly set up a minimal example |
Here is the file I'm using: mesh.txt using Ferrite # on current master branch
using FerriteMeshParser
grid = get_ferrite_grid("mesh.txt", meshformat=FerriteMeshParser.AbaqusMeshFormat(), generate_facetsets=false)
ip = Lagrange{RefHexahedron, 1}()
dh1 = DofHandler(grid)
add!(dh1, :u, ip)
close!(dh1)
dh2 = DofHandler(grid)
sdh = SubDofHandler(dh2, getcellset(grid, "FE"))
add!(sdh, :u, ip)
close!(dh2)
display(allocate_matrix(dh1))
display(allocate_matrix(dh2)) |
Thanks for the report and investigation!
Adding my quick notes on how to make the change here (I don't have time to do it and test it right now), so for future me or others who wants to do this, the fix should be to change
and FerriteMeshParser.jl/src/gridcreator.jl Lines 48 to 49 in fd138ca
to FerriteMeshParser.jl/src/FerriteMeshParser.jl Lines 29 to 41 in fd138ca
to const FerritePreV1 = !isdefined(Ferrite, :FacetIndex)
const SerendipityQuadraticHexahedron = FerritePreV1 ? Ferrite.Cell{3,20,6} : Ferrite.SerendipityQuadraticHexahedron
const SerendipityQuadraticQuadrilateral = FerritePreV1 ? Ferrite.Cell{2,8,4} : Ferrite.SerendipityQuadraticQuadrilateral
const FacetIndex = FerritePreV1 ? Ferrite.FaceIndex : Ferrite.FacetIndex
const facets = FerritePreV1 ? Ferrite.faces : Ferrite.facets
const addfacetset! = FerritePreV1 ? Ferrite.addfaceset! : Ferrite.addfacetset!
and use |
Currently when using FerriteMeshParser to parse the .inp file I get the following stiffnes matrix:
If I want to get a somewhat good looking matrix I have to first sort the cellsets in the Grid:
I then get
My guess is that this is because we don't use OrderedCollections like Ferrite#master does, so this should probably be a pretty simple fix?
The text was updated successfully, but these errors were encountered: