cgma
TDGeomFacet Class Reference

#include <TDGeomFacet.hpp>

Inheritance diagram for TDGeomFacet:
ToolData

List of all members.

Public Member Functions

 TDGeomFacet ()
 ~TDGeomFacet ()
int get_block_id ()
void set_block_id (int new_id)
int get_hit_flag ()
void set_hit_flag (int flag)
void add_cholla_owner (ChollaEntity *cholla_entity)
void add_cholla_surf (ChollaSurface *f_s_m)
void get_cholla_surfs (DLIList< ChollaSurface * > &surf_list)
void remove_cholla_surfs ()
void remove_cholla_surf (ChollaSurface *chsurf_ptr)
void add_cholla_curve (ChollaCurve *chcurv_ptr)
void get_cholla_curves (DLIList< ChollaCurve * > &curv_list)
void remove_cholla_curves ()
void remove_cholla_curve (ChollaCurve *chcurv_ptr)
void add_cholla_point (ChollaPoint *chpt_ptr)
void get_cholla_points (DLIList< ChollaPoint * > &point_list)
void remove_cholla_points ()
void remove_cholla_point (ChollaPoint *point_ptr)
void add_point (CubitPoint *point)
void delete_point (CubitPoint *point)
void get_points (DLIList< CubitPoint * > &point_list)
CubitPointget_first_point ()
void add_partner_edge (CubitFacetEdge *partner)
void get_partner_edges (DLIList< CubitFacetEdge * > &partner_list)
int num_partner_edges ()
void add_partner_point (CubitPoint *partner)
void get_partner_points (DLIList< CubitPoint * > &partner_list)
int num_partner_points ()
CubitBoolean is_in_volume (ChollaVolume *chvol_ptr)
 SetDynamicMemoryAllocation (memoryManager) static void set_memory_allocation_increment(int increment=0)
CubitVector get_normal ()
void set_normal (CubitVector &norm)
CubitBoolean is_partner (CubitFacetEdge *edge_ptr)
CubitBoolean is_partner (CubitPoint *point_ptr)
void reset_TD_as_new ()
int geo_type ()

Static Public Member Functions

static int is_geom_facet (const ToolData *td)
static void destroy_memory ()
static CubitStatus add_geom_facet (FacetEntity *facet_entity, int block_id)
static CubitStatus add_geom_facet (CubitFacet *facet_ptr, int block_id)
static CubitStatus add_geom_facet (CubitFacetEdge *edge_ptr, int block_id)
static CubitStatus add_geom_facet (CubitPoint *point_ptr, int block_id)
static TDGeomFacetget_geom_facet (FacetEntity *facet_entity)
static TDGeomFacetget_geom_facet (CubitFacet *facet_ptr)
static TDGeomFacetget_geom_facet (CubitFacetEdge *edge_ptr)
static TDGeomFacetget_geom_facet (CubitPoint *point_ptr)
static int get_block_id (FacetEntity *mesh_entity)
static int get_block_id (CubitFacet *facet_ptr)
static int get_block_id (CubitFacetEdge *edge_ptr)
static int get_block_id (CubitPoint *point_ptr)
static int get_hit_flag (FacetEntity *mesh_entity)
static void set_hit_flag (FacetEntity *mesh_entity, int new_val)

Private Attributes

int blockId
int hitFlag
DLIList< ChollaSurface * > ChollaSurfaceList
DLIList< ChollaCurve * > ChollaCurveList
DLIList< ChollaPoint * > ChollaPointList
DLIList< CubitPoint * > myPoints
CubitVector normal
DLIList< CubitFacetEdge * > * partnerEdgeList
DLIList< CubitPoint * > * partnerPointList

Static Private Attributes

static MemoryManager memoryManager

Detailed Description

Definition at line 27 of file TDGeomFacet.hpp.


Constructor & Destructor Documentation

Definition at line 16 of file TDGeomFacet.cpp.

{
  blockId = -1;
  hitFlag = 0;
  partnerEdgeList = NULL;
  partnerPointList = NULL;
}

Definition at line 24 of file TDGeomFacet.cpp.

{
  if (partnerEdgeList != NULL)
    delete partnerEdgeList;
  if (partnerPointList != NULL)
    delete partnerPointList;
}

Member Function Documentation

void TDGeomFacet::add_cholla_curve ( ChollaCurve chcurv_ptr) [inline]

Definition at line 94 of file TDGeomFacet.hpp.

    {ChollaCurveList.append_unique( chcurv_ptr );}
void TDGeomFacet::add_cholla_owner ( ChollaEntity cholla_entity)

Definition at line 151 of file TDGeomFacet.cpp.

{
  ChollaSurface *cholla_surface = dynamic_cast<ChollaSurface *> (cholla_entity);
  if (cholla_surface != NULL)
    add_cholla_surf(cholla_surface);
  else
  {
    ChollaCurve *cholla_curve = dynamic_cast<ChollaCurve *> (cholla_entity);
    if (cholla_curve != NULL)
      add_cholla_curve( cholla_curve );
    else
    {
      ChollaPoint *cholla_point = dynamic_cast<ChollaPoint *> (cholla_entity);
      if (cholla_point != NULL)
        add_cholla_point( cholla_point );
      else
        assert(0); // not a recognized cholla entity
    }
  }  
  return;
}
void TDGeomFacet::add_cholla_point ( ChollaPoint chpt_ptr) [inline]

Definition at line 106 of file TDGeomFacet.hpp.

Definition at line 172 of file TDGeomFacet.cpp.

{
  int ii;
  for ( ii = ChollaSurfaceList.size(); ii > 0; ii-- )
  {
    ChollaSurface *fsm_ptr = ChollaSurfaceList.get_and_step();
    if (f_s_m == fsm_ptr)
    {
      return;
    }
  }
  ChollaSurfaceList.append(f_s_m);
  return;
}
CubitStatus TDGeomFacet::add_geom_facet ( FacetEntity facet_entity,
int  block_id 
) [static]

Definition at line 37 of file TDGeomFacet.cpp.

{
  TDGeomFacet* td = (TDGeomFacet*) facet_ptr->get_TD( &TDGeomFacet::is_geom_facet );
  if ( td == NULL )
  {
    td = new TDGeomFacet;
    facet_ptr->add_TD( td );
  }
  td->set_block_id( block_id);
  return CUBIT_SUCCESS;
}
CubitStatus TDGeomFacet::add_geom_facet ( CubitFacet facet_ptr,
int  block_id 
) [static]

Definition at line 49 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) facet_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td == NULL )
  {
    td = new TDGeomFacet;
    facet_ptr->add_TD( td );
  }
  td->set_block_id( block_id);
  return CUBIT_SUCCESS;
}
CubitStatus TDGeomFacet::add_geom_facet ( CubitFacetEdge edge_ptr,
int  block_id 
) [static]

Definition at line 60 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) edge_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td == NULL )
  {
    td = new TDGeomFacet;
    edge_ptr->add_TD( td );
  }
  td->set_block_id( block_id);
  return CUBIT_SUCCESS;
}
CubitStatus TDGeomFacet::add_geom_facet ( CubitPoint point_ptr,
int  block_id 
) [static]

Definition at line 71 of file TDGeomFacet.cpp.

{
  TDGeomFacet* td = (TDGeomFacet*) point_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td == NULL )
  {
    td = new TDGeomFacet;
    point_ptr->add_TD( td );
  }
  td->set_block_id( block_id);

  return CUBIT_SUCCESS;
}
void TDGeomFacet::add_partner_edge ( CubitFacetEdge partner) [inline]

Definition at line 136 of file TDGeomFacet.hpp.

void TDGeomFacet::add_partner_point ( CubitPoint partner) [inline]

Definition at line 150 of file TDGeomFacet.hpp.

void TDGeomFacet::add_point ( CubitPoint point) [inline]

Definition at line 118 of file TDGeomFacet.hpp.

    {myPoints.append(point);}
void TDGeomFacet::delete_point ( CubitPoint point) [inline]

Definition at line 121 of file TDGeomFacet.hpp.

    {myPoints.omit(point);}
static void TDGeomFacet::destroy_memory ( ) [inline, static]

Definition at line 173 of file TDGeomFacet.hpp.

Definition at line 244 of file TDGeomFacet.cpp.

{
  if (ChollaSurfaceList.size() > 0)
    return 2;
  else if (ChollaCurveList.size() > 0)
    return 1;
  else if (myPoints.size() > 0)
    return 0;
  return -1;
}
int TDGeomFacet::get_block_id ( ) [inline]

Definition at line 69 of file TDGeomFacet.hpp.

    {return blockId;}
int TDGeomFacet::get_block_id ( FacetEntity mesh_entity) [static]

Definition at line 122 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) facet_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td->get_block_id();
  }
  return -1;
}
int TDGeomFacet::get_block_id ( CubitFacet facet_ptr) [static]

Definition at line 132 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) facet_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td->get_block_id();
  }
  return -1;
}
int TDGeomFacet::get_block_id ( CubitFacetEdge edge_ptr) [static]

Definition at line 142 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) edge_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td->get_block_id();
  }
  return -1;
}
static int TDGeomFacet::get_block_id ( CubitPoint point_ptr) [static]
void TDGeomFacet::get_cholla_curves ( DLIList< ChollaCurve * > &  curv_list) [inline]

Definition at line 97 of file TDGeomFacet.hpp.

    {curv_list =  ChollaCurveList;}
void TDGeomFacet::get_cholla_points ( DLIList< ChollaPoint * > &  point_list) [inline]

Definition at line 109 of file TDGeomFacet.hpp.

    {point_list =  ChollaPointList;}
void TDGeomFacet::get_cholla_surfs ( DLIList< ChollaSurface * > &  surf_list) [inline]

Definition at line 85 of file TDGeomFacet.hpp.

    {surf_list =  ChollaSurfaceList;}

Definition at line 127 of file TDGeomFacet.hpp.

    {
      myPoints.reset();
      if ( myPoints.size() )
        return myPoints.get();
      else
        return (CubitPoint*) NULL;
    }
TDGeomFacet * TDGeomFacet::get_geom_facet ( FacetEntity facet_entity) [static]

Definition at line 84 of file TDGeomFacet.cpp.

{
  TDGeomFacet* td = (TDGeomFacet*) facet_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td;
  }
  return (TDGeomFacet*) NULL;
}
TDGeomFacet * TDGeomFacet::get_geom_facet ( CubitFacet facet_ptr) [static]

Definition at line 111 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) facet_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td;
  }
  return (TDGeomFacet*) NULL;
}

Definition at line 102 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) edge_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td;
  }
  return (TDGeomFacet*) NULL;
}
TDGeomFacet * TDGeomFacet::get_geom_facet ( CubitPoint point_ptr) [static]

Definition at line 93 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) point_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td;
  }
  return (TDGeomFacet*) NULL;
}
int TDGeomFacet::get_hit_flag ( ) [inline]

Definition at line 75 of file TDGeomFacet.hpp.

    {return hitFlag;}
int TDGeomFacet::get_hit_flag ( FacetEntity mesh_entity) [static]

Definition at line 186 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) facet_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    return td->get_hit_flag();
  }
  return -1;
}

Definition at line 194 of file TDGeomFacet.hpp.

{ return normal; }
void TDGeomFacet::get_partner_edges ( DLIList< CubitFacetEdge * > &  partner_list) [inline]

Definition at line 141 of file TDGeomFacet.hpp.

    { if (partnerEdgeList != NULL) partner_list += *partnerEdgeList; };
void TDGeomFacet::get_partner_points ( DLIList< CubitPoint * > &  partner_list) [inline]

Definition at line 155 of file TDGeomFacet.hpp.

    { if (partnerPointList != NULL) partner_list += *partnerPointList; };
void TDGeomFacet::get_points ( DLIList< CubitPoint * > &  point_list) [inline]

Definition at line 124 of file TDGeomFacet.hpp.

    {point_list += myPoints;}
int TDGeomFacet::is_geom_facet ( const ToolData td) [static]

Definition at line 32 of file TDGeomFacet.cpp.

{
  return (CAST_TO(const_cast<ToolData*>(td), TDGeomFacet) != NULL);
}

Definition at line 255 of file TDGeomFacet.cpp.

{
  for (int ii=0; ii<ChollaSurfaceList.size(); ii++)
  {
    ChollaSurface *chsurf_ptr = ChollaSurfaceList.get_and_step();
    if (chsurf_ptr->is_in_volume( chvol_ptr ))
      return CUBIT_TRUE;
  }
  for (int jj=0; jj<ChollaCurveList.size(); jj++)
  {
    ChollaCurve *chcurv_ptr = ChollaCurveList.get_and_step();
    if (chcurv_ptr->is_in_volume( chvol_ptr ))
      return CUBIT_TRUE;
  }
  return CUBIT_FALSE;
}

Definition at line 205 of file TDGeomFacet.cpp.

{
  if (partnerEdgeList == NULL)
    return CUBIT_FALSE;
  for (int ii=0; ii<partnerEdgeList->size(); ii++)
  {
    if (partnerEdgeList->get_and_step() == edge_ptr)
      return CUBIT_TRUE;
  }
  return CUBIT_FALSE;
}

Definition at line 216 of file TDGeomFacet.cpp.

{
  if (partnerPointList == NULL)
    return CUBIT_FALSE;
  for (int ii=0; ii<partnerPointList->size(); ii++)
  {
    if (partnerPointList->get_and_step() == point_ptr)
      return CUBIT_TRUE;
  }
  return CUBIT_FALSE;
}

Definition at line 144 of file TDGeomFacet.hpp.

    { if (partnerEdgeList == NULL)
        return 0;
      else
        return partnerEdgeList->size(); }

Definition at line 158 of file TDGeomFacet.hpp.

    { if (partnerPointList == NULL)
        return 0;
      else
        return partnerPointList->size(); }
void TDGeomFacet::remove_cholla_curve ( ChollaCurve chcurv_ptr) [inline]

Definition at line 103 of file TDGeomFacet.hpp.

    {ChollaCurveList.remove( chcurv_ptr );}

Definition at line 100 of file TDGeomFacet.hpp.

void TDGeomFacet::remove_cholla_point ( ChollaPoint point_ptr) [inline]

Definition at line 115 of file TDGeomFacet.hpp.

    { ChollaPointList.remove( point_ptr ); }

Definition at line 112 of file TDGeomFacet.hpp.

void TDGeomFacet::remove_cholla_surf ( ChollaSurface chsurf_ptr) [inline]

Definition at line 91 of file TDGeomFacet.hpp.

    {ChollaSurfaceList.remove( chsurf_ptr );}

Definition at line 88 of file TDGeomFacet.hpp.

Definition at line 228 of file TDGeomFacet.cpp.

{
  blockId = -1;
  hitFlag = 0;
  partnerEdgeList = NULL;
  partnerPointList = NULL;
  ChollaSurfaceList.clean_out();
  ChollaCurveList.clean_out();
  myPoints.clean_out();
    //normal??????;
    //need to delete these?
  partnerEdgeList=NULL;
  partnerPointList=NULL;

}
void TDGeomFacet::set_block_id ( int  new_id) [inline]

Definition at line 72 of file TDGeomFacet.hpp.

    {blockId = new_id;}
void TDGeomFacet::set_hit_flag ( int  flag) [inline]

Definition at line 78 of file TDGeomFacet.hpp.

    {hitFlag = flag;}
void TDGeomFacet::set_hit_flag ( FacetEntity mesh_entity,
int  new_val 
) [static]

Definition at line 195 of file TDGeomFacet.cpp.

{
  TDGeomFacet *td = (TDGeomFacet*) facet_ptr->get_TD(&TDGeomFacet::is_geom_facet);
  if ( td != NULL )
  {
    td->set_hit_flag(new_val);
  }
  return;
}
void TDGeomFacet::set_normal ( CubitVector norm) [inline]

Definition at line 195 of file TDGeomFacet.hpp.

{ normal = norm; }

Definition at line 166 of file TDGeomFacet.hpp.


Member Data Documentation

int TDGeomFacet::blockId [private]

Definition at line 34 of file TDGeomFacet.hpp.

Definition at line 42 of file TDGeomFacet.hpp.

Definition at line 45 of file TDGeomFacet.hpp.

Definition at line 39 of file TDGeomFacet.hpp.

int TDGeomFacet::hitFlag [private]

Definition at line 36 of file TDGeomFacet.hpp.

Definition at line 31 of file TDGeomFacet.hpp.

Definition at line 48 of file TDGeomFacet.hpp.

Definition at line 51 of file TDGeomFacet.hpp.

Definition at line 54 of file TDGeomFacet.hpp.

Definition at line 57 of file TDGeomFacet.hpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines