VTK
dox/IO/vtkLSDynaReader.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    vtkLSDynaReader.h
00005 
00006   Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
00007   All rights reserved.
00008   See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
00009 
00010      This software is distributed WITHOUT ANY WARRANTY; without even
00011      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00012      PURPOSE.  See the above copyright notice for more information.
00013 
00014 =========================================================================*/
00015 /*----------------------------------------------------------------------------
00016  Copyright (c) Sandia Corporation
00017  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html for details.
00018 ----------------------------------------------------------------------------*/
00019 
00153 #ifndef __vtkLSDynaReader_h
00154 #define __vtkLSDynaReader_h
00155 
00156 #include "vtkMultiBlockDataSetAlgorithm.h"
00157 
00158 class LSDynaMetaData;
00159 class vtkLSDynaPartCollection;
00160 class vtkPoints;
00161 class vtkDataArray;
00162 class vtkUnsignedCharArray;
00163 class vtkUnstructuredGrid;
00164 
00165 class VTK_IO_EXPORT vtkLSDynaReader : public vtkMultiBlockDataSetAlgorithm
00166 {
00167 public:
00168   vtkTypeMacro(vtkLSDynaReader,vtkMultiBlockDataSetAlgorithm);
00169   virtual void PrintSelf(ostream &os, vtkIndent indent);
00170   static vtkLSDynaReader *New();
00171 
00174   void Dump( ostream &os );
00175 
00178   void DebugDump();
00179 
00181   virtual int CanReadFile( const char* fname );
00182 
00184 
00186   virtual void SetDatabaseDirectory( const char* );
00187   const char* GetDatabaseDirectory();
00188   int IsDatabaseValid();
00190 
00192 
00196   virtual void SetFileName( const char* );
00197   const char* GetFileName();
00199 
00204   char* GetTitle();
00205 
00209   int GetDimensionality();
00210 
00214   vtkIdType GetNumberOfNodes();
00215 
00220   vtkIdType GetNumberOfCells();
00221 
00228   vtkIdType GetNumberOfContinuumCells();
00229 
00233   vtkIdType GetNumberOfSolidCells();
00234 
00238   vtkIdType GetNumberOfThickShellCells();
00239 
00243   vtkIdType GetNumberOfShellCells();
00244 
00248   vtkIdType GetNumberOfRigidBodyCells();
00249 
00253   vtkIdType GetNumberOfRoadSurfaceCells();
00254 
00258   vtkIdType GetNumberOfBeamCells();
00259 
00263   vtkIdType GetNumberOfParticleCells();
00264 
00266 
00269   vtkIdType GetNumberOfTimeSteps();
00270   virtual void SetTimeStep( vtkIdType );
00271   vtkIdType GetTimeStep();
00272   double GetTimeValue( vtkIdType );
00273   vtkGetVector2Macro(TimeStepRange,int);
00274   vtkSetVector2Macro(TimeStepRange,int);
00276 
00278 
00280   int GetNumberOfPointArrays();
00281   const char* GetPointArrayName(int);
00282   virtual void SetPointArrayStatus( int arr, int status );
00283   virtual void SetPointArrayStatus( const char* arrName, int status );
00284   int GetPointArrayStatus( int arr );
00285   int GetPointArrayStatus( const char* arrName );
00286   int GetNumberOfComponentsInPointArray( int arr );
00287   int GetNumberOfComponentsInPointArray( const char* arrName );
00289 
00291 
00295   int GetNumberOfCellArrays( int cellType );
00296   const char* GetCellArrayName( int cellType, int arr );
00297   virtual void SetCellArrayStatus( int cellType, int arr, int status );
00298   virtual void SetCellArrayStatus( int cellType, const char* arrName, int status );
00299   int GetCellArrayStatus( int cellType, int arr );
00300   int GetCellArrayStatus( int cellType, const char* arrName );
00301   int GetNumberOfComponentsInCellArray( int cellType, int arr );
00302   int GetNumberOfComponentsInCellArray( int cellType, const char* arrName );
00304 
00306 
00308   int GetNumberOfSolidArrays();
00309   const char* GetSolidArrayName(int);
00310   virtual void SetSolidArrayStatus( int arr, int status );
00311   virtual void SetSolidArrayStatus( const char* arrName, int status );
00312   int GetSolidArrayStatus( int arr );
00313   int GetSolidArrayStatus( const char* arrName );
00315 
00316   int GetNumberOfComponentsInSolidArray( int a );
00317   int GetNumberOfComponentsInSolidArray( const char* arrName );
00318 
00320 
00322   int GetNumberOfThickShellArrays();
00323   const char* GetThickShellArrayName(int);
00324   virtual void SetThickShellArrayStatus( int arr, int status );
00325   virtual void SetThickShellArrayStatus( const char* arrName, int status );
00326   int GetThickShellArrayStatus( int arr );
00327   int GetThickShellArrayStatus( const char* arrName );
00329 
00330   int GetNumberOfComponentsInThickShellArray( int a );
00331   int GetNumberOfComponentsInThickShellArray( const char* arrName );
00332 
00334 
00336   int GetNumberOfShellArrays();
00337   const char* GetShellArrayName(int);
00338   virtual void SetShellArrayStatus( int arr, int status );
00339   virtual void SetShellArrayStatus( const char* arrName, int status );
00340   int GetShellArrayStatus( int arr );
00341   int GetShellArrayStatus( const char* arrName );
00343 
00344   int GetNumberOfComponentsInShellArray( int a );
00345   int GetNumberOfComponentsInShellArray( const char* arrName );
00346 
00348 
00350   int GetNumberOfRigidBodyArrays();
00351   const char* GetRigidBodyArrayName(int);
00352   virtual void SetRigidBodyArrayStatus( int arr, int status );
00353   virtual void SetRigidBodyArrayStatus( const char* arrName, int status );
00354   int GetRigidBodyArrayStatus( int arr );
00355   int GetRigidBodyArrayStatus( const char* arrName );
00357 
00358   int GetNumberOfComponentsInRigidBodyArray( int a );
00359   int GetNumberOfComponentsInRigidBodyArray( const char* arrName );
00360 
00362 
00364   int GetNumberOfRoadSurfaceArrays();
00365   const char* GetRoadSurfaceArrayName(int);
00366   virtual void SetRoadSurfaceArrayStatus( int arr, int status );
00367   virtual void SetRoadSurfaceArrayStatus( const char* arrName, int status );
00368   int GetRoadSurfaceArrayStatus( int arr );
00369   int GetRoadSurfaceArrayStatus( const char* arrName );
00371 
00372   int GetNumberOfComponentsInRoadSurfaceArray( int a );
00373   int GetNumberOfComponentsInRoadSurfaceArray( const char* arrName );
00374 
00376 
00378   int GetNumberOfBeamArrays();
00379   const char* GetBeamArrayName(int);
00380   virtual void SetBeamArrayStatus( int arr, int status );
00381   virtual void SetBeamArrayStatus( const char* arrName, int status );
00382   int GetBeamArrayStatus( int arr );
00383   int GetBeamArrayStatus( const char* arrName );
00385 
00386   int GetNumberOfComponentsInBeamArray( int a );
00387   int GetNumberOfComponentsInBeamArray( const char* arrName );
00388 
00390 
00392   int GetNumberOfParticleArrays();
00393   const char* GetParticleArrayName(int);
00394   virtual void SetParticleArrayStatus( int arr, int status );
00395   virtual void SetParticleArrayStatus( const char* arrName, int status );
00396   int GetParticleArrayStatus( int arr );
00397   int GetParticleArrayStatus( const char* arrName );
00399 
00400   int GetNumberOfComponentsInParticleArray( int a );
00401   int GetNumberOfComponentsInParticleArray( const char* arrName );
00402 
00404 
00407   void SetDeformedMesh(int);
00408   vtkGetMacro(DeformedMesh,int);
00409   vtkBooleanMacro(DeformedMesh,int);
00411 
00413 
00421   vtkSetMacro(RemoveDeletedCells,int);
00422   vtkGetMacro(RemoveDeletedCells,int);
00423   vtkBooleanMacro(RemoveDeletedCells,int);
00425 
00427 
00429   vtkSetMacro(DeletedCellsAsGhostArray,int);
00430   vtkGetMacro(DeletedCellsAsGhostArray,int);
00431   vtkBooleanMacro(DeletedCellsAsGhostArray,int);
00433 
00435 
00444   vtkSetStringMacro(InputDeck);
00445   vtkGetStringMacro(InputDeck);
00447 
00449 
00457   int GetNumberOfPartArrays();
00458   const char* GetPartArrayName(int);
00459   virtual void SetPartArrayStatus( int arr, int status );
00460   virtual void SetPartArrayStatus( const char* partName, int status );
00461   int GetPartArrayStatus( int arr );
00462   int GetPartArrayStatus( const char* partName );
00464 
00465 protected:
00466   //holds all the parts and all the properties for each part
00467   vtkLSDynaPartCollection* Parts;
00468 
00471   int DeformedMesh;
00472 
00474 
00476   int RemoveDeletedCells;
00477   int DeletedCellsAsGhostArray;
00479 
00482   int TimeStepRange[2];
00483 
00485   char* InputDeck;
00486 
00487   vtkLSDynaReader();
00488   virtual ~vtkLSDynaReader();
00489 
00496   int ReadHeaderInformation( int currentAdaptLevel );
00497 
00505   int ScanDatabaseTimeSteps();
00506 
00507   virtual int RequestInformation( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00508   virtual int RequestData( vtkInformation*, vtkInformationVector**, vtkInformationVector* );
00509 
00511 
00517   virtual int ReadTopology();
00518   virtual int ReadNodes();
00519   virtual int ReadPartSizes();
00520   virtual int ReadConnectivityAndMaterial();
00521   virtual int ReadUserIds();
00522   virtual int ReadState( vtkIdType );
00523   virtual int ReadNodeStateInfo( vtkIdType );
00524   virtual int ReadCellStateInfo( vtkIdType );
00525   virtual int ReadDeletion();
00526   virtual int ReadSPHState( vtkIdType );
00528 
00530   virtual void ResetPartInfo();
00531 
00534   virtual int ReadInputDeck();
00535 
00538   virtual int ReadPartTitlesFromRootFile();
00539 
00543   virtual int ReadUserMaterialIds();
00544 
00546 
00548   int ReadInputDeckXML( ifstream& deck );
00549   int ReadInputDeckKeywords( ifstream& deck );
00551 
00554   int WriteInputDeckSummary( const char* fname );
00555 
00563   virtual void ReadDeletionArray(vtkUnsignedCharArray* arr, const int& pos, const int& size);
00564 
00566   virtual void ReadCellProperties(const int& type,const int& numTuples);
00567   
00568   LSDynaMetaData* P;
00569 
00570   void ResetPartsCache();
00571 private:
00572 
00573   //Helper templated methods to optimze reading. We cast the entire buffer
00574   //to a given type instead of casting each element to improve performance
00575   template<typename T>
00576   void FillDeletionArray(T* buffer, vtkUnsignedCharArray* arr, const vtkIdType& start, const vtkIdType& numCells,
00577                          const int& deathPos, const int& cellSize);
00578 
00579   template<int wordSize, typename T>
00580   int FillTopology(T* buffer);
00581 
00582   template<typename T, int blockType, vtkIdType numWordsPerCell, vtkIdType cellLength>
00583   void ReadBlockCellSizes();
00584 
00585   template<typename T>
00586   int FillPartSizes();
00587 
00588   vtkLSDynaReader( const vtkLSDynaReader& ); // Not implemented.
00589   void operator = ( const vtkLSDynaReader& ); // Not implemented.
00590 };
00591 
00592 inline void vtkLSDynaReader::SetPointArrayStatus( const char* arrName, int status )
00593 {
00594   for ( int a=0; a<this->GetNumberOfPointArrays(); ++a )
00595     {
00596     if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
00597       {
00598       this->SetPointArrayStatus( a, status );
00599       return;
00600       }
00601     }
00602   vtkWarningMacro( "Point array \"" << arrName << "\" does not exist" );
00603 }
00604 
00605 inline int vtkLSDynaReader::GetPointArrayStatus( const char* arrName )
00606 {
00607   for ( int a=0; a<this->GetNumberOfPointArrays(); ++a )
00608     {
00609     if ( strcmp( arrName, this->GetPointArrayName(a) ) == 0 )
00610       {
00611       return this->GetPointArrayStatus( a );
00612       }
00613     }
00614   //vtkWarningMacro( "Point array \"" << arrName << "\" does not exist" );
00615   return 0;
00616 }
00617 
00618 inline int vtkLSDynaReader::GetNumberOfComponentsInPointArray( const char* arrName )
00619 {
00620   for ( int a=0; a<this->GetNumberOfPointArrays(); ++a )
00621     {
00622     if ( strcmp( arrName, this->GetPointArrayName( a ) ) == 0 )
00623       {
00624       return this->GetNumberOfComponentsInPointArray( a );
00625       }
00626     }
00627   //vtkWarningMacro( "Point array \"" << arrName << "\" does not exist" );
00628   return 0;
00629 }
00630 
00631 inline void vtkLSDynaReader::SetCellArrayStatus( int cellType, const char* arrName, int status )
00632 {
00633   for ( int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
00634     {
00635     if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
00636       {
00637       this->SetCellArrayStatus( cellType, a, status );
00638       return;
00639       }
00640     }
00641   vtkWarningMacro( "Cell array \"" << arrName << "\" (type " << cellType << ") does not exist" );
00642 }
00643 
00644 inline int vtkLSDynaReader::GetCellArrayStatus( int cellType, const char* arrName )
00645 {
00646   for ( int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
00647     {
00648     if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
00649       {
00650       return this->GetCellArrayStatus( cellType, a );
00651       }
00652     }
00653   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00654   return 0;
00655 }
00656 
00657 inline int vtkLSDynaReader::GetNumberOfComponentsInCellArray( int cellType, const char* arrName )
00658 {
00659   for ( int a=0; a<this->GetNumberOfCellArrays( cellType ); ++a )
00660     {
00661     if ( strcmp( arrName, this->GetCellArrayName( cellType, a ) ) == 0 )
00662       {
00663      return this->GetNumberOfComponentsInCellArray( cellType, a );
00664       }
00665     }
00666   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00667   return 0;
00668 }
00669 
00670 inline void vtkLSDynaReader::SetSolidArrayStatus( const char* arrName, int status )
00671 {
00672   for ( int a=0; a<this->GetNumberOfSolidArrays(); ++a )
00673     {
00674     if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
00675       {
00676       this->SetSolidArrayStatus( a, status );
00677       return;
00678       }
00679     }
00680   vtkWarningMacro( "Solid array \"" << arrName << "\" does not exist" );
00681 }
00682 
00683 inline int vtkLSDynaReader::GetSolidArrayStatus( const char* arrName )
00684 {
00685   for ( int a=0; a<this->GetNumberOfSolidArrays(); ++a )
00686     {
00687     if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
00688       {
00689       return this->GetSolidArrayStatus( a );
00690       }
00691     }
00692   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00693   return 0;
00694 }
00695 
00696 inline int vtkLSDynaReader::GetNumberOfComponentsInSolidArray( const char* arrName )
00697 {
00698   for ( int a=0; a<this->GetNumberOfSolidArrays(); ++a )
00699     {
00700     if ( strcmp( arrName, this->GetSolidArrayName(a) ) == 0 )
00701       {
00702      return this->GetNumberOfComponentsInSolidArray( a );
00703       }
00704     }
00705   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00706   return 0;
00707 }
00708 
00709 inline void vtkLSDynaReader::SetThickShellArrayStatus( const char* arrName, int status )
00710 {
00711   for ( int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
00712     {
00713     if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
00714       {
00715       this->SetThickShellArrayStatus( a, status );
00716       return;
00717       }
00718     }
00719   vtkWarningMacro( "Thick shell array \"" << arrName << "\" does not exist" );
00720 }
00721 
00722 inline int vtkLSDynaReader::GetThickShellArrayStatus( const char* arrName )
00723 {
00724   for ( int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
00725     {
00726     if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
00727       {
00728       return this->GetThickShellArrayStatus( a );
00729       }
00730     }
00731   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00732   return 0;
00733 }
00734 
00735 inline int vtkLSDynaReader::GetNumberOfComponentsInThickShellArray( const char* arrName )
00736 {
00737   for ( int a=0; a<this->GetNumberOfThickShellArrays(); ++a )
00738     {
00739     if ( strcmp( arrName, this->GetThickShellArrayName(a) ) == 0 )
00740       {
00741      return this->GetNumberOfComponentsInThickShellArray( a );
00742       }
00743     }
00744   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00745   return 0;
00746 }
00747 
00748 inline void vtkLSDynaReader::SetShellArrayStatus( const char* arrName, int status )
00749 {
00750   for ( int a=0; a<this->GetNumberOfShellArrays(); ++a )
00751     {
00752     if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
00753       {
00754       this->SetShellArrayStatus( a, status );
00755       return;
00756       }
00757     }
00758   vtkWarningMacro( "Shell array \"" << arrName << "\" does not exist" );
00759 }
00760 
00761 inline int vtkLSDynaReader::GetShellArrayStatus( const char* arrName )
00762 {
00763   for ( int a=0; a<this->GetNumberOfShellArrays(); ++a )
00764     {
00765     if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
00766       {
00767       return this->GetShellArrayStatus( a );
00768       }
00769     }
00770   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00771   return 0;
00772 }
00773 
00774 inline int vtkLSDynaReader::GetNumberOfComponentsInShellArray( const char* arrName )
00775 {
00776   for ( int a=0; a<this->GetNumberOfShellArrays(); ++a )
00777     {
00778     if ( strcmp( arrName, this->GetShellArrayName(a) ) == 0 )
00779       {
00780      return this->GetNumberOfComponentsInShellArray( a );
00781       }
00782     }
00783   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00784   return 0;
00785 }
00786 
00787 inline void vtkLSDynaReader::SetBeamArrayStatus( const char* arrName, int status )
00788 {
00789   for ( int a=0; a<this->GetNumberOfBeamArrays(); ++a )
00790     {
00791     if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
00792       {
00793       this->SetBeamArrayStatus( a, status );
00794       return;
00795       }
00796     }
00797   vtkWarningMacro( "Beam array \"" << arrName << "\" does not exist" );
00798 }
00799 
00800 inline int vtkLSDynaReader::GetBeamArrayStatus( const char* arrName )
00801 {
00802   for ( int a=0; a<this->GetNumberOfBeamArrays(); ++a )
00803     {
00804     if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
00805       {
00806       return this->GetBeamArrayStatus( a );
00807       }
00808     }
00809   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00810   return 0;
00811 }
00812 
00813 inline int vtkLSDynaReader::GetNumberOfComponentsInBeamArray( const char* arrName )
00814 {
00815   for ( int a=0; a<this->GetNumberOfBeamArrays(); ++a )
00816     {
00817     if ( strcmp( arrName, this->GetBeamArrayName(a) ) == 0 )
00818       {
00819      return this->GetNumberOfComponentsInBeamArray( a );
00820       }
00821     }
00822   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00823   return 0;
00824 }
00825 
00826 inline void vtkLSDynaReader::SetParticleArrayStatus( const char* arrName, int status )
00827 {
00828   for ( int a=0; a<this->GetNumberOfParticleArrays(); ++a )
00829     {
00830     if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
00831       {
00832       this->SetParticleArrayStatus( a, status );
00833       return;
00834       }
00835     }
00836   vtkWarningMacro( "Particle array \"" << arrName << "\" does not exist" );
00837 }
00838 
00839 inline int vtkLSDynaReader::GetParticleArrayStatus( const char* arrName )
00840 {
00841   for ( int a=0; a<this->GetNumberOfParticleArrays(); ++a )
00842     {
00843     if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
00844       {
00845       return this->GetParticleArrayStatus( a );
00846       }
00847     }
00848   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00849   return 0;
00850 }
00851 
00852 inline int vtkLSDynaReader::GetNumberOfComponentsInParticleArray( const char* arrName )
00853 {
00854   for ( int a=0; a<this->GetNumberOfParticleArrays(); ++a )
00855     {
00856     if ( strcmp( arrName, this->GetParticleArrayName(a) ) == 0 )
00857       {
00858      return this->GetNumberOfComponentsInParticleArray( a );
00859       }
00860     }
00861   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00862   return 0;
00863 }
00864 
00865 inline void vtkLSDynaReader::SetRigidBodyArrayStatus( const char* arrName, int status )
00866 {
00867   for ( int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
00868     {
00869     if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
00870       {
00871       this->SetRigidBodyArrayStatus( a, status );
00872       return;
00873       }
00874     }
00875   vtkWarningMacro( "Rigid body array \"" << arrName << "\" does not exist" );
00876 }
00877 
00878 inline int vtkLSDynaReader::GetRigidBodyArrayStatus( const char* arrName )
00879 {
00880   for ( int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
00881     {
00882     if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
00883       {
00884       return this->GetRigidBodyArrayStatus( a );
00885       }
00886     }
00887   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00888   return 0;
00889 }
00890 
00891 inline int vtkLSDynaReader::GetNumberOfComponentsInRigidBodyArray( const char* arrName )
00892 {
00893   for ( int a=0; a<this->GetNumberOfRigidBodyArrays(); ++a )
00894     {
00895     if ( strcmp( arrName, this->GetRigidBodyArrayName(a) ) == 0 )
00896       {
00897      return this->GetNumberOfComponentsInRigidBodyArray( a );
00898       }
00899     }
00900   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00901   return 0;
00902 }
00903 
00904 inline void vtkLSDynaReader::SetRoadSurfaceArrayStatus( const char* arrName, int status )
00905 {
00906   for ( int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
00907     {
00908     if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
00909       {
00910       this->SetRoadSurfaceArrayStatus( a, status );
00911       return;
00912       }
00913     }
00914   vtkWarningMacro( "Road surface array \"" << arrName << "\" does not exist" );
00915 }
00916 
00917 inline int vtkLSDynaReader::GetRoadSurfaceArrayStatus( const char* arrName )
00918 {
00919   for ( int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
00920     {
00921     if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
00922       {
00923       return this->GetRoadSurfaceArrayStatus( a );
00924       }
00925     }
00926   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00927   return 0;
00928 }
00929 
00930 inline int vtkLSDynaReader::GetNumberOfComponentsInRoadSurfaceArray( const char* arrName )
00931 {
00932   for ( int a=0; a<this->GetNumberOfRoadSurfaceArrays(); ++a )
00933     {
00934     if ( strcmp( arrName, this->GetRoadSurfaceArrayName(a) ) == 0 )
00935       {
00936      return this->GetNumberOfComponentsInRoadSurfaceArray( a );
00937       }
00938     }
00939   //vtkWarningMacro( "Cell array \"" << arrName << "\" does not exist" );
00940   return 0;
00941 }
00942 
00943 inline void vtkLSDynaReader::SetPartArrayStatus( const char* arrName, int status )
00944 {
00945   for ( int a=0; a<this->GetNumberOfPartArrays(); ++a )
00946     {
00947     if ( strcmp( arrName, this->GetPartArrayName(a) ) == 0 )
00948       {
00949       this->SetPartArrayStatus( a, status );
00950       return;
00951       }
00952     }
00953   vtkWarningMacro( "Part \"" << arrName << "\" does not exist" );
00954 }
00955 
00956 inline int vtkLSDynaReader::GetPartArrayStatus( const char* partName )
00957 {
00958   for ( int a=0; a<this->GetNumberOfPartArrays(); ++a )
00959     {
00960     if ( strcmp( partName, this->GetPartArrayName(a) ) == 0 )
00961       {
00962       return this->GetPartArrayStatus( a );
00963       }
00964     }
00965   //vtkWarningMacro( "PartArray \"" << partName << "\" does not exist" );
00966   return 0;
00967 }
00968 
00969 #endif // __vtkLSDynaReader_h