vtkbone
vtkboneN88ModelWriter.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Copyright 2010-2016, Numerics88 Solutions Ltd.
4  http://www.numerics88.com/
5 
6  Copyright (c) Eric Nodwell and Steven K. Boyd
7  See Copyright.txt for details.
8 
9  This software is distributed WITHOUT ANY WARRANTY; without even
10  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11  PURPOSE. See the above copyright notice for more information.
12 =========================================================================*/
13 
31 #ifndef __vtkboneN88ModelWriter_h
32 #define __vtkboneN88ModelWriter_h
33 
34 #include "vtkWriter.h"
35 #include "vtkboneWin32Header.h"
36 #include <set>
37 
38 // Forward declarations
39 class vtkPoints;
41 class vtkDoubleArray;
42 class vtkIdList;
43 class vtkIdTypeArray;
44 class vtkCharArray;
46 class vtkboneConstraint;
48 
50 {
51 public:
52  static vtkboneN88ModelWriter *New();
53  vtkTypeMacro(vtkboneN88ModelWriter, vtkWriter);
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57 
58  vtkSetStringMacro(FileName);
59  vtkGetStringMacro(FileName);
61 
63 
64  vtkSetMacro(Compression, int);
65  vtkGetMacro(Compression, int);
66  vtkBooleanMacro(Compression, int);
68 
69 protected:
72 
73  void WriteData();
74 
76 
77  int DefineNetCDFFile(int ncid, vtkboneFiniteElementModel* model);
78  int DefineMaterialDefinitions(int ncid, vtkboneFiniteElementModel* model);
79  int DefinePart(int ncid, vtkboneFiniteElementModel* model);
80  int DefineMaterialTable(int ncid, vtkboneFiniteElementModel* model);
81  int DefineConstraints(int ncid, vtkboneFiniteElementModel* model);
82  int DefineConstraint(int constraint_ncid, vtkboneConstraint* constraint, vtkboneFiniteElementModel *model);
83  int DefineProblem(int ncid, vtkboneFiniteElementModel* model);
84  int DefineSets(int ncid, vtkboneFiniteElementModel* model);
85  int DefineSolution(int ncid, vtkboneFiniteElementModel* model);
86  int WriteDataToNetCDFFile(int ncid, vtkboneFiniteElementModel* model);
87  int WriteMaterialDefinitions(int ncid, vtkboneFiniteElementModel* model);
88  int WriteNodes(int ncid, vtkboneFiniteElementModel* model);
89  int WriteMaterialTable(int ncid, vtkboneFiniteElementModel* model);
90  int WriteElements(int ncid, vtkboneFiniteElementModel* model);
91  int WriteConstraints(int ncid, vtkboneFiniteElementModel* model);
92  int WriteConstraint(int constraints_ncid,vtkboneConstraint* constraint,vtkboneFiniteElementModel* model);
93  int WriteSets(int ncid, vtkboneFiniteElementModel* model);
94  int WriteSolution(int ncid, vtkboneFiniteElementModel* model);
95 
96  //BTX
97  int GetSolutionArrayNames(vtkDataSetAttributes* fieldData, std::set<std::string>& names);
98  int GetNeededGaussPointGroups(vtkboneFiniteElementModel *model, std::set<size_t>& nGaussPoints);
99  //ETX
100  int WriteVTKDataArrayToNetCDF(int ncid, int varid, vtkDataArray* data);
101  int WriteVTKDataArrayToNetCDF(int ncid, int varid, vtkDataArray* data, size_t dim1);
102  int WriteVTKDataArrayToNetCDFOneIndexed(int ncid, int varid, vtkDataArray* data);
103  int SetChunking (int ncid, int varid);
104 
105  char* FileName;
107 
108 private:
109  vtkboneN88ModelWriter(const vtkboneN88ModelWriter&); // Not implemented
110  void operator=(const vtkboneN88ModelWriter&); // Not implemented
111 };
112 
113 #endif
114 
data model for finite element meshes
data
#define VTKBONE_EXPORT
info
a constraint for a finite element mesh
virtual int FillInputPortInformation(int port, vtkInformation *info)
static vtkAlgorithm * New()
virtual void WriteData()=0
writes an n88model file.
port
void operator=(const vtkObjectBase &)
void PrintSelf(ostream &os, vtkIndent indent)