VTK
dox/Filters/General/vtkYoungsMaterialInterface.h
Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   Visualization Toolkit
00004   Module:    $RCSfile: vtkYoungsMaterialInterface.h,v $
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 =========================================================================*/
00039 #ifndef __vtkYoungsMaterialInterface_h
00040 #define __vtkYoungsMaterialInterface_h
00041 
00042 #include "vtkFiltersGeneralModule.h" // For export macro
00043 #include "vtkMultiBlockDataSetAlgorithm.h"
00044 
00045 #include "vtkSmartPointer.h" // For SP ivars
00046 
00047 class vtkIntArray;
00048 class vtkInformation;
00049 class vtkInformationVector;
00050 class vtkYoungsMaterialInterfaceInternals;
00051 
00052 class VTKFILTERSGENERAL_EXPORT vtkYoungsMaterialInterface : public vtkMultiBlockDataSetAlgorithm
00053 {
00054 public:
00055   static vtkYoungsMaterialInterface* New();
00056   vtkTypeMacro(vtkYoungsMaterialInterface,vtkMultiBlockDataSetAlgorithm);
00057   void PrintSelf(ostream& os, vtkIndent indent);
00058 
00060 
00061   vtkSetMacro(InverseNormal,int);
00062   vtkGetMacro(InverseNormal,int);
00063   vtkBooleanMacro(InverseNormal,int);
00065 
00067 
00069   vtkSetMacro(ReverseMaterialOrder,int);
00070   vtkGetMacro(ReverseMaterialOrder,int);
00071   vtkBooleanMacro(ReverseMaterialOrder,int);
00073 
00075 
00078   vtkSetMacro(OnionPeel,int);
00079   vtkGetMacro(OnionPeel,int);
00080   vtkBooleanMacro(OnionPeel,int);
00082 
00084 
00086   vtkSetMacro(AxisSymetric,int);
00087   vtkGetMacro(AxisSymetric,int);
00088   vtkBooleanMacro(AxisSymetric,int);
00090 
00092 
00096   vtkSetMacro(UseFractionAsDistance,int);
00097   vtkGetMacro(UseFractionAsDistance,int);
00098   vtkBooleanMacro(UseFractionAsDistance,int);
00100 
00102 
00104   vtkSetMacro(FillMaterial,int);
00105   vtkGetMacro(FillMaterial,int);
00106   vtkBooleanMacro(FillMaterial,int);
00108 
00110 
00114   vtkSetVector2Macro(VolumeFractionRange,double);
00115   vtkGetVectorMacro(VolumeFractionRange,double,2);
00117 
00119 
00120   virtual void SetNumberOfMaterials(int n);
00121   virtual int GetNumberOfMaterials();
00123 
00125 
00127   vtkSetMacro(UseAllBlocks,bool);
00128   vtkGetMacro(UseAllBlocks,bool);
00129   vtkBooleanMacro(UseAllBlocks,bool);
00131 
00133 
00135   vtkGetMacro(NumberOfDomains,int);
00137 
00139 
00141   virtual void SetMaterialArrays( int i, const char* volume, const char* normalX, const char* normalY, const char* normalZ, const char* ordering );
00142   virtual void SetMaterialArrays( int i, const char* volume, const char* normal, const char* ordering );
00143   virtual void SetMaterialVolumeFractionArray( int i, const char* volume );
00144   virtual void SetMaterialNormalArray( int i, const char* normal );
00145   virtual void SetMaterialOrderingArray( int i, const char* ordering );
00147 
00149   virtual void RemoveAllMaterials();
00150 
00152 
00158   virtual void SetMaterialNormalArray(const char* volume, const char* normal);
00159   virtual void SetMaterialOrderingArray(const char* volume, const char* ordering);
00161 
00163 
00164   virtual void RemoveAllMaterialBlockMappings();
00165   virtual void AddMaterialBlockMapping(int b);
00167 
00168 
00169 //BTX
00170   enum
00171   {
00172     MAX_CELL_POINTS=256
00173   };
00174 //ETX
00175 
00176 protected:
00177   vtkYoungsMaterialInterface ();
00178   virtual ~vtkYoungsMaterialInterface ();
00179 
00180   virtual int FillInputPortInformation(int port, vtkInformation *info);
00181   virtual int RequestData(vtkInformation *request,
00182              vtkInformationVector **inputVector,
00183              vtkInformationVector *outputVector);
00184 
00186   virtual void Aggregate ( int, int* );
00187 
00188   void UpdateBlockMapping();
00189 
00190   int CellProduceInterface( int dim, int np, double fraction, double minFrac, double maxFrac );
00191 
00193 
00194   int FillMaterial;
00195   int InverseNormal;
00196   int AxisSymetric;
00197   int OnionPeel;
00198   int ReverseMaterialOrder;
00199   int UseFractionAsDistance;
00200   double VolumeFractionRange[2];
00201 //BTX
00202   vtkSmartPointer<vtkIntArray> MaterialBlockMapping;
00203 //ETX
00204   bool UseAllBlocks;
00206 
00208   int NumberOfDomains;
00209 
00210   // Desctiption:
00211   // Internal data structures
00212   vtkYoungsMaterialInterfaceInternals* Internals;
00213 
00214 private:
00215   vtkYoungsMaterialInterface(const vtkYoungsMaterialInterface&); // Not implemented
00216   void operator=(const vtkYoungsMaterialInterface&); // Not implemented
00217 };
00218 
00219 #endif /* VTK_YOUNGS_MATERIAL_INTERFACE_H */
00220