Commit dd70a8ec authored by hrchilds's avatar hrchilds

Update from February 9, 2006

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@617 18c085ea-50e0-402c-830e-de6fd14e8384
parent 2b7bcadc
#ifndef ARRAY_H
#define ARRAY_H
#ifndef VISITARRAY_H
#define VISITARRAY_H
#include <mir_exports.h>
#include <string.h>
// ****************************************************************************
// Class: Array
// Class: VisItArray
//
// Purpose:
// Lightweight implementation of the STL vector template class.
......@@ -20,29 +20,32 @@
// Jeremy Meredith, Mon Sep 15 09:47:58 PDT 2003
// Updated to allow reserving memory.
//
// Mark C. Miller, Thu Feb 9 20:29:57 PST 2006
// Renamed to VisItArray
//
// ****************************************************************************
template<class T>
class MIR_API Array
class MIR_API VisItArray
{
private:
T *d;
int cp;
int sz;
void operator=(const Array<T> &rhs) { };
void operator=(const VisItArray<T> &rhs) { };
public:
Array()
VisItArray()
{
d = new T[10];
cp = 10;
sz = 0;
}
Array(int initSize)
VisItArray(int initSize)
{
d = new T[initSize];
cp = initSize;
sz = 0;
}
~Array()
~VisItArray()
{
delete[] d;
}
......@@ -79,7 +82,7 @@ class MIR_API Array
d[sz++] = t;
}
static void Swap(Array<T> &a1, Array<T> &a2)
static void Swap(VisItArray<T> &a1, VisItArray<T> &a2)
{
T *td = a1.d;
a1.d = a2.d;
......
......@@ -3,7 +3,7 @@
#include <mir_exports.h>
#include "Tet.h"
#include "Array.h"
#include "VisItArray.h"
#include "mat3d_tet.h"
// ****************************************************************************
......@@ -36,11 +36,15 @@
// Added a "forced material" where if it is >=0, any added tet will have
// the forced material instead of the normal requested material.
//
// Mark C. Miller, Thu Feb 9 21:06:10 PST 2006
// Renamed Array class to VisItArray to avoid name collisions with
// third-party libs
//
// ****************************************************************************
class MIR_API TetList
{
private:
Array<Tet> list;
VisItArray<Tet> list;
void operator=(const TetList &rhs) { };
public:
void Clear() {list.clear();}
......@@ -49,7 +53,7 @@ class MIR_API TetList
Tet &operator[](const int i) {return list[i];}
void Add(const Tet&, int);
void AddTet(int, int, const Tet::Node&,const Tet::Node&,const Tet::Node&,const Tet::Node&, int);
static void Swap(TetList &a, TetList &b) {Array<Tet>::Swap(a.list, b.list);}
static void Swap(TetList &a, TetList &b) {VisItArray<Tet>::Swap(a.list, b.list);}
};
// ****************************************************************************
......
......@@ -40,7 +40,7 @@ using std::vector;
#define STDMAX(A, B) (((A)>(B)) ? (A) : (B))
#include "Array.h"
#include "VisItArray.h"
#include "Tri.h"
#include "Tet.h"
#include "Wedge.h"
......
......@@ -3,7 +3,7 @@
#include <mir_exports.h>
#include "Tri.h"
#include "Array.h"
#include "VisItArray.h"
// ****************************************************************************
......@@ -36,11 +36,14 @@
// Added a "forced material" where if it is >=0, any added tet will have
// the forced material instead of the normal requested material.
//
// Mark C. Miller, Thu Feb 9 21:06:10 PST 2006
// Renamed Array class to VisItArray to avoid name collisions with
// third-party libs
// ****************************************************************************
class MIR_API TriList
{
private:
Array<Tri> list;
VisItArray<Tri> list;
void operator=(const TriList &rhs) { };
public:
void Clear() {list.clear();}
......@@ -50,7 +53,7 @@ class MIR_API TriList
void Add(const Tri&, int);
void AddTri(int, int, Tri::Node&,Tri::Node&,Tri::Node&, int);
void AddQuad(int, int, Tri::Node&,Tri::Node&,Tri::Node&,Tri::Node&, int);
static void Swap(TriList &a, TriList &b) {Array<Tri>::Swap(a.list, b.list);}
static void Swap(TriList &a, TriList &b) {VisItArray<Tri>::Swap(a.list, b.list);}
};
// ****************************************************************************
......
......@@ -3,7 +3,7 @@
#include <mir_exports.h>
#include "Wedge.h"
#include "Array.h"
#include "VisItArray.h"
#include "mat3d_tet.h"
// ****************************************************************************
......@@ -23,11 +23,14 @@
//
// Modifications:
//
// Mark C. Miller, Thu Feb 9 21:06:10 PST 2006
// Renamed Array class to VisItArray to avoid name collisions with
// third-party libs
// ****************************************************************************
class MIR_API WedgeList
{
private:
Array<Wedge> list;
VisItArray<Wedge> list;
void operator=(const WedgeList &rhs) { };
public:
void Clear() {list.clear();}
......@@ -37,7 +40,7 @@ class MIR_API WedgeList
void Add(const Wedge&, int);
void AddWedge(int, int, const Tet::Node&,const Tet::Node&,const Tet::Node&,
const Tet::Node&,const Tet::Node&,const Tet::Node&, int);
static void Swap(WedgeList &a, WedgeList &b) {Array<Wedge>::Swap(a.list, b.list);}
static void Swap(WedgeList &a, WedgeList &b) {VisItArray<Wedge>::Swap(a.list, b.list);}
};
// ****************************************************************************
......
......@@ -2,6 +2,7 @@
#define CELL_RECONSTRUCTOR_H
#include <ZooMIR.h>
#include <VisItArray.h>
// ****************************************************************************
// Class: CellReconstructor
......@@ -19,6 +20,9 @@
// ReconstructCell pure-virtual, and I needed to keep track of whether
// or not edge points were shared across materials.
//
// Mark C. Miller, Thu Feb 9 21:06:10 PST 2006
// Renamed Array class to VisItArray to avoid name collisions with
// third-party libs
// ****************************************************************************
class CellReconstructor
{
......@@ -71,8 +75,8 @@ class CellReconstructor
};
ZooMIR::EdgeHashTable edges;
Array<TempCell> outlist;
Array<TempCell> tmplist;
VisItArray<TempCell> outlist;
VisItArray<TempCell> tmplist;
void CreateCentroidPoint(TempCell&, int, int, int, int, int, int*);
void CreateOutputShape(TempCell&, TempCell&, int, int, int*, int);
......
......@@ -4,6 +4,7 @@
#include <vtkCellTypes.h>
#include <avtMaterial.h>
#include <ZooMIR.h>
#include <VisItArray.h>
#include <ImproperUseException.h>
#include <vtkTriangulationTables.h>
......@@ -69,6 +70,9 @@ RecursiveCellReconstructor::RecursiveCellReconstructor(vtkDataSet *d,
// Created a base CellReconstructor class and moved this method down
// into this derived class.
//
// Mark C. Miller, Thu Feb 9 21:06:10 PST 2006
// Renamed Array class to VisItArray to avoid name collisions with
// third-party libs
// ****************************************************************************
void
RecursiveCellReconstructor::ReconstructCell(int cellid_, int celltype_,
......@@ -158,7 +162,7 @@ RecursiveCellReconstructor::ReconstructCell(int cellid_, int celltype_,
//
// make the new list the old list
Array<TempCell>::Swap(outlist, tmplist);
VisItArray<TempCell>::Swap(outlist, tmplist);
outlist.clear();
// loop over all old temporary cells
......
......@@ -20,7 +20,7 @@
#include <vtkUnstructuredGrid.h>
#include <vtkTriangulationTables.h>
#include <Array.h>
#include <VisItArray.h>
#include "BitUtils.h"
#include "RecursiveCellReconstructor.h"
#include "IsovolumeCellReconstructor.h"
......
......@@ -3,7 +3,7 @@
#include <MIR.h>
#include <MIRConnectivity.h>
#include <Array.h>
#include <VisItArray.h>
#define FREE_ENTRY_LIST_SIZE 16384
#define POOL_SIZE 256
......@@ -40,6 +40,9 @@ struct ResampledMat;
// This is because we are now also using this for an isovolume MIR method
// where we do NOT want the edge points to be reused across materials.
//
// Mark C. Miller, Thu Feb 9 21:06:10 PST 2006
// Renamed Array class to VisItArray to avoid name collisions with
// third-party libs
// ****************************************************************************
class MIR_API ZooMIR : public MIR
{
......@@ -164,9 +167,9 @@ class MIR_API ZooMIR : public MIR
std::vector<float> origXCoords;
std::vector<float> origYCoords;
std::vector<float> origZCoords;
Array<ReconstructedCoord> coordsList;
Array<ReconstructedZone> zonesList;
Array<vtkIdType> indexList;
VisItArray<ReconstructedCoord> coordsList;
VisItArray<ReconstructedZone> zonesList;
VisItArray<vtkIdType> indexList;
int dimension;
int nMaterials;
......
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