RefineStrategy.hpp
Go to the documentation of this file.
1 
6 #ifndef REFINESTRATEGY_HPP
7 #define REFINESTRATEGY_HPP 1
8 
9 #include <algorithm>
10 #include "../../tessellation/tessellation.hpp"
11 #include "../two_dimensional/computational_cell_2d.hpp"
12 #include "../../misc/utils.hpp"
17 {
18 public:
20  RefineStrategy(void);
30  virtual vector<int> CellsToRefine
31  (Tessellation const& tess,
32  vector<ComputationalCell> const& cells,
33  double time,
34  vector<Vector2D> &directions,
35  vector<int> const& Removed)=0;
45  vector<int> RemoveDuplicatedLately(vector<int> const& ToRefine,
46  int Npoints,vector<Vector2D> &directions,vector<int> const& Removed,
47  Tessellation const& tess);
48 
55  vector<int> RemoveNearBoundary(vector<int> const& ToRefine,vector<Vector2D>
56  &directions,Tessellation const& tess);
58  vector<int> refined_old;
60  virtual ~RefineStrategy(void);
61 };
62 
71 Vector2D FindBestSplit(Tessellation const* tess,int PointToRefine,
72  vector<Edge> const& edges,double R,Vector2D &normal);
73 #endif // REFINESTRATEGY_HPP
virtual vector< int > CellsToRefine(Tessellation const &tess, vector< ComputationalCell > const &cells, double time, vector< Vector2D > &directions, vector< int > const &Removed)=0
Calculates the cells to be refined.
Vector2D FindBestSplit(Tessellation const *tess, int PointToRefine, vector< Edge > const &edges, double R, Vector2D &normal)
Finds the best way to spit the cell by finding the line connecting the mesh point and the cell&#39;s CM...
RefineStrategy(void)
Class constructor.
Abstract class for tessellation.
vector< int > refined_old
The cells that were refined in the previous time step.
virtual ~RefineStrategy(void)
Virtual destructor.
vector< int > RemoveDuplicatedLately(vector< int > const &ToRefine, int Npoints, vector< Vector2D > &directions, vector< int > const &Removed, Tessellation const &tess)
Removes cells that were splitted in the last time step.
Abstract class for refinment strategies.
vector< int > RemoveNearBoundary(vector< int > const &ToRefine, vector< Vector2D > &directions, Tessellation const &tess)
Removed from the list cells near periodic boundaries.
2D Mathematical vector
Definition: geometry.hpp:15