#include <subdivision.hpp>
Definition at line 96 of file subdivision.hpp.
typedef Cell::BoundingBox BoundingBox |
Reimplemented in mesher3d_shape< C, V >, and subdivision< C, with_tpl3d< V >, CELL >.
Definition at line 100 of file subdivision.hpp.
typedef Cell Input |
Definition at line 103 of file subdivision.hpp.
Reimplemented in mesher3d_shape< C, V >, and subdivision< C, with_tpl3d< V >, CELL >.
Definition at line 102 of file subdivision.hpp.
typedef kdtree_cell<Cell> Output |
Definition at line 104 of file subdivision.hpp.
typedef C Scalar |
Definition at line 99 of file subdivision.hpp.
subdivision | ( | double | e1 = 0.1 , |
|
double | e2 = 0.001 | |||
) | [inline] |
Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.
Definition at line 137 of file subdivision.hpp.
~subdivision | ( | void | ) | [inline] |
Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.
Definition at line 142 of file subdivision.hpp.
void clear | ( | void | ) | [inline, virtual] |
Reimplemented in mesher3d_shape< C, V >, and subdivision< C, with_tpl3d< V >, CELL >.
Definition at line 161 of file subdivision.hpp.
Referenced by subdivision< C, with_tpl3d< V >, CELL >::clear().
Input* get_input | ( | void | ) | [inline] |
Definition at line 113 of file subdivision.hpp.
Output* get_output | ( | void | ) | [inline] |
Definition at line 115 of file subdivision.hpp.
Referenced by subdivision< C, V, Cell >::run(), mesher3d< C, V, Cell >::run(), mesher2d_dual< Cell, V >::run(), and subdivision< C, V, Cell >::set_input().
double get_precision | ( | void | ) | const [inline] |
Definition at line 120 of file subdivision.hpp.
Referenced by subdivision< C, V, Cell >::run().
00120 { return m_minprec ; }
double get_smoothness | ( | void | ) | const [inline] |
Definition at line 121 of file subdivision.hpp.
Referenced by subdivision< C, V, Cell >::run().
00121 { return m_maxprec ; }
void run | ( | void | ) | [inline] |
Reimplemented in mesher3d_shape< C, V >.
Definition at line 165 of file subdivision.hpp.
References Cell, node< _CELL >::get_cell(), subdivision< C, V, Cell >::get_output(), subdivision< C, V, Cell >::get_precision(), subdivision< C, V, Cell >::get_smoothness(), kdtree_cell< CELL >::m_nodes, and kdtree_cell< CELL >::root().
Referenced by mesher3d_dual< C, V, Cell >::run(), mesher3d< C, V, Cell >::run(), and mesher2d_dual< Cell, V >::run().
00165 { 00166 00167 typedef use<subdivision_def,C,V> USE; 00168 00169 double maxsz = this->get_smoothness()*this->get_output()->root()->get_cell()->size(); 00170 double minsz = this->get_precision()*this->get_output()->root()->get_cell()->size(); 00171 00172 std::cout<<"Size :"<< maxsz<< " "<<minsz<<std::endl; 00173 00174 while(!this->get_output()->m_nodes.empty()) { 00175 Node* node = this->get_output()->m_nodes.front() ; 00176 Cell* cl = node->get_cell() ; 00177 00178 if( USE::is_not_out(this,cl)) { 00179 if(cl->size() > maxsz) 00180 { 00181 USE::subdivide_node(this->get_output(), cl, node) ; 00182 } 00183 else if(USE::is_regular(this,cl)) 00184 { 00185 USE::process_regular(this->get_output(),cl) ; 00186 } 00187 else if(cl->size() > minsz ) 00188 { 00189 USE::subdivide_node(this->get_output(), cl, node) ; 00190 } 00191 else { 00192 std::cout<<"Singular cell"<<std::endl; 00193 USE::process_singular(this->get_output(), cl); 00194 } 00195 } 00196 this->get_output()->m_nodes.pop_front() ; 00197 } 00198 }
void set_input | ( | Cell * | bx | ) | [inline] |
Definition at line 146 of file subdivision.hpp.
References subdivision< C, V, Cell >::get_output(), kdtree_cell< CELL >::m_nodes, kdtree_cell< CELL >::root(), and node< _CELL >::set_cell().
Referenced by mesher3d_dual< C, V, Cell >::run(), mesher3d< C, V, Cell >::run(), and mesher2d_dual< Cell, V >::run().
00147 { 00148 Node* root = this->get_output()->root(); 00149 root->set_cell(c0); 00150 m_output->m_nodes.push_back(root) ; 00151 }
void set_precision | ( | double | eps | ) | [inline] |
Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.
Definition at line 157 of file subdivision.hpp.
References subdivision< C, V, Cell >::m_minprec.
Referenced by subdivision< C, with_tpl3d< V >, CELL >::set_precision().
00157 { 00158 m_minprec = eps; 00159 }
void set_smoothness | ( | double | eps | ) | [inline] |
Reimplemented in subdivision< C, with_tpl3d< V >, CELL >.
Definition at line 153 of file subdivision.hpp.
References subdivision< C, V, Cell >::m_maxprec.
Referenced by subdivision< C, with_tpl3d< V >, CELL >::set_smoothness().
00153 { 00154 m_maxprec = eps; 00155 }
double m_maxprec |
Definition at line 129 of file subdivision.hpp.
Referenced by subdivision< C, with_tpl3d< V >, bcell3d< C, V > >::get_smoothness(), and subdivision< C, V, Cell >::set_smoothness().
double m_minprec |
Definition at line 130 of file subdivision.hpp.
Referenced by subdivision< C, with_tpl3d< V >, bcell3d< C, V > >::get_precision(), and subdivision< C, V, Cell >::set_precision().