G+Smo
25.01.0
Geometry + Simulation Modules
|
Utility functions required by gsModeling classes. More...
Go to the source code of this file.
Namespaces | |
namespace | gismo |
The G+Smo namespace, containing all definitions for the library. | |
Functions | |
template<class T > | |
void | addConstraints (gsMatrix< T > const &C1, gsMatrix< T > const &d1, gsMatrix< T > const &C2, gsMatrix< T > const &d2, gsMatrix< T > &C, gsMatrix< T > &d) |
addConstraints | |
template<class T > | |
T | conditionedAngle (gsVector3d< T > vec1, gsVector3d< T > vec2) |
Angle between two vector: 0 <= angle <= pi. | |
template<class T > | |
T | conditionedAngle (gsVector3d< T > vec1, gsVector3d< T > vec2, gsVector3d< T > normal) |
template<class T > | |
gsMatrix< T > | convert2Zero (gsMatrix< T > const &mat) |
convert a with abs(a) < eps=2.220446049250313e-16 into 0 | |
template<class T > | |
gsVector< T > | criticalPointOfQuadratic (gsMatrix< T > &A, gsMatrix< T > &C, gsVector< T > &d) |
template<class T > | |
gsMatrix< T > | criticalPointOfQuadratic (gsMatrix< T > const &A, gsMatrix< T > const &b, gsMatrix< T > const &C, gsMatrix< T > const &d) |
template<class T > | |
gsMatrix< T > | criticalPointOfQuadratic (gsMatrix< T > const &A, gsMatrix< T > const &C, gsMatrix< T > const &d) |
template<class T > | |
gsMatrix< T > | crossNorm2Mat (gsMatrix< T > const &mat1, gsMatrix< T > const &mat2) |
template<class T > | |
gsMatrix< T > | flipLR (const gsMatrix< T > &mat) |
Flip columes from left to right and vice versa. | |
template<class T > | |
gsBSpline< T > | gsInterpolate (gsKnotVector< T > &kv, const gsMatrix< T > &preImage, const gsMatrix< T > &image, const gsMatrix< T > &preNormal, const gsMatrix< T > &normal, const gsMatrix< T > &preImageApp, const gsMatrix< T > &imageApp, T const &w_reg, T const &w_app, gsMatrix< T > &outPointResiduals, gsMatrix< T > &outNormalResiduals) |
template<class T > | |
gsTensorBSpline< 2, T >::Ptr | gsInterpolateSurface (const gsMatrix< T > &exactPoints, const gsMatrix< T > &exactValues, const gsMatrix< T > &appxPointsEdges, const gsMatrix< T > &appxValuesEdges, const gsMatrix< T > &appxPointsInt, const gsMatrix< T > &appxValuesInt, const gsMatrix< T > &appxNormalPoints, const gsMatrix< T > &appxNormals, T wEdge, T wInt, T wNormal, T wReg, const gsKnotVector< T > &kv1, const gsKnotVector< T > &kv2, bool force_normal) |
template<class T > | |
gsMatrix< T > | optQuadratic (gsMatrix< T > const &A, gsMatrix< T > const &b, gsMatrix< T > const &C, gsMatrix< T > const &d) |
Find X which solves: min (AX-b)^T (AX-b), s.t. CX=d. | |
template<class T > | |
gsMatrix< T > | optQuadratic (gsMatrix< T > const &A1, gsMatrix< T > const &b1, T const &w1, gsMatrix< T > const &A2, gsMatrix< T > const &b2, T const &w2, gsMatrix< T > const &C, gsMatrix< T > const &d) |
Find X which solves: min w_1 (A_1 X-b_1)^T (A_1 X-b_1) + w_2 (A_2 X-b_2)^T (A_2 X-b_2), s.t. CX=d. | |
template<class T > | |
gsMatrix< T > | optQuadratic (gsMatrix< T > const &A1, gsMatrix< T > const &b1, T const &w1, gsMatrix< T > const &A2, gsMatrix< T > const &b2, T const &w2, gsMatrix< T > const &C, gsMatrix< T > const &d, T const &w3, gsMatrix< T > const &Q) |
template<class T > | |
void | removeCol (gsMatrix< T > &mat, int const &removeEnds, int const &nPoints) |
remove columes 0, nPoints, 2*nPoints,.. of a given matrix | |
template<class T > | |
void | sampleGridGeometry (const gsMultiPatch< T > &mp, const index_t &numPatch, const index_t &numSamples, gsMatrix< T > ¶ms, gsMatrix< T > &points) |
sampleGridGeometry: samples a grid point cloud from a given geometry | |
template<class T > | |
void | sampleScatteredGeometry (const gsMultiPatch< T > &mp, const index_t &numPatch, const index_t &numSamples, index_t &numBdr, gsMatrix< T > ¶ms, gsMatrix< T > &points) |
sampleScatteredGeometry: samples a scattered point cloud from a given geometry | |
template<class T > | |
void | scaleFrom01 (T tMin, gsGeometry< T > &geo, T tMax, bool verbose) |
Scale the geometry geo from [0, 1]^D to [tMin, tMax]^D. | |
template<class T > | |
void | scaleFrom01 (T tMin, gsMatrix< T > &mT, T tMax, bool verbose) |
Scale the matrix mT entries from [0, 1] to [tMin, tMax]. | |
template<class T > | |
T | scaleFrom01 (T tMin, T t, T tMax) |
Scale the inteval [0,1] to [tMin, tMax]. | |
template<class T > | |
void | scaleGeo (const std::string &fin, const std::string &fout, T tMin, T tMax, bool verbose) |
Scale the geometry contained in file fin from [0, 1]^D to [tMin, tMax]^D and save it to fout. | |
template<class T > | |
void | scalePoints (const gsMatrix< T > &xyz, gsMatrix< T > &points) |
Function to scale the input points xyz in [0,1]^D and saves it to points. | |
template<class T > | |
void | scalePts (const std::string &fin, const std::string &fout, index_t uvIdIn, index_t uvIdOut, index_t xyzIdIn, index_t xyzIdOut, T tMin, T tMax, bool verbose) |
Scale the points contained in file fin from [0, 1]^D to [tMin, tMax]^D and save it to fout. | |
template<class T > | |
void | scaleTo01 (gsMatrix< T > &xyz, bool verbose) |
Scale the matrix xyz entries to [0, 1]^D. | |
template<class T > | |
void | scaleTo01 (real_t tMin, gsMatrix< T > &mT, real_t tMax) |
Scale the matrix mT entries to [0, 1]. | |
template<class T > | |
T | scaleTo01 (T tMin, T t, T tMax) |
Scale the interval [tMin, tMax] to [0, 1]. | |
template<class T > | |
void | sortPointCloud (gsMatrix< T > ¶meters, gsMatrix< T > &points, std::vector< index_t > &corners) |
sortPointCloud: sorts the point cloud into interior and boundary points. parameters and points ordered by : interior (parameters/points) and boundary (parameters/points) ordered anticlockwise south-east-north-west edges, plus the 4 corner domains stored in a vector [c1, c2, c3, c4]. | |
template<class T > | |
void | threeOnDiag (const gsSparseMatrix< T > &block, gsSparseMatrix< T > &result) |
template<class T > | |
gsVector< T > | vectorIntersect (gsVector< T > const &tangent1, gsVector< T > const &tangent2, gsMatrix< T > const &Vert1, gsMatrix< T > const &Vert2) |
intersection of two vectors | |
Utility functions required by gsModeling classes.
This file is part of the G+Smo library.
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
Author(s): A. Mantzaflaris, D.-M. Nguyen, M. Pauley