The plotSolution function currently supports:
- 1D line plots for scalar solutions (see e.g the tutorial)
- 2D contour plots for structured rectangular grids (reshaping node coordinates into grids) (see e.g the tutorial)
- 2D contour plots for unstructured meshes using node-based interpolation (via Plotly's contour type with
x y z arrays) (see e.g the tutorial)
However, it does not handle true element-based visualization for arbitrary polygonal topologies.
Tasks:
Example API usage: plotSolution(solutionVector, nodesCoordinates, solverConfig, "2D", "polygon", plotDivId);
The
plotSolutionfunction currently supports:xyzarrays) (see e.g the tutorial)However, it does not handle true element-based visualization for arbitrary polygonal topologies.
Tasks:
Introduce a newplotTypeoption, e.g.,"polygon"Use Plotly'sscatterwithfill: 'toself'ormesh3dto draw individual polygonal elements based on element connectivity (e.g., fromnoparrays inmeshGenerationScript.js)For each element, extract node coordinates and solution values to create filled polygons with color mappingExample API usage:
plotSolution(solutionVector, nodesCoordinates, solverConfig, "2D", "polygon", plotDivId);