G+Smo  24.08.0
Geometry + Simulation Modules
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
gsParametrization< T >::Neighbourhood Class Reference

Detailed Description

template<class T>
class gismo::gsParametrization< T >::Neighbourhood

Class that maintains neighbourhood information of triangle mesh. Represents the neighbourhood properties of a vertex in the triangle mesh.

For the parametrization according to Floater's Algorithm two linear equation systems have to be solved in order to calculate the coordinates of the parameter points. All the information needed to construct these linear equation systems is stored in a Neighbourhood object.

Every object of Neighbourhood therefore stores mesh information, the local parametrization for every inner vertex and the local neighbourhood for every boundary vertex. The linear equations are given by Au=b1 and Av=b2, where A is the matrix with a(i,i) = 1 and a(i,j) = -lambda(i,j) for j != i and the right-hand sides are given by the sum of all lambda(i,j)*u(j) or lambda(i,j)*v(j) for all boundary points, which are calculated beforehand. The boudary points can be calculated in different ways like choosing some particular boundary corner points and distribute the rest of the points evenly or according to their distance.

An object is constructed from a gsHalfEdgeMesh object and the desired parametrization method, that can be chosen from 'uniform', 'shape' and 'distance'. Basically the construction is just about constructing the MeshInfo object, the vector of localParametrization objects and the vector of LocalNeighbourhood objects.

There are getter functions for all information that is needed to formulate the equation system. E. g. one can get the number of vertices, number of inner vertices, boundary length, number of boundary halfedges, halfedge lengths and lambdas. Furthermore there are functions to find the boundary corner points according to the method.

A neighbourhood can be printed.

+ Inheritance diagram for gsParametrization< T >::Neighbourhood:

Public Member Functions

const std::vector< index_tgetBoundaryCorners (const size_t method, const T range=0.1, const size_t number=4) const
 Get boundary corners depending on the method. More...
 
const std::vector< T > & getLambdas (const size_t i) const
 Get vector of lambdas. More...
 
 Neighbourhood (const gsHalfEdgeMesh< T > &meshInfo, const size_t parametrizationMethod=2)
 Default constructor. More...
 

Constructor & Destructor Documentation

Neighbourhood ( const gsHalfEdgeMesh< T > &  meshInfo,
const size_t  parametrizationMethod = 2 
)
explicit

Default constructor.

Constructor

This constructor takes as an input the filename and a parametrization method. The LocalParametrization object then is constructed according to this method.

Parameters
[in]meshInfoconst gsHalfEdgeMesh<T> object
[in]parametrizationMethodconst size_t - {1:shape, 2:uniform, 3:distance}

Member Function Documentation

const std::vector< index_t > getBoundaryCorners ( const size_t  method,
const T  range = 0.1,
const size_t  number = 4 
) const

Get boundary corners depending on the method.

This method returns a vector with the indices of the boundary corners. ...........................................................................................................

Returns
vector of boundary corners
const std::vector< T > & getLambdas ( const size_t  i) const

Get vector of lambdas.

This method returns a vector that stores the lambdas.

Returns
vector of lambdas