1 // Copyright (C) 2021 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 /*=========================================================================
22 Program: Visualization Toolkit
23 Module: $RCSfile: vtkSerafinReader.h,v $
25 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
27 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
29 This software is distributed WITHOUT ANY WARRANTY; without even
30 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
31 PURPOSE. See the above copyright notice for more information.
33 =========================================================================*/
35 ////// Reader for files generated by The TELEMAC modelling system \\\\\
36 // Module developped by herve ozdoba - Sept 2008 ( herve-externe.ozdoba at edf.fr / herve at ozdoba.fr )
37 // Please address all comments to Regina Nebauer ( regina.nebauer at edf.fr )
40 #ifndef __vtkSerafinReader_h__
41 #define __vtkSerafinReader_h__
43 /** -- Inclusions issues de la bibliotheque standard du C++ -- */
53 /** -- Inclusion des entetes de la bibliotheque vtk -- **/
55 #include "vtkUnstructuredGridAlgorithm.h"
57 #include "vtkStringArray.h"
60 #include "stdSerafinReader.h"
62 #include "vtkIntArray.h"
63 #include "vtkFloatArray.h"
64 #include "vtkStdString.h"
65 #include "vtkDoubleArray.h"
66 #include "vtkIntArray.h"
67 #include "vtkCellArray.h"
70 /** ********************************************************************************************* **/
71 /** -- Definition de la classe de lecture des fichiers externes au format Serafin pour Telemac -- **/
72 /** ********************************************************************************************* **/
74 class VTK_EXPORT vtkSerafinReader : public vtkUnstructuredGridAlgorithm
78 static vtkSerafinReader *New();
80 vtkTypeMacro(vtkSerafinReader,vtkUnstructuredGridAlgorithm);
81 void PrintSelf(ostream& os, vtkIndent indent);
83 void SetTimeUnit(int);
85 vtkSetStringMacro(FileName);
86 vtkGetStringMacro(FileName);
88 vtkSetMacro(TimeStep, int);
89 vtkGetMacro(TimeStep, int);
93 // Implementation du constructeur associe a la classe
96 // Implementation du descructeur
99 int RequestInformation (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
100 int RequestData (vtkInformation *, vtkInformationVector **, vtkInformationVector *);
102 // Lecture de la geometrie du maillage
103 void ReadGeometry (vtkUnstructuredGrid *output, int time);
105 // Lecture des donnees de la simulation au niveau des noeuds et des cellules.
106 void ReadData (vtkUnstructuredGrid *output, int time);
108 char *FileName; // Nom du fichier ouvert par le logiciel Paraview
109 ifstream *FileStream;// Flux de lecture du fichier
113 stdSerafinReader* Reader; /** /!\ Instance de lecture du fichier Serafin **/
116 vtkInternal *Internal;
119 vtkSerafinReader(const vtkSerafinReader&); // Pas implemente
120 void operator=(const vtkSerafinReader&); // Pas implemente
122 }; /* class_vtkSerafinReader */