Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • iMSTK iMSTK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 83
    • Issues 83
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • iMSTKiMSTK
  • iMSTKiMSTK
  • Issues
  • #350
Closed
Open
Issue created Aug 01, 2021 by Andrew Wilson@andrew.wilson🐘Contributor

PolyMesh/CellMesh

An abstract base class for SurfaceMesh, LineMesh, TetrahedralMesh, and HexahedralMesh would be nice. Something we've discussed for awhile. Something to provide cells abstractly.

One simple use case is the abstract class "getCellWeights". Whose signature would look like: getCellWeights(int cellId, const Vec3d& ptInCell);

Which would barycentric interpolate for a cell (triangle, tet, line, hexahedron, ...). Someone can then easily write a template function that works for any cell.

Also consider renaming indices to cells. getCells()

Functions for the base class:

getCellWeights(int cellId, const Vec3d& ptInCell): Computes interpolation weights (usually barycentric)
getCellBounds(int cellId, Vec3d& min, Vec3d& max): Computes bounding box of a single cell
getCellVolume(int cellId): Computes the signed volume of a cell
getCell(): Gets single cells indices
getIndices(): Gets the cell indices
setIndices(std::shared_ptr<AbstractDataArray> indices): Set the cell indices, could also require int type here
Edited Apr 19, 2022 by Andrew Wilson
Assignee
Assign to
Time tracking