/usr/include/vtk-6.2/vtkLSDynaPartCollection.h is in libvtk6-dev 6.2.0+dfsg1-10build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkLSDynaPartCollection.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef vtkLSDynaPartCollection_h
#define vtkLSDynaPartCollection_h
#include "vtkIOLSDynaModule.h" // For export macro
#include "LSDynaMetaData.h" //needed for LSDynaMetaData::LSDYNA_TYPES enum
#include "vtkObject.h"
class vtkDataArray;
class vtkUnstructuredGrid;
class vtkPoints;
class vtkUnsignedCharArray;
class vtkLSDynaPart;
class VTKIOLSDYNA_EXPORT vtkLSDynaPartCollection: public vtkObject
{
public:
class LSDynaPart;
static vtkLSDynaPartCollection *New();
vtkTypeMacro(vtkLSDynaPartCollection,vtkObject);
virtual void PrintSelf(ostream &os, vtkIndent indent);
//Description:
//Pass in the metadata to setup this collection.
//The optional min and max cell Id are used when in parallel to load balance the nodes.
//Meaning the collection will only store subsections of parts that fall within
//the range of the min and max
//Note: min is included, and max is excluded from the valid range of cells.
void InitCollection(LSDynaMetaData *metaData,
vtkIdType* mins=NULL, vtkIdType* maxs=NULL);
//Description:
//For a given part type returns the number of cells to read and the number
//of cells to skip first to not read
void GetPartReadInfo(const int& partType, vtkIdType& numberOfCells,
vtkIdType& numCellsToSkip,vtkIdType& numCellsToSkipEnd) const;
//Description:
//Finalizes the cell topology by mapping the cells point indexes
//to a relative number based on the cells this collection is storing
void FinalizeTopology();
//Description: Register a cell of a given type and material index to the
//correct part
//NOTE: the cellIndex is relative to the collection. So in parallel
//the cellIndex will be from 0 to MaxId-MinId
void RegisterCellIndexToPart(const int& partType,const vtkIdType& matIdx,
const vtkIdType& cellIndex,const vtkIdType& npts);
void InitCellInsertion();
void AllocateParts();
//Description: Insert a cell of a given type and material index to the
//collection.
//NOTE: the cellIndex is relative to the collection. So in parallel
//the cellIndex will be from 0 to MaxId-MinId
void InsertCell(const int& partType,const vtkIdType& matIdx,
const int& cellType,const vtkIdType& npts, vtkIdType conn[8]);
//Description:
//Set for each part type what cells are deleted/dead
void SetCellDeadFlags(const int& partType, vtkUnsignedCharArray *death,
const int& deadCellsAsGhostArray);
bool IsActivePart(const int& id) const;
//Description:
//Given a part will return the unstructured grid for the part.
//Note: You must call finalize before using this method
vtkUnstructuredGrid* GetGridForPart(const int& index) const;
int GetNumberOfParts() const;
void DisbleDeadCells();
//Description:
void ReadPointUserIds(const vtkIdType& numTuples,const char* name);
//Description:
void ReadPointProperty(
const vtkIdType& numTuples,
const vtkIdType& numComps,
const char* name,
const bool &isProperty=true,
const bool& isGeometryPoints=false,
const bool& isRoadPoints=false);
//Description:
//Adds a property for all parts of a certain type
void AddProperty(const LSDynaMetaData::LSDYNA_TYPES& type, const char* name,
const int& offset, const int& numComps);
void FillCellProperties(float *buffer,const LSDynaMetaData::LSDYNA_TYPES& type,
const vtkIdType& startId, const vtkIdType& numCells,
const int& numPropertiesInCell);
void FillCellProperties(double *buffer,const LSDynaMetaData::LSDYNA_TYPES& type,
const vtkIdType& startId, const vtkIdType& numCells,
const int& numPropertiesInCell);
//Description:
//Adds User Ids for all parts of a certain type
void ReadCellUserIds(
const LSDynaMetaData::LSDYNA_TYPES& type, const int& status);
template<typename T>
void FillCellUserId(T *buffer,const LSDynaMetaData::LSDYNA_TYPES& type,
const vtkIdType& startId, const vtkIdType& numCells)
{
this->FillCellUserIdArray(buffer,type,startId,numCells);
}
protected:
vtkLSDynaPartCollection();
~vtkLSDynaPartCollection();
vtkIdType* MinIds;
vtkIdType* MaxIds;
//Builds up the basic meta information needed for topology storage
void BuildPartInfo();
//Description:
//Breaks down the buffer of cell properties to the cell properties we
//are interested in. This will remove all properties that aren't active or
//for parts we are not loading
template<typename T>
void FillCellArray(T *buffer,const LSDynaMetaData::LSDYNA_TYPES& type,
const vtkIdType& startId, vtkIdType numCells, const int& numTuples);
template<typename T>
void FillCellUserIdArray(T *buffer,const LSDynaMetaData::LSDYNA_TYPES& type,
const vtkIdType& startId, vtkIdType numCells);
//Description:
//Methods for adding points to the collection
void SetupPointPropertyForReading(
const vtkIdType& numTuples,
const vtkIdType& numComps,
const char* name,
const bool& isIdType,
const bool& isProperty,
const bool& isGeometryPoints,
const bool& isRoadPoints);
template<typename T>
void FillPointProperty(const vtkIdType& numTuples,
const vtkIdType& numComps,
vtkLSDynaPart** parts, const vtkIdType numParts);
private:
vtkLSDynaPartCollection( const vtkLSDynaPartCollection& ); // Not implemented.
void operator = ( const vtkLSDynaPartCollection& ); // Not implemented.
LSDynaMetaData *MetaData;
class LSDynaPartStorage;
LSDynaPartStorage* Storage;
};
#endif // LSDYNAPARTS_H
|