more consistent formatting of for/while loops and if statements

This commit is contained in:
Axel Kohlmeyer
2020-12-30 09:01:37 -05:00
parent eef28b58ab
commit 382ade15fe
345 changed files with 4259 additions and 4259 deletions

View File

@ -654,20 +654,20 @@ void Info::available_styles(FILE * out, int flags)
fputs("\nStyles information:\n",out);
if(flags & ATOM_STYLES) atom_styles(out);
if(flags & INTEGRATE_STYLES) integrate_styles(out);
if(flags & MINIMIZE_STYLES) minimize_styles(out);
if(flags & PAIR_STYLES) pair_styles(out);
if(flags & BOND_STYLES) bond_styles(out);
if(flags & ANGLE_STYLES) angle_styles(out);
if(flags & DIHEDRAL_STYLES) dihedral_styles(out);
if(flags & IMPROPER_STYLES) improper_styles(out);
if(flags & KSPACE_STYLES) kspace_styles(out);
if(flags & FIX_STYLES) fix_styles(out);
if(flags & COMPUTE_STYLES) compute_styles(out);
if(flags & REGION_STYLES) region_styles(out);
if(flags & DUMP_STYLES) dump_styles(out);
if(flags & COMMAND_STYLES) command_styles(out);
if (flags & ATOM_STYLES) atom_styles(out);
if (flags & INTEGRATE_STYLES) integrate_styles(out);
if (flags & MINIMIZE_STYLES) minimize_styles(out);
if (flags & PAIR_STYLES) pair_styles(out);
if (flags & BOND_STYLES) bond_styles(out);
if (flags & ANGLE_STYLES) angle_styles(out);
if (flags & DIHEDRAL_STYLES) dihedral_styles(out);
if (flags & IMPROPER_STYLES) improper_styles(out);
if (flags & KSPACE_STYLES) kspace_styles(out);
if (flags & FIX_STYLES) fix_styles(out);
if (flags & COMPUTE_STYLES) compute_styles(out);
if (flags & REGION_STYLES) region_styles(out);
if (flags & DUMP_STYLES) dump_styles(out);
if (flags & COMMAND_STYLES) command_styles(out);
}
void Info::atom_styles(FILE *out)
@ -935,31 +935,31 @@ bool Info::has_style(const std::string &category, const std::string &name)
{
if ( category == "atom" ) {
return find_style(lmp, atom->avec_map, name, false);
} else if( category == "integrate" ) {
} else if ( category == "integrate" ) {
return find_style(lmp, update->integrate_map, name, true);
} else if( category == "minimize" ) {
} else if ( category == "minimize" ) {
return find_style(lmp, update->minimize_map, name, true);
} else if( category == "pair" ) {
} else if ( category == "pair" ) {
return find_style(lmp, force->pair_map, name, true);
} else if( category == "bond" ) {
} else if ( category == "bond" ) {
return find_style(lmp, force->bond_map, name, true);
} else if( category == "angle" ) {
} else if ( category == "angle" ) {
return find_style(lmp, force->angle_map, name, true);
} else if( category == "dihedral" ) {
} else if ( category == "dihedral" ) {
return find_style(lmp, force->dihedral_map, name, true);
} else if( category == "improper" ) {
} else if ( category == "improper" ) {
return find_style(lmp, force->improper_map, name, true);
} else if( category == "kspace" ) {
} else if ( category == "kspace" ) {
return find_style(lmp, force->kspace_map, name, true);
} else if( category == "fix" ) {
} else if ( category == "fix" ) {
return find_style(lmp, modify->fix_map, name, true);
} else if( category == "compute" ) {
} else if ( category == "compute" ) {
return find_style(lmp, modify->compute_map, name, true);
} else if( category == "region" ) {
} else if ( category == "region" ) {
return find_style(lmp, domain->region_map, name, false);
} else if( category == "dump" ) {
} else if ( category == "dump" ) {
return find_style(lmp, output->dump_map, name, false);
} else if( category == "command" ) {
} else if ( category == "command" ) {
return find_style(lmp, input->command_map, name, false);
}
return false;
@ -969,31 +969,31 @@ std::vector<std::string> Info::get_available_styles(const std::string &category)
{
if ( category == "atom" ) {
return get_style_names(atom->avec_map);
} else if( category == "integrate" ) {
} else if ( category == "integrate" ) {
return get_style_names(update->integrate_map);
} else if( category == "minimize" ) {
} else if ( category == "minimize" ) {
return get_style_names(update->minimize_map);
} else if( category == "pair" ) {
} else if ( category == "pair" ) {
return get_style_names(force->pair_map);
} else if( category == "bond" ) {
} else if ( category == "bond" ) {
return get_style_names(force->bond_map);
} else if( category == "angle" ) {
} else if ( category == "angle" ) {
return get_style_names(force->angle_map);
} else if( category == "dihedral" ) {
} else if ( category == "dihedral" ) {
return get_style_names(force->dihedral_map);
} else if( category == "improper" ) {
} else if ( category == "improper" ) {
return get_style_names(force->improper_map);
} else if( category == "kspace" ) {
} else if ( category == "kspace" ) {
return get_style_names(force->kspace_map);
} else if( category == "fix" ) {
} else if ( category == "fix" ) {
return get_style_names(modify->fix_map);
} else if( category == "compute" ) {
} else if ( category == "compute" ) {
return get_style_names(modify->compute_map);
} else if( category == "region" ) {
} else if ( category == "region" ) {
return get_style_names(domain->region_map);
} else if( category == "dump" ) {
} else if ( category == "dump" ) {
return get_style_names(output->dump_map);
} else if( category == "command" ) {
} else if ( category == "command" ) {
return get_style_names(input->command_map);
}
return std::vector<std::string>();
@ -1005,7 +1005,7 @@ static std::vector<std::string> get_style_names(std::map<std::string, ValueType>
std::vector<std::string> names;
names.reserve(styles->size());
for(auto const& kv : *styles) {
for (auto const& kv : *styles) {
// skip "secret" styles
if (isupper(kv.first[0])) continue;
names.push_back(kv.first);
@ -1049,7 +1049,7 @@ static void print_columns(FILE *fp, std::map<std::string, ValueType> *styles)
// std::map keys are already sorted
int pos = 80;
for(typename std::map<std::string, ValueType>::iterator it = styles->begin(); it != styles->end(); ++it) {
for (typename std::map<std::string, ValueType>::iterator it = styles->begin(); it != styles->end(); ++it) {
const std::string &style_name = it->first;
// skip "secret" styles
@ -1121,8 +1121,8 @@ bool Info::has_exceptions() {
}
bool Info::has_package(const char * package_name) {
for(int i = 0; LAMMPS::installed_packages[i] != nullptr; ++i) {
if(strcmp(package_name, LAMMPS::installed_packages[i]) == 0) {
for (int i = 0; LAMMPS::installed_packages[i] != nullptr; ++i) {
if (strcmp(package_name, LAMMPS::installed_packages[i]) == 0) {
return true;
}
}