VTK
vtkYoungsMaterialInterface.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkYoungsMaterialInterface.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
40 #ifndef vtkYoungsMaterialInterface_h
41 #define vtkYoungsMaterialInterface_h
42 
43 #include "vtkFiltersGeneralModule.h" // For export macro
45 
46 #include "vtkSmartPointer.h" // For SP ivars
47 
48 class vtkIntArray;
49 class vtkInformation;
51 class vtkYoungsMaterialInterfaceInternals;
52 
53 class VTKFILTERSGENERAL_EXPORT vtkYoungsMaterialInterface : public vtkMultiBlockDataSetAlgorithm
54 {
55 public:
58  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
61 
64  vtkSetMacro(InverseNormal,vtkTypeBool);
65  vtkGetMacro(InverseNormal,vtkTypeBool);
66  vtkBooleanMacro(InverseNormal,vtkTypeBool);
68 
70 
74  vtkSetMacro(ReverseMaterialOrder,vtkTypeBool);
75  vtkGetMacro(ReverseMaterialOrder,vtkTypeBool);
76  vtkBooleanMacro(ReverseMaterialOrder,vtkTypeBool);
78 
80 
84  vtkSetMacro(OnionPeel,vtkTypeBool);
85  vtkGetMacro(OnionPeel,vtkTypeBool);
86  vtkBooleanMacro(OnionPeel,vtkTypeBool);
88 
90 
94  vtkSetMacro(AxisSymetric,vtkTypeBool);
95  vtkGetMacro(AxisSymetric,vtkTypeBool);
96  vtkBooleanMacro(AxisSymetric,vtkTypeBool);
98 
100 
105  vtkSetMacro(UseFractionAsDistance,vtkTypeBool);
106  vtkGetMacro(UseFractionAsDistance,vtkTypeBool);
107  vtkBooleanMacro(UseFractionAsDistance,vtkTypeBool);
109 
111 
114  vtkSetMacro(FillMaterial,vtkTypeBool);
115  vtkGetMacro(FillMaterial,vtkTypeBool);
116  vtkBooleanMacro(FillMaterial,vtkTypeBool);
118 
120 
123  vtkSetVector2Macro(VolumeFractionRange,double);
124  vtkGetVectorMacro(VolumeFractionRange,double,2);
126 
128 
131  virtual void SetNumberOfMaterials(int n);
132  virtual int GetNumberOfMaterials();
134 
136 
139  vtkSetMacro(UseAllBlocks,bool);
140  vtkGetMacro(UseAllBlocks,bool);
141  vtkBooleanMacro(UseAllBlocks,bool);
143 
145 
148  vtkGetMacro(NumberOfDomains,int);
150 
152 
155  virtual void SetMaterialArrays( int i, const char* volume, const char* normalX, const char* normalY, const char* normalZ, const char* ordering );
156  virtual void SetMaterialArrays( int i, const char* volume, const char* normal, const char* ordering );
157  virtual void SetMaterialVolumeFractionArray( int i, const char* volume );
158  virtual void SetMaterialNormalArray( int i, const char* normal );
159  virtual void SetMaterialOrderingArray( int i, const char* ordering );
161 
165  virtual void RemoveAllMaterials();
166 
168 
176  virtual void SetMaterialNormalArray(const char* volume, const char* normal);
177  virtual void SetMaterialOrderingArray(const char* volume, const char* ordering);
179 
181 
184  virtual void RemoveAllMaterialBlockMappings();
185  virtual void AddMaterialBlockMapping(int b);
187 
188  enum
189  {
190  MAX_CELL_POINTS=256
191  };
192 
193 protected:
195  ~vtkYoungsMaterialInterface () override;
196 
197  int FillInputPortInformation(int port, vtkInformation *info) override;
198  int RequestData(vtkInformation *request,
199  vtkInformationVector **inputVector,
200  vtkInformationVector *outputVector) override;
201 
205  virtual void Aggregate ( int, int* );
206 
207  void UpdateBlockMapping();
208 
209  int CellProduceInterface( int dim, int np, double fraction, double minFrac, double maxFrac );
210 
212 
221  double VolumeFractionRange[2];
223 
225 
227 
232 
233  // Description:
234  // Internal data structures
235  vtkYoungsMaterialInterfaceInternals* Internals;
236 
237 private:
239  void operator=(const vtkYoungsMaterialInterface&) = delete;
240 };
241 
242 #endif /* VTK_YOUNGS_MATERIAL_INTERFACE_H */
243 
vtkYoungsMaterialInterface::OnionPeel
vtkTypeBool OnionPeel
Definition: vtkYoungsMaterialInterface.h:218
vtkYoungsMaterialInterface
reconstructs material interfaces
Definition: vtkYoungsMaterialInterface.h:53
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:41
vtkYoungsMaterialInterface::AxisSymetric
vtkTypeBool AxisSymetric
Definition: vtkYoungsMaterialInterface.h:217
vtkSmartPointer< vtkIntArray >
vtkMultiBlockDataSetAlgorithm::New
static vtkMultiBlockDataSetAlgorithm * New()
vtkYoungsMaterialInterface::MaterialBlockMapping
vtkSmartPointer< vtkIntArray > MaterialBlockMapping
Definition: vtkYoungsMaterialInterface.h:224
vtkMultiBlockDataSetAlgorithm::RequestData
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called by the superclass.
Definition: vtkMultiBlockDataSetAlgorithm.h:91
vtkX3D::port
Definition: vtkX3D.h:447
vtkYoungsMaterialInterface::Internals
vtkYoungsMaterialInterfaceInternals * Internals
Definition: vtkYoungsMaterialInterface.h:235
vtkYoungsMaterialInterface::NumberOfDomains
int NumberOfDomains
Read only properties.
Definition: vtkYoungsMaterialInterface.h:231
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkIntArray
dynamic, self-adjusting array of int
Definition: vtkIntArray.h:45
vtkYoungsMaterialInterface::FillMaterial
vtkTypeBool FillMaterial
Read-Write Properties.
Definition: vtkYoungsMaterialInterface.h:215
vtkSmartPointer.h
vtkMultiBlockDataSetAlgorithm.h
vtkYoungsMaterialInterface::ReverseMaterialOrder
vtkTypeBool ReverseMaterialOrder
Definition: vtkYoungsMaterialInterface.h:219
vtkYoungsMaterialInterface::InverseNormal
vtkTypeBool InverseNormal
Definition: vtkYoungsMaterialInterface.h:216
vtkMultiBlockDataSetAlgorithm::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:86
vtkX3D::info
Definition: vtkX3D.h:376
vtkYoungsMaterialInterface::UseAllBlocks
bool UseAllBlocks
Definition: vtkYoungsMaterialInterface.h:226
vtkMultiBlockDataSetAlgorithm::FillInputPortInformation
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
vtkYoungsMaterialInterface::UseFractionAsDistance
vtkTypeBool UseFractionAsDistance
Definition: vtkYoungsMaterialInterface.h:220
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkMultiBlockDataSetAlgorithm
Superclass for algorithms that produce only vtkMultiBlockDataSet as output.
Definition: vtkMultiBlockDataSetAlgorithm.h:35