WaveBEM: Unsteady Nonlinear Potential Flow Solver for Ship-Wave Interaction.
bem_utilities.cc
Go to the documentation of this file.
1 #include "bem_utilities.h"
2 
5 
6 using namespace std;
7 
8 namespace BEMUtilities
9 {
11  {
13  cell = tria.begin_active(), endc = tria.end();
14  unsigned int refinedCellCounter = 1;
15  while (refinedCellCounter)
16  {
17  refinedCellCounter = 0;
18  for (cell=tria.begin_active(); cell!= endc; ++cell)
19  {
20  if (cell->extent_in_direction(0) > 1.5*cell->extent_in_direction(1))
21  {
22  cell->set_refine_flag(RefinementCase<2>::cut_axis(0));
23  refinedCellCounter++;
24  }
25  else
26  {
27  if (cell->extent_in_direction(1) > 1.5*cell->extent_in_direction(0))
28  {
29  cell->set_refine_flag(RefinementCase<2>::cut_axis(1));
30  refinedCellCounter++;
31  }
32  }
33  }
35  }
36  }
37 }
cell_iterator end() const
STL namespace.
virtual void execute_coarsening_and_refinement()
active_cell_iterator begin_active(const unsigned int level=0) const
We collect in this namespace all general BEM utilities.
Definition: bem_utilities.cc:8
void remove_mesh_anisotropy(Triangulation< 2, 3 > &tria)