Skip to content

Commit

Permalink
Added e_crit argument to break_strained_necks()
Browse files Browse the repository at this point in the history
  • Loading branch information
egor-demidov committed Aug 22, 2024
1 parent e0434fe commit 0326b7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/break_neck.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ void break_strained_necks(aggregate<field_value_t, real_t> & aggregate_model,
real_t k_t_bond,
real_t k_r_bond,
real_t k_o_bond,
real_t e_crit,
real_t r_part) {

const auto n_part = x.size();
Expand All @@ -41,8 +42,6 @@ void break_strained_necks(aggregate<field_value_t, real_t> & aggregate_model,
if (xi_n > 0.0)
total_strain_energy += k_n_bond * xi_n * xi_n;

constexpr double e_crit = 5e-19;

if (total_strain_energy < e_crit)
continue;

Expand Down
3 changes: 2 additions & 1 deletion src/restructuring_breaking_necks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ static constexpr double r_part = 1.4e-08;
static constexpr double r_verlet = 7e-08;
static constexpr double rho = 1700;
static constexpr double t_tot = 5e-08;
static constexpr double e_crit = 5e-19;
static constexpr long n_dumps = 500;
static constexpr long n_overlap_iter = 10000;
static constexpr long neighbor_update_period = 20;
Expand Down Expand Up @@ -139,7 +140,7 @@ int main() {
}

system.do_step(dt);
break_strained_necks(aggregate_model, system.get_x(), k_n_bond, k_t_bond, k_r_bond, k_o_bond, r_part);
break_strained_necks(aggregate_model, system.get_x(), k_n_bond, k_t_bond, k_r_bond, k_o_bond, e_crit, r_part);
}

return 0;
Expand Down

0 comments on commit 0326b7d

Please sign in to comment.