Commit 3cc8168a authored by whitlocb's avatar whitlocb
Browse files

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)
......
/*****************************************************************************
*
* Copyright (c) 2000 - 2015, Lawrence Livermore National Security, LLC
* Produced at the Lawrence Livermore National Laboratory
* LLNL-CODE-442911
* All rights reserved.
*
* This file is part of VisIt. For details, see https://visit.llnl.gov/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or other materials provided with the distribution.
* - Neither the name of the LLNS/LLNL nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL LAWRENCE LIVERMORE NATIONAL SECURITY,
* LLC, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
/* SIMPLE SIMULATION SKELETON */
#include <VisItControlInterface_V2.h>
#include <VisItDataInterface_V2.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#include "SimulationExample.h"
/* Data Access Function prototypes */
visit_handle SimGetMetaData(void *);
visit_handle SimGetMesh(int, const char *, void *);
/******************************************************************************
* Simulation data and functions
******************************************************************************/
#define SIM_STOPPED 0
#define SIM_RUNNING 1
typedef struct
{
int cycle;
double time;
int runMode;
int done;
} simulation_data;
void
simulation_data_ctor(simulation_data *sim)
{
sim->cycle = 0;
sim->time = 0.;
sim->runMode = SIM_STOPPED;
sim->done = 0;
}
void
simulation_data_dtor(simulation_data *sim)
{
}
const char *cmd_names[] = {"halt", "step", "run"};
void simulate_one_timestep(simulation_data *sim);
void read_input_deck(void) { }
/******************************************************************************
*
* Purpose: Callback function for control commands.
*
* Programmer: Brad Whitlock
* Date: Fri Feb 6 14:29:36 PST 2009
*
* Input Arguments:
* cmd : The command string that we want the sim to execute.
* args : String argument for the command.
* cbdata : User-provided callback data.
*
* Modifications:
*
*****************************************************************************/
void ControlCommandCallback(const char *cmd, const char *args, void *cbdata)
{
simulation_data *sim = (simulation_data *)cbdata;
if(strcmp(cmd, "halt") == 0)
sim->runMode = SIM_STOPPED;
else if(strcmp(cmd, "step") == 0)
simulate_one_timestep(sim);
else if(strcmp(cmd, "run") == 0)
sim->runMode = SIM_RUNNING;
}
/* Called to handle case 3 from VisItDetectInput where we have console
* input that needs to be processed in order to accomplish an action.
*/
void
ProcessConsoleCommand(simulation_data *sim)
{
/* Read A Command */
char cmd[1000];
int iseof = (fgets(cmd, 1000, stdin) == NULL);
if (iseof)
{
sprintf(cmd, "quit");
printf("quit\n");
}
if (strlen(cmd)>0 && cmd[strlen(cmd)-1] == '\n')
cmd[strlen(cmd)-1] = '\0';
if(strcmp(cmd, "quit") == 0)
sim->done = 1;
else if(strcmp(cmd, "halt") == 0)
sim->runMode = SIM_STOPPED;
else if(strcmp(cmd, "step") == 0)
simulate_one_timestep(sim);
else if(strcmp(cmd, "run") == 0)
sim->runMode = SIM_RUNNING;
}
/* SIMULATE ONE TIME STEP */
void simulate_one_timestep(simulation_data *sim)
{
++sim->cycle;
sim->time += 0.0134;
printf("Simulating time step: cycle=%d, time=%lg\n", sim->cycle, sim->time);
sim_sleep(1);
VisItTimeStepChanged();
}
/******************************************************************************
*
* Purpose: This is the main event loop function.
*
* Programmer: Brad Whitlock
* Date: Fri Feb 6 14:29:36 PST 2009
*
* Modifications:
*
*****************************************************************************/
void mainloop(void)
{
int blocking, visitstate, err = 0;
/* Set up some simulation data. */
simulation_data sim;
simulation_data_ctor(&sim);
/* main loop */
fprintf(stderr, "command> ");
fflush(stderr);
do
{
blocking = (sim.runMode == SIM_RUNNING) ? 0 : 1;
/* Get input from VisIt or timeout so the simulation can run. */
visitstate = VisItDetectInput(blocking, fileno(stdin));
/* Do different things depending on the output from VisItDetectInput. */
if(visitstate >= -5 && visitstate <= -1)
{
fprintf(stderr, "Can't recover from error!\n");
err = 1;
}
else if(visitstate == 0)
{
/* There was no input from VisIt, return control to sim. */
simulate_one_timestep(&sim);
}
else if(visitstate == 1)
{
/* VisIt is trying to connect to sim. */
if(VisItAttemptToCompleteConnection() == VISIT_OKAY)
{
sim.runMode = SIM_STOPPED;
fprintf(stderr, "VisIt connected\n");
VisItSetCommandCallback(ControlCommandCallback, (void*)&sim);
VisItSetGetMetaData(SimGetMetaData, (void*)&sim);
VisItSetGetMesh(SimGetMesh, (void*)&sim);
}
else
fprintf(stderr, "VisIt did not connect\n");
}
else if(visitstate == 2)
{
/* VisIt wants to tell the engine something. */
if(VisItProcessEngineCommand() == VISIT_ERROR)
{
/* Disconnect on an error or closed connection. */
VisItDisconnect();
/* Start running again if VisIt closes. */
sim.runMode = SIM_RUNNING;
}
}
else if(visitstate == 3)
{
/* VisItDetectInput detected console input - do something with it.
* NOTE: you can't get here unless you pass a file descriptor to
* VisItDetectInput instead of -1.
*/
ProcessConsoleCommand(&sim);
fprintf(stderr, "command> ");
fflush(stderr);
}
} while(!sim.done && err == 0);
/* Clean up */
simulation_data_dtor(&sim);
}
/******************************************************************************
*
* Purpose: This is the main function for the program.
*
* Programmer: Brad Whitlock
* Date: Fri Feb 6 14:29:36 PST 2009
*
* Input Arguments:
* argc : The number of command line arguments.
* argv : The command line arguments.
*
* Modifications:
*
*****************************************************************************/
int main(int argc, char **argv)
{
/* Initialize environment variables. */
SimulationArguments(argc, argv);
VisItSetupEnvironment();
/* Write out .sim2 file that VisIt uses to connect. */
VisItInitializeSocketAndDumpSimFile("higherorder",
"Demonstrates creating an unstructured mesh of higher order cells",
"/path/to/where/sim/was/started",
NULL, NULL, SimulationFilename());
/* Read input problem setup, geometry, data. */
read_input_deck();
/* Call the main loop. */
mainloop();
return 0;
}
/* DATA ACCESS FUNCTIONS */
/******************************************************************************
*
* Purpose: This callback function returns simulation metadata.
*
* Programmer: Brad Whitlock
* Date: Fri Feb 6 14:29:36 PST 2009
*
* Modifications:
*
*****************************************************************************/
visit_handle
SimGetMetaData(void *cbdata)
{
visit_handle md = VISIT_INVALID_HANDLE;
simulation_data *sim = (simulation_data *)cbdata;
/* Create metadata. */
if(VisIt_SimulationMetaData_alloc(&md) == VISIT_OKAY)
{
int i;
visit_handle mmd = VISIT_INVALID_HANDLE;
/* Set the simulation state. */
VisIt_SimulationMetaData_setMode(md, (sim->runMode == SIM_STOPPED) ?
VISIT_SIMMODE_STOPPED : VISIT_SIMMODE_RUNNING);
VisIt_SimulationMetaData_setCycleTime(md, sim->cycle, sim->time);
/* Fill in the metadata. */
if(VisIt_MeshMetaData_alloc(&mmd) == VISIT_OKAY)
{
/* Set the mesh's properties.*/
VisIt_MeshMetaData_setName(mmd, "edges");
VisIt_MeshMetaData_setMeshType(mmd, VISIT_MESHTYPE_UNSTRUCTURED);
VisIt_MeshMetaData_setTopologicalDimension(mmd, 1);
VisIt_MeshMetaData_setSpatialDimension(mmd, 3);
VisIt_MeshMetaData_setNumDomains(mmd, 1);
VisIt_SimulationMetaData_addMesh(md, mmd);
}
if(VisIt_MeshMetaData_alloc(&mmd) == VISIT_OKAY)
{
/* Set the mesh's properties.*/
VisIt_MeshMetaData_setName(mmd, "surfaces");
VisIt_MeshMetaData_setMeshType(mmd, VISIT_MESHTYPE_UNSTRUCTURED);
VisIt_MeshMetaData_setTopologicalDimension(mmd, 2);
VisIt_MeshMetaData_setSpatialDimension(mmd, 2);
VisIt_MeshMetaData_setNumDomains(mmd, 1);
VisIt_SimulationMetaData_addMesh(md, mmd);
}
if(VisIt_MeshMetaData_alloc(&mmd) == VISIT_OKAY)
{
/* Set the mesh's properties.*/
VisIt_MeshMetaData_setName(mmd, "volumes");
VisIt_MeshMetaData_setMeshType(mmd, VISIT_MESHTYPE_UNSTRUCTURED);
VisIt_MeshMetaData_setTopologicalDimension(mmd, 3);
VisIt_MeshMetaData_setSpatialDimension(mmd, 3);
VisIt_MeshMetaData_setNumDomains(mmd, 1);
VisIt_SimulationMetaData_addMesh(md, mmd);
}
/* Add some custom commands. */
for(i = 0; i < sizeof(cmd_names)/sizeof(const char *); ++i)
{
visit_handle cmd = VISIT_INVALID_HANDLE;
if(VisIt_CommandMetaData_alloc(&cmd) == VISIT_OKAY)
{
VisIt_CommandMetaData_setName(cmd, cmd_names[i]);
VisIt_SimulationMetaData_addGenericCommand(md, cmd);
}
}
}
return md;
}
/* A mesh of quadratic edge line segments. */
double edge_coords[][2] = {{1., 0.}, {1.,1.}, {0.,1.}, {-1, 1.},
{-1,0}, {-1,-1}, {0,-1}, {1, -1}};
int edge_conn[] = {
VISIT_CELL_QUADRATIC_EDGE, 0,2,1,
VISIT_CELL_QUADRATIC_EDGE, 2,4,3,
VISIT_CELL_QUADRATIC_EDGE, 4,6,5,
VISIT_CELL_QUADRATIC_EDGE, 6,0,7
};
int edge_nnodes = 8;
int edge_nzones = 4;
int ledge_conn = sizeof(edge_conn) / sizeof(int);
/* A mesh of quadratic surface cell types */
double surface_coords[][2] = {
{0., 0.}, {1., 0.}, {1.,1.}, {0.25,-0.25}, {1.25,0.5}, {0.6,0.4},
{2,0}, {4,0}, {4,4}, {2,4}, {3,0.3}, {4.3,2}, {3,3.7}, {2.3,2}
};
int surface_conn[] = {
VISIT_CELL_QUADRATIC_TRI, 0,1,2,3,4,5,
VISIT_CELL_QUADRATIC_QUAD, 6,7,8,9,10,11,12,13
};
int surface_nnodes = 14;
int surface_nzones = 2;
int lsurface_conn = sizeof(surface_conn) / sizeof(int);
/* A mesh of volume cell types */
double volume_coords[][3] = {
/* cell 0 coordinates */
/* 0*/{1.5, 0, 3},
/* 1*/{4.5, 0, 2.7},
/* 2*/{1, 0.5, 0.},
/* 3*/{3, 3, 1.5},
/* 4*/{2.8, -0.1, 3.1},
/* 5*/{2.8, 0.2, 1.4},
/* 6*/{0.8, 0.1, 2.2},
/* 7*/{2.2, 1.5, 2.8},
/* 8*/{3.5, 1.5, 2.5},
/* 9*/{2, 2, 0.8},
/*cell 1 coordinates*/
/*10*/{6,0,4},
/*11*/{10,0,4},