Logo Search packages:      
Sourcecode: madlib version File versions  Download package

bool MAd::F_volumeRatio ( const pFace  face,
double *  ratio 
)

Computes the ratio between the regions around the face Returns false if there is less than 2 regions

Definition at line 1901 of file MeshDataBaseInterface.cc.

References MAd::F_region(), and MAd::R_volume().

Referenced by MAd::F_worstVolumeRatio().

  {
    const pRegion pr0 = F_region(face,0);
    const pRegion pr1 = F_region(face,1);
  
    if ( !( pr0 && pr1 ) ) return false;
  
    double vol0 = R_volume(pr0);
    double vol1 = R_volume(pr1);
  
    if( vol0 <= 0. || vol1 <= 0. ) *ratio = -1.;
    else *ratio = ( vol0 < vol1 ) ? vol1/vol0 : vol0/vol1;
  
    return true;
  }


Generated by  Doxygen 1.6.0   Back to index