Skip to content

Naming of functions to get nodes on facets #1262

@KnutAM

Description

@KnutAM

Currently, it is not obvious that Ferrite.facets(::AbstractCell) only returns the node ids of the vertices of each facet, hence, it could be good to rename these functions to have something like

facet_vertex_node_ids(c::AbstractCell) = facets(c) # Can leave old `facets` just for backwards compatibility? 

function facet_node_ids(c::AbstractCell)
    ipg = geometric_interpolation(c)
    return map(facetdof_indices(ipg)) do dof_ids
        map(i -> get_node_ids(c)[i], dof_ids)
    end
end
function facet_node_ids(c::AbstractCell, facetnr::Int) # Possible for optimization, but doesn't seem necessary
    ipg = geometric_interpolation(c)
    return map(i -> get_node_ids(c)[i], facetdof_indices(ipg)[facetnr])
end

Ref #1259

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions