00001 /*======================================================================= 00002 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00003 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00004 *** *** 00005 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00006 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00007 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00008 *** *** 00009 *** RESTRICTED RIGHTS LEGEND *** 00010 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00011 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00012 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00013 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00014 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00015 *** *** 00016 *** COPYRIGHT (C) 1996-2017 BY FEI S.A.S, *** 00017 *** MERIGNAC, FRANCE *** 00018 *** ALL RIGHTS RESERVED *** 00019 **=======================================================================*/ 00020 /*======================================================================= 00021 ** Author : Martial Bonaventure (Mar 2010) 00022 **=======================================================================*/ 00023 00024 #ifndef _MyVolumeMeshUnstructured_H 00025 #define _MyVolumeMeshUnstructured_H 00026 00052 #include <MeshVizXLM/mesh/cell/MiVolumeCell.h> 00056 class MyVolumeCell : public MiVolumeCell 00057 { 00058 public: 00062 size_t getNumNodes() const 00063 { 00064 // @ADD YOUR CODE HERE. 00065 } 00066 00071 size_t getNodeIndex(size_t node) const 00072 { 00073 // @ADD YOUR CODE HERE. 00074 } 00075 00079 size_t getNumFacets() const 00080 { 00081 // @ADD YOUR CODE HERE. 00082 } 00083 00091 size_t appendNodesIndexOfFacet (size_t facet, std::vector<size_t>& facetNodes) const 00092 { 00093 // @ADD YOUR CODE HERE. 00094 // The implementation must use the push_back() method to add elements into the vector. 00095 // The given vector should not be cleared by this method. 00096 } 00097 00105 size_t appendLocalNodesIndexOfFacet (size_t SO_UNUSED_PARAM(facet), std::vector<size_t>& SO_UNUSED_PARAM(facetNodes)) const 00106 { 00107 // @ADD YOUR CODE HERE (Optional). 00108 // Requested only for polyhedral cells by MoPointProbe/MiPointProbeUnstructured, 00109 // MoMeshStreamline/MiStreamlineExtractUnstrctured, 00110 // MoMeshGridPlaneSlice/MiGridPlaneSliceExtractUnstructured. 00111 // Remove this method otherwise. 00112 // 00113 // It must use the push_back() method to add elements to the vector. 00114 // The given vector should not be cleared by this method. 00115 // This method is similar to appendNodesIndexOfFacet() but facetNodes must be filled 00116 // only with local node ids (i.e. node ids relative to the number of nodes in the cell): 00117 // 0 <= facetNodes[i] < getNumNodes() for each i. 00118 } 00119 00123 void getIsosurfTopology(unsigned char caseId, std::vector< std::pair<size_t,size_t> >& edgeList ) const 00124 { 00125 // @ADD YOUR CODE HERE (Optional). 00126 // Implementation provided for common volume cells (see MxXXXXCellExtract::getIsosurfTopology()). 00127 // Requested by MoMeshIsosurface/MiIsosurfExtractUnstructured, 00128 // MoMeshPlaneSlice/MiPlaneSliceExtractUnstructure, 00129 // MoMeshSphereSlice/MiSphereSliceExtractUnstructured, 00130 // MoMeshCylinderSlice/MiCylinderSliceExtractUnstrutured. 00131 } 00132 00140 double getRelativeSize(const MiGeometryI* meshGeometry) const 00141 { 00142 // @ADD YOUR CODE HERE (Optional). 00143 // Used only by MoMeshCellShape to display node names if using the relative offset feature and 00144 // MoMeshStreamline/MiStreamlineExtractUnstructured to adapt the step integration to the size of the cell. 00145 // 00146 // Must not return 0. For instance, use provided MxXXXXCellExtract::getLongestEdgeLength(). 00147 // Remove this method if not needed or to use the default implementation that returns 1. 00148 } 00149 00161 bool isPointInsideCell(const MiGeometryI& meshGeometry, 00162 const MbVec3d& point, 00163 std::vector<double>& weights) const 00164 { 00165 // @ADD YOUR CODE HERE (Optional). 00166 // Implementation provided for common volume cells (see MxXXXXCellExtract::isPointInsideCell()) 00167 // Requested by MoPointProbe/MiPointProbeUnstructured, 00168 // MoMeshStreamline/MiStreamlineExtractUnstrctured, 00169 // MoMeshGridPlaneSlice/MiGridPlaneSliceExtractUnstructured. 00170 // Remove this method otherwise. 00171 // 00172 // It is not nessessary to resize the weight vector array since 00173 // extraction classes are optimized such as weight vectors passed to this method are 00174 // already allocated and large enough to retrieve all the computed weights. 00175 } 00176 00177 }; 00178 00179 #include <MeshVizXLM/mesh/topology/MiVolumeTopologyExplicitI.h> 00183 class MyVolumeTopologyExplicitI : public MiVolumeTopologyExplicitI 00184 { 00185 public: 00189 size_t getNumCells() const 00190 { 00191 // @ADD YOUR CODE HERE. 00192 } 00193 00199 bool hasDeadCells() const 00200 { 00201 // @ADD YOUR CODE HERE (Optional). 00202 // Required only if the topology has dead cells, remove this method otherwise to use 00203 // the default implementation that always returns false. 00204 } 00205 00211 bool isDead(size_t i) const 00212 { 00213 // @ADD YOUR CODE HERE (Optional). 00214 // Required only if the topology has dead cells, remove this method otherwise to use 00215 // the default implementation that always returns false. 00216 } 00217 00222 const MiVolumeCell* getCell(size_t id) const 00223 { 00224 // @ADD YOUR CODE HERE. 00225 // For instance, can return an instance of MyVolumeCell. 00226 } 00227 00234 size_t getEndNodeId() const 00235 { 00236 // @ADD YOUR CODE HERE. 00237 } 00238 00245 size_t getBeginNodeId() const 00246 { 00247 // @ADD YOUR CODE HERE (Optional). 00248 // Remove this method to use the default implementation that returns 0. 00249 } 00250 00254 size_t getTimeStamp() const 00255 { 00256 // @ADD YOUR CODE HERE (see MxTimeStamp). 00257 // When the content of the topology changes, the time stamp must also change. 00258 // The time stamp allows MeshViz to be aware of any change to this topology. 00259 } 00260 00261 }; 00262 00263 #include <MeshVizXLM/mesh/geometry/MiGeometryI.h> 00267 class MyGeometryI : public MiGeometryI //, public YourGeometry 00268 // Advised to inherit from the class containing your application geometry. 00269 { 00270 public: 00274 MbVec3d getCoord(size_t i) const 00275 { 00276 // @ADD YOUR CODE HERE. 00277 } 00278 00282 size_t getTimeStamp() const 00283 { 00284 // @ADD YOUR CODE HERE (see MxTimeStamp). 00285 // When the content of the geometry changes, the time stamp must also change. 00286 // The time stamp allows MeshViz to be aware of any change to this geometry. 00287 } 00288 }; 00289 00290 #include <MeshVizXLM/mesh/MiVolumeMeshUnstructured.h> 00294 class MyVolumeMeshUnstructured : public MiVolumeMeshUnstructured 00295 { 00296 00297 public: 00301 const MiGeometryI& getGeometry() const 00302 { 00303 return m_geometry; 00304 } 00305 00309 const MiVolumeTopologyExplicitI& getTopology() const 00310 { 00311 return m_topology; 00312 } 00313 00314 00315 private: 00316 MyGeometryI m_geometry; 00317 MyVolumeTopologyExplicitI m_topology; 00318 00319 }; 00320 00321 #include <MeshVizXLM/mesh/data/MiDataSetI.h> 00325 class MyScalarSetI : public MiScalardSetI //, public YourData 00326 // Advised to inherit from the class containing your application data. 00327 { 00328 public: 00329 00333 double get(size_t i) const 00334 { 00335 // @ADD YOUR CODE HERE. 00336 } 00337 00341 size_t getTimeStamp() const 00342 { 00343 // @ADD YOUR CODE HERE (see MxTimeStamp). 00344 // When the content of the scalar set changes, the time stamp must also change. 00345 // The time stamp allows MeshViz to be aware of any change to this scalar set. 00346 } 00347 00351 std::string getName() const 00352 { 00353 // @ADD YOUR CODE HERE. 00354 } 00355 00359 DataBinding getBinding() const 00360 { 00361 // @ADD YOUR CODE HERE (see MiDataSet::DataBinding). 00362 } 00363 00364 }; 00365 00366 #include <MeshVizXLM/mesh/data/MiDataSetI.h> 00370 class MyVectorSetI : public MiVec3dSetI //, public YourData 00371 // Advised to inherit from the class containing your application data. 00372 { 00373 public: 00374 00378 MbVec3d get(size_t i) const 00379 { 00380 // @ADD YOUR CODE HERE. 00381 } 00382 00386 size_t getTimeStamp() const 00387 { 00388 // @ADD YOUR CODE HERE (see MxTimeStamp). 00389 // When the content of the vector set changes, the time stamp must also change. 00390 // The time stamp allows MeshViz to be aware of any change to this vector set. 00391 } 00392 00396 std::string getName() const 00397 { 00398 // @ADD YOUR CODE HERE. 00399 } 00400 00404 DataBinding getBinding() const 00405 { 00406 // @ADD YOUR CODE HERE (see MiDataSet::DataBinding). 00407 } 00408 00409 }; 00410 00411 00412 #endif 00413 00414 00415 00416 00417 00418 00419 00420