Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,11 @@ Float GlobalActiveSetManager::toi_threshold() const
return m_impl.toi_threshold;
}

Float GlobalActiveSetManager::alpha_lower_bound() const
{
return m_impl.alpha_lower_bound;
}

GlobalActiveSetManager::NonPenetratePositionInfo::NonPenetratePositionInfo(Impl* impl,
SizeT offset,
SizeT count) noexcept
Expand Down Expand Up @@ -855,6 +860,7 @@ void GlobalActiveSetManager::Impl::init(WorldVisitor& world)
dt = config.find<Float>("dt")->view()[0];
decay_factor = config.find<Float>("contact/al-ipc/decay_factor")->view()[0];
toi_threshold = config.find<Float>("contact/al-ipc/toi_threshold")->view()[0];
alpha_lower_bound = config.find<Float>("contact/al-ipc/alpha_lower_bound")->view()[0];
energy_enabled = true;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ class GlobalActiveSetManager final : public SimSystem

Float decay_factor, dt;
Float toi_threshold;
Float alpha_lower_bound;
bool energy_enabled;
bool should_discard_friction_candidates = false;

Expand Down Expand Up @@ -168,6 +169,7 @@ class GlobalActiveSetManager final : public SimSystem
//tex: $\Gamma$
Float decay_factor() const;
Float toi_threshold() const;
Float alpha_lower_bound() const;
bool is_enabled() const;

protected:
Expand Down
3 changes: 2 additions & 1 deletion src/backends/cuda/engine/advance_al.cu
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ void SimEngine::advance_AL()
m_global_active_set_manager->update_active_set();
m_global_active_set_manager->post_ccd();

m_global_active_set_manager->advance_non_penetrate_positions(alpha);
if(alpha > m_global_active_set_manager->alpha_lower_bound())
m_global_active_set_manager->advance_non_penetrate_positions(alpha);
}

// Update alpha and beta for next iteration
Expand Down
1 change: 1 addition & 0 deletions src/core/core/scene_default_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ geometry::AttributeCollection default_scene_config() noexcept
config.create("contact/al-ipc/mu_scale_fem", Float{5e7});
config.create("contact/al-ipc/mu_scale_abd", Float{1e5});
config.create("contact/al-ipc/toi_threshold", Float{0.1});
config.create("contact/al-ipc/alpha_lower_bound", Float{1e-6});
config.create("contact/al-ipc/decay_factor", Float{0.3});

// adaptive contact tuning knobs.
Expand Down
Loading