Chaste Commit::ca8ccdedf819b6e02855bc0e8e6f50bdecbc5208
MeshUtilityFunctions.hpp File Reference
#include "UblasVectorInclude.hpp"
#include <cfloat>
+ Include dependency graph for MeshUtilityFunctions.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

template<std::size_t DIM>
std::vector< c_vector< double, DIM > > EvenlySpaceAlongPath (std::vector< c_vector< double, DIM > > &path, bool closedPath, bool permuteOrder, std::size_t numPointsToPlace, double targetSpacing=DBL_MAX)
 

Detailed Description

This file contains utility functions for mesh operations.

Definition in file MeshUtilityFunctions.hpp.

Function Documentation

◆ EvenlySpaceAlongPath()

template<std::size_t DIM>
std::vector< c_vector< double, DIM > > EvenlySpaceAlongPath ( std::vector< c_vector< double, DIM > > &  path,
bool  closedPath,
bool  permuteOrder,
std::size_t  numPointsToPlace,
double  targetSpacing = DBL_MAX 
)

Evenly space a number of points along a given path so that the distance (along the path) between each two consecutive output points is identical.

Template Parameters
DIMthe space dimension of the path vertices
Parameters
patha vector of vertices defining the existing path along which to distribute points
closedPathwhether the path forms a closed polygon
permuteOrderwhether to randomly permute the input vertices, if the path is closed
numPointsToPlacethe number of points to distribute evenly along the path
targetSpacingthe target distance (along the path) between output points. If set, this overrides numPointsToPlace.
Returns

Definition at line 44 of file MeshUtilityFunctions.cpp.

References RandomNumberGenerator::Instance(), and RandomNumberGenerator::randMod().