simplifying svector handling for walls

This commit is contained in:
jtclemm
2025-01-16 15:37:16 -07:00
parent 57d47ebb4f
commit de5a41de7b
2 changed files with 7 additions and 5 deletions

View File

@ -435,7 +435,9 @@ void FixWallGran::post_force(int /*vflag*/)
rwall = 0.0;
model->calculate_svector = 0;
if (peratom_flag) {
model->calculate_svector = 1;
clear_stored_contacts();
}
@ -523,9 +525,7 @@ void FixWallGran::post_force(int /*vflag*/)
if (use_history) model->history = history_one[i];
if (heat_flag) model->Ti = temperature[i];
if (peratom_flag) model->calculate_svector = 1;
model->calculate_forces();
if (peratom_flag) model->calculate_svector = 0;
forces = model->forces;
torquesi = model->torquesi;

View File

@ -174,7 +174,11 @@ void FixWallGranRegion::post_force(int /*vflag*/)
region->set_velocity();
}
if (peratom_flag) clear_stored_contacts();
model->calculate_svector = 0;
if (peratom_flag) {
model->calculate_svector = 1;
clear_stored_contacts();
}
// Define constant wall properties (atom j)
model->radj = 0.0;
@ -262,9 +266,7 @@ void FixWallGranRegion::post_force(int /*vflag*/)
if (use_history) model->history = history_many[i][c2r[ic]];
if (heat_flag) model->Ti = temperature[i];
if (peratom_flag) model->calculate_svector = 1;
model->calculate_forces();
if (peratom_flag) model->calculate_svector = 0;
forces = model->forces;
torquesi = model->torquesi;