Discontinuous Galerkin Library
#include "dg/algorithm.h"

Shortest Distance to a collection of vertical and horizontal lines. More...

Public Member Functions

 WallDistance (std::vector< double > vertical, std::vector< double > horizontal)
 Allocate lines. More...
 
 WallDistance (dg::Grid2d walls)
 Allocate lines. More...
 
double operator() (double R, double Z) const
 Distance to closest wall in a box. More...
 

Detailed Description

Shortest Distance to a collection of vertical and horizontal lines.

First determine which line is closest to given point and then determine the exact distance to it

Constructor & Destructor Documentation

◆ WallDistance() [1/2]

dg::WallDistance::WallDistance ( std::vector< double >  vertical,
std::vector< double >  horizontal 
)
inline

Allocate lines.

Parameters
verticalwalls R_0, R_1 ... ( can be arbitrary size)
horizontalwalls Z_0, Z_1 ... ( can be arbitrary size)

◆ WallDistance() [2/2]

dg::WallDistance::WallDistance ( dg::Grid2d  walls)
inline

Allocate lines.

Parameters
wallstwo vertical (x0, x1) and two horizontal (y0, y1) walls

Member Function Documentation

◆ operator()()

double dg::WallDistance::operator() ( double  R,
double  Z 
) const
inline

Distance to closest wall in a box.


The documentation for this struct was generated from the following file: