diff --git a/src/ASPHERE/compute_erotate_asphere.cpp b/src/ASPHERE/compute_erotate_asphere.cpp index 192b5e5ed3..d98ef4efb2 100644 --- a/src/ASPHERE/compute_erotate_asphere.cpp +++ b/src/ASPHERE/compute_erotate_asphere.cpp @@ -43,9 +43,9 @@ void ComputeERotateAsphere::init() { // error check - avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); - avec_line = dynamic_cast( atom->style_match("line")); - avec_tri = dynamic_cast( atom->style_match("tri")); + avec_ellipsoid = dynamic_cast(atom->style_match("ellipsoid")); + avec_line = dynamic_cast(atom->style_match("line")); + avec_tri = dynamic_cast(atom->style_match("tri")); if (!avec_ellipsoid && !avec_line && !avec_tri) error->all(FLERR,"Compute erotate/asphere requires " "atom style ellipsoid or line or tri"); diff --git a/src/ASPHERE/compute_temp_asphere.cpp b/src/ASPHERE/compute_temp_asphere.cpp index 84581c63c1..36ef8af338 100644 --- a/src/ASPHERE/compute_temp_asphere.cpp +++ b/src/ASPHERE/compute_temp_asphere.cpp @@ -94,7 +94,7 @@ void ComputeTempAsphere::init() { // error check - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute temp/asphere requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nh_asphere.cpp b/src/ASPHERE/fix_nh_asphere.cpp index 11e11926e4..07461ba365 100644 --- a/src/ASPHERE/fix_nh_asphere.cpp +++ b/src/ASPHERE/fix_nh_asphere.cpp @@ -36,7 +36,7 @@ FixNHAsphere::FixNHAsphere(LAMMPS *lmp, int narg, char **arg) : void FixNHAsphere::init() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR, "Compute nvt/nph/npt asphere requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nve_asphere.cpp b/src/ASPHERE/fix_nve_asphere.cpp index ee8c8d3b6e..d969796f89 100644 --- a/src/ASPHERE/fix_nve_asphere.cpp +++ b/src/ASPHERE/fix_nve_asphere.cpp @@ -37,7 +37,7 @@ FixNVEAsphere::FixNVEAsphere(LAMMPS *lmp, int narg, char **arg) : void FixNVEAsphere::init() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/asphere requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nve_asphere_noforce.cpp b/src/ASPHERE/fix_nve_asphere_noforce.cpp index 799df8115a..2be23a644c 100644 --- a/src/ASPHERE/fix_nve_asphere_noforce.cpp +++ b/src/ASPHERE/fix_nve_asphere_noforce.cpp @@ -37,7 +37,7 @@ void FixNVEAsphereNoforce::init() { // error check - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!atom->ellipsoid_flag) error->all(FLERR,"Fix nve/asphere/noforce requires atom style ellipsoid"); diff --git a/src/ASPHERE/fix_nve_line.cpp b/src/ASPHERE/fix_nve_line.cpp index a46f6cf67b..5d9251d541 100644 --- a/src/ASPHERE/fix_nve_line.cpp +++ b/src/ASPHERE/fix_nve_line.cpp @@ -56,7 +56,7 @@ void FixNVELine::init() { // error checks - avec = dynamic_cast( atom->style_match("line")); + avec = dynamic_cast(atom->style_match("line")); if (!avec) error->all(FLERR,"Fix nve/line requires atom style line"); if (domain->dimension != 2) diff --git a/src/ASPHERE/fix_nve_tri.cpp b/src/ASPHERE/fix_nve_tri.cpp index d41d3ee0ef..d594f6a854 100644 --- a/src/ASPHERE/fix_nve_tri.cpp +++ b/src/ASPHERE/fix_nve_tri.cpp @@ -50,7 +50,7 @@ void FixNVETri::init() { // error checks - avec = dynamic_cast( atom->style_match("tri")); + avec = dynamic_cast(atom->style_match("tri")); if (!avec) error->all(FLERR,"Fix nve/tri requires atom style tri"); if (domain->dimension != 3) diff --git a/src/ASPHERE/pair_gayberne.cpp b/src/ASPHERE/pair_gayberne.cpp index 71b8a82cc7..025de0975b 100644 --- a/src/ASPHERE/pair_gayberne.cpp +++ b/src/ASPHERE/pair_gayberne.cpp @@ -346,7 +346,7 @@ void PairGayBerne::coeff(int narg, char **arg) void PairGayBerne::init_style() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Pair gayberne requires atom style ellipsoid"); neighbor->add_request(this,NeighConst::REQ_DEFAULT); diff --git a/src/ASPHERE/pair_line_lj.cpp b/src/ASPHERE/pair_line_lj.cpp index ab1b81ca73..6784f3341d 100644 --- a/src/ASPHERE/pair_line_lj.cpp +++ b/src/ASPHERE/pair_line_lj.cpp @@ -402,7 +402,7 @@ void PairLineLJ::coeff(int narg, char **arg) void PairLineLJ::init_style() { - avec = dynamic_cast( atom->style_match("line")); + avec = dynamic_cast(atom->style_match("line")); if (!avec) error->all(FLERR,"Pair line/lj requires atom style line"); neighbor->add_request(this,NeighConst::REQ_DEFAULT); diff --git a/src/ASPHERE/pair_tri_lj.cpp b/src/ASPHERE/pair_tri_lj.cpp index eaec71b055..a62e4f253d 100644 --- a/src/ASPHERE/pair_tri_lj.cpp +++ b/src/ASPHERE/pair_tri_lj.cpp @@ -467,7 +467,7 @@ void PairTriLJ::coeff(int narg, char **arg) void PairTriLJ::init_style() { - avec = dynamic_cast( atom->style_match("tri")); + avec = dynamic_cast(atom->style_match("tri")); if (!avec) error->all(FLERR,"Pair tri/lj requires atom style tri"); neighbor->add_request(this,NeighConst::REQ_DEFAULT); diff --git a/src/AWPMD/fix_nve_awpmd.cpp b/src/AWPMD/fix_nve_awpmd.cpp index c37feb2ede..f9931d5302 100644 --- a/src/AWPMD/fix_nve_awpmd.cpp +++ b/src/AWPMD/fix_nve_awpmd.cpp @@ -61,7 +61,7 @@ void FixNVEAwpmd::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; awpmd_pair=dynamic_cast(force->pair); awpmd_pair->wpmd->norm_needed=1; diff --git a/src/BOCS/fix_bocs.cpp b/src/BOCS/fix_bocs.cpp index 449deefd59..de55019be0 100644 --- a/src/BOCS/fix_bocs.cpp +++ b/src/BOCS/fix_bocs.cpp @@ -491,7 +491,7 @@ void FixBocs::init() { for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; + int *dimflag = (dynamic_cast(modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2]) || (p_flag[3] && dimflag[3]) || (p_flag[4] && dimflag[4]) || (p_flag[5] && dimflag[5])) @@ -591,8 +591,8 @@ void FixBocs::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; - step_respa = (dynamic_cast( update->integrate))->step; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; + step_respa = (dynamic_cast(update->integrate))->step; dto = 0.5*step_respa[0]; } diff --git a/src/BODY/compute_body_local.cpp b/src/BODY/compute_body_local.cpp index 7d48b0770f..d3d28a7ea0 100644 --- a/src/BODY/compute_body_local.cpp +++ b/src/BODY/compute_body_local.cpp @@ -53,7 +53,7 @@ ComputeBodyLocal::ComputeBodyLocal(LAMMPS *lmp, int narg, char **arg) : } } - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Compute body/local requires atom style body"); bptr = avec->bptr; diff --git a/src/BODY/compute_temp_body.cpp b/src/BODY/compute_temp_body.cpp index 3f97c2c82f..084b715b25 100644 --- a/src/BODY/compute_temp_body.cpp +++ b/src/BODY/compute_temp_body.cpp @@ -87,7 +87,7 @@ void ComputeTempBody::init() { // error check - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Compute temp/body requires atom style body"); diff --git a/src/BODY/fix_nh_body.cpp b/src/BODY/fix_nh_body.cpp index ba46bce2ac..2b462f1f4c 100644 --- a/src/BODY/fix_nh_body.cpp +++ b/src/BODY/fix_nh_body.cpp @@ -37,7 +37,7 @@ FixNHBody::FixNHBody(LAMMPS *lmp, int narg, char **arg) : void FixNHBody::init() { - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR, "Compute nvt/nph/npt body requires atom style body"); diff --git a/src/BODY/fix_nve_body.cpp b/src/BODY/fix_nve_body.cpp index f731bed81e..a0c2430f18 100644 --- a/src/BODY/fix_nve_body.cpp +++ b/src/BODY/fix_nve_body.cpp @@ -30,7 +30,7 @@ FixNVEBody::FixNVEBody(LAMMPS *lmp, int narg, char **arg) : void FixNVEBody::init() { - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Fix nve/body requires atom style body"); // check that all particles are bodies diff --git a/src/BODY/fix_wall_body_polygon.cpp b/src/BODY/fix_wall_body_polygon.cpp index 47467f9d42..be1d89468b 100644 --- a/src/BODY/fix_wall_body_polygon.cpp +++ b/src/BODY/fix_wall_body_polygon.cpp @@ -179,13 +179,13 @@ void FixWallBodyPolygon::init() { dt = update->dt; - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polygon requires atom style body"); if (strcmp(avec->bptr->style,"rounded/polygon") != 0) error->all(FLERR,"Pair body/rounded/polygon requires " "body style rounded/polygon"); - bptr = dynamic_cast( avec->bptr); + bptr = dynamic_cast(avec->bptr); // set pairstyle from body/polygonular pair style diff --git a/src/BODY/fix_wall_body_polyhedron.cpp b/src/BODY/fix_wall_body_polyhedron.cpp index 2e503640d8..f739d9d682 100644 --- a/src/BODY/fix_wall_body_polyhedron.cpp +++ b/src/BODY/fix_wall_body_polyhedron.cpp @@ -184,13 +184,13 @@ void FixWallBodyPolyhedron::init() { dt = update->dt; - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polyhedron requires atom style body"); if (strcmp(avec->bptr->style,"rounded/polyhedron") != 0) error->all(FLERR,"Pair body/rounded/polyhedron requires " "body style rounded/polyhedron"); - bptr = dynamic_cast( avec->bptr); + bptr = dynamic_cast(avec->bptr); // set pairstyle from body/polyhedronular pair style diff --git a/src/BODY/pair_body_nparticle.cpp b/src/BODY/pair_body_nparticle.cpp index df2c6c1d23..d056dd2840 100644 --- a/src/BODY/pair_body_nparticle.cpp +++ b/src/BODY/pair_body_nparticle.cpp @@ -416,11 +416,11 @@ void PairBodyNparticle::coeff(int narg, char **arg) void PairBodyNparticle::init_style() { - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/nparticle requires atom style body"); if (strcmp(avec->bptr->style,"nparticle") != 0) error->all(FLERR,"Pair body/nparticle requires body style nparticle"); - bptr = dynamic_cast( avec->bptr); + bptr = dynamic_cast(avec->bptr); neighbor->add_request(this); } diff --git a/src/BODY/pair_body_rounded_polygon.cpp b/src/BODY/pair_body_rounded_polygon.cpp index 7485cf4b9c..a7a83049a2 100644 --- a/src/BODY/pair_body_rounded_polygon.cpp +++ b/src/BODY/pair_body_rounded_polygon.cpp @@ -411,13 +411,13 @@ void PairBodyRoundedPolygon::coeff(int narg, char **arg) void PairBodyRoundedPolygon::init_style() { - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polygon requires atom style body"); if (strcmp(avec->bptr->style,"rounded/polygon") != 0) error->all(FLERR,"Pair body/rounded/polygon requires " "body style rounded/polygon"); - bptr = dynamic_cast( avec->bptr); + bptr = dynamic_cast(avec->bptr); if (force->newton_pair == 0) error->all(FLERR,"Pair style body/rounded/polygon requires " diff --git a/src/BODY/pair_body_rounded_polyhedron.cpp b/src/BODY/pair_body_rounded_polyhedron.cpp index a9593b5fa2..db8d6baf5d 100644 --- a/src/BODY/pair_body_rounded_polyhedron.cpp +++ b/src/BODY/pair_body_rounded_polyhedron.cpp @@ -390,13 +390,13 @@ void PairBodyRoundedPolyhedron::coeff(int narg, char **arg) void PairBodyRoundedPolyhedron::init_style() { - avec = dynamic_cast( atom->style_match("body")); + avec = dynamic_cast(atom->style_match("body")); if (!avec) error->all(FLERR,"Pair body/rounded/polyhedron requires " "atom style body"); if (strcmp(avec->bptr->style,"rounded/polyhedron") != 0) error->all(FLERR,"Pair body/rounded/polyhedron requires " "body style rounded/polyhedron"); - bptr = dynamic_cast( avec->bptr); + bptr = dynamic_cast(avec->bptr); if (force->newton_pair == 0) error->all(FLERR,"Pair style body/rounded/polyhedron requires " diff --git a/src/CG-DNA/fix_nve_dot.cpp b/src/CG-DNA/fix_nve_dot.cpp index 3806e452c3..47506874a7 100644 --- a/src/CG-DNA/fix_nve_dot.cpp +++ b/src/CG-DNA/fix_nve_dot.cpp @@ -37,7 +37,7 @@ FixNVEDot::FixNVEDot(LAMMPS *lmp, int narg, char **arg) : void FixNVEDot::init() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/dot requires atom style ellipsoid"); diff --git a/src/CG-DNA/fix_nve_dotc_langevin.cpp b/src/CG-DNA/fix_nve_dotc_langevin.cpp index 8ca4acf510..0c48df32ce 100644 --- a/src/CG-DNA/fix_nve_dotc_langevin.cpp +++ b/src/CG-DNA/fix_nve_dotc_langevin.cpp @@ -89,7 +89,7 @@ void FixNVEDotcLangevin::init() int *mask = atom->mask; int nlocal = atom->nlocal; - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Fix nve/dotc/langevin requires atom style ellipsoid"); diff --git a/src/CG-DNA/pair_oxdna_excv.cpp b/src/CG-DNA/pair_oxdna_excv.cpp index a201a5ccf7..73386f3fe4 100644 --- a/src/CG-DNA/pair_oxdna_excv.cpp +++ b/src/CG-DNA/pair_oxdna_excv.cpp @@ -139,7 +139,7 @@ void PairOxdnaExcv::compute(int eflag, int vflag) int newton_pair = force->newton_pair; int *alist,*blist,*numneigh,**firstneigh; - auto avec = dynamic_cast( atom->style_match("ellipsoid")); + auto avec = dynamic_cast(atom->style_match("ellipsoid")); AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; diff --git a/src/COLLOID/pair_brownian_poly.cpp b/src/COLLOID/pair_brownian_poly.cpp index d24a65a821..69af4ae769 100644 --- a/src/COLLOID/pair_brownian_poly.cpp +++ b/src/COLLOID/pair_brownian_poly.cpp @@ -362,7 +362,7 @@ void PairBrownianPoly::init_style() error->all(FLERR, "Cannot use multiple fix wall commands with pair brownian"); flagwall = 1; // Walls exist - wallfix = dynamic_cast( modify->fix[i]); + wallfix = dynamic_cast(modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricate.cpp b/src/COLLOID/pair_lubricate.cpp index 1267d42f1f..7e15bc563a 100644 --- a/src/COLLOID/pair_lubricate.cpp +++ b/src/COLLOID/pair_lubricate.cpp @@ -563,7 +563,7 @@ void PairLubricate::init_style() for (int i = 0; i < modify->nfix; i++) { if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = flagdeform = 1; - if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) + if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } @@ -572,7 +572,7 @@ void PairLubricate::init_style() error->all(FLERR, "Cannot use multiple fix wall commands with pair lubricate"); flagwall = 1; // Walls exist - wallfix = dynamic_cast( modify->fix[i]); + wallfix = dynamic_cast(modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricateU.cpp b/src/COLLOID/pair_lubricateU.cpp index aa83a53ce4..f263b18a86 100644 --- a/src/COLLOID/pair_lubricateU.cpp +++ b/src/COLLOID/pair_lubricateU.cpp @@ -1801,7 +1801,7 @@ void PairLubricateU::init_style() "Cannot use multiple fix wall commands with " "pair lubricateU"); flagwall = 1; // Walls exist - wallfix = dynamic_cast( modify->fix[i]); + wallfix = dynamic_cast(modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricateU_poly.cpp b/src/COLLOID/pair_lubricateU_poly.cpp index 1fad75a68c..7598baa88e 100644 --- a/src/COLLOID/pair_lubricateU_poly.cpp +++ b/src/COLLOID/pair_lubricateU_poly.cpp @@ -1165,7 +1165,7 @@ void PairLubricateUPoly::init_style() "Cannot use multiple fix wall commands with " "pair lubricateU"); flagwall = 1; // Walls exist - wallfix = dynamic_cast( modify->fix[i]); + wallfix = dynamic_cast(modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } } diff --git a/src/COLLOID/pair_lubricate_poly.cpp b/src/COLLOID/pair_lubricate_poly.cpp index 38ec073f48..8ce3e8e110 100644 --- a/src/COLLOID/pair_lubricate_poly.cpp +++ b/src/COLLOID/pair_lubricate_poly.cpp @@ -463,7 +463,7 @@ void PairLubricatePoly::init_style() for (int i = 0; i < modify->nfix; i++) { if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = flagdeform = 1; - if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) + if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate with inconsistent " "fix deform remap option"); } @@ -473,15 +473,15 @@ void PairLubricatePoly::init_style() "Cannot use multiple fix wall commands with " "pair lubricate/poly"); flagwall = 1; // Walls exist - wallfix = dynamic_cast( modify->fix[i]); + wallfix = dynamic_cast(modify->fix[i]); if (wallfix->xflag) flagwall = 2; // Moving walls exist } if (strstr(modify->fix[i]->style,"wall") != nullptr) { flagwall = 1; // Walls exist - if ((dynamic_cast( modify->fix[i]))->xflag) { + if ((dynamic_cast(modify->fix[i]))->xflag) { flagwall = 2; // Moving walls exist - wallfix = dynamic_cast( modify->fix[i]); + wallfix = dynamic_cast(modify->fix[i]); } } } @@ -539,7 +539,7 @@ void PairLubricatePoly::init_style() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { shearing = 1; - if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) + if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using pair lubricate/poly with inconsistent " "fix deform remap option"); } diff --git a/src/DIELECTRIC/msm_dielectric.cpp b/src/DIELECTRIC/msm_dielectric.cpp index 3217c8dbad..d371a5c0ff 100644 --- a/src/DIELECTRIC/msm_dielectric.cpp +++ b/src/DIELECTRIC/msm_dielectric.cpp @@ -58,7 +58,7 @@ void MSMDielectric::init() { MSM::init(); - avec = dynamic_cast( atom->style_match("dielectric")); + avec = dynamic_cast(atom->style_match("dielectric")); if (!avec) error->all(FLERR,"msm/dielectric requires atom style dielectric"); } diff --git a/src/DIELECTRIC/pppm_dielectric.cpp b/src/DIELECTRIC/pppm_dielectric.cpp index 92bd89ebd9..c063750a75 100644 --- a/src/DIELECTRIC/pppm_dielectric.cpp +++ b/src/DIELECTRIC/pppm_dielectric.cpp @@ -61,7 +61,7 @@ PPPMDielectric::PPPMDielectric(LAMMPS *_lmp) : PPPM(_lmp) // no warnings about non-neutral systems from qsum_qsq() warn_nonneutral = 2; - avec = dynamic_cast( atom->style_match("dielectric")); + avec = dynamic_cast(atom->style_match("dielectric")); if (!avec) error->all(FLERR,"pppm/dielectric requires atom style dielectric"); } diff --git a/src/DIELECTRIC/pppm_disp_dielectric.cpp b/src/DIELECTRIC/pppm_disp_dielectric.cpp index d4d84e0f62..beb392a3b3 100644 --- a/src/DIELECTRIC/pppm_disp_dielectric.cpp +++ b/src/DIELECTRIC/pppm_disp_dielectric.cpp @@ -72,7 +72,7 @@ PPPMDispDielectric::PPPMDispDielectric(LAMMPS *_lmp) : PPPMDisp(_lmp) phi = nullptr; potflag = 0; - avec = dynamic_cast( atom->style_match("dielectric")); + avec = dynamic_cast(atom->style_match("dielectric")); if (!avec) error->all(FLERR,"pppm/dielectric requires atom style dielectric"); } diff --git a/src/DIFFRACTION/fix_saed_vtk.cpp b/src/DIFFRACTION/fix_saed_vtk.cpp index 45b2db9743..64c62164ef 100644 --- a/src/DIFFRACTION/fix_saed_vtk.cpp +++ b/src/DIFFRACTION/fix_saed_vtk.cpp @@ -67,7 +67,7 @@ FixSAEDVTK::FixSAEDVTK(LAMMPS *lmp, int narg, char **arg) : error->all(FLERR,"Compute ID for fix saed/vtk does not exist"); // Check that specified compute is for SAED - compute_saed = dynamic_cast( modify->compute[icompute]); + compute_saed = dynamic_cast(modify->compute[icompute]); if (strcmp(compute_saed->style,"saed") != 0) error->all(FLERR,"Fix saed/vtk has invalid compute assigned"); diff --git a/src/DPD-REACT/fix_dpd_energy.cpp b/src/DPD-REACT/fix_dpd_energy.cpp index 79ff1cc231..c8dbf15bc4 100644 --- a/src/DPD-REACT/fix_dpd_energy.cpp +++ b/src/DPD-REACT/fix_dpd_energy.cpp @@ -30,9 +30,9 @@ FixDPDenergy::FixDPDenergy(LAMMPS *lmp, int narg, char **arg) : if (narg != 3 ) error->all(FLERR,"Illegal fix dpd/energy command"); pairDPDE = nullptr; - pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy",1)); + pairDPDE = dynamic_cast(force->pair_match("dpd/fdt/energy",1)); if (pairDPDE == nullptr) - pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy/kk",1)); + pairDPDE = dynamic_cast(force->pair_match("dpd/fdt/energy/kk",1)); if (pairDPDE == nullptr) error->all(FLERR,"Must use pair_style dpd/fdt/energy with fix dpd/energy"); diff --git a/src/DPD-REACT/fix_rx.cpp b/src/DPD-REACT/fix_rx.cpp index a85c6bfdd7..c54a8acee1 100644 --- a/src/DPD-REACT/fix_rx.cpp +++ b/src/DPD-REACT/fix_rx.cpp @@ -319,9 +319,9 @@ void FixRX::post_constructor() newcmd1 += " ghost yes"; newcmd2 += " ghost yes"; - fix_species = dynamic_cast( modify->add_fix(newcmd1)); + fix_species = dynamic_cast(modify->add_fix(newcmd1)); restartFlag = fix_species->restart_reset; - fix_species_old = dynamic_cast( modify->add_fix(newcmd2)); + fix_species_old = dynamic_cast(modify->add_fix(newcmd2)); if (nspecies==0) error->all(FLERR,"There are no rx species specified."); @@ -579,9 +579,9 @@ int FixRX::setmask() void FixRX::init() { - pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy",1)); + pairDPDE = dynamic_cast(force->pair_match("dpd/fdt/energy",1)); if (pairDPDE == nullptr) - pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy/kk",1)); + pairDPDE = dynamic_cast(force->pair_match("dpd/fdt/energy/kk",1)); if (pairDPDE == nullptr) error->all(FLERR,"Must use pair_style dpd/fdt/energy with fix rx"); diff --git a/src/DPD-REACT/fix_shardlow.cpp b/src/DPD-REACT/fix_shardlow.cpp index 41239c9058..824386019d 100644 --- a/src/DPD-REACT/fix_shardlow.cpp +++ b/src/DPD-REACT/fix_shardlow.cpp @@ -94,10 +94,10 @@ FixShardlow::FixShardlow(LAMMPS *lmp, int narg, char **arg) : pairDPD = nullptr; pairDPDE = nullptr; - pairDPD = dynamic_cast( force->pair_match("dpd/fdt",1)); - pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy",1)); + pairDPD = dynamic_cast(force->pair_match("dpd/fdt",1)); + pairDPDE = dynamic_cast(force->pair_match("dpd/fdt/energy",1)); if (pairDPDE == nullptr) - pairDPDE = dynamic_cast( force->pair_match("dpd/fdt/energy/kk",1)); + pairDPDE = dynamic_cast(force->pair_match("dpd/fdt/energy/kk",1)); maxRNG = 0; if (pairDPDE) { diff --git a/src/DRUDE/compute_temp_drude.cpp b/src/DRUDE/compute_temp_drude.cpp index f5cfe35223..18a924ba17 100644 --- a/src/DRUDE/compute_temp_drude.cpp +++ b/src/DRUDE/compute_temp_drude.cpp @@ -67,7 +67,7 @@ void ComputeTempDrude::init() for (ifix = 0; ifix < modify->nfix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "compute temp/drude requires fix drude"); - fix_drude = dynamic_cast( modify->fix[ifix]); + fix_drude = dynamic_cast(modify->fix[ifix]); if (!comm->ghost_velocity) error->all(FLERR,"compute temp/drude requires ghost velocities. Use comm_modify vel yes"); diff --git a/src/DRUDE/fix_langevin_drude.cpp b/src/DRUDE/fix_langevin_drude.cpp index 54cc156d67..622aa77f9f 100644 --- a/src/DRUDE/fix_langevin_drude.cpp +++ b/src/DRUDE/fix_langevin_drude.cpp @@ -148,7 +148,7 @@ void FixLangevinDrude::init() for (ifix = 0; ifix < modify->nfix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "fix langevin/drude requires fix drude"); - fix_drude = dynamic_cast( modify->fix[ifix]); + fix_drude = dynamic_cast(modify->fix[ifix]); } /* ---------------------------------------------------------------------- */ diff --git a/src/DRUDE/fix_tgnh_drude.cpp b/src/DRUDE/fix_tgnh_drude.cpp index d5de5bd67f..779b557fcf 100644 --- a/src/DRUDE/fix_tgnh_drude.cpp +++ b/src/DRUDE/fix_tgnh_drude.cpp @@ -523,7 +523,7 @@ FixTGNHDrude::FixTGNHDrude(LAMMPS *lmp, int narg, char **arg) : for (ifix = 0; ifix < modify->nfix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "fix tgnh/drude requires fix drude"); - fix_drude = dynamic_cast( modify->fix[ifix]); + fix_drude = dynamic_cast(modify->fix[ifix]); // make sure ghost atoms have velocity if (!comm->ghost_velocity) @@ -595,7 +595,7 @@ void FixTGNHDrude::init() if (pstat_flag) for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; + int *dimflag = (dynamic_cast(modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2]) || (p_flag[3] && dimflag[3]) || (p_flag[4] && dimflag[4]) || (p_flag[5] && dimflag[5])) @@ -664,8 +664,8 @@ void FixTGNHDrude::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; - step_respa = (dynamic_cast( update->integrate))->step; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; + step_respa = (dynamic_cast(update->integrate))->step; dto = 0.5*step_respa[0]; } diff --git a/src/DRUDE/pair_coul_tt.cpp b/src/DRUDE/pair_coul_tt.cpp index af8ed099c5..9d8395b535 100644 --- a/src/DRUDE/pair_coul_tt.cpp +++ b/src/DRUDE/pair_coul_tt.cpp @@ -289,7 +289,7 @@ void PairCoulTT::init_style() for (ifix = 0; ifix < modify->nfix; ifix++) if (utils::strmatch(modify->fix[ifix]->style,"^drude")) break; if (ifix == modify->nfix) error->all(FLERR, "Pair coul/tt requires fix drude"); - fix_drude = dynamic_cast( modify->fix[ifix]); + fix_drude = dynamic_cast(modify->fix[ifix]); neighbor->add_request(this); } diff --git a/src/DRUDE/pair_lj_cut_thole_long.cpp b/src/DRUDE/pair_lj_cut_thole_long.cpp index 33e1e435fa..581496a1f5 100644 --- a/src/DRUDE/pair_lj_cut_thole_long.cpp +++ b/src/DRUDE/pair_lj_cut_thole_long.cpp @@ -364,7 +364,7 @@ void PairLJCutTholeLong::init_style() if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "Pair style lj/cut/thole/long requires fix drude"); - fix_drude = dynamic_cast( modify->fix[ifix]); + fix_drude = dynamic_cast(modify->fix[ifix]); neighbor->add_request(this); diff --git a/src/DRUDE/pair_thole.cpp b/src/DRUDE/pair_thole.cpp index a2f0b25e13..79f7c8557a 100644 --- a/src/DRUDE/pair_thole.cpp +++ b/src/DRUDE/pair_thole.cpp @@ -258,7 +258,7 @@ void PairThole::init_style() for (ifix = 0; ifix < modify->nfix; ifix++) if (strcmp(modify->fix[ifix]->style,"drude") == 0) break; if (ifix == modify->nfix) error->all(FLERR, "Pair thole requires fix drude"); - fix_drude = dynamic_cast( modify->fix[ifix]); + fix_drude = dynamic_cast(modify->fix[ifix]); neighbor->add_request(this); } diff --git a/src/EFF/compute_temp_deform_eff.cpp b/src/EFF/compute_temp_deform_eff.cpp index 292bf64d7b..66452bb95c 100644 --- a/src/EFF/compute_temp_deform_eff.cpp +++ b/src/EFF/compute_temp_deform_eff.cpp @@ -74,7 +74,7 @@ void ComputeTempDeformEff::init() int i; for (i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - if ((dynamic_cast( modify->fix[i]))->remapflag == Domain::X_REMAP && + if ((dynamic_cast(modify->fix[i]))->remapflag == Domain::X_REMAP && comm->me == 0) error->warning(FLERR,"Using compute temp/deform/eff with inconsistent " "fix deform remap option"); diff --git a/src/EFF/fix_nve_eff.cpp b/src/EFF/fix_nve_eff.cpp index 6639197285..f8ce14f9f9 100644 --- a/src/EFF/fix_nve_eff.cpp +++ b/src/EFF/fix_nve_eff.cpp @@ -59,7 +59,7 @@ void FixNVEEff::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; } /* ---------------------------------------------------------------------- diff --git a/src/EFF/fix_nvt_sllod_eff.cpp b/src/EFF/fix_nvt_sllod_eff.cpp index c4cc2de87f..8b7c6bac9b 100644 --- a/src/EFF/fix_nvt_sllod_eff.cpp +++ b/src/EFF/fix_nvt_sllod_eff.cpp @@ -70,7 +70,7 @@ void FixNVTSllodEff::init() int i; for (i = 0; i < modify->nfix; i++) if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) + if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod/eff with inconsistent fix deform " "remap option"); break; diff --git a/src/EXTRA-FIX/fix_addtorque.cpp b/src/EXTRA-FIX/fix_addtorque.cpp index eb95db52b0..3a29a5abd7 100644 --- a/src/EXTRA-FIX/fix_addtorque.cpp +++ b/src/EXTRA-FIX/fix_addtorque.cpp @@ -130,7 +130,7 @@ void FixAddTorque::init() else varflag = CONSTANT; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -142,9 +142,9 @@ void FixAddTorque::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/EXTRA-FIX/fix_drag.cpp b/src/EXTRA-FIX/fix_drag.cpp index 48977a0cd1..64d37a4853 100644 --- a/src/EXTRA-FIX/fix_drag.cpp +++ b/src/EXTRA-FIX/fix_drag.cpp @@ -71,7 +71,7 @@ int FixDrag::setmask() void FixDrag::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -83,9 +83,9 @@ void FixDrag::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/EXTRA-FIX/fix_electron_stopping_fit.cpp b/src/EXTRA-FIX/fix_electron_stopping_fit.cpp index aa3e7fc867..3907ee8408 100644 --- a/src/EXTRA-FIX/fix_electron_stopping_fit.cpp +++ b/src/EXTRA-FIX/fix_electron_stopping_fit.cpp @@ -139,9 +139,9 @@ void FixElectronStoppingFit::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); }; }; diff --git a/src/EXTRA-FIX/fix_ffl.cpp b/src/EXTRA-FIX/fix_ffl.cpp index 6e08ae6c79..0b7f58e349 100644 --- a/src/EXTRA-FIX/fix_ffl.cpp +++ b/src/EXTRA-FIX/fix_ffl.cpp @@ -158,8 +158,8 @@ void FixFFL::init() { } if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; - step_respa = (dynamic_cast( update->integrate))->step; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; + step_respa = (dynamic_cast(update->integrate))->step; } init_ffl(); @@ -182,9 +182,9 @@ void FixFFL::setup(int vflag) { if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_filter_corotate.cpp b/src/EXTRA-FIX/fix_filter_corotate.cpp index 06eefd9ebd..cd8406f810 100644 --- a/src/EXTRA-FIX/fix_filter_corotate.cpp +++ b/src/EXTRA-FIX/fix_filter_corotate.cpp @@ -279,7 +279,7 @@ void FixFilterCorotate::init() // set ptrs to rRESPA variables if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } else error->all(FLERR,"Fix filter/corotate requires rRESPA!"); @@ -656,9 +656,9 @@ void FixFilterCorotate::pre_neighbor() void FixFilterCorotate::setup(int vflag) { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } void FixFilterCorotate::setup_pre_force_respa(int vflag,int ilevel) { diff --git a/src/EXTRA-FIX/fix_flow_gauss.cpp b/src/EXTRA-FIX/fix_flow_gauss.cpp index 8b9d9dca8f..36a4788479 100644 --- a/src/EXTRA-FIX/fix_flow_gauss.cpp +++ b/src/EXTRA-FIX/fix_flow_gauss.cpp @@ -123,7 +123,7 @@ void FixFlowGauss::init() //if respa level specified by fix_modify, then override default (outermost) //if specified level too high, set to max level if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -146,9 +146,9 @@ void FixFlowGauss::setup(int vflag) error->all(FLERR,"Invalid group mass in fix flow/gauss"); if (utils::strmatch(update->integrate_style,"^respa")) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } else post_force(vflag); diff --git a/src/EXTRA-FIX/fix_gld.cpp b/src/EXTRA-FIX/fix_gld.cpp index 3af37005c3..ea16976e83 100644 --- a/src/EXTRA-FIX/fix_gld.cpp +++ b/src/EXTRA-FIX/fix_gld.cpp @@ -197,7 +197,7 @@ void FixGLD::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; } /* ---------------------------------------------------------------------- diff --git a/src/EXTRA-FIX/fix_gle.cpp b/src/EXTRA-FIX/fix_gle.cpp index cabc876ab5..54e9073361 100644 --- a/src/EXTRA-FIX/fix_gle.cpp +++ b/src/EXTRA-FIX/fix_gle.cpp @@ -356,8 +356,8 @@ void FixGLE::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; - step_respa = (dynamic_cast( update->integrate))->step; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; + step_respa = (dynamic_cast(update->integrate))->step; } init_gle(); @@ -443,9 +443,9 @@ void FixGLE::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_momentum_chunk.cpp b/src/EXTRA-FIX/fix_momentum_chunk.cpp index 2734a4565b..653d3e1806 100644 --- a/src/EXTRA-FIX/fix_momentum_chunk.cpp +++ b/src/EXTRA-FIX/fix_momentum_chunk.cpp @@ -110,7 +110,7 @@ void FixMomentumChunk::init() int icompute = modify->find_compute(id_chunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for fix momentum/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Fix momentum/chunk does not use chunk/atom compute"); @@ -122,7 +122,7 @@ void FixMomentumChunk::init() auto cmd = fmt::format("{} {} com/chunk {}",id_com,group->names[igroup],id_chunk); modify->add_compute(cmd); icompute = modify->find_compute(id_com); - ccom = dynamic_cast( modify->compute[icompute]); + ccom = dynamic_cast(modify->compute[icompute]); id_vcm = id + id_chunk + "_vcm"; icompute = modify->find_compute(id_vcm); diff --git a/src/EXTRA-FIX/fix_npt_cauchy.cpp b/src/EXTRA-FIX/fix_npt_cauchy.cpp index c066d471d6..2f629f6f1c 100644 --- a/src/EXTRA-FIX/fix_npt_cauchy.cpp +++ b/src/EXTRA-FIX/fix_npt_cauchy.cpp @@ -680,7 +680,7 @@ void FixNPTCauchy::init() if (pstat_flag) for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; + int *dimflag = (dynamic_cast(modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2]) || (p_flag[3] && dimflag[3]) || (p_flag[4] && dimflag[4]) || (p_flag[5] && dimflag[5])) @@ -753,8 +753,8 @@ void FixNPTCauchy::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; - step_respa = (dynamic_cast( update->integrate))->step; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; + step_respa = (dynamic_cast(update->integrate))->step; dto = 0.5*step_respa[0]; } diff --git a/src/EXTRA-FIX/fix_nvk.cpp b/src/EXTRA-FIX/fix_nvk.cpp index 168af71262..fdb3e30532 100644 --- a/src/EXTRA-FIX/fix_nvk.cpp +++ b/src/EXTRA-FIX/fix_nvk.cpp @@ -62,7 +62,7 @@ void FixNVK::init() if (utils::strmatch(update->integrate_style,"^respa")) { error->all(FLERR,"Fix nvk not yet enabled for RESPA"); - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; } // compute initial kinetic energy diff --git a/src/EXTRA-FIX/fix_pafi.cpp b/src/EXTRA-FIX/fix_pafi.cpp index 1326dcc44a..c16daf9336 100644 --- a/src/EXTRA-FIX/fix_pafi.cpp +++ b/src/EXTRA-FIX/fix_pafi.cpp @@ -178,8 +178,8 @@ void FixPAFI::init() if (utils::strmatch(update->integrate_style,"^respa")) { - step_respa = (dynamic_cast( update->integrate))->step; // nve - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + step_respa = (dynamic_cast(update->integrate))->step; // nve + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; if (respa_level >= 0) ilevel_respa = MIN(respa_level,nlevels_respa-1); else ilevel_respa = nlevels_respa-1; } @@ -192,9 +192,9 @@ void FixPAFI::setup(int vflag) post_force(vflag); else for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel); } } diff --git a/src/EXTRA-FIX/fix_rhok.cpp b/src/EXTRA-FIX/fix_rhok.cpp index 077dad7f25..d90277819e 100644 --- a/src/EXTRA-FIX/fix_rhok.cpp +++ b/src/EXTRA-FIX/fix_rhok.cpp @@ -96,7 +96,7 @@ void FixRhok::init() { // RESPA boilerplate if (utils::strmatch(update->integrate_style,"^respa")) - mNLevelsRESPA = (dynamic_cast( update->integrate))->nlevels; + mNLevelsRESPA = (dynamic_cast(update->integrate))->nlevels; // Count the number of affected particles int nThisLocal = 0; @@ -121,9 +121,9 @@ void FixRhok::setup( int inVFlag ) post_force( inVFlag ); else { - (dynamic_cast( update->integrate))->copy_flevel_f( mNLevelsRESPA - 1 ); + (dynamic_cast(update->integrate))->copy_flevel_f( mNLevelsRESPA - 1 ); post_force_respa( inVFlag, mNLevelsRESPA - 1,0 ); - (dynamic_cast( update->integrate))->copy_f_flevel( mNLevelsRESPA - 1 ); + (dynamic_cast(update->integrate))->copy_f_flevel( mNLevelsRESPA - 1 ); } } diff --git a/src/EXTRA-FIX/fix_smd.cpp b/src/EXTRA-FIX/fix_smd.cpp index 4a0a9f040f..47fb5a5053 100644 --- a/src/EXTRA-FIX/fix_smd.cpp +++ b/src/EXTRA-FIX/fix_smd.cpp @@ -161,7 +161,7 @@ void FixSMD::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -173,9 +173,9 @@ void FixSMD::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } @@ -194,7 +194,7 @@ void FixSMD::post_force(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) r_old += v_smd * update->dt; else - r_old += v_smd * (dynamic_cast( update->integrate))->step[ilevel_respa]; + r_old += v_smd * (dynamic_cast(update->integrate))->step[ilevel_respa]; } } @@ -207,7 +207,7 @@ void FixSMD::smd_tether() double dt = update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - dt = (dynamic_cast( update->integrate))->step[ilevel_respa]; + dt = (dynamic_cast(update->integrate))->step[ilevel_respa]; // fx,fy,fz = components of k * (r-r0) @@ -313,7 +313,7 @@ void FixSMD::smd_couple() double dt = update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - dt = (dynamic_cast( update->integrate))->step[ilevel_respa]; + dt = (dynamic_cast(update->integrate))->step[ilevel_respa]; // renormalize direction of spring double dx,dy,dz,r,dr; diff --git a/src/EXTRA-FIX/fix_spring_rg.cpp b/src/EXTRA-FIX/fix_spring_rg.cpp index b955716923..b4ddaaeb15 100644 --- a/src/EXTRA-FIX/fix_spring_rg.cpp +++ b/src/EXTRA-FIX/fix_spring_rg.cpp @@ -79,7 +79,7 @@ void FixSpringRG::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -91,9 +91,9 @@ void FixSpringRG::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/EXTRA-FIX/fix_ti_spring.cpp b/src/EXTRA-FIX/fix_ti_spring.cpp index e44afdba01..36d9b8bd05 100644 --- a/src/EXTRA-FIX/fix_ti_spring.cpp +++ b/src/EXTRA-FIX/fix_ti_spring.cpp @@ -143,7 +143,7 @@ int FixTISpring::setmask() void FixTISpring::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -153,9 +153,9 @@ void FixTISpring::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_tmd.cpp b/src/EXTRA-FIX/fix_tmd.cpp index 1404682cda..e86b9d82e4 100644 --- a/src/EXTRA-FIX/fix_tmd.cpp +++ b/src/EXTRA-FIX/fix_tmd.cpp @@ -167,7 +167,7 @@ void FixTMD::init() dtv = update->dt; dtf = update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; } /* ---------------------------------------------------------------------- */ diff --git a/src/EXTRA-FIX/fix_ttm.cpp b/src/EXTRA-FIX/fix_ttm.cpp index 9184983bdb..facb207bfe 100644 --- a/src/EXTRA-FIX/fix_ttm.cpp +++ b/src/EXTRA-FIX/fix_ttm.cpp @@ -241,7 +241,7 @@ void FixTTM::init() } if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -251,9 +251,9 @@ void FixTTM::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) { post_force_setup(vflag); } else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa_setup(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_ttm_mod.cpp b/src/EXTRA-FIX/fix_ttm_mod.cpp index 539b7e1c19..1b82e5452b 100644 --- a/src/EXTRA-FIX/fix_ttm_mod.cpp +++ b/src/EXTRA-FIX/fix_ttm_mod.cpp @@ -271,7 +271,7 @@ void FixTTMMod::init() net_energy_transfer_all[ix][iy][iz] = 0; if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -281,9 +281,9 @@ void FixTTMMod::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) { post_force_setup(vflag); } else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa_setup(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/EXTRA-FIX/fix_wall_ees.cpp b/src/EXTRA-FIX/fix_wall_ees.cpp index 8b30e4a0be..a6226930c4 100644 --- a/src/EXTRA-FIX/fix_wall_ees.cpp +++ b/src/EXTRA-FIX/fix_wall_ees.cpp @@ -50,7 +50,7 @@ void FixWallEES::precompute(int m) /* ---------------------------------------------------------------------- */ void FixWallEES::init() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Fix wall/ees requires atom style ellipsoid"); @@ -85,7 +85,7 @@ void FixWallEES::wall_particle(int m, int which, double coord) double **f = atom->f; double **tor = atom->torque; - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); AtomVecEllipsoid::Bonus *bonus = avec->bonus; int *ellipsoid = atom->ellipsoid; int *mask = atom->mask; diff --git a/src/EXTRA-PAIR/pair_lj96_cut.cpp b/src/EXTRA-PAIR/pair_lj96_cut.cpp index 778dfbb562..4b7c2912b0 100644 --- a/src/EXTRA-PAIR/pair_lj96_cut.cpp +++ b/src/EXTRA-PAIR/pair_lj96_cut.cpp @@ -487,7 +487,7 @@ void PairLJ96Cut::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -496,8 +496,8 @@ void PairLJ96Cut::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp index a62aabf3a5..3841b50d45 100644 --- a/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp +++ b/src/EXTRA-PAIR/pair_lj_expand_coul_long.cpp @@ -688,7 +688,7 @@ void PairLJExpandCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -699,8 +699,8 @@ void PairLJExpandCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; // insure use of KSpace long-range solver, set g_ewald diff --git a/src/EXTRA-PAIR/pair_mie_cut.cpp b/src/EXTRA-PAIR/pair_mie_cut.cpp index dff41ce81b..8556bacb30 100644 --- a/src/EXTRA-PAIR/pair_mie_cut.cpp +++ b/src/EXTRA-PAIR/pair_mie_cut.cpp @@ -499,7 +499,7 @@ void PairMIECut::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -508,8 +508,8 @@ void PairMIECut::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/FEP/fix_adapt_fep.cpp b/src/FEP/fix_adapt_fep.cpp index 0fad4f362d..7d2831e179 100644 --- a/src/FEP/fix_adapt_fep.cpp +++ b/src/FEP/fix_adapt_fep.cpp @@ -294,7 +294,7 @@ void FixAdaptFEP::init() if (ad->pdim == 2 && (strcmp(force->pair_style,"hybrid") == 0 || strcmp(force->pair_style,"hybrid/overlay") == 0)) { - auto pair = dynamic_cast( force->pair); + auto pair = dynamic_cast(force->pair); for (i = ad->ilo; i <= ad->ihi; i++) for (j = MAX(ad->jlo,i); j <= ad->jhi; j++) if (!pair->check_ijtype(i,j,ad->pstyle)) diff --git a/src/FEP/pair_lj_charmm_coul_long_soft.cpp b/src/FEP/pair_lj_charmm_coul_long_soft.cpp index 119c545579..63e7be5490 100644 --- a/src/FEP/pair_lj_charmm_coul_long_soft.cpp +++ b/src/FEP/pair_lj_charmm_coul_long_soft.cpp @@ -692,7 +692,7 @@ void PairLJCharmmCoulLongSoft::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -714,8 +714,8 @@ void PairLJCharmmCoulLongSoft::init_style() // set & error check interior rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) { - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) { + cut_respa = (dynamic_cast(update->integrate))->cutoff; if (MIN(cut_lj,cut_coul) < cut_respa[3]) error->all(FLERR,"Pair cutoff < Respa interior cutoff"); if (cut_lj_inner < cut_respa[1]) diff --git a/src/FEP/pair_lj_cut_coul_long_soft.cpp b/src/FEP/pair_lj_cut_coul_long_soft.cpp index d3e0ca8a88..8090562c3e 100644 --- a/src/FEP/pair_lj_cut_coul_long_soft.cpp +++ b/src/FEP/pair_lj_cut_coul_long_soft.cpp @@ -635,7 +635,7 @@ void PairLJCutCoulLongSoft::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -646,8 +646,8 @@ void PairLJCutCoulLongSoft::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; // insure use of KSpace long-range solver, set g_ewald diff --git a/src/FEP/pair_lj_cut_soft.cpp b/src/FEP/pair_lj_cut_soft.cpp index 8cf61f013c..2f2b29af86 100644 --- a/src/FEP/pair_lj_cut_soft.cpp +++ b/src/FEP/pair_lj_cut_soft.cpp @@ -513,7 +513,7 @@ void PairLJCutSoft::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -522,8 +522,8 @@ void PairLJCutSoft::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; } diff --git a/src/GPU/fix_gpu.cpp b/src/GPU/fix_gpu.cpp index 1488900aec..0de2ab51f8 100644 --- a/src/GPU/fix_gpu.cpp +++ b/src/GPU/fix_gpu.cpp @@ -294,7 +294,7 @@ void FixGPU::init() // rRESPA support if (utils::strmatch(update->integrate_style,"^respa")) - _nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + _nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -308,9 +308,9 @@ void FixGPU::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { // In setup only, all forces calculated on GPU are put in the outer level - (dynamic_cast( update->integrate))->copy_flevel_f(_nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(_nlevels_respa-1); post_force(vflag); - (dynamic_cast( update->integrate))->copy_f_flevel(_nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(_nlevels_respa-1); } } diff --git a/src/GPU/fix_nve_asphere_gpu.cpp b/src/GPU/fix_nve_asphere_gpu.cpp index 1139c56272..1112641837 100644 --- a/src/GPU/fix_nve_asphere_gpu.cpp +++ b/src/GPU/fix_nve_asphere_gpu.cpp @@ -165,7 +165,7 @@ FixNVEAsphereGPU::FixNVEAsphereGPU(LAMMPS *lmp, int narg, char **arg) : void FixNVEAsphereGPU::init() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/asphere requires atom style ellipsoid"); diff --git a/src/GRANULAR/fix_freeze.cpp b/src/GRANULAR/fix_freeze.cpp index d3ed4db921..576daaff9c 100644 --- a/src/GRANULAR/fix_freeze.cpp +++ b/src/GRANULAR/fix_freeze.cpp @@ -73,11 +73,11 @@ void FixFreeze::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + int nlevels_respa = (dynamic_cast(update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/GRANULAR/fix_wall_gran.cpp b/src/GRANULAR/fix_wall_gran.cpp index da7af48e82..f59a7fa2e1 100644 --- a/src/GRANULAR/fix_wall_gran.cpp +++ b/src/GRANULAR/fix_wall_gran.cpp @@ -498,7 +498,7 @@ void FixWallGran::init() dt = update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; // check for FixRigid so can extract rigid body masses @@ -550,9 +550,9 @@ void FixWallGran::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/GRANULAR/pair_granular.cpp b/src/GRANULAR/pair_granular.cpp index 013c63172d..df46e27b95 100644 --- a/src/GRANULAR/pair_granular.cpp +++ b/src/GRANULAR/pair_granular.cpp @@ -102,7 +102,7 @@ PairGranular::PairGranular(LAMMPS *lmp) : Pair(lmp) // this is so final order of Modify:fix will conform to input script fix_history = nullptr; - fix_dummy = dynamic_cast( modify->add_fix("NEIGH_HISTORY_GRANULAR_DUMMY all DUMMY")); + fix_dummy = dynamic_cast(modify->add_fix("NEIGH_HISTORY_GRANULAR_DUMMY all DUMMY")); } /* ---------------------------------------------------------------------- */ @@ -1130,7 +1130,7 @@ void PairGranular::init_style() // this is so its order in the fix list is preserved if (use_history && fix_history == nullptr) { - fix_history = dynamic_cast( modify->replace_fix("NEIGH_HISTORY_GRANULAR_DUMMY", + fix_history = dynamic_cast(modify->replace_fix("NEIGH_HISTORY_GRANULAR_DUMMY", "NEIGH_HISTORY_GRANULAR" " all NEIGH_HISTORY " + std::to_string(size_history),1)); @@ -1199,7 +1199,7 @@ void PairGranular::init_style() // set fix which stores history info if (size_history > 0) { - fix_history = dynamic_cast( modify->get_fix_by_id("NEIGH_HISTORY_GRANULAR")); + fix_history = dynamic_cast(modify->get_fix_by_id("NEIGH_HISTORY_GRANULAR")); if (!fix_history) error->all(FLERR,"Could not find pair fix neigh history ID"); } } diff --git a/src/INTEL/fix_nve_asphere_intel.cpp b/src/INTEL/fix_nve_asphere_intel.cpp index fa68c9bb4a..2917edd3e8 100644 --- a/src/INTEL/fix_nve_asphere_intel.cpp +++ b/src/INTEL/fix_nve_asphere_intel.cpp @@ -49,7 +49,7 @@ FixNVEAsphereIntel::FixNVEAsphereIntel(LAMMPS *lmp, int narg, char **arg) : void FixNVEAsphereIntel::init() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nve/asphere requires atom style ellipsoid"); diff --git a/src/INTEL/fix_nvt_sllod_intel.cpp b/src/INTEL/fix_nvt_sllod_intel.cpp index bc13d1d677..eb11c8a7bb 100644 --- a/src/INTEL/fix_nvt_sllod_intel.cpp +++ b/src/INTEL/fix_nvt_sllod_intel.cpp @@ -70,7 +70,7 @@ void FixNVTSllodIntel::init() int i; for (i = 0; i < modify->nfix; i++) if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) + if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform " "remap option"); break; diff --git a/src/KIM/kim_interactions.cpp b/src/KIM/kim_interactions.cpp index 3427d6fb57..94c182026a 100644 --- a/src/KIM/kim_interactions.cpp +++ b/src/KIM/kim_interactions.cpp @@ -121,7 +121,7 @@ void KimInteractions::do_setup(int narg, char **arg) int ifix = modify->find_fix("KIM_MODEL_STORE"); if (ifix >= 0) { - auto fix_store = dynamic_cast( modify->fix[ifix]); + auto fix_store = dynamic_cast(modify->fix[ifix]); model_name = (char *)fix_store->getptr("model_name"); simulatorModel = (KIM_SimulatorModel *)fix_store->getptr("simulator_model"); } else error->all(FLERR, "Must use 'kim init' before 'kim interactions'"); diff --git a/src/KIM/kim_query.cpp b/src/KIM/kim_query.cpp index f3d1815aed..4851338367 100644 --- a/src/KIM/kim_query.cpp +++ b/src/KIM/kim_query.cpp @@ -158,7 +158,7 @@ void KimQuery::command(int narg, char **arg) // check if we had a kim init command by finding fix STORE/KIM const int ifix = modify->find_fix("KIM_MODEL_STORE"); if (ifix >= 0) { - auto fix_store = dynamic_cast( modify->fix[ifix]); + auto fix_store = dynamic_cast(modify->fix[ifix]); char *model_name_c = (char *) fix_store->getptr("model_name"); model_name = model_name_c; } else { diff --git a/src/KSPACE/pair_buck_long_coul_long.cpp b/src/KSPACE/pair_buck_long_coul_long.cpp index b1717a891d..b4beaa9766 100644 --- a/src/KSPACE/pair_buck_long_coul_long.cpp +++ b/src/KSPACE/pair_buck_long_coul_long.cpp @@ -249,8 +249,8 @@ void PairBuckLongCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; // setup force tables @@ -264,7 +264,7 @@ void PairBuckLongCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } diff --git a/src/KSPACE/pair_lj_charmm_coul_long.cpp b/src/KSPACE/pair_lj_charmm_coul_long.cpp index 6e39a4f56f..d1ca3117e9 100644 --- a/src/KSPACE/pair_lj_charmm_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmm_coul_long.cpp @@ -690,7 +690,7 @@ void PairLJCharmmCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -713,8 +713,8 @@ void PairLJCharmmCoulLong::init_style() // set & error check interior rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) { - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) { + cut_respa = (dynamic_cast(update->integrate))->cutoff; cut_in_off = cut_respa[0]; cut_in_on = cut_respa[1]; cut_out_on = cut_respa[2]; diff --git a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp index a4741a56a2..02dd4ac541 100644 --- a/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp +++ b/src/KSPACE/pair_lj_charmmfsw_coul_long.cpp @@ -741,7 +741,7 @@ void PairLJCharmmfswCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -775,8 +775,8 @@ void PairLJCharmmfswCoulLong::init_style() // set & error check interior rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) { - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) { + cut_respa = (dynamic_cast(update->integrate))->cutoff; if (MIN(cut_lj,cut_coul) < cut_respa[3]) error->all(FLERR,"Pair cutoff < Respa interior cutoff"); if (cut_lj_inner < cut_respa[1]) diff --git a/src/KSPACE/pair_lj_cut_coul_long.cpp b/src/KSPACE/pair_lj_cut_coul_long.cpp index 0ffdde24de..da9a783dec 100644 --- a/src/KSPACE/pair_lj_cut_coul_long.cpp +++ b/src/KSPACE/pair_lj_cut_coul_long.cpp @@ -658,7 +658,7 @@ void PairLJCutCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } @@ -669,8 +669,8 @@ void PairLJCutCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; // insure use of KSpace long-range solver, set g_ewald diff --git a/src/KSPACE/pair_lj_long_coul_long.cpp b/src/KSPACE/pair_lj_long_coul_long.cpp index 742f424b95..c1bba53d75 100644 --- a/src/KSPACE/pair_lj_long_coul_long.cpp +++ b/src/KSPACE/pair_lj_long_coul_long.cpp @@ -242,8 +242,8 @@ void PairLJLongCoulLong::init_style() // set rRESPA cutoffs if (utils::strmatch(update->integrate_style,"^respa") && - (dynamic_cast( update->integrate))->level_inner >= 0) - cut_respa = (dynamic_cast( update->integrate))->cutoff; + (dynamic_cast(update->integrate))->level_inner >= 0) + cut_respa = (dynamic_cast(update->integrate))->cutoff; else cut_respa = nullptr; // setup force tables @@ -257,7 +257,7 @@ void PairLJLongCoulLong::init_style() int list_style = NeighConst::REQ_DEFAULT; if (update->whichflag == 1 && utils::strmatch(update->integrate_style, "^respa")) { - auto respa = dynamic_cast( update->integrate); + auto respa = dynamic_cast(update->integrate); if (respa->level_inner >= 0) list_style = NeighConst::REQ_RESPA_INOUT; if (respa->level_middle >= 0) list_style = NeighConst::REQ_RESPA_ALL; } diff --git a/src/MACHDYN/pair_smd_tlsph.cpp b/src/MACHDYN/pair_smd_tlsph.cpp index 6a55948426..6c8f286fe5 100644 --- a/src/MACHDYN/pair_smd_tlsph.cpp +++ b/src/MACHDYN/pair_smd_tlsph.cpp @@ -143,11 +143,11 @@ void PairTlsph::PreCompute() { int nlocal = atom->nlocal; int jnum, jj, i, j, itype, idim; - tagint **partner = (dynamic_cast( modify->fix[ifix_tlsph]))->partner; - int *npartner = (dynamic_cast( modify->fix[ifix_tlsph]))->npartner; - float **wfd_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wfd_list; - float **wf_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wf_list; - float **degradation_ij = (dynamic_cast( modify->fix[ifix_tlsph]))->degradation_ij; + tagint **partner = (dynamic_cast(modify->fix[ifix_tlsph]))->partner; + int *npartner = (dynamic_cast(modify->fix[ifix_tlsph]))->npartner; + float **wfd_list = (dynamic_cast(modify->fix[ifix_tlsph]))->wfd_list; + float **wf_list = (dynamic_cast(modify->fix[ifix_tlsph]))->wf_list; + float **degradation_ij = (dynamic_cast(modify->fix[ifix_tlsph]))->degradation_ij; double r0, r0Sq, wf, wfd, h, irad, voli, volj, scale, shepardWeight; Vector3d dx, dx0, dv, g; Matrix3d Ktmp, Ftmp, Fdottmp, L, U, eye; @@ -421,12 +421,12 @@ void PairTlsph::ComputeForces(int eflag, int vflag) { Vector3d xi, xj, vi, vj, f_visc, sumForces, f_spring; int periodic = (domain->xperiodic || domain->yperiodic || domain->zperiodic); - tagint **partner = (dynamic_cast( modify->fix[ifix_tlsph]))->partner; - int *npartner = (dynamic_cast( modify->fix[ifix_tlsph]))->npartner; - float **wfd_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wfd_list; - float **wf_list = (dynamic_cast( modify->fix[ifix_tlsph]))->wf_list; - float **degradation_ij = (dynamic_cast( modify->fix[ifix_tlsph]))->degradation_ij; - float **energy_per_bond = (dynamic_cast( modify->fix[ifix_tlsph]))->energy_per_bond; + tagint **partner = (dynamic_cast(modify->fix[ifix_tlsph]))->partner; + int *npartner = (dynamic_cast(modify->fix[ifix_tlsph]))->npartner; + float **wfd_list = (dynamic_cast(modify->fix[ifix_tlsph]))->wfd_list; + float **wf_list = (dynamic_cast(modify->fix[ifix_tlsph]))->wf_list; + float **degradation_ij = (dynamic_cast(modify->fix[ifix_tlsph]))->degradation_ij; + float **energy_per_bond = (dynamic_cast(modify->fix[ifix_tlsph]))->energy_per_bond; Matrix3d eye; eye.setIdentity(); @@ -1612,7 +1612,7 @@ void PairTlsph::init_style() { fixarg[2] = (char *) "SMD_TLSPH_NEIGHBORS"; modify->add_fix(3, fixarg); delete[] fixarg; - fix_tlsph_reference_configuration = dynamic_cast( modify->fix[modify->nfix - 1]); + fix_tlsph_reference_configuration = dynamic_cast(modify->fix[modify->nfix - 1]); fix_tlsph_reference_configuration->pair = this; } diff --git a/src/MANIFOLD/fix_manifoldforce.cpp b/src/MANIFOLD/fix_manifoldforce.cpp index 7542205f8f..9e56b624d7 100644 --- a/src/MANIFOLD/fix_manifoldforce.cpp +++ b/src/MANIFOLD/fix_manifoldforce.cpp @@ -124,11 +124,11 @@ void FixManifoldForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + int nlevels_respa = (dynamic_cast(update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/MANYBODY/fix_qeq_comb.cpp b/src/MANYBODY/fix_qeq_comb.cpp index cf9441da1e..23a4d49566 100644 --- a/src/MANYBODY/fix_qeq_comb.cpp +++ b/src/MANYBODY/fix_qeq_comb.cpp @@ -119,14 +119,14 @@ void FixQEQComb::init() if (!atom->q_flag) error->all(FLERR,"Fix qeq/comb requires atom attribute q"); - comb3 = dynamic_cast( force->pair_match("^comb3",0)); - if (!comb3) comb = dynamic_cast( force->pair_match("^comb",0)); + comb3 = dynamic_cast(force->pair_match("^comb3",0)); + if (!comb3) comb = dynamic_cast(force->pair_match("^comb",0)); if (comb == nullptr && comb3 == nullptr) error->all(FLERR,"Must use pair_style comb or comb3 with fix qeq/comb"); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -154,9 +154,9 @@ void FixQEQComb::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } firstflag = 0; } diff --git a/src/MC/fix_bond_break.cpp b/src/MC/fix_bond_break.cpp index 71408d8aed..7bd70e93ec 100644 --- a/src/MC/fix_bond_break.cpp +++ b/src/MC/fix_bond_break.cpp @@ -149,7 +149,7 @@ int FixBondBreak::setmask() void FixBondBreak::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; // enable angle/dihedral/improper breaking if any defined diff --git a/src/MC/fix_bond_create.cpp b/src/MC/fix_bond_create.cpp index 2550e881d6..6651dd9d13 100644 --- a/src/MC/fix_bond_create.cpp +++ b/src/MC/fix_bond_create.cpp @@ -235,7 +235,7 @@ int FixBondCreate::setmask() void FixBondCreate::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; // check cutoff for iatomtype,jatomtype diff --git a/src/MISC/fix_imd.cpp b/src/MISC/fix_imd.cpp index 33a7aa5d2b..4a4a077cb4 100644 --- a/src/MISC/fix_imd.cpp +++ b/src/MISC/fix_imd.cpp @@ -590,7 +590,7 @@ int FixIMD::setmask() void FixIMD::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ diff --git a/src/MOLECULE/fix_cmap.cpp b/src/MOLECULE/fix_cmap.cpp index b384294a89..a0137ab40c 100644 --- a/src/MOLECULE/fix_cmap.cpp +++ b/src/MOLECULE/fix_cmap.cpp @@ -189,7 +189,7 @@ void FixCMAP::init() newton_bond = force->newton_bond; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -203,9 +203,9 @@ void FixCMAP::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/OPENMP/fix_nh_asphere_omp.cpp b/src/OPENMP/fix_nh_asphere_omp.cpp index 554a0d52b6..4b93706f32 100644 --- a/src/OPENMP/fix_nh_asphere_omp.cpp +++ b/src/OPENMP/fix_nh_asphere_omp.cpp @@ -43,7 +43,7 @@ FixNHAsphereOMP::FixNHAsphereOMP(LAMMPS *lmp, int narg, char **arg) : void FixNHAsphereOMP::init() { - avec = dynamic_cast( atom->style_match("ellipsoid")); + avec = dynamic_cast(atom->style_match("ellipsoid")); if (!avec) error->all(FLERR,"Compute nvt/nph/npt asphere requires atom style ellipsoid"); diff --git a/src/OPENMP/fix_nvt_sllod_omp.cpp b/src/OPENMP/fix_nvt_sllod_omp.cpp index c9ee6c153f..866592728d 100644 --- a/src/OPENMP/fix_nvt_sllod_omp.cpp +++ b/src/OPENMP/fix_nvt_sllod_omp.cpp @@ -78,7 +78,7 @@ void FixNVTSllodOMP::init() int i; for (i = 0; i < modify->nfix; i++) if (utils::strmatch(modify->fix[i]->style,"^deform")) { - if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) + if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod/omp with inconsistent fix " "deform remap option"); break; diff --git a/src/OPENMP/pair_reaxff_omp.cpp b/src/OPENMP/pair_reaxff_omp.cpp index 7112681b06..c860514f6e 100644 --- a/src/OPENMP/pair_reaxff_omp.cpp +++ b/src/OPENMP/pair_reaxff_omp.cpp @@ -136,7 +136,7 @@ void PairReaxFFOMP::init_style() "increased neighbor list skin."); if (fix_reaxff == nullptr) - fix_reaxff = dynamic_cast( modify->add_fix(fmt::format("{} all REAXFF",fix_id))); + fix_reaxff = dynamic_cast(modify->add_fix(fmt::format("{} all REAXFF",fix_id))); api->control->nthreads = comm->nthreads; } diff --git a/src/ORIENT/fix_orient_bcc.cpp b/src/ORIENT/fix_orient_bcc.cpp index c8979794e8..a97123a33d 100644 --- a/src/ORIENT/fix_orient_bcc.cpp +++ b/src/ORIENT/fix_orient_bcc.cpp @@ -202,7 +202,7 @@ int FixOrientBCC::setmask() void FixOrientBCC::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -225,9 +225,9 @@ void FixOrientBCC::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/ORIENT/fix_orient_eco.cpp b/src/ORIENT/fix_orient_eco.cpp index 5f725a9e06..b34ce8e33a 100644 --- a/src/ORIENT/fix_orient_eco.cpp +++ b/src/ORIENT/fix_orient_eco.cpp @@ -176,7 +176,7 @@ void FixOrientECO::init() { MPI_Bcast(&inv_norm_fac, 1, MPI_DOUBLE, 0, world); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels - 1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels - 1; if (respa_level >= 0) ilevel_respa = MIN(respa_level, ilevel_respa); } @@ -197,9 +197,9 @@ void FixOrientECO::setup(int vflag) { if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa, 0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/ORIENT/fix_orient_fcc.cpp b/src/ORIENT/fix_orient_fcc.cpp index 069d4b58fc..57a6e5ffd8 100644 --- a/src/ORIENT/fix_orient_fcc.cpp +++ b/src/ORIENT/fix_orient_fcc.cpp @@ -199,7 +199,7 @@ int FixOrientFCC::setmask() void FixOrientFCC::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -222,9 +222,9 @@ void FixOrientFCC::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/QEQ/fix_qeq.cpp b/src/QEQ/fix_qeq.cpp index b586ecb9d9..aec84947a1 100644 --- a/src/QEQ/fix_qeq.cpp +++ b/src/QEQ/fix_qeq.cpp @@ -308,7 +308,7 @@ void FixQEq::init() error->warning(FLERR,"Fix efield is ignored during charge equilibration"); if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; // compute net charge and print warning if too large diff --git a/src/QEQ/fix_qeq_fire.cpp b/src/QEQ/fix_qeq_fire.cpp index d4dc68ace2..429fcc79d6 100644 --- a/src/QEQ/fix_qeq_fire.cpp +++ b/src/QEQ/fix_qeq_fire.cpp @@ -81,8 +81,8 @@ void FixQEqFire::init() if (comm->me == 0) error->warning(FLERR,"Fix qeq/fire tolerance may be too small for damped fires"); - comb3 = dynamic_cast( force->pair_match("^comb3",0)); - if (!comb3) comb = dynamic_cast( force->pair_match("^comb",0)); + comb3 = dynamic_cast(force->pair_match("^comb3",0)); + if (!comb3) comb = dynamic_cast(force->pair_match("^comb",0)); } /* ---------------------------------------------------------------------- */ diff --git a/src/QTB/fix_qtb.cpp b/src/QTB/fix_qtb.cpp index f9faf2475c..217e386953 100644 --- a/src/QTB/fix_qtb.cpp +++ b/src/QTB/fix_qtb.cpp @@ -218,7 +218,7 @@ void FixQTB::init() // respa if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- @@ -229,9 +229,9 @@ void FixQTB::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/REACTION/fix_bond_react.cpp b/src/REACTION/fix_bond_react.cpp index 60bd6fa82d..a76d11630c 100644 --- a/src/REACTION/fix_bond_react.cpp +++ b/src/REACTION/fix_bond_react.cpp @@ -794,7 +794,7 @@ void FixBondReact::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; // check cutoff for iatomtype,jatomtype for (int i = 0; i < nreacts; i++) { diff --git a/src/REAXFF/compute_spec_atom.cpp b/src/REAXFF/compute_spec_atom.cpp index 1df4ae559b..117ee0c862 100644 --- a/src/REAXFF/compute_spec_atom.cpp +++ b/src/REAXFF/compute_spec_atom.cpp @@ -40,7 +40,7 @@ ComputeSpecAtom::ComputeSpecAtom(LAMMPS *lmp, int narg, char **arg) : else size_peratom_cols = nvalues; // get reference to ReaxFF pair style - reaxff = dynamic_cast( force->pair_match("^reax..",0)); + reaxff = dynamic_cast(force->pair_match("^reax..",0)); pack_choice = new FnPtrPack[nvalues]; diff --git a/src/REAXFF/fix_qeq_reaxff.cpp b/src/REAXFF/fix_qeq_reaxff.cpp index 6c03683518..f0d58ae120 100644 --- a/src/REAXFF/fix_qeq_reaxff.cpp +++ b/src/REAXFF/fix_qeq_reaxff.cpp @@ -141,7 +141,7 @@ FixQEqReaxFF::FixQEqReaxFF(LAMMPS *lmp, int narg, char **arg) : // perform initial allocation of atom-based arrays // register with Atom class - reaxff = dynamic_cast( force->pair_match("^reax..",0)); + reaxff = dynamic_cast(force->pair_match("^reax..",0)); s_hist = t_hist = nullptr; atom->add_callback(Atom::GROW); @@ -395,7 +395,7 @@ void FixQEqReaxFF::init() efield = nullptr; auto fixes = modify->get_fix_by_style("^efield"); - if (fixes.size() == 1) efield = dynamic_cast( fixes.front()); + if (fixes.size() == 1) efield = dynamic_cast(fixes.front()); else if (fixes.size() > 1) error->all(FLERR, "There may be only one fix efield instance used with fix {}", style); @@ -423,7 +423,7 @@ void FixQEqReaxFF::init() init_taper(); if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ diff --git a/src/REAXFF/fix_reaxff_bonds.cpp b/src/REAXFF/fix_reaxff_bonds.cpp index 4b96cb21a1..3eba1e205d 100644 --- a/src/REAXFF/fix_reaxff_bonds.cpp +++ b/src/REAXFF/fix_reaxff_bonds.cpp @@ -101,7 +101,7 @@ void FixReaxFFBonds::setup(int /*vflag*/) void FixReaxFFBonds::init() { - reaxff = dynamic_cast( force->pair_match("^reax..",0)); + reaxff = dynamic_cast(force->pair_match("^reax..",0)); if (reaxff == nullptr) error->all(FLERR,"Cannot use fix reaxff/bonds without " "pair_style reaxff, reaxff/kk, or reaxff/omp"); } diff --git a/src/REAXFF/pair_reaxff.cpp b/src/REAXFF/pair_reaxff.cpp index b08a167431..f3ab23bf06 100644 --- a/src/REAXFF/pair_reaxff.cpp +++ b/src/REAXFF/pair_reaxff.cpp @@ -374,7 +374,7 @@ void PairReaxFF::init_style() "increased neighbor list skin."); if (fix_reaxff == nullptr) - fix_reaxff = dynamic_cast( modify->add_fix(fmt::format("{} all REAXFF",fix_id))); + fix_reaxff = dynamic_cast(modify->add_fix(fmt::format("{} all REAXFF",fix_id))); } /* ---------------------------------------------------------------------- */ @@ -468,7 +468,7 @@ void PairReaxFF::compute(int eflag, int vflag) if (api->system->acks2_flag) { auto ifix = modify->get_fix_by_style("^acks2/reax").front(); - api->workspace->s = (dynamic_cast( ifix))->get_s(); + api->workspace->s = (dynamic_cast(ifix))->get_s(); } // setup data structures diff --git a/src/REPLICA/compute_event_displace.cpp b/src/REPLICA/compute_event_displace.cpp index 6a8791de71..7d08955803 100644 --- a/src/REPLICA/compute_event_displace.cpp +++ b/src/REPLICA/compute_event_displace.cpp @@ -69,7 +69,7 @@ void ComputeEventDisplace::init() int ifix = modify->find_fix(id_event); if (ifix < 0) error->all(FLERR, "Could not find compute event/displace fix ID"); - fix_event = dynamic_cast( modify->fix[ifix]); + fix_event = dynamic_cast(modify->fix[ifix]); if (strcmp(fix_event->style,"EVENT/PRD") != 0 && strcmp(fix_event->style,"EVENT/TAD") != 0 && diff --git a/src/REPLICA/hyper.cpp b/src/REPLICA/hyper.cpp index c2e968e41b..7b402a1729 100644 --- a/src/REPLICA/hyper.cpp +++ b/src/REPLICA/hyper.cpp @@ -86,7 +86,7 @@ void Hyper::command(int narg, char **arg) } else { int ifix = modify->find_fix(id_fix); if (ifix < 0) error->all(FLERR,"Could not find fix ID for hyper"); - fix_hyper = dynamic_cast( modify->fix[ifix]); + fix_hyper = dynamic_cast(modify->fix[ifix]); int dim; int *hyperflag = (int *) fix_hyper->extract("hyperflag",dim); if (hyperflag == nullptr || *hyperflag == 0) @@ -98,7 +98,7 @@ void Hyper::command(int narg, char **arg) // create FixEventHyper class to store event and pre-quench states - fix_event = dynamic_cast( modify->add_fix("hyper_event all EVENT/HYPER")); + fix_event = dynamic_cast(modify->add_fix("hyper_event all EVENT/HYPER")); // create Finish for timing output @@ -109,7 +109,7 @@ void Hyper::command(int narg, char **arg) int icompute = modify->find_compute(id_compute); if (icompute < 0) error->all(FLERR,"Could not find compute ID for hyper"); - compute_event = dynamic_cast( modify->compute[icompute]); + compute_event = dynamic_cast(modify->compute[icompute]); compute_event->reset_extra_compute_fix("hyper_event"); // reset reneighboring criteria since will perform minimizations diff --git a/src/REPLICA/neb.cpp b/src/REPLICA/neb.cpp index a811dabfd5..e80668a687 100644 --- a/src/REPLICA/neb.cpp +++ b/src/REPLICA/neb.cpp @@ -178,7 +178,7 @@ void NEB::run() if (fixes.size() != 1) error->all(FLERR,"NEB requires use of exactly one fix neb instance"); - fneb = dynamic_cast( fixes[0]); + fneb = dynamic_cast(fixes[0]); if (verbose) numall =7; else numall = 4; memory->create(all,nreplica,numall,"neb:all"); diff --git a/src/REPLICA/prd.cpp b/src/REPLICA/prd.cpp index a658dba853..e09807e565 100644 --- a/src/REPLICA/prd.cpp +++ b/src/REPLICA/prd.cpp @@ -167,7 +167,7 @@ void PRD::command(int narg, char **arg) // create FixEventPRD class to store event and pre-quench states - fix_event = dynamic_cast( modify->add_fix("prd_event all EVENT/PRD")); + fix_event = dynamic_cast(modify->add_fix("prd_event all EVENT/PRD")); // create Finish for timing output diff --git a/src/REPLICA/tad.cpp b/src/REPLICA/tad.cpp index 490e98f168..ceda4fb592 100644 --- a/src/REPLICA/tad.cpp +++ b/src/REPLICA/tad.cpp @@ -844,7 +844,7 @@ void TAD::add_event() int ievent = n_event_list++; fix_event_list[ievent] - = dynamic_cast( modify->add_fix(fmt::format("tad_event_{} all EVENT/TAD", ievent))); + = dynamic_cast(modify->add_fix(fmt::format("tad_event_{} all EVENT/TAD", ievent))); // store quenched state for new event diff --git a/src/RIGID/compute_erotate_rigid.cpp b/src/RIGID/compute_erotate_rigid.cpp index 6e51e4853f..0d0ad038b1 100644 --- a/src/RIGID/compute_erotate_rigid.cpp +++ b/src/RIGID/compute_erotate_rigid.cpp @@ -66,8 +66,8 @@ double ComputeERotateRigid::compute_scalar() if (strncmp(modify->fix[irfix]->style,"rigid",5) == 0) { if (strstr(modify->fix[irfix]->style,"/small")) { - scalar = (dynamic_cast( modify->fix[irfix]))->extract_erotational(); - } else scalar = (dynamic_cast( modify->fix[irfix]))->extract_erotational(); + scalar = (dynamic_cast(modify->fix[irfix]))->extract_erotational(); + } else scalar = (dynamic_cast(modify->fix[irfix]))->extract_erotational(); } scalar *= force->mvv2e; return scalar; diff --git a/src/RIGID/compute_ke_rigid.cpp b/src/RIGID/compute_ke_rigid.cpp index 1b858dea15..b0342ec1f9 100644 --- a/src/RIGID/compute_ke_rigid.cpp +++ b/src/RIGID/compute_ke_rigid.cpp @@ -65,8 +65,8 @@ double ComputeKERigid::compute_scalar() if (strncmp(modify->fix[irfix]->style,"rigid",5) == 0) { if (strstr(modify->fix[irfix]->style,"/small")) { - scalar = (dynamic_cast( modify->fix[irfix]))->extract_ke(); - } else scalar = (dynamic_cast( modify->fix[irfix]))->extract_ke(); + scalar = (dynamic_cast(modify->fix[irfix]))->extract_ke(); + } else scalar = (dynamic_cast(modify->fix[irfix]))->extract_ke(); } scalar *= force->mvv2e; return scalar; diff --git a/src/RIGID/compute_rigid_local.cpp b/src/RIGID/compute_rigid_local.cpp index 21b232fdfe..4254acc025 100644 --- a/src/RIGID/compute_rigid_local.cpp +++ b/src/RIGID/compute_rigid_local.cpp @@ -111,7 +111,7 @@ void ComputeRigidLocal::init() int ifix = modify->find_fix(idrigid); if (ifix < 0) error->all(FLERR,"FixRigidSmall ID for compute rigid/local does not exist"); - fixrigid = dynamic_cast( modify->fix[ifix]); + fixrigid = dynamic_cast(modify->fix[ifix]); int flag = 0; if (strstr(fixrigid->style,"rigid/") == nullptr) flag = 1; diff --git a/src/RIGID/fix_rigid.cpp b/src/RIGID/fix_rigid.cpp index eecd59cfa0..f0bcf630b7 100644 --- a/src/RIGID/fix_rigid.cpp +++ b/src/RIGID/fix_rigid.cpp @@ -676,9 +676,9 @@ void FixRigid::init() // atom style pointers to particles that store extra info - avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); - avec_line = dynamic_cast( atom->style_match("line")); - avec_tri = dynamic_cast( atom->style_match("tri")); + avec_ellipsoid = dynamic_cast(atom->style_match("ellipsoid")); + avec_line = dynamic_cast(atom->style_match("line")); + avec_tri = dynamic_cast(atom->style_match("tri")); // warn if more than one rigid fix // if earlyflag, warn if any post-force fixes come after a rigid fix @@ -737,7 +737,7 @@ void FixRigid::init() dtq = 0.5 * update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; // setup rigid bodies, using current atom info. if reinitflag is not set, // do the initialization only once, b/c properties may not be re-computable diff --git a/src/RIGID/fix_rigid_nh.cpp b/src/RIGID/fix_rigid_nh.cpp index 622a2f86b0..61491688e9 100644 --- a/src/RIGID/fix_rigid_nh.cpp +++ b/src/RIGID/fix_rigid_nh.cpp @@ -270,7 +270,7 @@ void FixRigidNH::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; + int *dimflag = (dynamic_cast(modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2])) error->all(FLERR,"Cannot use fix rigid npt/nph and fix deform on " diff --git a/src/RIGID/fix_rigid_nh_small.cpp b/src/RIGID/fix_rigid_nh_small.cpp index bd8db90827..ba4de80d15 100644 --- a/src/RIGID/fix_rigid_nh_small.cpp +++ b/src/RIGID/fix_rigid_nh_small.cpp @@ -268,7 +268,7 @@ void FixRigidNHSmall::init() for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; + int *dimflag = (dynamic_cast(modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2])) error->all(FLERR,"Cannot use fix rigid npt/nph and fix deform on " diff --git a/src/RIGID/fix_rigid_small.cpp b/src/RIGID/fix_rigid_small.cpp index 2eb3c1a63c..d39102f5dc 100644 --- a/src/RIGID/fix_rigid_small.cpp +++ b/src/RIGID/fix_rigid_small.cpp @@ -432,9 +432,9 @@ FixRigidSmall::FixRigidSmall(LAMMPS *lmp, int narg, char **arg) : // atom style pointers to particles that store extra info - avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); - avec_line = dynamic_cast( atom->style_match("line")); - avec_tri = dynamic_cast( atom->style_match("tri")); + avec_ellipsoid = dynamic_cast(atom->style_match("ellipsoid")); + avec_line = dynamic_cast(atom->style_match("line")); + avec_tri = dynamic_cast(atom->style_match("tri")); // compute per body forces and torques inside final_integrate() by default @@ -582,7 +582,7 @@ void FixRigidSmall::init() dtq = 0.5 * update->dt; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; } /* ---------------------------------------------------------------------- diff --git a/src/RIGID/fix_shake.cpp b/src/RIGID/fix_shake.cpp index 1ff61c8856..82f35eab59 100644 --- a/src/RIGID/fix_shake.cpp +++ b/src/RIGID/fix_shake.cpp @@ -374,10 +374,10 @@ void FixShake::init() if (utils::strmatch(update->integrate_style,"^respa")) { if (update->whichflag > 0) { auto fixes = modify->get_fix_by_style("^RESPA"); - if (fixes.size() > 0) fix_respa = dynamic_cast( fixes.front()); + if (fixes.size() > 0) fix_respa = dynamic_cast(fixes.front()); else error->all(FLERR,"Run style respa did not create fix RESPA"); } - auto respa_style = dynamic_cast( update->integrate); + auto respa_style = dynamic_cast(update->integrate); nlevels_respa = respa_style->nlevels; loop_respa = respa_style->loop; step_respa = respa_style->step; @@ -3177,9 +3177,9 @@ void FixShake::shake_end_of_step(int vflag) { // apply correction to all rRESPA levels for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel); FixShake::post_force_respa(vflag,ilevel,loop_respa[ilevel]-1); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel); } if (!rattle) dtf_inner = step_respa[0] * force->ftm2v; } diff --git a/src/SHOCK/fix_msst.cpp b/src/SHOCK/fix_msst.cpp index 1a7ebde991..3b682f7df5 100644 --- a/src/SHOCK/fix_msst.cpp +++ b/src/SHOCK/fix_msst.cpp @@ -299,7 +299,7 @@ void FixMSST::init() if (dftb) { for (int i = 0; i < modify->nfix; i++) if (utils::strmatch(modify->fix[i]->style,"^external$")) - fix_external = dynamic_cast( modify->fix[i]); + fix_external = dynamic_cast(modify->fix[i]); if (fix_external == nullptr) error->all(FLERR,"Fix msst dftb cannot be used w/out fix external"); } diff --git a/src/SPIN/compute_spin.cpp b/src/SPIN/compute_spin.cpp index a6dfdf79d2..ba553335bb 100644 --- a/src/SPIN/compute_spin.cpp +++ b/src/SPIN/compute_spin.cpp @@ -112,11 +112,11 @@ void ComputeSpin::init() int count = 0; if (npairspin == 1) { count = 1; - spin_pairs[0] = dynamic_cast( force->pair_match("^spin",0,0)); + spin_pairs[0] = dynamic_cast(force->pair_match("^spin",0,0)); } else if (npairspin > 1) { for (int i = 0; ipair_match("^spin",0,i)) { - spin_pairs[count] = dynamic_cast( force->pair_match("^spin",0,i)); + spin_pairs[count] = dynamic_cast(force->pair_match("^spin",0,i)); count++; } } @@ -141,7 +141,7 @@ void ComputeSpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^precession/spin")) { precession_spin_flag = 1; - lockprecessionspin = dynamic_cast( modify->fix[iforce]); + lockprecessionspin = dynamic_cast(modify->fix[iforce]); } } } diff --git a/src/SPIN/fix_langevin_spin.cpp b/src/SPIN/fix_langevin_spin.cpp index a29ce8aa2c..f8aacc0c5c 100644 --- a/src/SPIN/fix_langevin_spin.cpp +++ b/src/SPIN/fix_langevin_spin.cpp @@ -119,9 +119,9 @@ void FixLangevinSpin::init() void FixLangevinSpin::setup(int vflag) { if (utils::strmatch(update->integrate_style,"^respa")) { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } else post_force(vflag); } diff --git a/src/SPIN/fix_nve_spin.cpp b/src/SPIN/fix_nve_spin.cpp index e578462526..20240ab2ea 100644 --- a/src/SPIN/fix_nve_spin.cpp +++ b/src/SPIN/fix_nve_spin.cpp @@ -206,11 +206,11 @@ void FixNVESpin::init() int count1 = 0; if (npairspin == 1) { count1 = 1; - spin_pairs[0] = dynamic_cast( force->pair_match("^spin",0,0)); + spin_pairs[0] = dynamic_cast(force->pair_match("^spin",0,0)); } else if (npairspin > 1) { for (int i = 0; ipair_match("^spin",0,i)) { - spin_pairs[count1] = dynamic_cast( force->pair_match("^spin",0,i)); + spin_pairs[count1] = dynamic_cast(force->pair_match("^spin",0,i)); count1++; } } @@ -254,7 +254,7 @@ void FixNVESpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^precession/spin")) { precession_spin_flag = 1; - lockprecessionspin[count2] = dynamic_cast( modify->fix[iforce]); + lockprecessionspin[count2] = dynamic_cast(modify->fix[iforce]); count2++; } } @@ -287,7 +287,7 @@ void FixNVESpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^langevin/spin")) { maglangevin_flag = 1; - locklangevinspin[count2] = dynamic_cast( modify->fix[iforce]); + locklangevinspin[count2] = dynamic_cast(modify->fix[iforce]); count2++; } } @@ -301,7 +301,7 @@ void FixNVESpin::init() for (iforce = 0; iforce < modify->nfix; iforce++) { if (utils::strmatch(modify->fix[iforce]->style,"^setforce/spin")) { setforce_spin_flag = 1; - locksetforcespin = dynamic_cast( modify->fix[iforce]); + locksetforcespin = dynamic_cast(modify->fix[iforce]); } } diff --git a/src/SPIN/fix_precession_spin.cpp b/src/SPIN/fix_precession_spin.cpp index 6f4bc10b87..8902857433 100644 --- a/src/SPIN/fix_precession_spin.cpp +++ b/src/SPIN/fix_precession_spin.cpp @@ -273,7 +273,7 @@ void FixPrecessionSpin::init() K6h = K6/hbar; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -305,9 +305,9 @@ void FixPrecessionSpin::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/SPIN/neb_spin.cpp b/src/SPIN/neb_spin.cpp index 381d1827b3..c67ba36d59 100644 --- a/src/SPIN/neb_spin.cpp +++ b/src/SPIN/neb_spin.cpp @@ -172,7 +172,7 @@ void NEBSpin::run() if (fixes.size() != 1) error->all(FLERR,"NEBSpin requires use of exactly one fix neb/spin instance"); - fneb = dynamic_cast( fixes[0]); + fneb = dynamic_cast(fixes[0]); if (verbose) numall =7; else numall = 4; memory->create(all,nreplica,numall,"neb:all"); diff --git a/src/SPIN/pair_spin.cpp b/src/SPIN/pair_spin.cpp index d236e910c7..4ee6110659 100644 --- a/src/SPIN/pair_spin.cpp +++ b/src/SPIN/pair_spin.cpp @@ -96,7 +96,7 @@ void PairSpin::init_style() auto fixes = modify->get_fix_by_style("^nve/spin"); if (fixes.size() == 1) - lattice_flag = (dynamic_cast( fixes.front()))->lattice_flag; + lattice_flag = (dynamic_cast(fixes.front()))->lattice_flag; else if (fixes.size() > 1) error->warning(FLERR,"Using multiple instances of fix nve/spin or neb/spin"); diff --git a/src/UEF/compute_pressure_uef.cpp b/src/UEF/compute_pressure_uef.cpp index da35b7635d..feb524904d 100644 --- a/src/UEF/compute_pressure_uef.cpp +++ b/src/UEF/compute_pressure_uef.cpp @@ -57,7 +57,7 @@ void ComputePressureUef::init() if (i==modify->nfix) error->all(FLERR,"Can't use compute pressure/uef without defining a fix nvt/npt/uef"); ifix_uef=i; - (dynamic_cast( modify->fix[ifix_uef]))->get_ext_flags(ext_flags); + (dynamic_cast(modify->fix[ifix_uef]))->get_ext_flags(ext_flags); if (strcmp(temperature->style,"temp/uef") != 0) error->warning(FLERR,"The temperature used in compute pressure/ued is not of style temp/uef"); @@ -127,7 +127,7 @@ void ComputePressureUef::compute_vector() else { double r[3][3]; - ( dynamic_cast( modify->fix[ifix_uef]))->get_rot(r); + ( dynamic_cast(modify->fix[ifix_uef]))->get_rot(r); virial_rot(virial,r); } if (keflag) { @@ -158,7 +158,7 @@ void ComputePressureUef::compute_vector() ------------------------------------------------------------------------- */ void ComputePressureUef::update_rot() { - ( dynamic_cast( modify->fix[ifix_uef]))->get_rot(rot); + ( dynamic_cast(modify->fix[ifix_uef]))->get_rot(rot); } /* ---------------------------------------------------------------------- diff --git a/src/UEF/compute_temp_uef.cpp b/src/UEF/compute_temp_uef.cpp index 8d02317267..9b7e83f920 100644 --- a/src/UEF/compute_temp_uef.cpp +++ b/src/UEF/compute_temp_uef.cpp @@ -61,7 +61,7 @@ void ComputeTempUef::compute_vector() ComputeTemp::compute_vector(); if (rot_flag) { double rot[3][3]; - ( dynamic_cast( modify->fix[ifix_uef]))->get_rot(rot); + ( dynamic_cast(modify->fix[ifix_uef]))->get_rot(rot); virial_rot(vector,rot); } diff --git a/src/UEF/dump_cfg_uef.cpp b/src/UEF/dump_cfg_uef.cpp index c87e1632ef..f5803b499b 100644 --- a/src/UEF/dump_cfg_uef.cpp +++ b/src/UEF/dump_cfg_uef.cpp @@ -68,8 +68,8 @@ void DumpCFGUef::write_header(bigint n) // so molecules are not split across periodic box boundaries double box[3][3],rot[3][3]; - (dynamic_cast( modify->fix[ifix_uef]))->get_box(box); - (dynamic_cast( modify->fix[ifix_uef]))->get_rot(rot); + (dynamic_cast(modify->fix[ifix_uef]))->get_box(box); + (dynamic_cast(modify->fix[ifix_uef]))->get_rot(rot); // rot goes from "lab frame" to "upper triangular frame" // it's transpose takes the simulation box to the flow frame for (int i=0;i<3;i++) diff --git a/src/UEF/fix_nh_uef.cpp b/src/UEF/fix_nh_uef.cpp index 71b076bddb..ac866e945e 100644 --- a/src/UEF/fix_nh_uef.cpp +++ b/src/UEF/fix_nh_uef.cpp @@ -274,9 +274,9 @@ void FixNHUef::setup(int j) error->all(FLERR,"Initial box is not close enough to the expected uef box"); uefbox->get_rot(rot); - (dynamic_cast( temperature))->yes_rot(); - (dynamic_cast( pressure))->in_fix = true; - (dynamic_cast( pressure))->update_rot(); + (dynamic_cast(temperature))->yes_rot(); + (dynamic_cast(pressure))->in_fix = true; + (dynamic_cast(pressure))->update_rot(); FixNH::setup(j); } @@ -288,12 +288,12 @@ void FixNHUef::initial_integrate(int vflag) inv_rotate_x(rot); inv_rotate_v(rot); inv_rotate_f(rot); - (dynamic_cast( temperature))->no_rot(); + (dynamic_cast(temperature))->no_rot(); FixNH::initial_integrate(vflag); rotate_x(rot); rotate_v(rot); rotate_f(rot); - (dynamic_cast( temperature))->yes_rot(); + (dynamic_cast(temperature))->yes_rot(); } /* ---------------------------------------------------------------------- @@ -304,12 +304,12 @@ void FixNHUef::initial_integrate_respa(int vflag, int ilevel, int iloop) inv_rotate_x(rot); inv_rotate_v(rot); inv_rotate_f(rot); - (dynamic_cast( temperature))->no_rot(); + (dynamic_cast(temperature))->no_rot(); FixNH::initial_integrate_respa(vflag,ilevel,iloop); rotate_x(rot); rotate_v(rot); rotate_f(rot); - (dynamic_cast( temperature))->yes_rot(); + (dynamic_cast(temperature))->yes_rot(); } /* ---------------------------------------------------------------------- @@ -318,14 +318,14 @@ void FixNHUef::initial_integrate_respa(int vflag, int ilevel, int iloop) void FixNHUef::final_integrate() { // update rot here since it must directly follow the virial calculation - (dynamic_cast( pressure))->update_rot(); + (dynamic_cast(pressure))->update_rot(); inv_rotate_v(rot); inv_rotate_f(rot); - (dynamic_cast( temperature))->no_rot(); + (dynamic_cast(temperature))->no_rot(); FixNH::final_integrate(); rotate_v(rot); rotate_f(rot); - (dynamic_cast( temperature))->yes_rot(); + (dynamic_cast(temperature))->yes_rot(); } /* ---------------------------------------------------------------------- diff --git a/src/atom.cpp b/src/atom.cpp index 973ca616da..b0ee766c8d 100644 --- a/src/atom.cpp +++ b/src/atom.cpp @@ -795,7 +795,7 @@ AtomVec *Atom::style_match(const char *style) { if (strcmp(atom_style,style) == 0) return avec; else if (strcmp(atom_style,"hybrid") == 0) { - auto avec_hybrid = dynamic_cast( avec); + auto avec_hybrid = dynamic_cast(avec); for (int i = 0; i < avec_hybrid->nstyles; i++) if (strcmp(avec_hybrid->keywords[i],style) == 0) return avec_hybrid->styles[i]; @@ -2021,7 +2021,7 @@ int Atom::shape_consistency(int itype, double &shapex, double &shapey, double &s double one[3] = {-1.0, -1.0, -1.0}; double *shape; - auto avec_ellipsoid = dynamic_cast( style_match("ellipsoid")); + auto avec_ellipsoid = dynamic_cast(style_match("ellipsoid")); auto bonus = avec_ellipsoid->bonus; int flag = 0; diff --git a/src/compute_chunk_spread_atom.cpp b/src/compute_chunk_spread_atom.cpp index a68174e058..34f39413f3 100644 --- a/src/compute_chunk_spread_atom.cpp +++ b/src/compute_chunk_spread_atom.cpp @@ -180,7 +180,7 @@ void ComputeChunkSpreadAtom::init() void ComputeChunkSpreadAtom::init_chunk() { - cchunk = dynamic_cast( modify->get_compute_by_id(idchunk)); + cchunk = dynamic_cast(modify->get_compute_by_id(idchunk)); if (!cchunk) error->all(FLERR,"Chunk/atom compute does not exist for compute chunk/spread/atom {}", idchunk); if (strcmp(cchunk->style,"chunk/atom") != 0) diff --git a/src/compute_com_chunk.cpp b/src/compute_com_chunk.cpp index 8124a7dccd..7a1308366e 100644 --- a/src/compute_com_chunk.cpp +++ b/src/compute_com_chunk.cpp @@ -75,7 +75,7 @@ void ComputeCOMChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for compute com/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute com/chunk does not use chunk/atom compute"); } @@ -180,7 +180,7 @@ void ComputeCOMChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_dipole_chunk.cpp b/src/compute_dipole_chunk.cpp index f1afcc01fd..3517fb1781 100644 --- a/src/compute_dipole_chunk.cpp +++ b/src/compute_dipole_chunk.cpp @@ -94,7 +94,7 @@ void ComputeDipoleChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute dipole/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute dipole/chunk does not use chunk/atom compute"); @@ -232,7 +232,7 @@ void ComputeDipoleChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_gyration_chunk.cpp b/src/compute_gyration_chunk.cpp index f79325274f..8dd28ca4e6 100644 --- a/src/compute_gyration_chunk.cpp +++ b/src/compute_gyration_chunk.cpp @@ -95,7 +95,7 @@ void ComputeGyrationChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute gyration/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute gyration/chunk does not use chunk/atom compute"); } @@ -286,7 +286,7 @@ void ComputeGyrationChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_inertia_chunk.cpp b/src/compute_inertia_chunk.cpp index ceca61c1b7..275ef66071 100644 --- a/src/compute_inertia_chunk.cpp +++ b/src/compute_inertia_chunk.cpp @@ -74,7 +74,7 @@ void ComputeInertiaChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute inertia/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute inertia/chunk does not use chunk/atom compute"); } @@ -189,7 +189,7 @@ void ComputeInertiaChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_msd_chunk.cpp b/src/compute_msd_chunk.cpp index c2ec394db9..14f8786db5 100644 --- a/src/compute_msd_chunk.cpp +++ b/src/compute_msd_chunk.cpp @@ -85,7 +85,7 @@ void ComputeMSDChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for compute msd/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute msd/chunk does not use chunk/atom compute"); @@ -235,7 +235,7 @@ void ComputeMSDChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_omega_chunk.cpp b/src/compute_omega_chunk.cpp index bf00dda6a8..0378fa19ef 100644 --- a/src/compute_omega_chunk.cpp +++ b/src/compute_omega_chunk.cpp @@ -81,7 +81,7 @@ void ComputeOmegaChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute omega/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute omega/chunk does not use chunk/atom compute"); } @@ -313,7 +313,7 @@ void ComputeOmegaChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_pressure.cpp b/src/compute_pressure.cpp index ad14b552a4..53ac58e505 100644 --- a/src/compute_pressure.cpp +++ b/src/compute_pressure.cpp @@ -202,7 +202,7 @@ void ComputePressure::init() vptr = new double*[nvirial]; nvirial = 0; if (pairhybridflag && force->pair) { - auto ph = dynamic_cast( force->pair); + auto ph = dynamic_cast(force->pair); ph->no_virial_fdotr_compute = 1; vptr[nvirial++] = pairhybrid->virial; } diff --git a/src/compute_property_atom.cpp b/src/compute_property_atom.cpp index 4d55549d99..e2b0c1e422 100644 --- a/src/compute_property_atom.cpp +++ b/src/compute_property_atom.cpp @@ -400,10 +400,10 @@ ComputePropertyAtom::~ComputePropertyAtom() void ComputePropertyAtom::init() { - avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); - avec_line = dynamic_cast( atom->style_match("line")); - avec_tri = dynamic_cast( atom->style_match("tri")); - avec_body = dynamic_cast( atom->style_match("body")); + avec_ellipsoid = dynamic_cast(atom->style_match("ellipsoid")); + avec_line = dynamic_cast(atom->style_match("line")); + avec_tri = dynamic_cast(atom->style_match("tri")); + avec_body = dynamic_cast(atom->style_match("body")); // NOTE: could reset custom vector/array indices here, like dump custom does // in case have been deleted diff --git a/src/compute_property_chunk.cpp b/src/compute_property_chunk.cpp index 3154e01516..46914ca358 100644 --- a/src/compute_property_chunk.cpp +++ b/src/compute_property_chunk.cpp @@ -115,7 +115,7 @@ void ComputePropertyChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute property/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute property/chunk does not use chunk/atom compute"); } @@ -196,7 +196,7 @@ void ComputePropertyChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_reduce_chunk.cpp b/src/compute_reduce_chunk.cpp index 5236917688..11604998c8 100644 --- a/src/compute_reduce_chunk.cpp +++ b/src/compute_reduce_chunk.cpp @@ -229,7 +229,7 @@ void ComputeReduceChunk::init_chunk() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute reduce/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute reduce/chunk does not use chunk/atom compute"); } @@ -451,7 +451,7 @@ void ComputeReduceChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_temp_chunk.cpp b/src/compute_temp_chunk.cpp index bd17e3995d..c174c11ef9 100644 --- a/src/compute_temp_chunk.cpp +++ b/src/compute_temp_chunk.cpp @@ -164,7 +164,7 @@ void ComputeTempChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute temp/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute temp/chunk does not use chunk/atom compute"); @@ -774,7 +774,7 @@ void ComputeTempChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_torque_chunk.cpp b/src/compute_torque_chunk.cpp index 79c0ce5aed..01e91e0797 100644 --- a/src/compute_torque_chunk.cpp +++ b/src/compute_torque_chunk.cpp @@ -73,7 +73,7 @@ void ComputeTorqueChunk::init() if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for " "compute torque/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute torque/chunk does not use chunk/atom compute"); } @@ -185,7 +185,7 @@ void ComputeTorqueChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/compute_vcm_chunk.cpp b/src/compute_vcm_chunk.cpp index 5ac73f8d1e..66e7dbeb48 100644 --- a/src/compute_vcm_chunk.cpp +++ b/src/compute_vcm_chunk.cpp @@ -73,7 +73,7 @@ void ComputeVCMChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for compute vcm/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (strcmp(cchunk->style,"chunk/atom") != 0) error->all(FLERR,"Compute vcm/chunk does not use chunk/atom compute"); } @@ -175,7 +175,7 @@ void ComputeVCMChunk::lock_disable() { int icompute = modify->find_compute(idchunk); if (icompute >= 0) { - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); cchunk->lockcount--; } } diff --git a/src/displace_atoms.cpp b/src/displace_atoms.cpp index 75298604c9..5dc862a023 100644 --- a/src/displace_atoms.cpp +++ b/src/displace_atoms.cpp @@ -263,10 +263,10 @@ void DisplaceAtoms::command(int narg, char **arg) // AtomVec pointers to retrieve per-atom storage of extra quantities - auto avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); - auto avec_line = dynamic_cast( atom->style_match("line")); - auto avec_tri = dynamic_cast( atom->style_match("tri")); - auto avec_body = dynamic_cast( atom->style_match("body")); + auto avec_ellipsoid = dynamic_cast(atom->style_match("ellipsoid")); + auto avec_line = dynamic_cast(atom->style_match("line")); + auto avec_tri = dynamic_cast(atom->style_match("tri")); + auto avec_body = dynamic_cast(atom->style_match("body")); double **x = atom->x; int *ellipsoid = atom->ellipsoid; diff --git a/src/domain.cpp b/src/domain.cpp index c3dacc0201..8df73852c2 100644 --- a/src/domain.cpp +++ b/src/domain.cpp @@ -182,7 +182,7 @@ void Domain::init() for (const auto &fix : fixes) if (utils::strmatch(fix->style,"^deform")) { deform_flag = 1; - if ((dynamic_cast( fix))->remapflag == Domain::V_REMAP) { + if ((dynamic_cast(fix))->remapflag == Domain::V_REMAP) { deform_vremap = 1; deform_groupbit = fix->groupbit; } diff --git a/src/dump_image.cpp b/src/dump_image.cpp index 7a7f89801a..3f4e5c7457 100644 --- a/src/dump_image.cpp +++ b/src/dump_image.cpp @@ -332,17 +332,17 @@ DumpImage::DumpImage(LAMMPS *lmp, int narg, char **arg) : // error checks and setup for lineflag, triflag, bodyflag, fixflag if (lineflag) { - avec_line = dynamic_cast( atom->style_match("line")); + avec_line = dynamic_cast(atom->style_match("line")); if (!avec_line) error->all(FLERR,"Dump image line requires atom style line"); } if (triflag) { - avec_tri = dynamic_cast( atom->style_match("tri")); + avec_tri = dynamic_cast(atom->style_match("tri")); if (!avec_tri) error->all(FLERR,"Dump image tri requires atom style tri"); } if (bodyflag) { - avec_body = dynamic_cast( atom->style_match("body")); + avec_body = dynamic_cast(atom->style_match("body")); if (!avec_body) error->all(FLERR,"Dump image body yes requires atom style body"); } diff --git a/src/finish.cpp b/src/finish.cpp index 5300bf8ef7..b35fed0dde 100644 --- a/src/finish.cpp +++ b/src/finish.cpp @@ -346,7 +346,7 @@ void Finish::end(int flag) } #ifdef LMP_OPENMP - FixOMP *fixomp = dynamic_cast( modify->get_fix_by_id("package_omp")); + FixOMP *fixomp = dynamic_cast(modify->get_fix_by_id("package_omp")); // print thread breakdown only with full timer detail diff --git a/src/fix_adapt.cpp b/src/fix_adapt.cpp index 3fa6f4b8df..75817ec083 100644 --- a/src/fix_adapt.cpp +++ b/src/fix_adapt.cpp @@ -380,7 +380,7 @@ void FixAdapt::init() // if pair hybrid, test that ilo,ihi,jlo,jhi are valid for sub-style if (utils::strmatch(force->pair_style,"^hybrid")) { - auto pair = dynamic_cast( force->pair); + auto pair = dynamic_cast(force->pair); for (i = ad->ilo; i <= ad->ihi; i++) for (j = MAX(ad->jlo,i); j <= ad->jhi; j++) if (!pair->check_ijtype(i,j,pstyle)) diff --git a/src/fix_ave_chunk.cpp b/src/fix_ave_chunk.cpp index 9d378f2e0c..688c4676e1 100644 --- a/src/fix_ave_chunk.cpp +++ b/src/fix_ave_chunk.cpp @@ -466,7 +466,7 @@ void FixAveChunk::init() int icompute = modify->find_compute(idchunk); if (icompute < 0) error->all(FLERR,"Chunk/atom compute does not exist for fix ave/chunk"); - cchunk = dynamic_cast( modify->compute[icompute]); + cchunk = dynamic_cast(modify->compute[icompute]); if (biasflag) { int i = modify->find_compute(id_bias); diff --git a/src/fix_enforce2d.cpp b/src/fix_enforce2d.cpp index cc3b79c45d..fc8240ae44 100644 --- a/src/fix_enforce2d.cpp +++ b/src/fix_enforce2d.cpp @@ -93,11 +93,11 @@ void FixEnforce2D::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + int nlevels_respa = (dynamic_cast(update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/fix_gravity.cpp b/src/fix_gravity.cpp index cf559043cf..7d8b5aa906 100644 --- a/src/fix_gravity.cpp +++ b/src/fix_gravity.cpp @@ -181,7 +181,7 @@ int FixGravity::setmask() void FixGravity::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } @@ -245,9 +245,9 @@ void FixGravity::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_indent.cpp b/src/fix_indent.cpp index f38ab5efa6..ab9ef08e30 100644 --- a/src/fix_indent.cpp +++ b/src/fix_indent.cpp @@ -155,7 +155,7 @@ void FixIndent::init() } if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -167,9 +167,9 @@ void FixIndent::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_lineforce.cpp b/src/fix_lineforce.cpp index d9408efb48..fa284d3ed2 100644 --- a/src/fix_lineforce.cpp +++ b/src/fix_lineforce.cpp @@ -62,11 +62,11 @@ void FixLineForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + int nlevels_respa = (dynamic_cast(update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/fix_nh.cpp b/src/fix_nh.cpp index 9f5915cf1e..a1b46c51fb 100644 --- a/src/fix_nh.cpp +++ b/src/fix_nh.cpp @@ -648,7 +648,7 @@ void FixNH::init() if (pstat_flag) for (int i = 0; i < modify->nfix; i++) if (strcmp(modify->fix[i]->style,"deform") == 0) { - int *dimflag = (dynamic_cast( modify->fix[i]))->dimflag; + int *dimflag = (dynamic_cast(modify->fix[i]))->dimflag; if ((p_flag[0] && dimflag[0]) || (p_flag[1] && dimflag[1]) || (p_flag[2] && dimflag[2]) || (p_flag[3] && dimflag[3]) || (p_flag[4] && dimflag[4]) || (p_flag[5] && dimflag[5])) @@ -719,8 +719,8 @@ void FixNH::init() else kspace_flag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; - step_respa = (dynamic_cast( update->integrate))->step; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; + step_respa = (dynamic_cast(update->integrate))->step; dto = 0.5*step_respa[0]; } diff --git a/src/fix_nve.cpp b/src/fix_nve.cpp index a4c9060e6a..fd8c4a4099 100644 --- a/src/fix_nve.cpp +++ b/src/fix_nve.cpp @@ -55,7 +55,7 @@ void FixNVE::init() dtf = 0.5 * update->dt * force->ftm2v; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; } /* ---------------------------------------------------------------------- diff --git a/src/fix_nve_limit.cpp b/src/fix_nve_limit.cpp index fdebcf5bfe..0ce217168e 100644 --- a/src/fix_nve_limit.cpp +++ b/src/fix_nve_limit.cpp @@ -67,7 +67,7 @@ void FixNVELimit::init() ncount = 0; if (utils::strmatch(update->integrate_style,"^respa")) - step_respa = (dynamic_cast( update->integrate))->step; + step_respa = (dynamic_cast(update->integrate))->step; // warn if using fix shake, which will lead to invalid constraint forces diff --git a/src/fix_nvt_sllod.cpp b/src/fix_nvt_sllod.cpp index 8c5116c070..a721afd2ee 100644 --- a/src/fix_nvt_sllod.cpp +++ b/src/fix_nvt_sllod.cpp @@ -73,7 +73,7 @@ void FixNVTSllod::init() int i; for (i = 0; i < modify->nfix; i++) if (strncmp(modify->fix[i]->style,"deform",6) == 0) { - if ((dynamic_cast( modify->fix[i]))->remapflag != Domain::V_REMAP) + if ((dynamic_cast(modify->fix[i]))->remapflag != Domain::V_REMAP) error->all(FLERR,"Using fix nvt/sllod with inconsistent fix deform " "remap option"); break; diff --git a/src/fix_planeforce.cpp b/src/fix_planeforce.cpp index 0d91f2b90e..c58b87630a 100644 --- a/src/fix_planeforce.cpp +++ b/src/fix_planeforce.cpp @@ -62,11 +62,11 @@ void FixPlaneForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - int nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + int nlevels_respa = (dynamic_cast(update->integrate))->nlevels; for (int ilevel = 0; ilevel < nlevels_respa; ilevel++) { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel); post_force_respa(vflag,ilevel,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel); } } } diff --git a/src/fix_recenter.cpp b/src/fix_recenter.cpp index 1f2fedc842..b5a1d39d1a 100644 --- a/src/fix_recenter.cpp +++ b/src/fix_recenter.cpp @@ -146,7 +146,7 @@ void FixRecenter::init() } if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_restrain.cpp b/src/fix_restrain.cpp index e5440830f5..0dde6a7f39 100644 --- a/src/fix_restrain.cpp +++ b/src/fix_restrain.cpp @@ -186,7 +186,7 @@ int FixRestrain::setmask() void FixRestrain::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -198,9 +198,9 @@ void FixRestrain::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_spring.cpp b/src/fix_spring.cpp index 46310ef181..ccc2b288a9 100644 --- a/src/fix_spring.cpp +++ b/src/fix_spring.cpp @@ -130,7 +130,7 @@ void FixSpring::init() if (styleflag == COUPLE) masstotal2 = group->mass(igroup2); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -142,9 +142,9 @@ void FixSpring::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_spring_chunk.cpp b/src/fix_spring_chunk.cpp index 7d316af50d..c727b14bad 100644 --- a/src/fix_spring_chunk.cpp +++ b/src/fix_spring_chunk.cpp @@ -108,7 +108,7 @@ void FixSpringChunk::init() idchunk, ccom->idchunk); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -120,9 +120,9 @@ void FixSpringChunk::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_spring_self.cpp b/src/fix_spring_self.cpp index 180f7427ec..2c62bdc3c0 100644 --- a/src/fix_spring_self.cpp +++ b/src/fix_spring_self.cpp @@ -122,7 +122,7 @@ int FixSpringSelf::setmask() void FixSpringSelf::init() { if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -134,9 +134,9 @@ void FixSpringSelf::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_store_force.cpp b/src/fix_store_force.cpp index 8e696c075c..d63d5e67ea 100644 --- a/src/fix_store_force.cpp +++ b/src/fix_store_force.cpp @@ -70,7 +70,7 @@ int FixStoreForce::setmask() void FixStoreForce::init() { if (utils::strmatch(update->integrate_style,"^respa")) - nlevels_respa = (dynamic_cast( update->integrate))->nlevels; + nlevels_respa = (dynamic_cast(update->integrate))->nlevels; } /* ---------------------------------------------------------------------- */ @@ -80,9 +80,9 @@ void FixStoreForce::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_flevel_f(nlevels_respa-1); post_force_respa(vflag,nlevels_respa-1,0); - (dynamic_cast( update->integrate))->copy_f_flevel(nlevels_respa-1); + (dynamic_cast(update->integrate))->copy_f_flevel(nlevels_respa-1); } } diff --git a/src/fix_viscous.cpp b/src/fix_viscous.cpp index f0c6faa419..65515f2802 100644 --- a/src/fix_viscous.cpp +++ b/src/fix_viscous.cpp @@ -82,7 +82,7 @@ void FixViscous::init() int max_respa = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = max_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = max_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,max_respa); } } @@ -94,9 +94,9 @@ void FixViscous::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) post_force(vflag); else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/fix_wall.cpp b/src/fix_wall.cpp index 2156ac321c..0eee94b1f7 100644 --- a/src/fix_wall.cpp +++ b/src/fix_wall.cpp @@ -261,7 +261,7 @@ void FixWall::init() for (int m = 0; m < nwall; m++) precompute(m); if (utils::strmatch(update->integrate_style,"^respa")) { - ilevel_respa = (dynamic_cast( update->integrate))->nlevels-1; + ilevel_respa = (dynamic_cast(update->integrate))->nlevels-1; if (respa_level >= 0) ilevel_respa = MIN(respa_level,ilevel_respa); } } @@ -273,9 +273,9 @@ void FixWall::setup(int vflag) if (utils::strmatch(update->integrate_style,"^verlet")) { if (!fldflag) post_force(vflag); } else { - (dynamic_cast( update->integrate))->copy_flevel_f(ilevel_respa); + (dynamic_cast(update->integrate))->copy_flevel_f(ilevel_respa); post_force_respa(vflag,ilevel_respa,0); - (dynamic_cast( update->integrate))->copy_f_flevel(ilevel_respa); + (dynamic_cast(update->integrate))->copy_f_flevel(ilevel_respa); } } diff --git a/src/library.cpp b/src/library.cpp index 771508ff1b..fc3700c786 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -5071,7 +5071,7 @@ void lammps_set_fix_external_callback(void *handle, const char *id, FixExternalF if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style 'external'", id); - auto fext = dynamic_cast( fix); + auto fext = dynamic_cast(fix); fext->set_callback(callback, ptr); } END_CAPTURE @@ -5179,7 +5179,7 @@ void lammps_fix_external_set_energy_global(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - auto fext = dynamic_cast( fix); + auto fext = dynamic_cast(fix); fext->set_energy_global(eng); } END_CAPTURE @@ -5227,7 +5227,7 @@ void lammps_fix_external_set_virial_global(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - auto fext = dynamic_cast( fix); + auto fext = dynamic_cast(fix); fext->set_virial_global(virial); } END_CAPTURE @@ -5275,7 +5275,7 @@ void lammps_fix_external_set_energy_peratom(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - auto fext = dynamic_cast( fix); + auto fext = dynamic_cast(fix); fext->set_energy_peratom(eng); } END_CAPTURE @@ -5326,7 +5326,7 @@ void lammps_fix_external_set_virial_peratom(void *handle, const char *id, double if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - auto fext = dynamic_cast( fix); + auto fext = dynamic_cast(fix); fext->set_virial_peratom(virial); } END_CAPTURE @@ -5370,7 +5370,7 @@ void lammps_fix_external_set_vector_length(void *handle, const char *id, int len if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - auto fext = dynamic_cast( fix); + auto fext = dynamic_cast(fix); fext->set_vector_length(len); } END_CAPTURE @@ -5424,7 +5424,7 @@ void lammps_fix_external_set_vector(void *handle, const char *id, int idx, doubl if (strcmp("external",fix->style) != 0) lmp->error->all(FLERR,"Fix '{}' is not of style external!", id); - auto fext = dynamic_cast( fix); + auto fext = dynamic_cast(fix); fext->set_vector(idx, val); } END_CAPTURE diff --git a/src/min.cpp b/src/min.cpp index d00c0deca4..62333b215c 100644 --- a/src/min.cpp +++ b/src/min.cpp @@ -121,7 +121,7 @@ void Min::init() // create fix needed for storing atom-based quantities // will delete it at end of run - fix_minimize = dynamic_cast( modify->add_fix("MINIMIZE all MINIMIZE")); + fix_minimize = dynamic_cast(modify->add_fix("MINIMIZE all MINIMIZE")); // clear out extra global and per-atom dof // will receive requests for new per-atom dof during pair init() diff --git a/src/neighbor.cpp b/src/neighbor.cpp index d7ac1b1e81..9e00ff014c 100644 --- a/src/neighbor.cpp +++ b/src/neighbor.cpp @@ -467,12 +467,12 @@ void Neighbor::init() int respa = 0; if (update->whichflag == 1 && utils::strmatch(update->integrate_style,"^respa")) { - if ((dynamic_cast( update->integrate))->level_inner >= 0) respa = 1; - if ((dynamic_cast( update->integrate))->level_middle >= 0) respa = 2; + if ((dynamic_cast(update->integrate))->level_inner >= 0) respa = 1; + if ((dynamic_cast(update->integrate))->level_middle >= 0) respa = 2; } if (respa) { - double *cut_respa = (dynamic_cast( update->integrate))->cutoff; + double *cut_respa = (dynamic_cast(update->integrate))->cutoff; cut_inner_sq = (cut_respa[1] + skin) * (cut_respa[1] + skin); cut_middle_sq = (cut_respa[3] + skin) * (cut_respa[3] + skin); cut_middle_inside_sq = (cut_respa[0] - skin) * (cut_respa[0] - skin); diff --git a/src/pair_hybrid.cpp b/src/pair_hybrid.cpp index 2ea749a3a3..a4a7528d14 100644 --- a/src/pair_hybrid.cpp +++ b/src/pair_hybrid.cpp @@ -116,7 +116,7 @@ void PairHybrid::compute(int eflag, int vflag) Respa *respa = nullptr; respaflag = 0; if (utils::strmatch(update->integrate_style,"^respa")) { - respa = dynamic_cast( update->integrate); + respa = dynamic_cast(update->integrate); if (respa->nhybrid_styles > 0) respaflag = 1; } diff --git a/src/read_restart.cpp b/src/read_restart.cpp index 949e4e7057..98f594ac5c 100644 --- a/src/read_restart.cpp +++ b/src/read_restart.cpp @@ -451,7 +451,7 @@ void ReadRestart::command(int narg, char **arg) if (nextra) { memory->destroy(atom->extra); memory->create(atom->extra,atom->nmax,nextra,"atom:extra"); - auto fix = dynamic_cast( modify->get_fix_by_id("_read_restart")); + auto fix = dynamic_cast(modify->get_fix_by_id("_read_restart")); int *count = fix->count; double **extra = fix->extra; double **atom_extra = atom->extra; diff --git a/src/set.cpp b/src/set.cpp index 80c524f8a4..0131b1e16c 100644 --- a/src/set.cpp +++ b/src/set.cpp @@ -818,10 +818,10 @@ void Set::set(int keyword) // loop over selected atoms - auto avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); - auto avec_line = dynamic_cast( atom->style_match("line")); - auto avec_tri = dynamic_cast( atom->style_match("tri")); - auto avec_body = dynamic_cast( atom->style_match("body")); + auto avec_ellipsoid = dynamic_cast(atom->style_match("ellipsoid")); + auto avec_line = dynamic_cast(atom->style_match("line")); + auto avec_tri = dynamic_cast(atom->style_match("tri")); + auto avec_body = dynamic_cast(atom->style_match("body")); int nlocal = atom->nlocal; for (int i = 0; i < nlocal; i++) { @@ -1153,10 +1153,10 @@ void Set::setrandom(int keyword) { int i; - auto avec_ellipsoid = dynamic_cast( atom->style_match("ellipsoid")); - auto avec_line = dynamic_cast( atom->style_match("line")); - auto avec_tri = dynamic_cast( atom->style_match("tri")); - auto avec_body = dynamic_cast( atom->style_match("body")); + auto avec_ellipsoid = dynamic_cast(atom->style_match("ellipsoid")); + auto avec_line = dynamic_cast(atom->style_match("line")); + auto avec_tri = dynamic_cast(atom->style_match("tri")); + auto avec_body = dynamic_cast(atom->style_match("body")); double **x = atom->x; int seed = ivalue;