Rocstar  1.0
Rocstar multiphysics simulation application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Overlay_1d.C File Reference
#include "Overlay.h"
#include <cstdio>
#include <iterator>
Include dependency graph for Overlay_1d.C:

Go to the source code of this file.

Functions

static bool equal (const Bbox_3 &b1, const Bbox_3 &b2, Real tol_r)
 

Function Documentation

static bool equal ( const Bbox_3 b1,
const Bbox_3 b2,
Real  tol_r 
)
static

Definition at line 87 of file Overlay_1d.C.

References max(), Bbox_3::xmax(), Bbox_3::xmin(), Bbox_3::ymax(), Bbox_3::ymin(), Bbox_3::zmax(), and Bbox_3::zmin().

Referenced by In_place_list_n< T, managed >::operator!=(), and In_place_list_n< T, managed >::operator==().

87  {
88  Bbox_3 u = b1+b2;
89  Real tol_a = std::max(std::max(u.xmax()-u.xmin(), u.ymax()-u.ymin()),
90  u.zmax()-u.zmin()) * tol_r;
91  return ( std::max( std::fabs(b1.xmin()-b2.xmin()),
92  std::fabs(b1.xmax()-b2.xmax())) <= tol_a &&
93  std::max( std::fabs(b1.ymin()-b2.ymin()),
94  std::fabs(b1.ymax()-b2.ymax())) <= tol_a &&
95  std::max( std::fabs(b1.zmin()-b2.zmin()),
96  std::fabs(b1.zmax()-b2.zmax())) <= tol_a);
97 }
double xmax() const
Vector_n max(const Array_n_const &v1, const Array_n_const &v2)
Definition: Vector_n.h:354
double Real
Definition: mapbasic.h:322
double xmin() const
double zmin() const
double ymax() const
double zmax() const
double ymin() const

Here is the call graph for this function:

Here is the caller graph for this function: