Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Should Element store a constant pointer to the mesh?

Aperta
#213 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Refactoring
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
cpp

Direzione di ricerca

Start by inspecting the Element and RangeSetBase classes and the existing constant-reference iteration behavior. Trace every place these classes use their mesh pointers to determine whether non-constant mesh access is required; done means documenting the remaining requirements and confirming whether both pointers can safely become pointers to constant meshes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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?

Lingua principale
C++
Stelle
1.3k
Fork
183
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nmwsharp/geometry-central

Tutte le issue di nmwsharp/geometry-central

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.