Skip to content
Snippets Groups Projects
Commit 072b8fee authored by David Thompson's avatar David Thompson
Browse files

Significant vtkCellGrid changes.

+ Add a copy query and `vtkCellGrid::CopyStructure`; the virtual
  ShallowCopy and DeepCopy methods `vtkCellGrid` inherits now use it.
  But it is more flexible, allowing partial copies (such as a
  geometry-only copy) for filters that need it.
+ Refactor `vtkCellAttribute` so that DOF-sharing, function space,
  basis, and order may vary on a per-cell-type basis within the
  same `vtkCellGrid`. This adds `vtkCellAttribute::CellTypeInfo`
  that can be fetched from an attribute given a cell type.
+ Reorganize the basis functions and basis-gradient functions
  so the same code that performs numerical evaluation of each
  operator is available both on the CPU (via the C++
  `vtkDGOperatorEntry`) and the GPU (via the `vtkDGRenderResponder`).
+ Improve cell-grid external-surface computation.
  + Add an option to omit computation of sides for renderable cells.
    Without this option, a quadrilateral cell would have its edges
    output (either with the original cell if PreserveRenderableCells
    is true; or without the cell). This is not how ParaView's
    representations behave.
  + Add a new member to `vtkDGCell::Source` to hold a per-node array
    of "ghost" flags. This allows distributed-memory meshes to have
    properly-computed external surfaces (without internal faces rendered
    at process boundaries).
  + Add a new member to `vtkDGCell::Source` specifying whether the
    original cells or the sides should be extracted when processing
    a vtkSelectionNode that lists cell IDs.
+ Add a method to the base vtkDGCell to fetch sides of a side.
  All of the subclassed shapes implement this method and there is
  a test to validate (and compute for new shape subclasses) the
  lookup tables used by each shape.
  This is used to enhance the vtkDGSidesResponder so it can
  compute sides of sides in order to display "surface with edges"-style
  meshes, nodes/edges of boundary-condition side-sets, etc.
+ Simplify all cell-grid `normalToSideAt()` functions.
  This is used way to prevent shading of edges and vertices;
  the fragment shader can ignore the provided normal when rendering edges
  and vertices. And having a normal to a side (even when not uniquely
  defined) might be useful to shaders at some other point.
+ Add new DG test data.
  This includes
  + `dgEdges.dg` – a poly-line
  + `dgGhostHexahedra.dg` – the same as `dgHexahedra.dg` but with
    a ghost-node array that affects how the external surface is
    computed.
  + `dgMixed.dg` – contains cells of multiple types in the same
    cell-grid object.
  + `dgQuadraticQuadrilaterals.dg` – quadrilaterals with a quadratic
    shape function for testing tessellation control shaders.
+ vtkDGCell responders now use the new integer-tuple API for fetching
  connectivity data (so that arrays may be `vtkIntArray`,
  `vtkTypeInt32Array`, `vtkTypeInt64Array`, `vtkIdTypeArray`, or
  any other integer-valued array). This greatly simplifies
  logic for processing cells.
+ `vtkCellGridComputeSurface` has been renamed to `vtkCellGridComputeSides`.
  This breaks the VTK API but the cell-grid libraries were noted at
  the release of vtk 9.3.0 to be unstable.
  The filter is now more general and may output data not on the external
  surface of the model.
+ Fix coloring by vector magnitude/norm for cell-grids.
+ Fix the DG render-responder to use proper
  + colormap (preferring the mapper's if it exists and then the cell-attribute's if not);
  + attribute component (using the setting provided by the source of the colormap);
  + scalar range (paying attention to the colormap if requested).
+ Make `vtkCellGridSidesQuery::HashCombiner` available everywhere
  (as `Common/Core/vtkHashCombiner.h`).
  This will allow it to be used for upcoming changes to
  vtkCellGridResponders (to add caches based on an integer key).
+ Add cache data to cell-grid query-responders.
  This allows multiple query/filter instances to cache and share
  data so that data processed in them can share indices and other
  useful state.
  At this point, the cache must be manually managed.
+ Improved cell-grid range computation.
  + Now all component ranges (plus the L₁ and L₂ norms) are computed at once.
  + Range computation is parallelized.
  + HCurl and HDiv function spaces are sampled to obtain their range instead
    of simply taking the range of their coefficients. This is necessary
    since the coefficients are scaled by the inverse Jacobian of the
    shape attribute for the cell.
+ Add `vtkDGCell::GetParametricCenterOfSide()`.
  This is used for range queries as well as generating debug output.
+ Fix cached attribute-range lookup.
  The size of the per-component range vector was not tested properly,
  resulting in the cache nearly always being regarded as stale.
+ Fix rendering of cell-grid data.
  + HCurl/HDiv fields should not have data normalized by the determinant
    of the Jacobian.
  + Switch the pyramid data to use for rendering test.
    This uses a 19-node pyramid which does not have problems
    with surface normals like the 5- and 12-node versions.
  + Switch HCurl/HDiv basis functions to always be 3-D (even for 2-D cells).
    Because of the way shaders work, this is mandatory for now.
    Eventually, it would be nice to switch back.
parent 9fececf0
No related branches found
No related tags found
No related merge requests found
Showing
with 2038 additions and 310 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment