shape_doc 0.1
|
#include <cell3d_algebraic_curve.hpp>
Definition at line 34 of file cell3d_algebraic_curve.hpp.
typedef Cell3d::BoundingBox BoundingBox |
Reimplemented from cell3d< C, V >.
Definition at line 45 of file cell3d_algebraic_curve.hpp.
Reimplemented from cell3d< C, V >.
Definition at line 43 of file cell3d_algebraic_curve.hpp.
Definition at line 44 of file cell3d_algebraic_curve.hpp.
Reimplemented in cell3d_surface_algebraic< C, V >.
Definition at line 49 of file cell3d.hpp.
typedef Topology::Edge Edge [inherited] |
Reimplemented in cell3d_surface_algebraic< C, V >.
Definition at line 47 of file cell3d.hpp.
Reimplemented from cell3d< C, V >.
Definition at line 39 of file cell3d_algebraic_curve.hpp.
typedef polynomial< double, with<Bernstein> > Polynomial |
Definition at line 41 of file cell3d_algebraic_curve.hpp.
typedef solver_implicit<C,V> Solver |
Definition at line 47 of file cell3d_algebraic_curve.hpp.
Reimplemented from cell3d< C, V >.
Definition at line 37 of file cell3d_algebraic_curve.hpp.
typedef tpl3d<C,V> Topology3d |
Reimplemented from cell3d< C, V >.
Definition at line 38 of file cell3d_algebraic_curve.hpp.
cell3d_algebraic_curve | ( | const cell3d_algebraic_curve< C, V > & | c | ) |
Definition at line 95 of file cell3d_algebraic_curve.hpp.
: m_polynomials(c.m_polynomials), m_shape(c.m_shape), m_reg(-1) {};
cell3d_algebraic_curve | ( | const Seq< Polynomial > & | s, |
const BoundingBox & | b | ||
) |
Definition at line 99 of file cell3d_algebraic_curve.hpp.
: Cell3d(b), m_polynomials(s), m_reg(-1) { }
cell3d_algebraic_curve | ( | algebraic_curve< C, V > * | cv, |
const BoundingBox & | bx | ||
) |
Definition at line 106 of file cell3d_algebraic_curve.hpp.
References solver_implicit< C, V >::back_face, solver_implicit< C, V >::east_face, solver_implicit< C, V >::face_point(), solver_implicit< C, V >::front_face, cell3d< C, V >::m_boundary, cell3d_algebraic_curve< C, V >::m_polynomials, solver_implicit< C, V >::north_face, solver_implicit< C, V >::south_face, solver_implicit< C, V >::west_face, point< C, V, N >::x(), bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), point< C, V, N >::y(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), point< C, V, N >::z(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().
: Cell3d(b), m_reg(-1) { Seq<mmx::GMP::rational> bx; bx<<as<mmx::GMP::rational>(b.xmin()); bx<<as<mmx::GMP::rational>(b.xmax()); bx<<as<mmx::GMP::rational>(b.ymin()); bx<<as<mmx::GMP::rational>(b.ymax()); bx<<as<mmx::GMP::rational>(b.zmin()); bx<<as<mmx::GMP::rational>(b.zmax()); Polynomial tmp; for(int i=0;i<cv->nbequation();i++) { tensor::bernstein<mmx::GMP::rational> polq(cv->equation(i).rep(),bx); let::assign(tmp.rep(),polq); m_polynomials<<tmp; } Solver::face_point(this->m_boundary, m_polynomials, Solver::north_face, b); Solver::face_point(this->m_boundary, m_polynomials, Solver::south_face, b); Solver::face_point(this->m_boundary, m_polynomials, Solver::west_face , b); Solver::face_point(this->m_boundary, m_polynomials, Solver::east_face , b); Solver::face_point(this->m_boundary, m_polynomials, Solver::front_face, b); Solver::face_point(this->m_boundary, m_polynomials, Solver::back_face , b); foreach(Point* p, this->m_boundary) std::cout<<"n "<<p->x()<<" "<<p->y()<<" "<<p->z() <<std::endl; // check_cluster(this->m_boundary); // Solver::singular(m_singular, m_polynomial, b); }
BoundingBox boundingBox | ( | ) | const [inline, inherited] |
Definition at line 74 of file cell3d.hpp.
{ return (BoundingBox)*this; }
virtual Point center | ( | void | ) | const [inline, virtual, inherited] |
Definition at line 67 of file cell3d.hpp.
References bounding_box< C, V >::xmax(), bounding_box< C, V >::xmin(), bounding_box< C, V >::ymax(), bounding_box< C, V >::ymin(), bounding_box< C, V >::zmax(), and bounding_box< C, V >::zmin().
Definition at line 350 of file cell3d_algebraic_curve.hpp.
References mmx::shape::distance().
{ // l<<p; return ; unsigned i=0; for(i=0; i<l.size() && distance(*l[i],*p)>eps; i++) ; if(i==l.size()) l<<p; }
Definition at line 170 of file cell3d.hpp.
References mmx::shape::check_overlap(), and SELF.
{ int i; bool flag; //copy horizontally b->e_neighbors= this->e_neighbors ; foreach(SELF* cl,b->e_neighbors) { i= cl->w_neighbors.search(this); cl->w_neighbors[i]= b; } a->w_neighbors= this->w_neighbors ; foreach(SELF* cl,a->w_neighbors) { i= cl->e_neighbors.search(this); cl->e_neighbors[i]= a; } //update vertically foreach(SELF* cl,this->s_neighbors) { flag=false; if ( check_overlap(cl,a,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { //assert( cl->ymax()== a->ymin() ); a->s_neighbors<< cl; i= cl->n_neighbors.search(this); cl->n_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { //assert( cl->ymax()== b->ymin() ); b->s_neighbors<< cl; if (!flag) { i= cl->n_neighbors.search(this); cl->n_neighbors[i]= b; } else cl->n_neighbors << b; } } foreach(SELF* cl,this->n_neighbors) { flag=false; if ( check_overlap(cl,a,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { a->n_neighbors<< cl; i= cl->s_neighbors.search(this); cl->s_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { b->n_neighbors<< cl; if (!flag) { i= cl->s_neighbors.search(this); cl->s_neighbors[i]= b; } else cl->s_neighbors << b; } } //update depth foreach(SELF* cl,this->f_neighbors) { flag=false; if ( check_overlap(cl,a,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { //assert( cl->ymax()== a->ymin() ); a->f_neighbors<< cl; i= cl->b_neighbors.search(this); cl->b_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { //assert( cl->ymax()== b->ymin() ); b->f_neighbors<< cl; if (!flag) { i= cl->b_neighbors.search(this); cl->b_neighbors[i]= b; } else cl->b_neighbors << b; } } foreach(SELF* cl,this->b_neighbors) { flag=false; if ( check_overlap(cl,a,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { a->b_neighbors<< cl; i= cl->f_neighbors.search(this); cl->f_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,0) //) && ( check_overlap(cl,a,1) || check_overlap(cl,a,2)) ) { b->b_neighbors<< cl; if (!flag) { i= cl->f_neighbors.search(this); cl->f_neighbors[i]= b; } else cl->f_neighbors << b; } } }
Definition at line 290 of file cell3d.hpp.
References mmx::shape::check_overlap(), and SELF.
{ int i; bool flag; //copy vertically a->s_neighbors= this->s_neighbors ; foreach(SELF* cl,a->s_neighbors) { i= cl->n_neighbors.search(this); cl->n_neighbors[i]= a; } b->n_neighbors= this->n_neighbors ; foreach(SELF* cl,b->n_neighbors) { i= cl->s_neighbors.search(this); cl->s_neighbors[i]= b; } //update horizontally foreach(SELF* cl,this->w_neighbors) { flag=false; if ( check_overlap(cl,a,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { //assert( cl->xmax()== a->xmin() ); a->w_neighbors<< cl; i= cl->e_neighbors.search(this); cl->e_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { //assert( cl->xmax()== b->xmin() ); b->w_neighbors<< cl; if (!flag) { i= cl->e_neighbors.search(this); cl->e_neighbors[i]= b; } else cl->e_neighbors << b; } } foreach(SELF* cl,this->e_neighbors) { flag=false; if ( check_overlap(cl,a,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { a->e_neighbors<< cl; i= cl->w_neighbors.search(this); cl->w_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { b->e_neighbors<< cl; if (!flag) { i= cl->w_neighbors.search(this); cl->w_neighbors[i]= b; } else cl->w_neighbors << b; } } //update depth foreach(SELF* cl,this->f_neighbors) { flag=false; if ( check_overlap(cl,a,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { //assert( cl->xmax()== a->xmin() ); a->f_neighbors<< cl; i= cl->b_neighbors.search(this); cl->b_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { //assert( cl->xmax()== b->xmin() ); b->f_neighbors<< cl; if (!flag) { i= cl->b_neighbors.search(this); cl->b_neighbors[i]= b; } else cl->b_neighbors << b; } } foreach(SELF* cl,this->b_neighbors) { flag=false; if ( check_overlap(cl,a,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { a->b_neighbors<< cl; i= cl->f_neighbors.search(this); cl->f_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,1) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,2)) ) { b->b_neighbors<< cl; if (!flag) { i= cl->f_neighbors.search(this); cl->f_neighbors[i]= b; } else cl->f_neighbors << b; } } }
Definition at line 411 of file cell3d.hpp.
References mmx::shape::check_overlap(), and SELF.
{ int i; bool flag; //copy vertically a->f_neighbors= this->f_neighbors ; foreach(SELF* cl,a->f_neighbors) { i= cl->b_neighbors.search(this); cl->b_neighbors[i]= a; } b->b_neighbors= this->b_neighbors ; foreach(SELF* cl,b->b_neighbors) { i= cl->f_neighbors.search(this); cl->f_neighbors[i]= b; } //update horizontally foreach(SELF* cl,this->w_neighbors) { flag=false; if ( check_overlap(cl,a,2) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { //assert( cl->xmax()== a->xmin() ); a->w_neighbors<< cl; i= cl->e_neighbors.search(this); cl->e_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,2) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { //assert( cl->xmax()== b->xmin() ); b->w_neighbors<< cl; if (!flag) { i= cl->e_neighbors.search(this); cl->e_neighbors[i]= b; } else cl->e_neighbors << b; } } foreach(SELF* cl,this->e_neighbors) { flag=false; if ( check_overlap(cl,a,2) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { a->e_neighbors<< cl; i= cl->w_neighbors.search(this); cl->w_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,2) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { b->e_neighbors<< cl; if (!flag) { i= cl->w_neighbors.search(this); cl->w_neighbors[i]= b; } else cl->w_neighbors << b; } } //update vertically foreach(SELF* cl,this->s_neighbors) { flag=false; if ( check_overlap(cl,a,0) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { //assert( cl->ymax()== a->ymin() ); a->s_neighbors<< cl; i= cl->n_neighbors.search(this); cl->n_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,0) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { //assert( cl->ymax()== b->ymin() ); b->s_neighbors<< cl; if (!flag) { i= cl->n_neighbors.search(this); cl->n_neighbors[i]= b; } else cl->n_neighbors << b; } } foreach(SELF* cl,this->n_neighbors) { flag=false; if ( check_overlap(cl,a,2) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { a->n_neighbors<< cl; i= cl->s_neighbors.search(this); cl->s_neighbors[i]= a; flag=true; } if ( check_overlap(cl,b,2) //) && ( check_overlap(cl,a,0) || check_overlap(cl,a,1)) ) { b->n_neighbors<< cl; if (!flag) { i= cl->s_neighbors.search(this); cl->s_neighbors[i]= b; } else cl->s_neighbors << b; } } }
bool contains | ( | double | x, |
bool | strict = false |
||
) | [inherited] |
bool contains | ( | double | x, |
double | y, | ||
bool | strict = false |
||
) | [inherited] |
bool contains | ( | double | x, |
double | y, | ||
double | z, | ||
bool | strict = false |
||
) | [inherited] |
void disconnect | ( | ) | [inline, inherited] |
Definition at line 528 of file cell3d.hpp.
{ this->e_neighbors.clear(); this->w_neighbors.clear(); this->n_neighbors.clear(); this->s_neighbors.clear(); this->b_neighbors.clear(); this->f_neighbors.clear(); }
Polynomial equation | ( | int | i = 0 | ) | const [inline] |
Definition at line 73 of file cell3d_algebraic_curve.hpp.
References cell3d_algebraic_curve< C, V >::m_polynomials.
{ return m_polynomials[i]; }
bool insert_regular | ( | Topology * | t | ) | [virtual] |
Implements cell3d< C, V >.
Definition at line 321 of file cell3d_algebraic_curve.hpp.
{
return this->inserted_regular_in<Topology>(t);
}
bool insert_singular | ( | Topology * | t | ) | [virtual] |
Implements cell3d< C, V >.
Definition at line 335 of file cell3d_algebraic_curve.hpp.
{
return this->inserted_singular_in<Topology>(t);
}
bool inserted_regular_in | ( | TOPOLOGY * | t | ) |
Definition at line 286 of file cell3d_algebraic_curve.hpp.
References Edge.
Referenced by mesher3d_curve_algebraic< C, V >::insert_regular().
{ typedef typename TOPOLOGY::Edge Edge; if(this->m_boundary.size()==0) return true; // if(this->m_boundary.size()==1) { // std::cout<<"cell with 1 boundary point with reg "<<m_reg<<std::endl; // return false; // } if(this->m_boundary.size()==2) { t->insert(this->m_boundary[0]); t->insert(this->m_boundary[1]); t->insert(new Edge(this->m_boundary[0],this->m_boundary[1])); } else { // std::cout<<"cell with "<<this->m_boundary.size()<<" boundary points with reg "<<m_reg<<std::endl; BoundingBox bx=*this; // std::cout<<"["<<bx.xmin()<<" "<<bx.xmax()<<" "<<bx.ymin()<<" "<<bx.ymax()<<" "<<bx.zmin()<<" "<<bx.zmax()<<"]"<<std::endl; std::sort(this->m_boundary.begin(), this->m_boundary.end(), along(m_reg) ); foreach(Point* p, this->m_boundary) t->insert(p); for(unsigned i=0;i<this->m_boundary.size();i++) { unsigned j=i+1, i0=i; // std::cout<<"i0 "<<i<<" "<<j<<std::endl; for(j=i+1; j<this->m_boundary.size() && (this->m_boundary[i0] == this->m_boundary[j]);i++, j++) ; if(j<this->m_boundary.size()) t->insert(new Edge( this->m_boundary[i0], this->m_boundary[j])); // std::cout<<"i0 "<<i<<" "<<j<<std::endl; } } return true; }
bool inserted_singular_in | ( | TOPOLOGY * | t | ) |
Definition at line 326 of file cell3d_algebraic_curve.hpp.
Referenced by mesher3d_curve_algebraic< C, V >::sing_process().
{ if(this->m_boundary.size()>0) { t->insert((BoundingBox *)this); foreach(Point* p, this->m_boundary) t->insert(p); } return true; }
bounding_box< C, V > * intersect | ( | const bounding_box< C, V > & | other | ) | [inherited] |
Definition at line 318 of file bounding_box.hpp.
References mmx::shape::mmxmax(), mmx::shape::mmxmin(), and SELF.
Referenced by bounding_box< double, V >::operator*().
{ SELF * cell = new SELF ; cell->set_xmin(mmxmax(this->xmin(), other.xmin())) ; cell->set_xmax(mmxmin(this->xmax(), other.xmax())) ; cell->set_ymin(mmxmax(this->ymin(), other.ymin())) ; cell->set_ymax(mmxmin(this->ymax(), other.ymax())) ; cell->set_zmin(mmxmax(this->zmin(), other.zmin())) ; cell->set_zmax(mmxmin(this->zmax(), other.zmax())) ; return cell ; }
void intersected | ( | bounding_box< C, V > * | other | ) | [inherited] |
Definition at line 298 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
bool intersects | ( | bounding_box< C, V > * | other, |
bool | strict = true |
||
) | [inherited] |
Definition at line 238 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
{ if(this->is0D()) return (this->xmin() == other->xmin()) ; else if(this->is1D()) if(strict) return ((mmxmax(this->xmin(), other->xmin()) < mmxmin(this->xmax(), other->xmax()))) ; else return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax()))) ; else if(this->is2D()) if(strict) return ((mmxmax(this->xmin(), other->xmin()) < mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) < mmxmin(this->ymax(), other->ymax()))) ; else return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax()))) ; else if(this->is3d()) { if(strict) return ((mmxmax(this->xmin(), other->xmin()) < mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) < mmxmin(this->ymax(), other->ymax())) && (mmxmax(this->zmin(), other->zmin()) < mmxmin(this->zmax(), other->zmax()))) ; else return ((mmxmax(this->xmin(), other->xmin()) <= mmxmin(this->xmax(), other->xmax())) && (mmxmax(this->ymin(), other->ymin()) <= mmxmin(this->ymax(), other->ymax())) && (mmxmax(this->zmin(), other->zmin()) <= mmxmin(this->zmax(), other->zmax()))) ; } return false ; }
bool is0D | ( | void | ) | const [inline, inherited] |
bool is1D | ( | void | ) | const [inline, inherited] |
bool is2D | ( | void | ) | const [inline, inherited] |
bool is3d | ( | void | ) | const [inline, inherited] |
bool is_active | ( | void | ) | const [virtual] |
Implements cell3d< C, V >.
Definition at line 136 of file cell3d_algebraic_curve.hpp.
Referenced by mesher3d_curve_algebraic< C, V >::run().
{ // std::cout<<"Is active "<<m_polynomials[0].rep()<<std::endl; if(!has_sign_variation(m_polynomials[0])) return false; // std::cout<<"Is active "<<m_polynomials[1]<<std::endl; if(!has_sign_variation(m_polynomials[1])) //m_polynomials[1].begin(),m_polynomials[1].end())) return false; // std::cout<<"Is active end"<<std::endl; return true; }
virtual bool is_intersected | ( | void | ) | [inline, virtual] |
bool is_regular | ( | void | ) | [virtual] |
Implements cell3d< C, V >.
Definition at line 154 of file cell3d_algebraic_curve.hpp.
Referenced by mesher3d_curve_algebraic< C, V >::is_regular().
{ if(this->m_singular.size()>1) return false; Polynomial tx=diff(equation(0),1)*diff(equation(1),2)-diff(equation(1),1)*diff(equation(0),2); if(!has_sign_variation(tx)) { m_reg=0; return true; } Polynomial ty=diff(equation(0),0)*diff(equation(1),2)-diff(equation(1),0)*diff(equation(0),2); if(!has_sign_variation(ty)) { m_reg=1; return true; } Polynomial tz=diff(equation(0),0)*diff(equation(1),1)-diff(equation(1),0)*diff(equation(0),1); if(!has_sign_variation(tz)) { m_reg=2; return true; } // int n=this->m_boundary.size(); // if(n > 2) return false; // else { // return true; // } }
void join0 | ( | cell3d< C, V > * | b | ) | [inline, inherited] |
Definition at line 149 of file cell3d.hpp.
{ this->e_neighbors << b; b->w_neighbors << this; }
void join1 | ( | cell3d< C, V > * | b | ) | [inline, inherited] |
Definition at line 156 of file cell3d.hpp.
{ b->s_neighbors << this; this->n_neighbors << b; }
Definition at line 163 of file cell3d.hpp.
{ b->f_neighbors << this; this->b_neighbors << b; }
int nbeq | ( | ) | const [inline] |
Definition at line 72 of file cell3d_algebraic_curve.hpp.
References cell3d_algebraic_curve< C, V >::m_polynomials.
{ return m_polynomials.size(); }
Seq<cell3d *> neighbors | ( | ) | [inline, inherited] |
Definition at line 96 of file cell3d.hpp.
References cell3d< C, V >::b_neighbors, cell3d< C, V >::e_neighbors, cell3d< C, V >::f_neighbors, cell3d< C, V >::n_neighbors, cell3d< C, V >::s_neighbors, and cell3d< C, V >::w_neighbors.
{ Seq<cell3d *> t; t<< s_neighbors ; t<< e_neighbors ; t<< n_neighbors ; t<< b_neighbors ; t<< w_neighbors ; t<< f_neighbors ; return t; } ;
double operator() | ( | unsigned | v, |
unsigned | s | ||
) | const [inherited] |
double & operator() | ( | unsigned | v, |
unsigned | s | ||
) | [inherited] |
bounding_box<C,V>* operator* | ( | const bounding_box< C, V > & | other | ) | [inline, inherited] |
Definition at line 103 of file bounding_box.hpp.
{ return intersect(other) ; }
bounding_box<C,V>* operator+ | ( | const bounding_box< C, V > & | other | ) | [inline, inherited] |
Definition at line 104 of file bounding_box.hpp.
{ return unite(other) ; }
virtual void polygonise | ( | Topology3d * | ) | [inline, virtual] |
void set_xmax | ( | double | x | ) | [inline, inherited] |
Definition at line 74 of file bounding_box.hpp.
{ this->m_xmax = x ; }
void set_xmin | ( | double | x | ) | [inline, inherited] |
Definition at line 73 of file bounding_box.hpp.
{ this->m_xmin = x ; }
void set_ymax | ( | double | y | ) | [inline, inherited] |
Definition at line 76 of file bounding_box.hpp.
{ this->m_ymax = y ; }
void set_ymin | ( | double | y | ) | [inline, inherited] |
Definition at line 75 of file bounding_box.hpp.
{ this->m_ymin = y ; }
void set_zmax | ( | double | z | ) | [inline, inherited] |
Definition at line 78 of file bounding_box.hpp.
{ this->m_zmax = z ; }
void set_zmin | ( | double | z | ) | [inline, inherited] |
Definition at line 77 of file bounding_box.hpp.
{ this->m_zmin = z ; }
double size | ( | void | ) | [inherited] |
Definition at line 199 of file bounding_box.hpp.
References mmx::max().
Referenced by voronoi2d< C, V >::run(), topology2d< C, V >::run(), mesher3d_shape< C, V >::run(), and mesher3d_curve_algebraic< C, V >::run().
void split_position | ( | int & | v, |
double & | s | ||
) | [virtual, inherited] |
Reimplemented in cell3d_list< C, V >.
Definition at line 125 of file cell3d.hpp.
{ double sx = (this->xmax()-this->xmin()); double sy = (this->ymax()-this->ymin()); double sz = (this->zmax()-this->zmin()); if(sx<sy) if(sy<sz) { v=2; s=(this->zmax()+this->zmin())/2; } else { v=1; s=(this->ymax()+this->ymin())/2; } else if(sx<sz) { v=2; s=(this->zmax()+this->zmin())/2; } else { v=0; s=(this->xmax()+this->xmin())/2; } }
virtual void subdivide | ( | cell3d< C, V > *& | left, |
cell3d< C, V > *& | right, | ||
int | v, | ||
double | s | ||
) | [pure virtual, inherited] |
int subdivide | ( | cell3d_algebraic_curve< C, V > *& | left, |
cell3d_algebraic_curve< C, V > *& | right | ||
) | [virtual] |
Definition at line 181 of file cell3d_algebraic_curve.hpp.
Referenced by mesher3d_curve_algebraic< C, V >::subdivide().
{ int v; double s; this->split_position(v,s); this->subdivide((Cell*&)Left,(Cell*&)Right,v,s); return v; }
Definition at line 189 of file cell3d_algebraic_curve.hpp.
References BoundingBox, mmx::shape_ssi::left(), mmx::shape_ssi::right(), and SELF.
{ SELF * left, * right; // if (this->m_boundary.size()>2){ // std::cout<<" split cell with "<<this->m_boundary.size()<<" points"<<std::endl; // foreach(Point* p, this->m_boundary) // std::cout<<" "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl; // } if(v==0){ c=(this->xmin()+this->xmax())/2; left = new SELF(m_polynomials, BoundingBox(this->xmin(),c, this->ymin(),this->ymax(), this->zmin(),this->zmax())); right= new SELF(m_polynomials, BoundingBox(c,this->xmax(), this->ymin(),this->ymax(), this->zmin(),this->zmax())); } else if(v==1) { c=(this->ymin()+this->ymax())/2; left = new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), this->ymin(),c, this->zmin(),this->zmax())); right= new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), c,this->ymax(), this->zmin(),this->zmax())); } else { c=(this->zmin()+this->zmax())/2; left = new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), this->ymin(),this->ymax(), this->zmin(),c)); right= new SELF(m_polynomials, BoundingBox(this->xmin(),this->xmax(), this->ymin(),this->ymax(), c,this->zmax())); } for(int i=0;i<nbeq();i++) { tensor::split(left->m_polynomials[i], right->m_polynomials[i], v); } if(v==0) { foreach(Point* p, this->m_boundary) { if (Solver::east_face.is_valid(*p,left->boundingBox())) left->m_boundary << p ; if (Solver::west_face.is_valid(*p,right->boundingBox())) right->m_boundary << p ; } } else if (v==1) { foreach(Point* p, this->m_boundary) { if (Solver::north_face.is_valid(*p,left->boundingBox())) left->m_boundary << p ; if (Solver::south_face.is_valid(*p,right->boundingBox())) right->m_boundary << p ; } } else { foreach(Point* p, this->m_boundary) { if (Solver::front_face.is_valid(*p,left->boundingBox())) left->m_boundary << p ; if (Solver::back_face.is_valid(*p,right->boundingBox())) right->m_boundary << p ; } } Seq<Point*> tmp; // Points on vertical faces of back subcells if(v==0){ Solver::face_point(tmp, left->m_polynomials, Solver::east_face, left->boundingBox()); foreach(Point *p, tmp){ check_insert(p, left->m_boundary); check_insert(p, right->m_boundary); } } else if(v==1) { Solver::face_point(tmp, left->m_polynomials, Solver::north_face, left->boundingBox()); foreach(Point *p, tmp){ check_insert(p, left->m_boundary); check_insert(p, right->m_boundary); } } else { Solver::face_point(tmp, left->m_polynomials, Solver::front_face, left->boundingBox()); foreach(Point *p, tmp){ check_insert(p, left->m_boundary); check_insert(p, right->m_boundary); } } // if (tmp.size()>0){ // std::cout<<" insert "<<tmp.size()<<" points"<<std::endl; // foreach(Point* p, tmp) // std::cout<<" "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl; // } // if (left->m_boundary.size()>2){ // std::cout<<"["<<left->xmin()<<" "<<left->xmax()<<" "<<left->ymin()<<" "<<left->ymax()<<" "<<left->zmin()<<" "<<left->zmax()<<"]"<<std::endl; // std::cout<<" left cell with "<<left->m_boundary.size()<<" points"<<std::endl; // foreach(Point* p, left->m_boundary) // std::cout<<" "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl; // } // if (right->m_boundary.size()>2){ // std::cout<<" right cell with "<<right->m_boundary.size()<<" points"<<std::endl; // std::cout<<"["<<right->xmin()<<" "<<right->xmax()<<" "<<right->ymin()<<" "<<right->ymax()<<" "<<right->zmin()<<" "<<right->zmax()<<"]"<<std::endl; // foreach(Point* p, right->m_boundary) // std::cout<<" "<<p->x()<<" "<<p->y()<<" "<<p->z()<<std::endl; // } // left ->m_boundary<<tmp; // right->m_boundary<<tmp; Left=left; Right=right; }
Definition at line 117 of file cell3d.hpp.
Referenced by mesher3d_shape< C, V >::subdivide().
{ int v; double s; this->split_position(v,s); this->subdivide(Left,Right,v,s); return v; }
bool topology_regular | ( | Topology * | ) | [inline, virtual] |
Implements cell3d< C, V >.
Definition at line 83 of file cell3d_algebraic_curve.hpp.
{ return true;}
bounding_box< C, V > * unite | ( | bounding_box< C, V > * | other | ) | [inherited] |
Definition at line 330 of file bounding_box.hpp.
References mmx::shape::mmxmax(), mmx::shape::mmxmin(), and SELF.
Referenced by bounding_box< double, V >::operator+().
{ SELF * cell = new SELF ; cell->set_xmin(mmxmin(this->xmin(), other->xmin())) ; cell->set_xmax(mmxmax(this->xmax(), other->xmax())) ; cell->set_ymin(mmxmin(this->ymin(), other->ymin())) ; cell->set_ymax(mmxmax(this->ymax(), other->ymax())) ; cell->set_zmin(mmxmin(this->zmin(), other->zmin())) ; cell->set_zmax(mmxmax(this->zmax(), other->zmax())) ; return cell ; }
void united | ( | bounding_box< C, V > * | other | ) | [inherited] |
Definition at line 308 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
bool unites | ( | bounding_box< C, V > * | other, |
bool | strict = true |
||
) | [inherited] |
Definition at line 268 of file bounding_box.hpp.
References mmx::shape::mmxmax(), and mmx::shape::mmxmin().
{ if(this->is0D()) return (this->xmin() == other->xmin()) ; else if(this->is1D()) { if(strict) return ((mmxmin(this->xmin(), other->xmin()) < mmxmax(this->xmax(), other->xmax()))) ; else return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax()))) ; } else if(this->is2D()) { if(strict) return ((mmxmin(this->xmin(), other->xmin()) < mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) < mmxmax(this->ymax(), other->ymax()))) ; else return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax()))) ; } else if(this->is3d()) { if(strict) return ((mmxmin(this->xmin(), other->xmin()) < mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) < mmxmax(this->ymax(), other->ymax())) && (mmxmin(this->zmin(), other->zmin()) < mmxmax(this->zmax(), other->zmax()))) ; else return ((mmxmin(this->xmin(), other->xmin()) <= mmxmax(this->xmax(), other->xmax())) && (mmxmin(this->ymin(), other->ymin()) <= mmxmax(this->ymax(), other->ymax())) && (mmxmin(this->zmin(), other->zmin()) <= mmxmax(this->zmax(), other->zmax()))) ; } return false ; }
double xmax | ( | void | ) | [inline, inherited] |
Definition at line 56 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_xmax ; }
double xmax | ( | void | ) | const [inline, inherited] |
Definition at line 63 of file bounding_box.hpp.
{ return m_xmax ; }
double xmin | ( | void | ) | const [inline, inherited] |
Definition at line 62 of file bounding_box.hpp.
{ return m_xmin ; }
double xmin | ( | void | ) | [inline, inherited] |
Definition at line 55 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), mmx::shape::operator<<(), mmx::operator<<(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_xmin ; }
double xsize | ( | void | ) | const [inline, inherited] |
Definition at line 69 of file bounding_box.hpp.
double ymax | ( | void | ) | [inline, inherited] |
Definition at line 58 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_ymax ; }
double ymax | ( | void | ) | const [inline, inherited] |
Definition at line 65 of file bounding_box.hpp.
{ return m_ymax ; }
double ymin | ( | void | ) | const [inline, inherited] |
Definition at line 64 of file bounding_box.hpp.
{ return m_ymin ; }
double ymin | ( | void | ) | [inline, inherited] |
Definition at line 57 of file bounding_box.hpp.
Referenced by cell2d_algebraic_curve< C, V >::cell2d_algebraic_curve(), cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), solver_implicit< C, V >::extremal(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), solver_implicit< C, V >::intersection(), solver_implicit< C, V >::singular(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_ymin ; }
double ysize | ( | void | ) | const [inline, inherited] |
Definition at line 70 of file bounding_box.hpp.
double zmax | ( | void | ) | [inline, inherited] |
Definition at line 60 of file bounding_box.hpp.
Referenced by cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_zmax ; }
double zmax | ( | void | ) | const [inline, inherited] |
Definition at line 67 of file bounding_box.hpp.
{ return m_zmax ; }
double zmin | ( | void | ) | [inline, inherited] |
Definition at line 59 of file bounding_box.hpp.
Referenced by cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_surface_algebraic< C, V >::cell3d_surface_algebraic(), cell3d< C, V >::center(), cell< C, REF_OF(REF_OF(V)) >::center(), EdgeListBuilder< node_t >::computeCommonFace(), topology< C, V >::insert(), mesher3d_curve_algebraic< C, V >::insert(), and EdgeListBuilder< node_t >::verifyFaceList().
{ return m_zmin ; }
double zmin | ( | void | ) | const [inline, inherited] |
Definition at line 66 of file bounding_box.hpp.
{ return m_zmin ; }
double zsize | ( | void | ) | const [inline, inherited] |
Definition at line 71 of file bounding_box.hpp.
Seq<cell3d *> b_neighbors [inherited] |
Definition at line 111 of file cell3d.hpp.
Referenced by cell3d< C, V >::neighbors().
Seq<cell3d *> e_neighbors [inherited] |
Definition at line 107 of file cell3d.hpp.
Referenced by cell3d< C, V >::neighbors().
Seq<cell3d *> f_neighbors [inherited] |
Definition at line 110 of file cell3d.hpp.
Referenced by cell3d< C, V >::neighbors().
Seq<Point *> m_boundary [inherited] |
Definition at line 88 of file cell3d.hpp.
Referenced by cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve().
Definition at line 93 of file cell3d.hpp.
Seq<Polynomial> m_polynomials |
Definition at line 88 of file cell3d_algebraic_curve.hpp.
Referenced by cell3d_algebraic_curve< C, V >::cell3d_algebraic_curve(), cell3d_algebraic_curve< C, V >::equation(), and cell3d_algebraic_curve< C, V >::nbeq().
int m_reg |
Definition at line 90 of file cell3d_algebraic_curve.hpp.
algebraic_curve<C,V>* m_shape |
Definition at line 89 of file cell3d_algebraic_curve.hpp.
Seq<Point *> m_singular [inherited] |
Definition at line 89 of file cell3d.hpp.
int m_type [inherited] |
Definition at line 90 of file cell3d.hpp.
double m_xmax [protected, inherited] |
Definition at line 107 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_xmax(), bounding_box< double, V >::xmax(), and bounding_box< double, V >::xsize().
double m_xmin [protected, inherited] |
Definition at line 107 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_xmin(), bounding_box< double, V >::xmin(), and bounding_box< double, V >::xsize().
double m_ymax [protected, inherited] |
Definition at line 108 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_ymax(), bounding_box< double, V >::ymax(), and bounding_box< double, V >::ysize().
double m_ymin [protected, inherited] |
Definition at line 108 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_ymin(), bounding_box< double, V >::ymin(), and bounding_box< double, V >::ysize().
double m_zmax [protected, inherited] |
Definition at line 109 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_zmax(), bounding_box< double, V >::zmax(), and bounding_box< double, V >::zsize().
double m_zmin [protected, inherited] |
Definition at line 109 of file bounding_box.hpp.
Referenced by bounding_box< double, V >::is0D(), bounding_box< double, V >::is1D(), bounding_box< double, V >::is2D(), bounding_box< double, V >::is3d(), bounding_box< double, V >::set_zmin(), bounding_box< double, V >::zmin(), and bounding_box< double, V >::zsize().
Seq<cell3d *> n_neighbors [inherited] |
Definition at line 108 of file cell3d.hpp.
Referenced by cell3d< C, V >::neighbors().
Seq<cell3d *> s_neighbors [inherited] |
Definition at line 104 of file cell3d.hpp.
Referenced by cell3d< C, V >::neighbors().
Seq<cell3d *> w_neighbors [inherited] |
Definition at line 109 of file cell3d.hpp.
Referenced by cell3d< C, V >::neighbors().