LCOV - code coverage report
Current view: top level - geom/Cholla/cgm - TDFacetboolData.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 0 3 0.0 %
Date: 2020-06-30 00:58:45 Functions: 0 3 0.0 %
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : /** \class TDFacetboolData
       2                 :            : //- Class: TDFacetboolData
       3                 :            : //- Owner: John Fowler
       4                 :            : //- Description: Data for maintaining persistent IDs.
       5                 :            : //-              surfaceIndex and edgeIndex[] are indices into a list of entities.
       6                 :            : //- Checked By: 
       7                 :            : //- Version:
       8                 :            : */
       9                 :            : 
      10                 :            : #ifndef TDFACETBOOLDATA_HPP
      11                 :            : #define TDFACETBOOLDATA_HPP
      12                 :            : 
      13                 :            : #include "CubitDefines.h"
      14                 :            : #include "ToolData.hpp"
      15                 :            : class FacetEntity;
      16                 :            : class CubitFacet;
      17                 :            : 
      18                 :            : class TDFacetboolData : public ToolData
      19                 :            : {
      20                 :            : private:
      21                 :            :     //!  An index into an array of FacetSurfaces denoting which FacetSurface
      22                 :            :     //!  this triangle came from.
      23                 :            :   int surfaceIndex;
      24                 :            :     //!  An index into an array of CubitFacetEdges denoting which
      25                 :            :     //!  CubitFacetEdges (if any) that the three triangle edges came from. 
      26                 :            :   int edgeIndex[3]; 
      27                 :            :     //!  true if this triangle came from body 1; false if from body 2. 
      28                 :            :   bool body_1_flag;
      29                 :            :     //!Is the associated facet reversed or not.  The determines whether
      30                 :            :     //! we need to adjust the edge array before returning it.
      31                 :            :   bool isReversed;
      32                 :            :     //!To try to avoid a problem with the order of the edge indices,
      33                 :            :     //! we force the calling code to provide whether the associated facet
      34                 :            :     //! is reversed or not.  The public version is below.
      35                 :          0 :   int *get_edge_indices() { return edgeIndex; }
      36                 :            :   
      37                 :            : public:
      38                 :            : 
      39                 :            :   TDFacetboolData();
      40                 :            :     //- constructor
      41                 :            : 
      42                 :            :   ~TDFacetboolData();
      43                 :            : 
      44                 :            :   static int is_facetbool_facet(const ToolData* td);
      45                 :            : 
      46                 :            :   void set(int sv, int e0v, int e1v, int e2v, bool parent, bool is_reversed); 
      47                 :            : 
      48                 :            :   static TDFacetboolData* get(CubitFacet *facet_ptr);    
      49                 :            : 
      50                 :            :   static CubitStatus add_facetbool_facet(FacetEntity *facet_entity);
      51                 :            :   
      52                 :            :     //!Get the edge indices array.  Give a flag telling whether the facet
      53                 :            :     //! is backwards.  If it has been marked as reversed (or forward) since
      54                 :            :     //! the last time this function was called, the array will be reversed.
      55                 :            :     //! This is a little dangerous since the calling code can have a pointer
      56                 :            :     //! to this array, so please be careful.
      57                 :            :   int *get_edge_indices(bool rev_flag);
      58                 :            : 
      59                 :          0 :   int get_surf_index() { return surfaceIndex; }
      60                 :            :   
      61                 :          0 :   bool parent_is_body_1() { return body_1_flag; }
      62                 :            :     //! Returns the isReversed.  This allows to determine whether the facets
      63                 :            :     //! orientation has changed since the egde array was last modified.
      64                 :            :   bool is_reversed()
      65                 :            :     {return isReversed;}
      66                 :            : 
      67                 :            :     //!  Manually set the is_reversed flag.  This shouldn't be needed.
      68                 :            :     //! By calling get_edge_indices(bool rev_flag), the isReversed flag
      69                 :            :     //! will be automatically modified if necessary.
      70                 :            :   void is_reversed(bool rev);
      71                 :            :   
      72                 :            : };
      73                 :            :     
      74                 :            : 
      75                 :            : #endif // TDFACETBOOLDATA_HPP
      76                 :            : 
      77                 :            : 

Generated by: LCOV version 1.11