Functions
find_affected_cells.hpp File Reference

Determines which cells might be affected by boundary conditions. More...

#include <vector>
#include "tessellation.hpp"
#include "shape_2d.hpp"
Include dependency graph for find_affected_cells.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

bool edge_circle_intersect (const Edge &edge, const Circle &circle)
 Determines if an edge and a circle intersect. More...
 
void find_affected_cells_recursive (const Tessellation &tess, int index, const Circle &circle, vector< int > &res, std::vector< Vector2D > &added, bool periodic, Vector2D const &ll, Vector2D const &ur)
 Recursively finds all cells that intersect a circle. More...
 
vector< int > find_affected_cells (const Tessellation &tess, int index, Circle &circle, vector< int > &vtemp, bool periodic, std::vector< Vector2D > &periodic_add)
 Non recursive version of find affected cells. Only searches one degree of separation. More...
 

Detailed Description

Determines which cells might be affected by boundary conditions.

Author
Almog Yalinewich

Definition in file find_affected_cells.hpp.

Function Documentation

◆ edge_circle_intersect()

bool edge_circle_intersect ( const Edge edge,
const Circle circle 
)

Determines if an edge and a circle intersect.

Parameters
edgeEdge
circleCircle
Returns
True if both intersect, false otherwise

Definition at line 63 of file find_affected_cells.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_affected_cells()

vector<int> find_affected_cells ( const Tessellation tess,
int  index,
Circle circle,
vector< int > &  vtemp,
bool  periodic,
std::vector< Vector2D > &  periodic_add 
)

Non recursive version of find affected cells. Only searches one degree of separation.

Parameters
tessTessellation
indexCell index
circleCircle
vtempTemperaroy object for not reallocating on heap
periodicWhether periodic boundary conditions are used
periodic_addList of points to add due to periodic boundary conditions
Returns
Vector with indices of affected cells

Definition at line 136 of file find_affected_cells.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ find_affected_cells_recursive()

void find_affected_cells_recursive ( const Tessellation tess,
int  index,
const Circle circle,
vector< int > &  res,
std::vector< Vector2D > &  added,
bool  periodic,
Vector2D const &  ll,
Vector2D const &  ur 
)

Recursively finds all cells that intersect a circle.

Parameters
tessTessellation
indexCurrent cell index
circleCircle
resList of cell indices that intersect the circle
addedThe Vector2D to add to the duplicated point (for periodic boundaries)
periodicFlag if periodic boundaries
llLower left corner of the domain
urUpper right corner of the domain

Definition at line 174 of file find_affected_cells.cpp.

Here is the caller graph for this function: