Minor style changes
This commit is contained in:
@ -127,7 +127,9 @@ double GranSubMod::mix_geom(double val1, double val2)
|
||||
return sqrt(val1 * val2);
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
double GranSubMod::mix_mean(double val1, double val2)
|
||||
{
|
||||
return 0.5*(val1 + val2);
|
||||
return 0.5 * (val1 + val2);
|
||||
}
|
||||
|
||||
@ -40,9 +40,9 @@ class GranSubMod : protected Pointers {
|
||||
double *transfer_history_factor;
|
||||
|
||||
int history_index;
|
||||
int beyond_contact; // If the sub model contact extends beyond overlap
|
||||
int allow_cohesion; // If the sub model works with a cohesive normal force
|
||||
int contact_radius_flag; // If the sub model requires contact radius
|
||||
int beyond_contact; // If the sub model contact extends beyond overlap
|
||||
int allow_cohesion; // If the sub model works with a cohesive normal force
|
||||
int contact_radius_flag; // If the sub model requires contact radius
|
||||
|
||||
GranularModel *gm;
|
||||
|
||||
|
||||
@ -278,12 +278,12 @@ void GranSubModNormalJKR::mix_coeffs(double* icoeffs, double* jcoeffs)
|
||||
|
||||
bool GranSubModNormalJKR::touch()
|
||||
{
|
||||
double pref, delta_pulloff, dist_pulloff;
|
||||
double delta_pulloff, dist_pulloff;
|
||||
bool touchflag;
|
||||
|
||||
if (gm->touch) {
|
||||
// delta_pulloff defined as positive so center-to-center separation is > radsum
|
||||
delta_pulloff = JKRPREFIX * cbrt(gm->Reff * cohesion*cohesion / (Emix * Emix));
|
||||
delta_pulloff = JKRPREFIX * cbrt(gm->Reff * cohesion * cohesion / (Emix * Emix));
|
||||
dist_pulloff = gm->radsum + delta_pulloff;
|
||||
touchflag = gm->rsq < (dist_pulloff * dist_pulloff);
|
||||
} else {
|
||||
@ -304,7 +304,7 @@ double GranSubModNormalJKR::pulloff_distance(double radi, double radj)
|
||||
Reff_tmp = radi * radj / (radi + radj); // May not be defined
|
||||
if (Reff_tmp <= 0) return 0;
|
||||
// Defined as positive so center-to-center separation is > radsum
|
||||
return JKRPREFIX * cbrt(gm->Reff * cohesion*cohesion / (Emix * Emix));
|
||||
return JKRPREFIX * cbrt(Reff_tmp * cohesion * cohesion / (Emix * Emix));
|
||||
}
|
||||
|
||||
/* ---------------------------------------------------------------------- */
|
||||
|
||||
@ -36,7 +36,6 @@ GranSubModStyle(dmt,
|
||||
GranSubModStyle(jkr,
|
||||
GranSubModNormalJKR,
|
||||
NORMAL);
|
||||
|
||||
// clang-format on
|
||||
#else
|
||||
|
||||
|
||||
@ -109,9 +109,9 @@ int GranularModel::add_sub_model(char **arg, int iarg, int narg, SubModelType mo
|
||||
error->all(FLERR, "Must specify granular sub model name");
|
||||
|
||||
std::string model_name = std::string(arg[iarg++]);
|
||||
|
||||
|
||||
construct_sub_model(model_name, model_type);
|
||||
|
||||
|
||||
int num_coeffs = sub_models[model_type]->num_coeffs;
|
||||
if (iarg + num_coeffs > narg)
|
||||
error->all(FLERR, "Insufficient arguments provided for {} model", model_name);
|
||||
@ -134,7 +134,6 @@ void GranularModel::construct_sub_model(std::string model_name, SubModelType mod
|
||||
int i;
|
||||
for (i = 0; i < nclass; i++) {
|
||||
if (gran_sub_mod_types[i] == model_type) {
|
||||
|
||||
if (strcmp(gran_sub_mod_names[i], model_name.c_str()) == 0) {
|
||||
GranSubModCreator &gran_sub_mod_creator = gran_sub_mod_class[i];
|
||||
delete sub_models[model_type];
|
||||
|
||||
Reference in New Issue
Block a user