Using only the laplacian weight lapWeight for the matrix and 1 - lapWeight for the barycentric constraints in the implicit smoother (removed the unusefull face weight).
This commit is contained in:
parent
5085477562
commit
75534804cf
|
@ -50,23 +50,19 @@ public:
|
||||||
int numF;
|
int numF;
|
||||||
std::vector<ScalarType > BarycentricW;
|
std::vector<ScalarType > BarycentricW;
|
||||||
CoordType TargetPos;
|
CoordType TargetPos;
|
||||||
ScalarType facePenalty;
|
|
||||||
|
|
||||||
FaceConstraint()
|
FaceConstraint()
|
||||||
{
|
{
|
||||||
numF=-1;
|
numF=-1;
|
||||||
facePenalty=ScalarType(PENALTY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FaceConstraint(int _numF,
|
FaceConstraint(int _numF,
|
||||||
const std::vector<ScalarType > &_BarycentricW,
|
const std::vector<ScalarType > &_BarycentricW,
|
||||||
const CoordType &_TargetPos,
|
const CoordType &_TargetPos)
|
||||||
const ScalarType fPenalty = ScalarType(PENALTY))
|
|
||||||
{
|
{
|
||||||
numF=_numF;
|
numF=_numF;
|
||||||
BarycentricW= std::vector<ScalarType > (_BarycentricW.begin(),_BarycentricW.end());
|
BarycentricW= std::vector<ScalarType > (_BarycentricW.begin(),_BarycentricW.end());
|
||||||
TargetPos=_TargetPos;
|
TargetPos=_TargetPos;
|
||||||
facePenalty=fPenalty;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -185,7 +181,8 @@ private:
|
||||||
assert(FaceN>=0);
|
assert(FaceN>=0);
|
||||||
assert(FaceN<(int)mesh.face.size());
|
assert(FaceN<(int)mesh.face.size());
|
||||||
assert(mesh.face[FaceN].VN()==(int)SParam.ConstrainedF[i].BarycentricW.size());
|
assert(mesh.face[FaceN].VN()==(int)SParam.ConstrainedF[i].BarycentricW.size());
|
||||||
penalty=SParam.ConstrainedF[i].facePenalty;
|
penalty=ScalarType(1) - SParam.lapWeight;
|
||||||
|
assert(penalty>ScalarType(0) && penalty<ScalarType(1));
|
||||||
|
|
||||||
//then add all the weights to impose the constraint
|
//then add all the weights to impose the constraint
|
||||||
for (int j=0;j<mesh.face[FaceN].VN();j++)
|
for (int j=0;j<mesh.face[FaceN].VN();j++)
|
||||||
|
|
Loading…
Reference in New Issue