Commit 3cc8168a authored by whitlocb's avatar whitlocb

Some higher order support in Libsim.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@27912 18c085ea-50e0-402c-830e-de6fd14e8384
parent 91a37310
......@@ -43,6 +43,7 @@ using std::ostringstream;
#include <vtkCellArray.h>
#include <vtkCellData.h>
#include <vtkCellType.h>
#include <vtkFieldData.h>
#include <vtkFloatArray.h>
#include <vtkDoubleArray.h>
......@@ -119,6 +120,42 @@ SimV2_GetVTKType(int simv2type)
return ret;
}
static void InitializeCellNumPoints(int *celltype_npts)
{
celltype_npts[VISIT_CELL_BEAM] = 2;
celltype_npts[VISIT_CELL_TRI] = 3;
celltype_npts[VISIT_CELL_QUAD] = 4;
celltype_npts[VISIT_CELL_TET] = 4;
celltype_npts[VISIT_CELL_PYR] = 5;
celltype_npts[VISIT_CELL_WEDGE] = 6;
celltype_npts[VISIT_CELL_HEX] = 8;
celltype_npts[VISIT_CELL_POINT] = 1;
celltype_npts[VISIT_CELL_POLYHEDRON] = 0; // handled specially
celltype_npts[VISIT_CELL_QUADRATIC_EDGE] = 3;
celltype_npts[VISIT_CELL_QUADRATIC_TRI] = 6;
celltype_npts[VISIT_CELL_QUADRATIC_QUAD] = 8;
celltype_npts[VISIT_CELL_QUADRATIC_TET] = 10;
celltype_npts[VISIT_CELL_QUADRATIC_HEX] = 20;
celltype_npts[VISIT_CELL_QUADRATIC_WEDGE] = 15;
celltype_npts[VISIT_CELL_QUADRATIC_PYR] = 13;
celltype_npts[VISIT_CELL_BIQUADRATIC_TRI] = 7;
celltype_npts[VISIT_CELL_BIQUADRATIC_QUAD] = 9;
celltype_npts[VISIT_CELL_TRIQUADRATIC_HEX] = 26;
celltype_npts[VISIT_CELL_QUADRATIC_LINEAR_QUAD] = 6;
celltype_npts[VISIT_CELL_QUADRATIC_LINEAR_WEDGE] = 12;
celltype_npts[VISIT_CELL_BIQUADRATIC_QUADRATIC_WEDGE] = 18;
celltype_npts[VISIT_CELL_BIQUADRATIC_QUADRATIC_HEX] = 24;
}
static bool
ValidCellType(int celltype)
{
return (celltype >= VISIT_CELL_BEAM && celltype <= VISIT_CELL_POLYHEDRON) ||
(celltype >= VISIT_CELL_QUADRATIC_EDGE && celltype <= VISIT_CELL_BIQUADRATIC_QUADRATIC_HEX);
}
// ****************************************************************************
// Function: GetQuadGhostZones
//
......@@ -1322,14 +1359,8 @@ static void
SimV2_UnstructuredMesh_Count_Cells(const int *connectivity, int connectivityLen,
int &normalCellCount, int &polyCount)
{
int celltype_npts[10];
celltype_npts[VISIT_CELL_BEAM] = 2;
celltype_npts[VISIT_CELL_TRI] = 3;
celltype_npts[VISIT_CELL_QUAD] = 4;
celltype_npts[VISIT_CELL_TET] = 4;
celltype_npts[VISIT_CELL_PYR] = 5;
celltype_npts[VISIT_CELL_WEDGE] = 6;
celltype_npts[VISIT_CELL_HEX] = 8;
int celltype_npts[40];
InitializeCellNumPoints(celltype_npts);
polyCount = 0;
normalCellCount = 0;
......@@ -1349,7 +1380,7 @@ SimV2_UnstructuredMesh_Count_Cells(const int *connectivity, int connectivityLen,
}
polyCount++;
}
else if(celltype >= VISIT_CELL_BEAM && celltype <= VISIT_CELL_POLYHEDRON)
else if(ValidCellType(celltype))
{
cell += celltype_npts[celltype];
normalCellCount++;
......@@ -1554,6 +1585,9 @@ SimV2_Add_PolyhedralCell(vtkUnstructuredGrid *ugrid, const int **cellptr,
// William T. Jones, Fri Jan 20 17:55:27 EDT 2012
// I added support for ghost nodes from an array.
//
// Brad Whitlock, Fri Jan 8 15:17:10 PST 2016
// Add some quadratic cell types.
//
// ****************************************************************************
vtkDataSet *
......@@ -1629,16 +1663,10 @@ SimV2_GetMesh_Unstructured(int domain, visit_handle h, avtPolyhedralSplit **phSp
//
// Create the cells.
//
int celltype_npts[10];
celltype_npts[VISIT_CELL_BEAM] = 2;
celltype_npts[VISIT_CELL_TRI] = 3;
celltype_npts[VISIT_CELL_QUAD] = 4;
celltype_npts[VISIT_CELL_TET] = 4;
celltype_npts[VISIT_CELL_PYR] = 5;
celltype_npts[VISIT_CELL_WEDGE] = 6;
celltype_npts[VISIT_CELL_HEX] = 8;
int celltype_npts[40];
InitializeCellNumPoints(celltype_npts);
int celltype_idtype[10];
int celltype_idtype[40];
celltype_idtype[VISIT_CELL_BEAM] = VTK_LINE;
celltype_idtype[VISIT_CELL_TRI] = VTK_TRIANGLE;
celltype_idtype[VISIT_CELL_QUAD] = VTK_QUAD;
......@@ -1646,6 +1674,22 @@ SimV2_GetMesh_Unstructured(int domain, visit_handle h, avtPolyhedralSplit **phSp
celltype_idtype[VISIT_CELL_PYR] = VTK_PYRAMID;
celltype_idtype[VISIT_CELL_WEDGE] = VTK_WEDGE;
celltype_idtype[VISIT_CELL_HEX] = VTK_HEXAHEDRON;
celltype_idtype[VISIT_CELL_POINT] = VTK_VERTEX;
celltype_idtype[VISIT_CELL_QUADRATIC_EDGE] = VTK_QUADRATIC_EDGE;
celltype_idtype[VISIT_CELL_QUADRATIC_TRI] = VTK_QUADRATIC_TRIANGLE;
celltype_idtype[VISIT_CELL_QUADRATIC_QUAD] = VTK_QUADRATIC_QUAD;
celltype_idtype[VISIT_CELL_QUADRATIC_TET] = VTK_QUADRATIC_TETRA;
celltype_idtype[VISIT_CELL_QUADRATIC_HEX] = VTK_QUADRATIC_HEXAHEDRON;
celltype_idtype[VISIT_CELL_QUADRATIC_WEDGE] = VTK_QUADRATIC_WEDGE;
celltype_idtype[VISIT_CELL_QUADRATIC_PYR] = VTK_QUADRATIC_PYRAMID;
celltype_idtype[VISIT_CELL_BIQUADRATIC_TRI] = VTK_BIQUADRATIC_TRIANGLE;
celltype_idtype[VISIT_CELL_BIQUADRATIC_QUAD] = VTK_BIQUADRATIC_QUAD;
celltype_idtype[VISIT_CELL_TRIQUADRATIC_HEX] = VTK_TRIQUADRATIC_HEXAHEDRON;
celltype_idtype[VISIT_CELL_QUADRATIC_LINEAR_QUAD] = VTK_QUADRATIC_LINEAR_QUAD;
celltype_idtype[VISIT_CELL_QUADRATIC_LINEAR_WEDGE] = VTK_QUADRATIC_LINEAR_WEDGE;
celltype_idtype[VISIT_CELL_BIQUADRATIC_QUADRATIC_WEDGE] = VTK_BIQUADRATIC_QUADRATIC_WEDGE;
celltype_idtype[VISIT_CELL_BIQUADRATIC_QUADRATIC_HEX] = VTK_BIQUADRATIC_QUADRATIC_HEXAHEDRON;
vtkUnstructuredGrid *ugrid = vtkUnstructuredGrid::New();
ugrid->SetPoints(points);
......@@ -1678,7 +1722,7 @@ SimV2_GetMesh_Unstructured(int domain, visit_handle h, avtPolyhedralSplit **phSp
polyhedralSplit->AppendCellSplits(numCells, nsplits);
phIndex++;
}
else if(celltype >= VISIT_CELL_BEAM && celltype <= VISIT_CELL_HEX)
else if(ValidCellType(celltype))
{
// Add a normal cell
int vtktype = celltype_idtype[celltype];
......
......@@ -42,7 +42,7 @@ enhancements and bug-fixes that were added to this release.</p>
<li>VisIt now permits the <i>-socket-bridge-host</i> command line argument to override the host name passed to compute engines when VCL starts a socket bridge. This is useful for login nodes that are attached to multiple network interfaces such as on BlueGene/Q where compute nodes may need to attach to the socket bridge host (typically the LAC node) using an alias.</li>
<li>The PF3D reader was enhanced so that it now reads the new multi level file format.</li>
<li>The SPH Resample Operator now supports zone-centered data</li>
<li></li>
<li>VTK's higher order elements are now exposed via Libsim.</li>
</ul>
<a name="Dev_changes"></a>
......
......@@ -125,6 +125,22 @@ typedef enum {
#define VISIT_CELL_POINT 7
#define VISIT_CELL_POLYHEDRON 8
#define VISIT_CELL_QUADRATIC_EDGE 20
#define VISIT_CELL_QUADRATIC_TRI 21
#define VISIT_CELL_QUADRATIC_QUAD 22
#define VISIT_CELL_QUADRATIC_TET 23
#define VISIT_CELL_QUADRATIC_PYR 24
#define VISIT_CELL_QUADRATIC_WEDGE 25
#define VISIT_CELL_QUADRATIC_HEX 26
#define VISIT_CELL_BIQUADRATIC_TRI 27
#define VISIT_CELL_BIQUADRATIC_QUAD 28
#define VISIT_CELL_TRIQUADRATIC_HEX 29
#define VISIT_CELL_QUADRATIC_LINEAR_QUAD 30
#define VISIT_CELL_QUADRATIC_LINEAR_WEDGE 31
#define VISIT_CELL_BIQUADRATIC_QUADRATIC_WEDGE 32
#define VISIT_CELL_BIQUADRATIC_QUADRATIC_HEX 33
/* Coordinate modes */
#define VISIT_COORD_MODE_SEPARATE 0
#define VISIT_COORD_MODE_INTERLEAVED 1
......
......@@ -176,6 +176,35 @@
parameter (VISIT_CELL_POINT = 7)
integer VISIT_CELL_POLYHEDRON
parameter (VISIT_CELL_POLYHEDRON = 8)
integer VISIT_CELL_QUADRATIC_EDGE
parameter (VISIT_CELL_QUADRATIC_EDGE = 20)
integer VISIT_CELL_QUADRATIC_TRI
parameter (VISIT_CELL_QUADRATIC_TRI = 21)
integer VISIT_CELL_QUADRATIC_QUAD
parameter (VISIT_CELL_QUADRATIC_QUAD = 22)
integer VISIT_CELL_QUADRATIC_TET
parameter (VISIT_CELL_QUADRATIC_TET = 23)
integer VISIT_CELL_QUADRATIC_PYRAMID
parameter (VISIT_CELL_QUADRATIC_PYRAMID = 24)
integer VISIT_CELL_QUADRATIC_WEDGE
parameter (VISIT_CELL_QUADRATIC_WEDGE = 25)
integer VISIT_CELL_QUADRATIC_HEX
parameter (VISIT_CELL_QUADRATIC_HEX = 26)
integer VISIT_CELL_BIQUAD_TRI
parameter (VISIT_CELL_BIQUAD_TRI = 27)
integer VISIT_CELL_BIQUAD_QUAD
parameter (VISIT_CELL_BIQUAD_QUAD = 28)
integer VISIT_CELL_TRIQUAD_HEX
parameter (VISIT_CELL_TRIQUAD_HEX = 29)
integer VISIT_CELL_QUAD_LIN_QUAD
parameter (VISIT_CELL_QUAD_LIN_QUAD = 30)
integer VISIT_CELL_QUAD_LIN_WEDGE
parameter (VISIT_CELL_QUAD_LIN_WEDGE = 31)
integer VISIT_CELL_BIQUAD_QUAD_WEDGE
parameter (VISIT_CELL_BIQUAD_QUAD_WEDGE = 32)
integer VISIT_CELL_BIQUAD_QUAD_HEX
parameter (VISIT_CELL_BIQUAD_QUAD_HEX = 33)
!... Coordinate modes
integer VISIT_COORD_MODE_SEPARATE
......
......@@ -230,6 +230,8 @@ ADD_PARALLEL_SIMV2_SIMULATION(ghostcells_par ghostcells.c)
ADD_SIMV2_SIMULATION(globalids globalids.c)
ADD_PARALLEL_SIMV2_SIMULATION(globalids_par globalids.c)
ADD_SIMV2_SIMULATION(higherorder higherorder.c)
ADD_SIMV2_SIMULATION(interleave interleave.c)
ADD_SIMV2_SIMULATION(life life.c)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment