Skip to content
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

DofHandler with any <: AbstractGrid #379

Merged
merged 14 commits into from
Apr 22, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add working, general version of cellcoords
koehlerson committed Apr 22, 2022
commit 5f5d25b34fca20dadd86e69f455785780541f97e
2 changes: 1 addition & 1 deletion src/Dofs/DofHandler.jl
Original file line number Diff line number Diff line change
@@ -317,7 +317,7 @@ function cellcoords!(global_coords::Vector{Vec{dim,T}}, grid::AbstractGrid{dim},
N = length(nodes)
@assert length(global_coords) == N
for j in 1:N
global_coords[j] = getnodes(grid,nodes[j]).x
global_coords[j] = getcoordinates(getnodes(grid,nodes[j]))
end
return global_coords
end
1 change: 1 addition & 0 deletions test/test_abstractgrid.jl
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@
Ferrite.getncells(grid::SmallGrid{dim,N}) where {dim,N} = N
Ferrite.getcelltype(grid::SmallGrid) = eltype(grid.cells_test)
Ferrite.getcelltype(grid::SmallGrid, i::Int) = typeof(grid.cells_test[i])
Ferrite.getcoordinates(x::NTuple{dim,Float64}) where dim = Vec{dim,Float64}(x)

Ferrite.getnodes(grid::SmallGrid) = grid.nodes_test
Ferrite.getnodes(grid::SmallGrid, v::Union{Int, Vector{Int}}) = grid.nodes_test[v]