API¶
C++ API¶
-
template<typename
Scalar>
class_Polygon¶ - #include <Polygon.h>
: Polygon class
- Note
: we do not name the class as Polygon to avoid confusion with Polygon defined in windows.h
Subclassed by Cross< Scalar >
Public Types
-
typedef Matrix<int, 3, 1>
Vector3i¶
Public Functions
-
_Polygon()¶
-
~_Polygon()¶
-
void
reverseVertices()¶
-
void
setPolyType(int _polyType)¶
-
void
setPolyType(PolygonType _polyType)¶
-
void
clear()¶
-
bool
at_boundary(int edge_index) const¶
-
void
print() const¶
-
size_t
size() const¶
-
int
getPolyType() const¶
Private Members
-
PolygonType
polyType¶
-
template<typename
Scalar>
classAABBTree_Line¶ Public Types
Public Functions
-
bool
findIntersec(const Line<Scalar> &line, Vector2 &tex2D, Vector3 &pos3D)¶ Search for an intersection between a given line and the lines defined in AABB tree.
- Return
true/false if an instersection is found
- Parameters
line:tex2D:pos3D:node:
Search for an intersection between a given line and the lines defined in AABB tree from a given node.
- Return
true/false if an instersection is found
- Parameters
line:tex2D:pos3D:node:
-
bool
checkLineBoxIntersec(const Line<Scalar> &line, const Box<Scalar> &box)¶ Find if a 2D line is intersecting with a given box.
- Return
- Parameters
line:box:
-
bool
-
template<typename
Scalar>
classAugmentedVectorCreator: public TopoObject¶ - #include <AugmentedVectorCreator.h>
: Create CrossMesh by Input the polygonal mesh and tiltAngle
Public Types
Public Functions
-
~AugmentedVectorCreator()¶
-
void
createAugmentedVectors(Scalar tiltAngle, pCrossMesh crossMesh)¶ Create crossMesh by setting alterative tiltAngle in polyMesh.
- Note
This is the main function
-
void
updateAugmentedVectors(Scalar tiltAngle, pCrossMesh crossMesh)¶
-
void
InitMeshTiltNormalsResolveConflicts(pCrossMesh crossMesh, Scalar tiltAngle)¶ Distribute the sign of each tilt angle.
-
bool
UpdateMeshTiltRange(pCrossMesh crossMesh)¶
Public Static Functions
-
void
InitMeshTiltNormals(pCrossMesh crossMesh)¶ Set initial tilt angle for each cross.
- Note
: the initial tilt angle is 0.
-
-
class
Bezier::AxisAlignedBoundingBox¶ Public Functions
-
AxisAlignedBoundingBox(const ExtremePoints &xPoints)¶
-
float
minX() const¶
-
float
maxX() const¶
-
float
minY() const¶
-
float
maxY() const¶
-
float
width() const¶
-
float
height() const¶
-
float
area() const¶
Public Static Functions
-
constexpr size_t
size()¶
-
-
template<typename
Scalar>
classBaseMeshCreator: public TopoObject¶ - #include <BaseMeshCreator.h>
Mapping the 2D pattern into the 3D surface.
- Return
the base polygonal mesh
Public Types
-
typedef shared_ptr<PolyMesh_AABBTree<Scalar>>
pPolyMeshAABB¶
-
typedef weak_ptr<PolyMesh_AABBTree<Scalar>>
wpPolyMeshAABB¶
Public Functions
-
~BaseMeshCreator()¶
-
void
computeBaseCrossMesh(Matrix<Scalar, 4, 4> textureMat, pPolyMesh &baseMesh2D, pCrossMesh &crossMesh, bool previewMode = false)¶ : main function for mapping the 2D pattern into 3D surface
- Note
: it requires polyMesh with texture.
- Parameters
[in] polyMesh: input 3D guide surface[in] pattern2D: input 2D pattern[in] inverTextureMat: Map from 2D pattern space to surface texture space[out] baseMesh2D: output the base 2D mesh[out] baseMesh: output the base mesh
-
void
computeInternalCross(Matrix4 textureMat, pPolyMesh &baseMesh2D, pCrossMesh &crossMesh)¶
-
void
computeBoundaryCross(Matrix4 textureMat, pPolyMesh &baseMesh2D, pCrossMesh &crossMesh)¶
-
void
removeSmallCrosses(pCrossMesh crossMesh)¶
-
void
recomputeBoundary(pCrossMesh crossMesh)¶
-
void
removeDanglingCross(pCrossMesh crossMesh)¶
-
Vector2
getTextureCoord(Vector2 point, Matrix4 textureMat)¶ : scale the 2D pattern position into UV space
-
template<size_t
N>
classBezier::Bezier¶ Public Functions
-
Bezier()¶
-
size_t
order() const¶
-
size_t
size() const¶
-
double
valueAt(float t, size_t axis) const¶
-
void
translate(float dx, float dy)¶
-
ExtremeValues
derivativeZero(size_t intervals = BEZIER_DEFAULT_INTERVALS, double epsilon = BEZIER_FUZZY_EPSILON, size_t maxIterations = BEZIER_DEFAULT_MAX_ITERATIONS) const¶
-
ExtremePoints
extremePoints() const¶
-
AxisAlignedBoundingBox
aabb() const¶
-
AxisAlignedBoundingBox
aabb(const ExtremePoints &xPoints) const¶
-
TightBoundingBox
tbb() const¶
Public Static Attributes
-
const BinomialCoefficients<N>
binomialCoefficients= BinomialCoefficients<N>()¶
-
const PolynomialCoefficients<N>
polynomialCoefficients= PolynomialCoefficients<N>()¶
Private Functions
-
ExtremeValues
derivativeZero1() const¶
-
ExtremeValues
derivativeZero2() const¶
-
ExtremeValues
derivativeZero3() const¶
-
ExtremeValues
newtonRhapson(size_t intervals = BEZIER_DEFAULT_INTERVALS, double epsilon = BEZIER_FUZZY_EPSILON, size_t maxIterations = BEZIER_DEFAULT_MAX_ITERATIONS) const¶
-
-
template<size_t
N>
classBezier::BinomialCoefficients¶ -
Public Static Functions
-
constexpr size_t
size()¶
Private Members
-
float
mCoefficients[size()]¶
-
constexpr size_t
-
template<typename
Scalar>
structBox¶
-
template<typename
Scalar>
classContactGraph: public TopoObject¶ Public Types
-
typedef shared_ptr<ContactGraphNode<Scalar>>
pContactGraphNode¶
-
typedef shared_ptr<ContactGraphEdge<Scalar>>
pContactGraphEdge¶
-
typedef weak_ptr<ContactGraphEdge<Scalar>>
wpContactGraphEdge¶
-
typedef weak_ptr<ContactGraphNode<Scalar>>
wpContactGraphNode¶
Public Functions
Class constructor.
- Template Parameters
Scalar:
- Parameters
varList:
-
~ContactGraph()¶ Class destructor.
- Template Parameters
Scalar:
-
bool
buildFromMeshes(const vector<pPolyMesh> &meshes, vector<bool> &atBoundary, Scalar eps = 0.002, bool convexhull = true)¶ build the graph from a list of polygonal meshes
- Return
- Template Parameters
Scalar:
- Parameters
meshes:atBoundary:eps:convexhull: : merges faces which on a same plane by its convexhull
-
void
addNode(pContactGraphNode _node)¶ - Template Parameters
Scalar:
- Parameters
_node:
-
void
addContact(pContactGraphNode _nodeA, pContactGraphNode _nodeB, pContactGraphEdge _edge)¶ - Template Parameters
Scalar:
- Parameters
_nodeA:_nodeB:_edge:
-
void
mergeNode(pContactGraphNode _nodeA, pContactGraphNode _nodeB)¶ merging nodeA and nodeB. they should move together.
- Template Parameters
Scalar:
- Parameters
_nodeA_nodeB:
-
void
finalize()¶ Assign nodeID to the graph. Must be called after updating the graph.
- Template Parameters
Scalar:
Public Members
-
vector<pContactGraphNode>
nodes¶
-
vector<pContactGraphEdge>
edges¶
-
vector<pContactGraphEdge>
contact_edges¶
-
vector<std::pair<wpContactGraphNode, wpContactGraphNode>>
merged_nodes¶
-
vector<wpContactGraphNode>
dynamic_nodes¶
Private Functions
-
bool
clusterFacesofInputMeshes(Scalar eps)¶ extract all polygonal faces from the meshes_input and cluster the faces which are on a same plane.
- Return
- Template Parameters
Scalar:
- Parameters
eps:
-
void
listPotentialContacts(vector<bool> &atBoundary)¶ find all pairs of faces which are on a same plane. Their normals have to be on opposite directions
- Template Parameters
Scalar:
- Parameters
atBoundary:
-
void
computeContacts()¶ Parallel compute contacts. Though faces in the ‘contact_pairs’ are on the same plane, checking whether they are overlap needs the 2D poly-poly intersection tool.
- Template Parameters
Scalar:
-
void
buildNodes(vector<bool> &atBoundary)¶ add each part as a node into the graph
- Template Parameters
Scalar:
- Parameters
atBoundary:
-
void
buildEdges()¶ for all pairs of potential contact faces, if their contact_graphedges is not empty, then we add this edge into the graph
- Template Parameters
Scalar:
-
void
computeConvexHullofEdgePolygons()¶ simplified the contact between two nodes, only compute their convex-hull
- Template Parameters
Scalar:
-
typedef shared_ptr<ContactGraphNode<Scalar>>
-
template<typename
Scalar>
classContactGraphEdge¶ - #include <ContactGraphEdge.h>
: Stores which parts are contacted and the contact’s geometry
-
template<typename
Scalar>
classContactGraphNode¶ - #include <ContactGraphNode.h>
Graph node records one part’s geometry and contacts with its neighbors.
Public Types
-
typedef shared_ptr<ContactGraphNode<Scalar>>
pContactGraphNode¶
-
typedef shared_ptr<ContactGraphEdge<Scalar>>
pContactGraphEdge¶
-
typedef weak_ptr<ContactGraphEdge<Scalar>>
wpContactGraphEdge¶
-
typedef weak_ptr<ContactGraphNode<Scalar>>
wpContactGraphNode¶
-
using
ContactNeighbor= pair<wpContactGraphNode, wpContactGraphEdge>¶
Public Functions
-
float
height()¶
-
typedef shared_ptr<ContactGraphNode<Scalar>>
-
template<typename
Scalar>
classConvexBlock: public TopoObject¶ Public Types
-
template<typename
Scalar>
classConvexHull2D¶ Public Types
Public Functions
-
ConvexHull2D()¶
-
void
compute(const ListVector3 &in, ListVector3 &out)¶
-
void
compute(const ListVector3 &in, Vector3 normal, ListVector3 &out)¶
-
-
template<typename
Scalar>
classConvexHull3D¶ Public Types
Public Functions
-
void
compute(ListVector3 &pointList, ListVector3 &ver, ListVector3i &tri)¶
-
void
compute(ListVector3 &pointList, Matrix<Scalar, Dynamic, Dynamic> &V, Matrix<int, Dynamic, Dynamic> &F)¶
-
void
-
template<typename
Scalar>
classCross: public _Polygon<Scalar>, public TopoObject¶ Public Types
Public Functions
-
~Cross()¶
-
void
print() const override¶
-
void
clear()¶
-
shared_ptr<OrientPoint<Scalar>>
ori(int index)¶
-
void
initTiltNormals()¶ Compute Initial Tilt Normal, the rotation angle is 0.
-
void
updateTiltNormalsRoot(float tiltAngle)¶ : Initially update all oriPoints in this cross
1) alternatively update the sign by following the order as oriPoints
2) the sign of first orient point is positive
-
void
updateTiltNormals(float tiltAngle, const std::unordered_map<Cross<Scalar>*, bool> &crossVisited)¶ : Update oriPoints in this cross
1) Apply breadth first search
2) The sign of some orient point could be changed in order to resolve conflict
3) In odd polygon, neighboring orient point could have same sign
: found the EdgeID (order in oriPoints) which correspond crossID is currCrossID
get the edgeID shared between two crosses or NOT_FOUND
- Return
EdgeID the local index of a polygon vertex
- Template Parameters
Scalar:
- Parameters
ncross: the 2nd cross
-
int
getEdgeIDOfGivenVertexID(int vertexID)¶ get the local index of a vertex in a given polygon
fixme: edgeID is not a well chosen name. We should think of changing.
- Return
EdgeID the local index of a polygon vertex
- Template Parameters
Scalar:
- Parameters
vertexID:
Fills up a vector with the IDs of crosses shared between this cross and another one. A cross is shared if in contact with both other crosses.
- Return
The size this crossIDs vector or NOT_FOUND
- Template Parameters
Scalar:
- Parameters
ncross: the cross you want to checkshared_crossIDs: the vector of crossIDs
-
int
getPrevEdgeID(int edgeID)¶ search for the previous local index of local index
fixme: edgeID is not a well chosen name. We should think of changing.
- Return
the previous local index
- Template Parameters
Scalar:
- Parameters
edgeID: the input local index
-
bool
checkNeighborAtBoundary(int nID)¶
-
-
template<typename
Scalar>
classCrossMesh: private PolyMesh<Scalar>¶ Public Types
Public Functions
-
~CrossMesh()¶
-
void
update()¶
-
void
createConnectivity()¶
-
void
print() const¶
-
bool
parse(const nlohmann::json &mesh_json)¶
-
nlohmann::json
dump() const¶
-
void
clear()¶
-
void
erase(size_t index)¶
-
void
erase_nullptr()¶
-
size_t
size() const¶
-
vector<int>
getBoundaryCrossIDs() const¶
-
void
updateCrossID()¶
-
-
template<typename
Scalar>
classCrossMeshCreator: public TopoObject¶ - #include <CrossMeshCreator.h>
CrossMesh = BaseMesh + AugmentedVector
Public Types
-
typedef shared_ptr<PolyMesh_AABBTree<Scalar>>
pPolyMeshAABB¶
-
typedef weak_ptr<PolyMesh_AABBTree<Scalar>>
wpPolyMeshAABB¶
Public Functions
-
CrossMeshCreator(const CrossMeshCreator &_model)¶
-
~CrossMeshCreator()¶
-
void
clear()¶
-
bool
loadSurface(const char *objFileName)¶ : load a .obj model from file
- Parameters
objFileName: .obj file pathtexturedModel: True if use the texture
-
bool
setCrossMesh(pCrossMesh crossmesh)¶
-
bool
updatePatternMesh()¶ : function to create the 2D tiling pattern by using the method in PatternCreator.cpp/.h
-
bool
createCrossMeshFromRSnPattern(bool previewMode, Matrix4 textureMat)¶ : main function to create base CrossMesh
- Parameters
texturedModel: True if the geometry of cross mesh is unknown. False if the polymesh just need to be assigned the tilt anglepreviewMode: True if unnecessary operations are dismissed.
-
bool
createAugmentedVectors()¶ : function to update the augmented vectors of each edge in cross mesh
-
bool
updateAugmentedVectors()¶ : function to update the augmented vectors of each edge in cross mesh
-
bool
updateCrossMeshBoundary(const vector<int> &boundary_crossIDs)¶ : function to update the boundary of the crossmesh
-
bool
computeAugmentedRange()¶ : function to update the valid range of augmented vector
Private Functions
-
void
recomputeTexture()¶
-
typedef shared_ptr<PolyMesh_AABBTree<Scalar>>
-
struct
InterlockingSolver::EquilibriumData¶
-
struct
Bezier::ExtremeValue¶ Public Functions
-
ExtremeValue(float t, size_t axis)¶
-
bool
fuzzyEquals(const ExtremeValue &other) const¶
-
-
class
Bezier::ExtremeValues¶ Public Functions
-
bool
add(float t, size_t axis)¶
-
bool
add(const ExtremeValue &val)¶
-
size_t
size() const¶
-
ExtremeValue &
operator[](size_t idx)¶
-
ExtremeValue
operator[](size_t idx) const¶
Private Members
-
std::vector<ExtremeValue>
values¶
-
bool
-
template<typename
Scalar>
structHypEdge¶
-
template<typename
Scalar>
structHypVertex¶
-
struct
InputMeshNormalizeData¶
-
class
InputVar¶ Subclassed by InputVarBool, InputVarFloat, InputVarInt, InputVarIntList, InputVarMatrix4d
-
class
InputVarIntList: public InputVar¶ Public Functions
-
InputVarIntList(vector<int> val)¶
Public Members
-
vector<int>
value¶
-
-
class
InputVarList¶
-
class
InputVarManager¶
-
struct
InteractData¶
-
struct
InterlockingSolver::InterlockingData¶
-
template<typename
Scalar>
classInterlockingSolver: public TopoObject¶ Subclassed by InterlockingSolver_Clp< Scalar >, InterlockingSolver_Ipopt< Scalar >
Public Types
-
typedef Matrix<double, 3, 1>
Vector3¶
-
typedef Matrix<double, 1, 2>
RowVector2¶
-
typedef Matrix<double, 1, 4>
RowVector4¶
-
typedef weak_ptr<ContactGraphNode<Scalar>>
wpContactGraphNode¶
Public Functions
-
void
computeTranslationalInterlockingMatrix(vector<EigenTriple> &tri, Eigen::Vector2i &size)¶
-
void
computeRotationalInterlockingMatrix(vector<EigenTriple> &tri, Eigen::Vector2i &size)¶
-
void
computeRotationalInterlockingMatrixSparse(EigenSpMat &mat)¶
-
void
appendAuxiliaryVariables(vector<EigenTriple> &tri, Eigen::Vector2i &size)¶
-
void
appendMergeConstraints(vector<EigenTriple> &tri, Eigen::Vector2i &size, bool isRotation)¶
Public Members
-
shared_ptr<ContactGraph<Scalar>>
graph¶
Protected Functions
-
void
get_force_from_norm_fric(Vector3 n, Vector3 u, Vector3 v, RowVector2 &fkx, RowVector2 &fky, RowVector2 &fkz)¶
-
void
get_force_from_norm_fric(Vector3 n, Vector3 u, Vector3 v, RowVector4 &fkx, RowVector4 &fky, RowVector4 &fkz)¶
-
void
get_moment_from_norm_fric_vertex(Vector3 n, Vector3 u, Vector3 v, Vector3 r, RowVector2 &mx, RowVector2 &my, RowVector2 &mz)¶
-
void
get_moment_from_norm_fric_vertex(Vector3 n, Vector3 u, Vector3 v, Vector3 r, RowVector4 &mx, RowVector4 &my, RowVector4 &mz)¶
-
typedef Matrix<double, 3, 1>
-
template<typename
Scalar>
classInterlockingSolver_Clp: public InterlockingSolver<Scalar>¶ Public Types
-
typedef shared_ptr<ContactGraph<Scalar>>
pContactGraph¶
-
typedef shared_ptr<ContactGraphNode<Scalar>>
pContactGraphNode¶
Public Functions
-
bool
isTranslationalInterlocking(pInterlockingData &data)¶
-
bool
isRotationalInterlocking(pInterlockingData &data)¶
-
bool
checkSpecialCase(pInterlockingData &data, vector<EigenTriple> copy_tris, bool rotationalInterlockingCheck, Eigen::Vector2i copy_size)¶
-
bool
solve(pInterlockingData &data, vector<EigenTriple> &tris, bool rotationalInterlockingCheck, int num_row, int num_col, int num_var)¶
-
bool
solveSimplex(pInterlockingData &data, bool rotationalInterlockingCheck, int num_row, int num_col, int num_var, const CoinPackedMatrix &matrix, const double *colLower, const double *colUpper, const double *objective, const double *rowLower, const double *rowUpper)¶
-
bool
solveBarrier(pInterlockingData &data, bool rotationalInterlockingCheck, int num_row, int num_col, int num_var, const CoinPackedMatrix &matrix, const double *colLower, const double *colUpper, const double *objective, const double *rowLower, const double *rowUpper)¶
-
void
unpackSolution(InterlockingSolver_Clp::pInterlockingData &data, bool rotationalInterlockingCheck, const double *solution, int num_var)¶
Public Members
-
CLP_SOLVER_TYPE
type¶
-
typedef shared_ptr<ContactGraph<Scalar>>
-
template<typename
Scalar>
classInterlockingSolver_Ipopt: public InterlockingSolver<Scalar>¶ Public Types
-
typedef shared_ptr<ContactGraph<Scalar>>
pContactGraph¶
-
typedef shared_ptr<ContactGraphNode<Scalar>>
pContactGraphNode¶
Public Functions
-
bool
isTranslationalInterlocking(pInterlockingData &data)¶
-
bool
isRotationalInterlocking(pInterlockingData &data)¶
-
bool
checkSpecialCase(pInterlockingData &data, vector<EigenTriple> copy_tris, bool rotationalInterlockingCheck, Eigen::Vector2i copy_size)¶
-
bool
solve(pInterlockingData &data, vector<EigenTriple> &tris, bool rotationalInterlockingCheck, int num_row, int num_col, int num_var)¶
-
void
unpackSolution(InterlockingSolver_Ipopt::pInterlockingData &data, bool rotationalInterlockingCheck, const double *solution, int num_var)¶
-
typedef shared_ptr<ContactGraph<Scalar>>
-
struct
IOData¶ Public Functions
-
IOData()¶
Public Members
-
shared_ptr<InputVarList>
varList¶
-
vector<int>
boundary_crossIDs¶
-
vector<int>
pickPartIDs¶
-
double
interactMatrix[16]¶
-
InteractData
interact_delta¶
-
InputMeshNormalizeData
normalizedData¶
-
-
class
IpoptProblem: public TNLP¶ - #include <InterlockingSolver_Ipopt.h>
Interface between Ipopt NLP interface and TopoLite Interlocking Solver.
NLP provides an easy interface to Ipopt.
tris is equal to a sparse matrix A, which size is [num_row x num_col]
our variables are [x, t], a row vector.
x: (size: num_var) is the instant translational and rotational velocity.
t: (size: num_col - num_var) is the auxiliary variable.
The optimization is formulated as:
s.t. A.X + * >= T 0 =< x_i =< 1 x_i are real 0 <= <= 1max (\sum_{i = 0}^{num_var} t_i) + \lambda M
Ideally if the structure is interlocking, the objective value should be zero.
In practice, due to numerical error, we have to allow a small tolerance for the objective value.
Wang, Z. et al. (2019). ACM Transactions on Graphics, 38(6), 1–13. https://doi.org/10.1145/3355089.3356489
Wang, Z. (2019). Supplementary Material. ACM Transactions on Graphics, 38(6), 3–5.
Methods to block default compiler methods.
The compiler automatically generates the following three methods. Since the default compiler implementation is generally not what you want (for all but the most simple classes), we usually put the declarations of these methods in the private section and never implement them. This prevents the compiler from implementing an incorrect “default” behavior without us knowing. (See Scott Meyers book, “Effective C++”)
-
IpoptProblem(const IpoptProblem&)¶
-
IpoptProblem &
operator=(const IpoptProblem&)¶
Public Types
Public Functions
-
IpoptProblem()¶ Default constructor
-
~IpoptProblem() override¶ Default destructor
-
bool
get_nlp_info(Index &n, Index &m, Index &nnz_jac_g, Index &nnz_h_lag, IndexStyleEnum &index_style) override¶ Get infos about problem dimensions.
- Parameters
n: number of variablesm: number of constraints eq/ineqnnz_jac_g: non-zero elements in constaints Jacobiannnz_h_lag: non-zero elements in Lagrangian and Hessianindex_style: C or Fortran style
-
bool
initialize(EigenSpMat &mat)¶ Set infos about problem dimensions. The following vars are set:
- Parameters
mat: initial B matrix elements before adding big M contribution to it
-
bool
get_bounds_info(Index n, Number *x_l, Number *x_u, Index m, Number *g_l, Number *g_u) override¶ Get the problem bounds conditions.
- Parameters
n: number of variablesx_l: lower bounds for the variablesx_u: upper bounds for the variablesm: number of constraints eq/ineqg_l: lower bounds for the constraintsg_u: upper bounds for the constraints
-
void
set_vectors_dimensions()¶
-
void
append_bigm_variables(EigenSpMat &mat)¶ Compute B = B_interlock + t0.
/ B00 … B1n | 1 \ B = | … … … | 1 | \ Bm1 … Bmn | 1 /
-
bool
set_bounds_info()¶ Set the problem bounds conditions. The following vars are set.
-
bool
get_starting_point(Index n, bool init_x, Number *x, bool init_z, Number *z_L, Number *z_U, Index m, bool init_lambda, Number *lambda) override¶ Get the starting point for solving the pb Cannot be used for our problem. If we know a starting point, it is not interlocking.
- Parameters
n: number of variablesinit_x:x:init_z:z_L:z_U:m:init_lambda:lambda:
-
bool
eval_f(Index n, const Number *x, bool new_x, Number &obj_value) override¶ - Return
- Parameters
n: number of variablesx: variables valuesnew_x:obj_value: value of the objective function
-
bool
eval_grad_f(Index n, const Number *x, bool new_x, Number *grad_f) override¶ Method to return the gradient of the objective.
- Return
- Parameters
n: number of variablesx: variables valuesnew_x:grad_f: gradient vector values
-
bool
eval_g(Index n, const Number *x, bool new_x, Index m, Number *g) override¶ Method to return the constraint residuals Computes g = B * X.
- Return
- Parameters
n: number of variablesx: variables valuesnew_x:m: number of constraintsg: constraints residuals
-
bool
eval_jac_g(Index n, const Number *x, bool new_x, Index m, Index nele_jac, Index *iRow, Index *jCol, Number *values) override¶ Method to return: 1) The structure of the jacobian (if “values” is NULL) 2) The values of the jacobian (if “values” is not NULL)
-
bool
eval_h(Index n, const Number *x, bool new_x, Number obj_factor, Index m, const Number *lambda, bool new_lambda, Index nele_hess, Index *iRow, Index *jCol, Number *values) override¶ Method to return: 1) The structure of the hessian of the lagrangian (if “values” is NULL) 2) The values of the hessian of the lagrangian (if “values” is not NULL)
-
void
finalize_solution(SolverReturn status, Index n, const Number *x, const Number *z_L, const Number *z_U, Index m, const Number *g, const Number *lambda, Number obj_value, const IpoptData *ip_data, IpoptCalculatedQuantities *ip_cq) override¶ This method is called when the algorithm is complete so the TNLP can store/write the solution
-
class
JsonIOReader¶
-
class
JsonIOWriter¶
-
template<typename
Scalar>
structLine¶
-
struct
AABBTree_Line::Node¶
-
template<typename
Scalar>
structOrientPoint¶ -
Public Functions
-
OrientPoint(const nlohmann::json &oript_json)¶
-
void
print()¶
-
nlohmann::json
dump()¶
-
void
parse(const nlohmann::json &oript_json)¶
-
-
template<typename
Scalar>
classPatternCreator: public TopoObject¶ Public Types
Public Functions
-
PatternCreator()¶
-
~PatternCreator()¶
-
void
create2DPattern(PatternType patternID, int patternRadius, pCrossMesh &out)¶
-
void
computeNeighbors(PatternType crosstype, pPolygon poly, vector<pPolygon> &out)¶
-
Matrix<Scalar, 3, 1>
ComputeTileTranslation(pPolygon neighbor, Vector3 tagtStaPt, Vector3 tagtEndPt)¶
-
void
CreatePolygon_Square(pPolygon &out, Scalar edgeLen, int polyType = POLY_SQUARE_THETA_45)¶
-
void
CreatePolygon_Hexagon(pPolygon &out, Scalar edgeLen, int polyType = POLY_HEXAGON_TYPE_0)¶
-
void
CreatePolygon_Rhombus(pPolygon &out, Scalar edgeLen, int polyType = POLY_RHOMBUS_THETA_0)¶
-
void
CreatePolygon_Pentagon_Cross(pPolygon &out, Scalar edgeLen, int polyType = POLY_PENTAGON_CROSS_TYPE_0)¶
-
void
CreatePolygon_Pentagon_Snow(pPolygon &out, Scalar edgeLen, int polyType = POLY_PENTAGON_SNOW_TYPE_0)¶
-
void
CreatePolygon_Pentagon_Mirror(pPolygon &out, Scalar edgeLen, int polyType = POLY_PENTAGON_MIRROR_TYPE_0)¶
-
vector<vector<double>>
PyCreateMesh_2DPattern(int patternID, int patternRadius)¶
-
-
struct
ContactGraph::plane_contact_compare¶ Public Functions
-
bool
operator()(const polygonal_face &A, const polygonal_face &B) const¶
-
bool
-
template<typename
Scalar>
structPoint¶
-
struct
ContactGraph::polygonal_face¶
-
template<typename
Scalar>
classPolyMesh: public TopoObject¶ Subclassed by CrossMesh< Scalar >, PolyMesh_AABBTree< Scalar >
Public Types
Public Functions
-
~PolyMesh()¶
-
void
clear()¶
-
void
update()¶
-
bool
parse(const nlohmann::json &mesh_json)¶ : parse from json file
- Return
: whether read the json object successfully
- Parameters
mesh_json: json object of the mesh
-
bool
readOBJModel(const char *fileName, bool normalized)¶ : Read OBJ File (from file)
- Parameters
fileName: filename of an input filenormalized: scale the mode into [-1, 1] x [-1, 1] x [-1, 1] box;
-
bool
readOBJModel(const vector<vector<double>> &V, const vector<vector<double>> &TC, const vector<vector<int>> &F, const vector<vector<int>> &FTC, bool normalized)¶ : Read OBJ File (from matrix)
- Parameters
V: vertice’s position arraryTC: vertex texture coordinates arrayF: face index (tri or polygon)FTC: texture face index (tri or polygon)normalized: scale the mode into [-1, 1] x [-1, 1] x [-1, 1] box;
-
void
removeDuplicatedVertices(double eps = FLOAT_ERROR_LARGE)¶
-
void
mergeFaces(double eps = 1e-3)¶
-
void
computeVertexList()¶
-
void
computeTextureList()¶
-
void
print() const¶
-
void
writeOBJModel(const char *objFileName, bool triangulate = false) const¶
-
nlohmann::json
dump() const¶
-
size_t
size()¶
Public Members
-
bool
texturedModel¶
-
-
template<typename
Scalar>
classPolyMesh_AABBTree: public PolyMesh<Scalar>¶ Public Types
Public Functions
-
void
buildTexTree()¶ build a texture tree
-
void
buildPosTree()¶
-
void
-
template<size_t
N>
classBezier::PolynomialCoefficients¶ Public Functions
-
PolynomialCoefficients()¶
-
double
valueAt(size_t pos, float t) const¶
-
const PolynomialPair &
operator[](size_t idx) const¶
Public Static Functions
-
constexpr size_t
size()¶
Private Members
-
PolynomialPair
mPolynomialPairs[size()]¶
-
-
template<typename
Scalar>
classPolyPolyBoolean: private TopoObject¶ Public Functions
-
void
computePolygonsUnion(PolysVector3 &polys, PolysVector3 &polysUnion)¶
-
void
computePolygonsIntersection(const PolyVector3 &polyA, const PolyVector3 &polyB, PolyVector3 &polyIntsec)¶
-
void
computePolygonsIntersection(const PolyVector3 &polyA, const PolyVector3 &polyB, PolysVector3 &polyIntsec)¶
-
bool
check2DPolygonsIntersection(const PolyVector2 &polyA, const PolyVector2 &polyB, Scalar &area)¶
-
void
printPolygon(const PolyVector3 &poly)¶
-
void
cleanPath(PolyVector3 &polyIntsec)¶
-
void
computeFrame(const PolyVector3 &poly, Vector3 &xaxis, Vector3 &yaxis, Vector3 &origin)¶
-
Scalar
computeScale(const PolysVector2 &poly)¶
-
Vector3
computeNormal(const PolyVector3 &poly)¶
-
Vector3
computeCenter(const PolyVector3 &poly)¶
-
void
-
struct
PatternCreator::pVertex_compare¶ Public Functions
-
bool
operator()(const Vector3 &A, const Vector3 &B) const¶
-
bool
-
struct
PolyMesh::sort_vertex¶
-
struct
PolyMesh::sort_vertex_compare¶ Public Functions
-
bool
operator()(const sort_vertex &A, const sort_vertex &B) const¶
-
bool
-
template<typename
Scalar>
classStrucCreator: public TopoObject¶ Public Types
-
typedef shared_ptr<ConvexBlock<Scalar>>
pConvexBlock¶
Public Members
-
vector<pConvexBlock>
blocks¶
-
typedef shared_ptr<ConvexBlock<Scalar>>
-
class
Bezier::TightBoundingBox¶ Public Functions
-
TightBoundingBox(const ExtremePoints &xPoints, const Vec2 &translation, double rotation)¶
-
float
minX() const¶
-
float
maxX() const¶
-
float
minY() const¶
-
float
maxY() const¶
-
float
area() const¶
-
float
width() const¶
-
float
height() const¶
Public Static Functions
-
constexpr size_t
size()¶
-
-
class
TopoObject¶ Subclassed by AugmentedVectorCreator< Scalar >, BaseMeshCreator< Scalar >, ContactGraph< Scalar >, ConvexBlock< Scalar >, Cross< Scalar >, CrossMeshCreator< Scalar >, InterlockingSolver< Scalar >, PatternCreator< Scalar >, PolyMesh< Scalar >, PolyPolyBoolean< Scalar >, StrucCreator< Scalar >
Public Functions
-
TopoObject()¶
-
TopoObject(const TopoObject &obj)¶
-
shared_ptr<InputVarList>
getVarList() const¶
-
bool
checkCoherency()¶
Private Members
-
shared_ptr<InputVarList>
varList¶
-
-
template<typename
Scalar>
structTriangle¶
-
class
Bezier::Vec2¶ Public Functions
-
Vec2()¶
-
Vec2(float x, float y)¶
-
Vec2(float x, float y, bool normalize)¶
-
void
set(float x, float y)¶
-
double
length() const¶
-
void
normalize()¶
-
void
translate(float dx, float dy)¶
-
float
angle() const¶
-
float
angleDeg() const¶
-
float
operator[](size_t axis) const¶
-
float &
operator[](size_t axis)¶
-
bool
isWithinZeroAndOne() const¶
Public Static Attributes
-
constexpr size_t
size= 2¶
-
-
template<typename
Scalar>
classVPoint¶
-
template<typename
Scalar>
classVTex¶
-
class
XMLIO_backward¶
-
namespace
Bezier¶
-
namespace
Eigen¶
-
namespace
Ipopt¶
-
namespace
std¶
-
namespace
filesystem¶
-
file
CMakeLists.txt Functions
-
add_subdirectory (CrossMesh) add_subdirectory(Interlocking) add_subdirectory(IO) add_subdirectory(Mesh) add_subdirectory(Utility) add_subdirectory(Structure) set(TpCoreFiles $
-
-
file
CMakeLists.txt
-
file
CMakeLists.txt
-
file
CMakeLists.txt
-
file
CMakeLists.txt
-
file
CMakeLists.txt
-
file
CMakeLists.txt
-
file
AugmentedVectorCreator.cpp - #include “AugmentedVectorCreator.h”
-
file
AugmentedVectorCreator.h - #include “Mesh/PolyMesh.h”#include “Mesh/CrossMesh.h”#include “Mesh/Cross.h”#include “Utility/TopoObject.h”#include <tbb/tbb.h>#include <utility>#include <queue>#include <unordered_map>
-
file
BaseMeshCreator.cpp - #include “BaseMeshCreator.h”
-
file
BaseMeshCreator.h - #include <vector>#include <unordered_map>#include <tbb/tbb.h>#include “TopoLite/Mesh/PolyMesh_AABBTree.h”#include “Mesh/CrossMesh.h”
-
file
CrossMeshCreator.cpp - #include “CrossMeshCreator.h”#include “tbb/tbb.h”
-
file
CrossMeshCreator.h - #include “TopoLite/Utility/TopoObject.h”#include “TopoLite/Mesh/CrossMesh.h”#include “TopoLite/Mesh/PolyMesh_AABBTree.h”#include “BaseMeshCreator.h”#include “AugmentedVectorCreator.h”#include “PatternCreator.h”#include “Eigen/Dense”#include <vector>#include “igl/lscm.h”#include <memory>
-
file
PatternCreator.cpp - #include “Utility/HelpDefine.h”#include “CrossMesh/BaseMeshCreator.h”#include “CrossMesh/PatternCreator.h”#include “Mesh/Polygon.h”#include “Mesh/PolyMesh.h”#include <queue>
-
file
PatternCreator.h - #include <vector>#include “Mesh/CrossMesh.h”
Enums
-
enum
PatternType¶ Values:
-
enumerator
CROSS_SQUARE= 1¶
-
enumerator
CROSS_RHOMBUS= 2¶
-
enumerator
CROSS_SQUARE_RHOMBUS= 3¶
-
enumerator
CROSS_HEXAGON= 4¶
-
enumerator
CROSS_HEXAGON_RHOMBUS= 5¶
-
enumerator
CROSS_DODECAGON_HEXAGON_QUAD= 6¶
-
enumerator
CROSS_OCTAGON_SQUARE= 7¶
-
enumerator
CROSS_OCTAGON_SQUARE_COLINEAR= 8¶
-
enumerator
CROSS_DODECAGON= 9¶
-
enumerator
CROSS_PENTAGON_CROSS= 10¶
-
enumerator
CROSS_PENTAGON_SNOW= 11¶
-
enumerator
CROSS_PENTAGON_MIRROR= 12¶
-
enumerator
Variables
-
const int
MAX_PATTERN_TYPE= 12¶
-
enum
-
file
ContactGraph.cpp - #include “ContactGraph.h”#include “Utility/ConvexHull2D.h”
Functions
-
void
TemporaryFunction_ContactGraph()¶
-
void
-
file
ContactGraph.h - #include “ContactGraphNode.h”#include “Mesh/PolyMesh.h”#include “Utility/TopoObject.h”#include “Utility/PolyPolyBoolean.h”#include <string>#include <map>#include <iostream>#include <algorithm>#include <set>#include <tbb/tbb.h>#include <cmath>
-
file
ContactGraphDefine.h
-
file
ContactGraphEdge.h - #include <Eigen/Dense>#include “Utility/HelpDefine.h”#include <Mesh/Polygon.h>
-
file
ContactGraphNode.h - #include “ContactGraphEdge.h”#include <map>#include <memory>
-
file
InterlockingSolver.cpp - #include “InterlockingSolver.h”
Functions
-
void
TemporaryFunction_InterlockingSolver()¶
-
void
-
file
InterlockingSolver.h - #include <Eigen/Sparse>#include <Eigen/SparseCore>#include <Eigen/Dense>#include “ContactGraph.h”#include “Utility/TopoObject.h”
-
file
InterlockingSolver_Clp.cpp - #include “InterlockingSolver_Clp.h”#include “tbb/tbb.h”#include <Eigen/SparseQR>#include “ClpInterior.hpp”#include “ClpSimplex.hpp”#include “ClpCholeskyDense.hpp”
Functions
-
void
TemporaryFunction_InterlockingSolver_Clp()¶
-
void
-
file
InterlockingSolver_Clp.h - #include “InterlockingSolver.h”#include “ClpSimplex.hpp”#include “CoinHelperFunctions.hpp”
-
file
InterlockingSolver_Ipopt.cpp - #include <cassert>#include <iostream>#include “tbb/tbb.h”#include “InterlockingSolver_Ipopt.h”#include <Eigen/SparseQR>#include “Utility/SparseOperations.h”#include <IpIpoptApplication.hpp>
Defines
-
HAVE_CSTDDEF¶
Functions
-
void
TemporaryFunction_InterlockingSolver_Ipopt()¶
-
-
file
InterlockingSolver_Ipopt.h - #include “IpTNLP.hpp”#include “InterlockingSolver.h”#include “CoinHelperFunctions.hpp”#include <Eigen/SparseQR>
Defines
-
HAVE_CSTDDEF
-
-
file
InputVar.cpp - #include “InputVar.h”
-
file
InputVar.h - #include <string>#include <map>#include <pugixml.hpp>#include <nlohmann/json.hpp>#include <vector>#include <Eigen/Dense>#include <memory>#include <iostream>
-
file
IOData.h - #include “TopoLite/IO/InputVar.h”#include “TopoLite/Mesh/CrossMesh.h”
-
file
JsonIOReader.cpp - #include “JsonIOReader.h”#include <fstream>
-
file
JsonIOReader.h - #include “TopoLite/Utility/HelpDefine.h”#include “IO/IOData.h”#include <string>#include <nlohmann/json.hpp>#include <filesystem>
-
file
JsonIOWriter.cpp - #include “JsonIOWriter.h”#include <fstream>
-
file
JsonIOWriter.h - #include “TopoLite/Utility/HelpDefine.h”#include “IO/IOData.h”#include <string>#include <nlohmann/json.hpp>#include <filesystem>
-
file
XMLIO_backward.cpp - #include “XMLIO_backward.h”#include “CrossMesh/CrossMeshCreator.h”
-
file
XMLIO_backward.h - #include <iostream>#include <unordered_map>#include <string>#include <pugixml.hpp>#include “IOData.h”#include <filesystem>
-
file
Cross.cpp - #include “Utility/HelpDefine.h”#include “Cross.h”
-
file
Cross.h - #include “TopoLite/Utility/GeometricPrimitives.h”#include “TopoLite/Utility/TopoObject.h”#include <unordered_map>#include “Polygon.h”#include <vector>#include <memory>#include <Eigen/Dense>
-
file
CrossMesh.cpp - #include “Utility/HelpDefine.h”#include “CrossMesh.h”
-
file
CrossMesh.h - #include “TopoLite/Mesh/PolyMesh.h”#include “Cross.h”
-
file
Polygon.cpp - #include “Utility/GeometricPrimitives.h”#include “Utility/HelpDefine.h”#include “Polygon.h”#include <igl/triangle/triangulate.h>#include <iostream>#include <set>
-
file
Polygon.h - #include “TopoLite/Utility/GeometricPrimitives.h”#include <Eigen/Dense>#include <vector>#include <memory>#include <string.h>
Enums
-
enum
PolygonType¶ Values:
-
enumerator
POLY_NONE= 0¶
-
enumerator
POLY_SQUARE_THETA_45= 1¶
-
enumerator
POLY_SQUARE_THETA_15= 2¶
-
enumerator
POLY_SQUARE_THETA_75= 3¶
-
enumerator
POLY_RHOMBUS_THETA_0= 4¶
-
enumerator
POLY_RHOMBUS_THETA_90= 5¶
-
enumerator
POLY_RHOMBUS_THETA_120= 6¶
-
enumerator
POLY_RHOMBUS_THETA_240= 7¶
-
enumerator
POLY_HEXAGON_TYPE_0= 8¶
-
enumerator
POLY_HEXAGON_TYPE_1= 9¶
-
enumerator
POLY_OCTAGON_REGULAR= 10¶
-
enumerator
POLY_OCTAGON_COLINEAR= 11¶
-
enumerator
POLY_DODECAGON= 12¶
-
enumerator
POLY_PENTAGON_CROSS_TYPE_0= 13¶
-
enumerator
POLY_PENTAGON_CROSS_TYPE_1= 14¶
-
enumerator
POLY_PENTAGON_CROSS_TYPE_2= 15¶
-
enumerator
POLY_PENTAGON_CROSS_TYPE_3= 16¶
-
enumerator
POLY_PENTAGON_SNOW_TYPE_0= 17¶
-
enumerator
POLY_PENTAGON_SNOW_TYPE_1= 18¶
-
enumerator
POLY_PENTAGON_SNOW_TYPE_2= 19¶
-
enumerator
POLY_PENTAGON_SNOW_TYPE_3= 20¶
-
enumerator
POLY_PENTAGON_SNOW_TYPE_4= 21¶
-
enumerator
POLY_PENTAGON_SNOW_TYPE_5= 22¶
-
enumerator
POLY_PENTAGON_MIRROR_TYPE_0= 23¶
-
enumerator
POLY_PENTAGON_MIRROR_TYPE_1= 24¶
-
enumerator
POLY_RHOMBUS_TYPE_0= 25¶
-
enumerator
POLY_RHOMBUS_TYPE_1= 26¶
-
enumerator
-
enum
-
file
PolyMesh.cpp - #include “Utility/HelpDefine.h”#include “igl/boundary_loop.h”#include “igl/readOBJ.h”#include “Polygon.h”#include “PolyMesh.h”#include <unordered_map>#include <queue>#include <set>
-
file
PolyMesh.h - #include “TopoLite/Utility/GeometricPrimitives.h”#include “TopoLite/Utility/TopoObject.h”#include “TopoLite/Utility/PolyPolyBoolean.h”#include “Polygon.h”#include <Eigen/Dense>#include <nlohmann/json.hpp>
-
file
PolyMesh_AABBTree.h - #include <Eigen/Dense>#include “Mesh/PolyMesh.h”#include <igl/AABB.h>#include <igl/boundary_loop.h>
-
file
ConvexBlock.cpp - #include “Utility/HelpDefine.h”#include “Utility/GeometricPrimitives.h”#include “Mesh/Cross.h”#include “Utility/ConvexHull2D.h”#include “Mesh/PolyMesh.h”#include “ConvexBlock.h”
-
file
ConvexBlock.h - #include <vector>#include “Utility/GeometricPrimitives.h”#include “Mesh/Cross.h”#include “Mesh/PolyMesh.h”
-
file
StrucCreator.cpp - #include “StrucCreator.h”#include <tbb/tbb.h>
-
file
StrucCreator.h - #include <vector>#include “ConvexBlock.h”#include “Mesh/CrossMesh.h”
-
file
Bezier.h - #include <assert.h>#include <math.h>#include <vector>#include <limits>
-
file
ConvexHull2D.h - #include <Eigen/Dense>#include <vector>#include “HelpDefine.h”
-
file
ConvexHull3D.h - #include <Eigen/Dense>#include <QuickHull.hpp>
-
file
GeometricPrimitives.h - #include “TopoLite/Utility/HelpDefine.h”#include <nlohmann/json.hpp>#include <vector>#include <Eigen/Dense>#include <cmath>
-
file
HelpDefine.h - #include <math.h>
Defines
-
UNITTEST_DATAPATH¶
-
ELEMENT_OUT_LIST¶
-
FILE_NAME_LENGTH¶
-
BUFFER_LENGTH¶
-
MIN_INT¶
-
MAX_INT¶
-
MIN_FLOAT¶
-
MAX_FLOAT¶
-
FLOAT_ERROR_SMALL¶
-
FLOAT_ERROR_LARGE¶
-
CLIPPER_INTERGER_SCALE¶
-
errexit(s)¶
-
errexit2(s1, s2)¶
-
_MAX_STR_SIZE¶
-
_MAX_LINE_SIZE¶
-
_MAX_PATH_SIZE¶
-
_ERROR¶
-
_ERROR1¶
-
_ERROR2¶
-
_OKAY¶
-
_TRUE¶
-
_FALSE¶
-
_TOGGLE(bool)¶
-
_ToRadian(X)¶
-
_ToDegree(X)¶
-
_EPSILON¶
-
_MAX(a, b)¶
-
_MIN(a, b)¶
-
_IN_BETWEEN(v, a, b)¶
-
M_PI¶
-
SURFACE_CylinderA60¶
-
SURFACE_CylinderA80¶
-
SURFACE_HyperbolicA90¶
-
SURFACE_SeaShell¶
-
SURFACE_SphereA60¶
-
SURFACE_Torus¶
-
SURFACE_Spindle¶
-
DBG_DOTP_EPSILON¶
-
CO_PLANAR_THRES¶
-
MODEL_HEXAGON¶
-
MODEL_HEXAGON_5x5¶
-
MODEL_HEXAGON_10¶
-
MODEL_SQUARE¶
-
MODEL_SQUARE_5X5¶
-
MODEL_SQUARE_10¶
-
CROSS_L¶
-
MOBILITY_SCORE_MAX¶
-
MOBILITY_SCORE_DIFF¶
-
NONE_CROSS¶
-
NONE_PART¶
-
NONE_GROUP¶
-
NONE_ELEMENT¶
-
NONE_FACE¶
-
NOT_FOUND¶
-
MOBILITY_SPHERE_R¶
-
CROSS_THETA¶
-
TILT_SIGN_NONE¶
-
TILT_SIGN_POSITIVE¶
-
TILT_SIGN_NEGATIVE¶
-
INIT_WORLD_POSITION¶
-
INIT_WORLD_ROT_AXIS¶
-
INIT_WORLD_ROT_ANGLE¶
-
INIT_WORLD_SCALE¶
-
INIT_WORLD_AXES_POSITION¶
-
INIT_WORLD_AXES_ROT_AXIS¶
-
INIT_WORLD_AXES_ROT_ANGLE¶
-
DRAW_POINT¶
-
DRAW_LINE¶
-
DRAW_FLAT¶
-
DRAW_SMOOTH¶
-
-
file
PolyPolyBoolean.h - #include <clipper.hpp>#include <cmath>#include <Eigen/Dense>#include “TopoObject.h”#include “HelpDefine.h”
-
file
SparseOperations.h - #include <Eigen/Sparse>#include <iostream>
Functions
-
template<typename
Scalar>
voidcreate_identity_SparseMat(SparseMatrix<Scalar> &m, int dim)¶ Create a identity SparseMat object.
- Template Parameters
Scalar:
- Parameters
m: the matrix the createdim: the dimensions of the matrix.
-
template<typename
Scalar>
voidstack_col_SparseMat(const SparseMatrix<Scalar> &B, const SparseMatrix<Scalar> &I, SparseMatrix<Scalar> &C)¶ Concatenate B and I horizontally.
/ B00 B01 B02 | I00 I01 \ C = | B10 B11 B12 | I10 I11 | \ B20 B21 B22 | I20 I21 /
- Template Parameters
Scalar:
- Parameters
B: Left sparse matrixI: Right sparse matrixC: Final sparse matrix
-
void
stack_row_SparseMat(SpMat &B, SpMat &I, SpMat &C)¶ Concatenate B and I vertically.
/ B00 B01 B02 \ | B10 B11 B12 | C = ———- | I00 I01 I02 | \ I10 I11 I12 /
- Template Parameters
Scalar:
- Parameters
B: Left sparse matrixI: Right sparse matrixC: Final sparse matrix
-
template<typename
-
file
TopoAssert.h
-
file
TopoObject.h - #include “TopoLite/IO/InputVar.h”#include “TopoAssert.h”
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src/TopoLite/CrossMesh
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src/TopoLite/Interlocking
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src/TopoLite/IO
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src/TopoLite/Mesh
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src/TopoLite/Structure
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src/TopoLite
-
dir
/home/docs/checkouts/readthedocs.org/user_builds/topolite/checkouts/latest/src/TopoLite/Utility
Python API¶
Danger
This will be automatically generated with cpp code source. Need to be set up.