Skip to content

Should Element store a constant pointer to the mesh? #213

@spookyGh0st

Description

@spookyGh0st

I have noticed that it is currently not possible to iterate over the elements of a constant reference - even if it is read only. However it seems to me that there is no reason for the Element and RangeSetBase class to store a nonconstant pointer. Note that this does NOT mean, that the pointer cannot change, we can still set it to nullptr or a different mesh - only the value that the pointer points to cannot, i.e. we would not be allowed to change element.getMesh()

I have implemented this for the Element class and it seems to work flawlessly. Is there any point where the elements require non-constant references?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions