Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions Libs/Optimize/Domain/MeshDomain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,19 @@ MeshDomain::PointType MeshDomain::UpdateParticlePosition(const PointType &point,
return newPoint;
}

//-------------------------------------------------------------------
MeshDomain::PointType MeshDomain::GetPositionAfterSplit(const PointType &pt,
const VectorDoubleType &local_direction,
const VectorDoubleType &global_direction,
double epsilon) const {
VectorDoubleType update;
for (unsigned int k = 0; k < DIMENSION; k++) {
// Negate here because UpdateParticlePosition negates before calling geodesic_walk
update[k] = -epsilon * local_direction[k] / 5.0;
}
return UpdateParticlePosition(pt, -1, update);
}

//-------------------------------------------------------------------
double MeshDomain::GetMaxDiameter() const {
// todo should this not be the length of the bounding box diagonal?
Expand Down
2 changes: 2 additions & 0 deletions Libs/Optimize/Domain/MeshDomain.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class MeshDomain : public ParticleDomain {
bool ApplyVectorConstraints(VectorDoubleType &gradE, const PointType &pos) const;
VectorDoubleType ProjectVectorToSurfaceTangent(VectorDoubleType &gradE, const PointType &pos, int idx) const override;
PointType UpdateParticlePosition(const PointType &point, int idx, VectorDoubleType &update) const override;
PointType GetPositionAfterSplit(const PointType &pt, const VectorDoubleType &local_direction,
const VectorDoubleType &global_direction, double epsilon) const override;

virtual void InvalidateParticlePosition(int idx) const override;

Expand Down
Loading