52 typedef std::vector<Point2D, typename Point2D::aalloc> VectorType;
54 typedef memory::shared_ptr<gsParametrization<T> > uPtr;
101 real_t = 0, real_t = 1)
const
106 gsParametrization<T>& setOptions(
const gsOptionList& list);
148 const size_t vertexIndex,
149 const bool innerVertex = 1);
238 const size_t parametrizationMethod = 2);
304 const size_t parametrizationMethod = 2);
313 const std::vector<T> &
getLambdas(
const size_t i)
const;
322 const std::vector<index_t>
323 getBoundaryCorners(
const size_t method,
const T range = 0.1,
const size_t number = 4)
const;
328 static const Point2D findPointOnBoundary(T w,
size_t index);
331 std::vector<T> midpoints(
const size_t numberOfCorners,
const T length)
const;
332 void searchAreas(
const T range,
333 std::vector<std::pair<T, size_t> > &sortedAngles,
334 std::vector<index_t> &corners)
const;
335 void takeCornersWithSmallestAngles(
size_t number,
336 std::vector<std::pair<T, size_t> > &sortedAngles,
337 std::vector<index_t> &corners)
const;
341 std::vector<LocalParametrization> m_localParametrizations;
342 std::vector<LocalNeighbourhood> m_localBoundaryNeighbourhoods;
372 std::vector<size_t> indices(
const gsMatrix<T>& vertices)
const
374 std::vector<size_t> result;
375 GISMO_ASSERT(vertices.rows() == 3,
"three rows expected in vertices");
376 for(
index_t c=0; c<vertices.cols(); c++)
378 result.push_back(
m_mesh.findVertex(vertices(0, c), vertices(1, c), vertices(2, c),
true));
383 void calculate(
const size_t boundaryMethod,
384 const size_t paraMethod,
385 const std::vector<index_t> &cornersInput,
387 const size_t numberInput);
389 T findLengthOfPositionPart(
const size_t position,
390 const size_t numberOfPositions,
391 const std::vector<index_t> &bounds,
392 const std::vector<T> &lengths);
394 bool rangeCheck(
const std::vector<index_t> &corners,
const size_t minimum,
const size_t maximum);
398 const gsHalfEdgeMesh<T> & mesh()
const {
return m_mesh;}
400 const VectorType & pointParameters()
const
409 #ifndef GISMO_BUILD_LIB
410 #include GISMO_HPP_HEADER(gsParametrization.hpp)
Class that maintains parametrization This class Parametrization stores the mesh information and the t...
Definition: gsParametrization.h:46
const std::list< T > & getAngles() const
Get angles.
Definition: gsParametrization.hpp:757
Provides declaration of the gsHalfEdgeMesh class.
Class that maintains neighbourhood information of triangle mesh. Represents the neighbourhood propert...
Definition: gsParametrization.h:285
size_t getVertexIndex() const
Get vertex index.
Definition: gsParametrization.hpp:739
const Point2D & getParameterPoint(size_t vertexIndex) const
Get parameter point Returns the parameter point with given vertex index.
Definition: gsParametrization.hpp:157
const std::vector< T > & getLambdas() const
Get lambdas The lambdas are returned.
Definition: gsParametrization.hpp:604
void writeTexturedMesh(std::string filename) const
Definition: gsParametrization.hpp:204
T getInnerAngle() const
Get inner angle.
Definition: gsParametrization.hpp:763
Class that maintains the local neighbourhood properties.
Definition: gsParametrization.h:127
std::vector< T > m_lambdas
lambdas
Definition: gsParametrization.h:259
gsHalfEdgeMesh< T >::Chain m_neighbours
chain of neighbours
Definition: gsParametrization.h:207
#define index_t
Definition: gsConfig.h:32
gsMatrix< T > createUVmatrix()
Definition: gsParametrization.hpp:163
std::list< T > getNeighbourDistances() const
Get neighbour distances.
Definition: gsParametrization.hpp:774
#define GISMO_ASSERT(cond, message)
Definition: gsDebug.h:89
LocalParametrization(const gsHalfEdgeMesh< T > &meshInfo, const LocalNeighbourhood &localNeighbourhood, const size_t parametrizationMethod=2)
Constructor Using this constructor one needs to input mesh information, a local neighbourhood and a p...
Definition: gsParametrization.hpp:524
void calculateLambdas(const size_t N, VectorType &points)
Calculate lambdas The lambdas according to Floater's algorithm are calculated.
Definition: gsParametrization.hpp:616
virtual gsMesh< T > createFlatMesh() const
Definition: gsParametrization.hpp:185
const std::list< size_t > getVertexIndicesOfNeighbours() const
Get vertex indices of neighbours.
Definition: gsParametrization.hpp:751
Class Representing a triangle mesh with 3D vertices.
Definition: gsMesh.h:31
virtual void restrictMatrices(gsMatrix< T > &, const gsMatrix< T > &, real_t=0, real_t=1) const
It might make sense in the derived classes to restrict the parameters to [0, 1]^2.
Definition: gsParametrization.h:100
Provides a list of labeled parameters/options that can be set and accessed easily.
Class maintains local parametrization This class represents a local parametrization for a point in th...
Definition: gsParametrization.h:221
const std::vector< T > & getLambdas(const size_t i) const
Get vector of lambdas.
Definition: gsParametrization.hpp:279
gsMatrix< T > createXYZmatrix()
Definition: gsParametrization.hpp:174
Neighbourhood(const gsHalfEdgeMesh< T > &meshInfo, const size_t parametrizationMethod=2)
Default constructor.
Definition: gsParametrization.hpp:263
std::list< T > m_neighbourDistances
list of distances to neighbours
Definition: gsParametrization.h:209
size_t m_vertexIndex
vertex index
Definition: gsParametrization.h:258
size_t m_vertexIndex
vertex index
Definition: gsParametrization.h:206
static gsOptionList defaultOptions()
Returns the list of default options for gsParametrization.
Definition: gsParametrization.hpp:35
A Point in T^d, with an index number.
Definition: gsPoint.h:26
LocalNeighbourhood(const gsHalfEdgeMesh< T > &meshInfo, const size_t vertexIndex, const bool innerVertex=1)
Constructor.
Definition: gsParametrization.hpp:681
Class that maintains chain of halfedges.
Definition: gsHalfEdgeMesh.h:156
void constructAndSolveEquationSystem(const Neighbourhood &neighbourhood, const size_t n, const size_t N)
Constructs linear equation system and solves it.
Definition: gsParametrization.hpp:122
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.
Definition: gsParametrization.hpp:285
This is the main header file that collects wrappers of Eigen for linear algebra.
Class which holds a list of parameters/options, and provides easy access to them. ...
Definition: gsOptionList.h:32
virtual void compute()
Main function which performs the computation.
Definition: gsParametrization.hpp:224
const gsHalfEdgeMesh< T > m_mesh
mesh information
Definition: gsParametrization.h:57
std::list< T > m_angles
list of angles between neighbours
Definition: gsParametrization.h:208
gsHalfEdgeMesh is a gsMesh implementation that handles Halfedges
Definition: gsHalfEdgeMesh.h:46
size_t getNumberOfNeighbours() const
Get number of neighbours.
Definition: gsParametrization.hpp:745
VectorType m_parameterPoints
parameter points
Definition: gsParametrization.h:58
gsParametrization(const gsMesh< T > &mesh, const gsOptionList &list=defaultOptions())
Constructor using the input mesh and (possibly) options.
Definition: gsParametrization.hpp:49