diff --git a/src/Makefile.lib b/src/Makefile.lib index 0a2d3a49b..877dd02c7 100644 --- a/src/Makefile.lib +++ b/src/Makefile.lib @@ -1,34 +1,34 @@ # LAMMPS library multiple-machine Makefile SHELL = /bin/sh # Definitions ROOT = lmp EXE = lib$(ROOT)_$@.a -SRC = angle.cpp angle_charmm.cpp angle_cosine.cpp angle_cosine_delta.cpp angle_cosine_squared.cpp angle_harmonic.cpp angle_hybrid.cpp atom.cpp atom_vec.cpp atom_vec_angle.cpp atom_vec_atomic.cpp atom_vec_bond.cpp atom_vec_charge.cpp atom_vec_full.cpp atom_vec_hybrid.cpp atom_vec_molecular.cpp bond.cpp bond_fene.cpp bond_fene_expand.cpp bond_harmonic.cpp bond_hybrid.cpp bond_morse.cpp bond_nonlinear.cpp bond_quartic.cpp change_box.cpp comm.cpp compute.cpp compute_centro_atom.cpp compute_cna_atom.cpp compute_coord_atom.cpp compute_displace_atom.cpp compute_erotate_sphere.cpp compute_group_group.cpp compute_heat_flux.cpp compute_ke.cpp compute_ke_atom.cpp compute_pe.cpp compute_pe_atom.cpp compute_pressure.cpp compute_reduce.cpp compute_reduce_region.cpp compute_stress_atom.cpp compute_temp.cpp compute_temp_com.cpp compute_temp_deform.cpp compute_temp_partial.cpp compute_temp_profile.cpp compute_temp_ramp.cpp compute_temp_region.cpp compute_temp_sphere.cpp create_atoms.cpp create_box.cpp delete_atoms.cpp delete_bonds.cpp dihedral.cpp dihedral_charmm.cpp dihedral_harmonic.cpp dihedral_helix.cpp dihedral_hybrid.cpp dihedral_multi_harmonic.cpp dihedral_opls.cpp displace_atoms.cpp displace_box.cpp domain.cpp dump.cpp dump_atom.cpp dump_bond.cpp dump_custom.cpp dump_dcd.cpp dump_xyz.cpp error.cpp ewald.cpp fft3d.cpp fft3d_wrap.cpp finish.cpp fix.cpp fix_add_force.cpp fix_ave_atom.cpp fix_ave_force.cpp fix_ave_spatial.cpp fix_ave_time.cpp fix_bond_break.cpp fix_bond_create.cpp fix_bond_swap.cpp fix_box_relax.cpp fix_com.cpp fix_coord_original.cpp fix_deform.cpp fix_deposit.cpp fix_drag.cpp fix_dt_reset.cpp fix_efield.cpp fix_enforce2d.cpp fix_evaporate.cpp fix_gravity.cpp fix_gyration.cpp fix_heat.cpp fix_indent.cpp fix_langevin.cpp fix_line_force.cpp fix_minimize.cpp fix_momentum.cpp fix_msd.cpp fix_nph.cpp fix_npt.cpp fix_npt_sphere.cpp fix_nve.cpp fix_nve_limit.cpp fix_nve_noforce.cpp fix_nve_sphere.cpp fix_nvt.cpp fix_nvt_sllod.cpp fix_nvt_sphere.cpp fix_orient_fcc.cpp fix_plane_force.cpp fix_press_berendsen.cpp fix_print.cpp fix_rdf.cpp fix_recenter.cpp fix_respa.cpp fix_rigid.cpp fix_set_force.cpp fix_shake.cpp fix_shear_history.cpp fix_spring.cpp fix_spring_rg.cpp fix_spring_self.cpp fix_temp_berendsen.cpp fix_temp_rescale.cpp fix_thermal_conductivity.cpp fix_tmd.cpp fix_ttm.cpp fix_viscosity.cpp fix_viscous.cpp fix_wall_lj126.cpp fix_wall_lj93.cpp fix_wall_reflect.cpp fix_wiggle.cpp force.cpp group.cpp improper.cpp improper_cvff.cpp improper_harmonic.cpp improper_hybrid.cpp input.cpp integrate.cpp kspace.cpp lammps.cpp lattice.cpp library.cpp memory.cpp min.cpp min_cg.cpp min_sd.cpp minimize.cpp modify.cpp neigh_bond.cpp neigh_derive.cpp neigh_full.cpp neigh_gran.cpp neigh_half_bin.cpp neigh_half_multi.cpp neigh_half_nsq.cpp neigh_list.cpp neigh_request.cpp neigh_respa.cpp neigh_stencil.cpp neighbor.cpp output.cpp pack.cpp pair.cpp pair_airebo.cpp pair_born_coul_long.cpp pair_buck.cpp pair_buck_coul_cut.cpp pair_buck_coul_long.cpp pair_coul_cut.cpp pair_coul_debye.cpp pair_coul_long.cpp pair_dlvo.cpp pair_eam.cpp pair_eam_alloy.cpp pair_eam_fs.cpp pair_hybrid.cpp pair_hybrid_overlay.cpp pair_lj_charmm_coul_charmm.cpp pair_lj_charmm_coul_charmm_implicit.cpp pair_lj_charmm_coul_long.cpp pair_lj_cut.cpp pair_lj_cut_coul_cut.cpp pair_lj_cut_coul_debye.cpp pair_lj_cut_coul_long.cpp pair_lj_cut_coul_long_tip4p.cpp pair_lj_expand.cpp pair_lj_gromacs.cpp pair_lj_gromacs_coul_gromacs.cpp pair_lj_smooth.cpp pair_morse.cpp pair_soft.cpp pair_sw.cpp pair_table.cpp pair_tersoff.cpp pair_tersoff_zbl.cpp pair_yukawa.cpp pppm.cpp pppm_tip4p.cpp random_mars.cpp random_park.cpp read_data.cpp read_restart.cpp region.cpp region_block.cpp region_cone.cpp region_cylinder.cpp region_intersect.cpp region_prism.cpp region_sphere.cpp region_union.cpp remap.cpp remap_wrap.cpp replicate.cpp respa.cpp run.cpp set.cpp shell.cpp special.cpp temper.cpp thermo.cpp timer.cpp universe.cpp update.cpp variable.cpp velocity.cpp verlet.cpp write_restart.cpp +SRC = angle.cpp angle_charmm.cpp angle_class2.cpp angle_cosine.cpp angle_cosine_delta.cpp angle_cosine_squared.cpp angle_harmonic.cpp angle_hybrid.cpp atom.cpp atom_vec.cpp atom_vec_angle.cpp atom_vec_atomic.cpp atom_vec_bond.cpp atom_vec_charge.cpp atom_vec_dipole.cpp atom_vec_dpd.cpp atom_vec_ellipsoid.cpp atom_vec_full.cpp atom_vec_granular.cpp atom_vec_hybrid.cpp atom_vec_molecular.cpp atom_vec_peri.cpp bond.cpp bond_class2.cpp bond_fene.cpp bond_fene_expand.cpp bond_harmonic.cpp bond_hybrid.cpp bond_morse.cpp bond_nonlinear.cpp bond_quartic.cpp change_box.cpp comm.cpp compute.cpp compute_centro_atom.cpp compute_cna_atom.cpp compute_coord_atom.cpp compute_damage_atom.cpp compute_displace_atom.cpp compute_erotate_asphere.cpp compute_erotate_sphere.cpp compute_group_group.cpp compute_heat_flux.cpp compute_ke.cpp compute_ke_atom.cpp compute_pe.cpp compute_pe_atom.cpp compute_pressure.cpp compute_reduce.cpp compute_reduce_region.cpp compute_stress_atom.cpp compute_temp.cpp compute_temp_asphere.cpp compute_temp_com.cpp compute_temp_deform.cpp compute_temp_partial.cpp compute_temp_profile.cpp compute_temp_ramp.cpp compute_temp_region.cpp compute_temp_sphere.cpp create_atoms.cpp create_box.cpp delete_atoms.cpp delete_bonds.cpp dihedral.cpp dihedral_charmm.cpp dihedral_class2.cpp dihedral_harmonic.cpp dihedral_helix.cpp dihedral_hybrid.cpp dihedral_multi_harmonic.cpp dihedral_opls.cpp displace_atoms.cpp displace_box.cpp domain.cpp dump.cpp dump_atom.cpp dump_bond.cpp dump_custom.cpp dump_dcd.cpp dump_xtc.cpp dump_xyz.cpp error.cpp ewald.cpp fft3d.cpp fft3d_wrap.cpp finish.cpp fix.cpp fix_add_force.cpp fix_ave_atom.cpp fix_ave_force.cpp fix_ave_spatial.cpp fix_ave_time.cpp fix_bond_break.cpp fix_bond_create.cpp fix_bond_swap.cpp fix_box_relax.cpp fix_com.cpp fix_coord_original.cpp fix_deform.cpp fix_deposit.cpp fix_drag.cpp fix_dt_reset.cpp fix_efield.cpp fix_enforce2d.cpp fix_evaporate.cpp fix_freeze.cpp fix_gravity.cpp fix_gyration.cpp fix_heat.cpp fix_indent.cpp fix_langevin.cpp fix_line_force.cpp fix_minimize.cpp fix_momentum.cpp fix_msd.cpp fix_nph.cpp fix_npt.cpp fix_npt_asphere.cpp fix_npt_sphere.cpp fix_nve.cpp fix_nve_asphere.cpp fix_nve_limit.cpp fix_nve_noforce.cpp fix_nve_sphere.cpp fix_nvt.cpp fix_nvt_asphere.cpp fix_nvt_sllod.cpp fix_nvt_sphere.cpp fix_orient_fcc.cpp fix_peri_neigh.cpp fix_plane_force.cpp fix_pour.cpp fix_press_berendsen.cpp fix_print.cpp fix_rdf.cpp fix_recenter.cpp fix_respa.cpp fix_rigid.cpp fix_set_force.cpp fix_shake.cpp fix_shear_history.cpp fix_spring.cpp fix_spring_rg.cpp fix_spring_self.cpp fix_temp_berendsen.cpp fix_temp_rescale.cpp fix_thermal_conductivity.cpp fix_tmd.cpp fix_ttm.cpp fix_viscosity.cpp fix_viscous.cpp fix_wall_gran.cpp fix_wall_lj126.cpp fix_wall_lj93.cpp fix_wall_reflect.cpp fix_wiggle.cpp force.cpp group.cpp improper.cpp improper_class2.cpp improper_cvff.cpp improper_harmonic.cpp improper_hybrid.cpp input.cpp integrate.cpp kspace.cpp lammps.cpp lattice.cpp library.cpp memory.cpp min.cpp min_cg.cpp min_sd.cpp minimize.cpp modify.cpp neigh_bond.cpp neigh_derive.cpp neigh_full.cpp neigh_gran.cpp neigh_half_bin.cpp neigh_half_multi.cpp neigh_half_nsq.cpp neigh_list.cpp neigh_request.cpp neigh_respa.cpp neigh_stencil.cpp neighbor.cpp output.cpp pack.cpp pair.cpp pair_airebo.cpp pair_born_coul_long.cpp pair_buck.cpp pair_buck_coul_cut.cpp pair_buck_coul_long.cpp pair_colloid.cpp pair_coul_cut.cpp pair_coul_debye.cpp pair_coul_long.cpp pair_dipole_cut.cpp pair_dpd.cpp pair_eam.cpp pair_eam_alloy.cpp pair_eam_alloy_opt.cpp pair_eam_fs.cpp pair_eam_fs_opt.cpp pair_eam_opt.cpp pair_gayberne.cpp pair_gran_hertz_history.cpp pair_gran_hooke.cpp pair_gran_hooke_history.cpp pair_hybrid.cpp pair_hybrid_overlay.cpp pair_lj_charmm_coul_charmm.cpp pair_lj_charmm_coul_charmm_implicit.cpp pair_lj_charmm_coul_long.cpp pair_lj_charmm_coul_long_opt.cpp pair_lj_class2.cpp pair_lj_class2_coul_cut.cpp pair_lj_class2_coul_long.cpp pair_lj_cut.cpp pair_lj_cut_coul_cut.cpp pair_lj_cut_coul_debye.cpp pair_lj_cut_coul_long.cpp pair_lj_cut_coul_long_tip4p.cpp pair_lj_cut_opt.cpp pair_lj_expand.cpp pair_lj_gromacs.cpp pair_lj_gromacs_coul_gromacs.cpp pair_lj_smooth.cpp pair_lubricate.cpp pair_morse.cpp pair_morse_opt.cpp pair_peri_pmb.cpp pair_resquared.cpp pair_soft.cpp pair_sw.cpp pair_table.cpp pair_tersoff.cpp pair_tersoff_zbl.cpp pair_yukawa.cpp pppm.cpp pppm_tip4p.cpp random_mars.cpp random_park.cpp read_data.cpp read_restart.cpp region.cpp region_block.cpp region_cone.cpp region_cylinder.cpp region_intersect.cpp region_prism.cpp region_sphere.cpp region_union.cpp remap.cpp remap_wrap.cpp replicate.cpp respa.cpp run.cpp set.cpp shell.cpp special.cpp temper.cpp thermo.cpp timer.cpp universe.cpp update.cpp variable.cpp velocity.cpp verlet.cpp write_restart.cpp xdr_compat.cpp -INC = angle.h angle_charmm.h angle_cosine.h angle_cosine_delta.h angle_cosine_squared.h angle_harmonic.h angle_hybrid.h atom.h atom_vec.h atom_vec_angle.h atom_vec_atomic.h atom_vec_bond.h atom_vec_charge.h atom_vec_full.h atom_vec_hybrid.h atom_vec_molecular.h bond.h bond_fene.h bond_fene_expand.h bond_harmonic.h bond_hybrid.h bond_morse.h bond_nonlinear.h bond_quartic.h change_box.h comm.h compute.h compute_centro_atom.h compute_cna_atom.h compute_coord_atom.h compute_displace_atom.h compute_erotate_sphere.h compute_group_group.h compute_heat_flux.h compute_ke.h compute_ke_atom.h compute_pe.h compute_pe_atom.h compute_pressure.h compute_reduce.h compute_reduce_region.h compute_stress_atom.h compute_temp.h compute_temp_com.h compute_temp_deform.h compute_temp_partial.h compute_temp_profile.h compute_temp_ramp.h compute_temp_region.h compute_temp_sphere.h create_atoms.h create_box.h delete_atoms.h delete_bonds.h dihedral.h dihedral_charmm.h dihedral_harmonic.h dihedral_helix.h dihedral_hybrid.h dihedral_multi_harmonic.h dihedral_opls.h displace_atoms.h displace_box.h domain.h dump.h dump_atom.h dump_bond.h dump_custom.h dump_dcd.h dump_xyz.h error.h ewald.h fft3d.h fft3d_wrap.h finish.h fix.h fix_add_force.h fix_ave_atom.h fix_ave_force.h fix_ave_spatial.h fix_ave_time.h fix_bond_break.h fix_bond_create.h fix_bond_swap.h fix_box_relax.h fix_com.h fix_coord_original.h fix_deform.h fix_deposit.h fix_drag.h fix_dt_reset.h fix_efield.h fix_enforce2d.h fix_evaporate.h fix_gravity.h fix_gyration.h fix_heat.h fix_indent.h fix_langevin.h fix_line_force.h fix_minimize.h fix_momentum.h fix_msd.h fix_nph.h fix_npt.h fix_npt_sphere.h fix_nve.h fix_nve_limit.h fix_nve_noforce.h fix_nve_sphere.h fix_nvt.h fix_nvt_sllod.h fix_nvt_sphere.h fix_orient_fcc.h fix_plane_force.h fix_press_berendsen.h fix_print.h fix_rdf.h fix_recenter.h fix_respa.h fix_rigid.h fix_set_force.h fix_shake.h fix_shear_history.h fix_spring.h fix_spring_rg.h fix_spring_self.h fix_temp_berendsen.h fix_temp_rescale.h fix_thermal_conductivity.h fix_tmd.h fix_ttm.h fix_viscosity.h fix_viscous.h fix_wall_lj126.h fix_wall_lj93.h fix_wall_reflect.h fix_wiggle.h force.h group.h improper.h improper_cvff.h improper_harmonic.h improper_hybrid.h input.h integrate.h kspace.h lammps.h lattice.h library.h math_extra.h memory.h min.h min_cg.h min_sd.h minimize.h modify.h neigh_list.h neigh_request.h neighbor.h output.h pack.h pair.h pair_airebo.h pair_born_coul_long.h pair_buck.h pair_buck_coul_cut.h pair_buck_coul_long.h pair_coul_cut.h pair_coul_debye.h pair_coul_long.h pair_dlvo.h pair_eam.h pair_eam_alloy.h pair_eam_fs.h pair_hybrid.h pair_hybrid_overlay.h pair_lj_charmm_coul_charmm.h pair_lj_charmm_coul_charmm_implicit.h pair_lj_charmm_coul_long.h pair_lj_cut.h pair_lj_cut_coul_cut.h pair_lj_cut_coul_debye.h pair_lj_cut_coul_long.h pair_lj_cut_coul_long_tip4p.h pair_lj_expand.h pair_lj_gromacs.h pair_lj_gromacs_coul_gromacs.h pair_lj_smooth.h pair_morse.h pair_soft.h pair_sw.h pair_table.h pair_tersoff.h pair_tersoff_zbl.h pair_yukawa.h pointers.h pppm.h pppm_tip4p.h random_mars.h random_park.h read_data.h read_restart.h region.h region_block.h region_cone.h region_cylinder.h region_intersect.h region_prism.h region_sphere.h region_union.h remap.h remap_wrap.h replicate.h respa.h run.h set.h shell.h special.h style.h style_asphere.h style_class2.h style_colloid.h style_dipole.h style_dpd.h style_granular.h style_kspace.h style_manybody.h style_meam.h style_molecule.h style_opt.h style_peri.h style_poems.h style_reax.h style_user.h style_user_ackland.h style_user_cg_cmm.h style_user_ewaldn.h style_user_packages.h style_user_smd.h style_xtc.h temper.h thermo.h timer.h universe.h update.h variable.h velocity.h verlet.h write_restart.h +INC = angle.h angle_charmm.h angle_class2.h angle_cosine.h angle_cosine_delta.h angle_cosine_squared.h angle_harmonic.h angle_hybrid.h atom.h atom_vec.h atom_vec_angle.h atom_vec_atomic.h atom_vec_bond.h atom_vec_charge.h atom_vec_dipole.h atom_vec_dpd.h atom_vec_ellipsoid.h atom_vec_full.h atom_vec_granular.h atom_vec_hybrid.h atom_vec_molecular.h atom_vec_peri.h bond.h bond_class2.h bond_fene.h bond_fene_expand.h bond_harmonic.h bond_hybrid.h bond_morse.h bond_nonlinear.h bond_quartic.h change_box.h comm.h compute.h compute_centro_atom.h compute_cna_atom.h compute_coord_atom.h compute_damage_atom.h compute_displace_atom.h compute_erotate_asphere.h compute_erotate_sphere.h compute_group_group.h compute_heat_flux.h compute_ke.h compute_ke_atom.h compute_pe.h compute_pe_atom.h compute_pressure.h compute_reduce.h compute_reduce_region.h compute_stress_atom.h compute_temp.h compute_temp_asphere.h compute_temp_com.h compute_temp_deform.h compute_temp_partial.h compute_temp_profile.h compute_temp_ramp.h compute_temp_region.h compute_temp_sphere.h create_atoms.h create_box.h delete_atoms.h delete_bonds.h dihedral.h dihedral_charmm.h dihedral_class2.h dihedral_harmonic.h dihedral_helix.h dihedral_hybrid.h dihedral_multi_harmonic.h dihedral_opls.h displace_atoms.h displace_box.h domain.h dump.h dump_atom.h dump_bond.h dump_custom.h dump_dcd.h dump_xtc.h dump_xyz.h error.h ewald.h fft3d.h fft3d_wrap.h finish.h fix.h fix_add_force.h fix_ave_atom.h fix_ave_force.h fix_ave_spatial.h fix_ave_time.h fix_bond_break.h fix_bond_create.h fix_bond_swap.h fix_box_relax.h fix_com.h fix_coord_original.h fix_deform.h fix_deposit.h fix_drag.h fix_dt_reset.h fix_efield.h fix_enforce2d.h fix_evaporate.h fix_freeze.h fix_gravity.h fix_gyration.h fix_heat.h fix_indent.h fix_langevin.h fix_line_force.h fix_minimize.h fix_momentum.h fix_msd.h fix_nph.h fix_npt.h fix_npt_asphere.h fix_npt_sphere.h fix_nve.h fix_nve_asphere.h fix_nve_limit.h fix_nve_noforce.h fix_nve_sphere.h fix_nvt.h fix_nvt_asphere.h fix_nvt_sllod.h fix_nvt_sphere.h fix_orient_fcc.h fix_peri_neigh.h fix_plane_force.h fix_pour.h fix_press_berendsen.h fix_print.h fix_rdf.h fix_recenter.h fix_respa.h fix_rigid.h fix_set_force.h fix_shake.h fix_shear_history.h fix_spring.h fix_spring_rg.h fix_spring_self.h fix_temp_berendsen.h fix_temp_rescale.h fix_thermal_conductivity.h fix_tmd.h fix_ttm.h fix_viscosity.h fix_viscous.h fix_wall_gran.h fix_wall_lj126.h fix_wall_lj93.h fix_wall_reflect.h fix_wiggle.h force.h group.h improper.h improper_class2.h improper_cvff.h improper_harmonic.h improper_hybrid.h input.h integrate.h kspace.h lammps.h lattice.h library.h math_extra.h memory.h min.h min_cg.h min_sd.h minimize.h modify.h neigh_list.h neigh_request.h neighbor.h output.h pack.h pair.h pair_airebo.h pair_born_coul_long.h pair_buck.h pair_buck_coul_cut.h pair_buck_coul_long.h pair_colloid.h pair_coul_cut.h pair_coul_debye.h pair_coul_long.h pair_dipole_cut.h pair_dpd.h pair_eam.h pair_eam_alloy.h pair_eam_alloy_opt.h pair_eam_fs.h pair_eam_fs_opt.h pair_eam_opt.h pair_gayberne.h pair_gran_hertz_history.h pair_gran_hooke.h pair_gran_hooke_history.h pair_hybrid.h pair_hybrid_overlay.h pair_lj_charmm_coul_charmm.h pair_lj_charmm_coul_charmm_implicit.h pair_lj_charmm_coul_long.h pair_lj_charmm_coul_long_opt.h pair_lj_class2.h pair_lj_class2_coul_cut.h pair_lj_class2_coul_long.h pair_lj_cut.h pair_lj_cut_coul_cut.h pair_lj_cut_coul_debye.h pair_lj_cut_coul_long.h pair_lj_cut_coul_long_tip4p.h pair_lj_cut_opt.h pair_lj_expand.h pair_lj_gromacs.h pair_lj_gromacs_coul_gromacs.h pair_lj_smooth.h pair_lubricate.h pair_morse.h pair_morse_opt.h pair_peri_pmb.h pair_resquared.h pair_soft.h pair_sw.h pair_table.h pair_tersoff.h pair_tersoff_zbl.h pair_yukawa.h pointers.h pppm.h pppm_tip4p.h random_mars.h random_park.h read_data.h read_restart.h region.h region_block.h region_cone.h region_cylinder.h region_intersect.h region_prism.h region_sphere.h region_union.h remap.h remap_wrap.h replicate.h respa.h run.h set.h shell.h special.h style.h style_asphere.h style_class2.h style_colloid.h style_dipole.h style_dpd.h style_granular.h style_kspace.h style_manybody.h style_meam.h style_molecule.h style_opt.h style_peri.h style_poems.h style_reax.h style_user.h style_user_ackland.h style_user_cg_cmm.h style_user_ewaldn.h style_user_packages.h style_user_smd.h style_xtc.h temper.h thermo.h timer.h universe.h update.h variable.h velocity.h verlet.h write_restart.h xdr_compat.h OBJ = $(SRC:.cpp=.o) # Targets help: @echo 'Type "make target" where target is one of:' @echo '' @files="`ls MAKE/Makefile.*`"; \ for file in $$files; do head -1 $$file; done clean: rm -rf Obj_* .DEFAULT: @test -f MAKE/Makefile.$@ @if [ ! -d Obj_$@ ]; then mkdir Obj_$@; fi @cp -p $(SRC) $(INC) Obj_$@ @cp MAKE/Makefile.$@ Obj_$@/Makefile @cd Obj_$@; \ $(MAKE) $(MFLAGS) "OBJ = $(OBJ)" "INC = $(INC)" "EXE = ../$(EXE)" lib @if [ -d Obj_$@ ]; then cd Obj_$@; rm -f $(SRC) $(INC) Makefile*; fi diff --git a/src/fix_heat.cpp b/src/fix_heat.cpp index 19eb3d20e..e27e14f64 100644 --- a/src/fix_heat.cpp +++ b/src/fix_heat.cpp @@ -1,104 +1,104 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ /* ---------------------------------------------------------------------- Contributing author: Paul Crozier (SNL) ------------------------------------------------------------------------- */ #include "math.h" #include "stdlib.h" #include "string.h" #include "fix_heat.h" #include "atom.h" #include "domain.h" #include "group.h" #include "force.h" #include "update.h" #include "error.h" using namespace LAMMPS_NS; /* ---------------------------------------------------------------------- */ FixHeat::FixHeat(LAMMPS *lmp, int narg, char **arg) : Fix(lmp, narg, arg) { if (narg < 4) error->all("Illegal fix heat command"); scalar_flag = 1; scalar_vector_freq = 1; extscalar = 0; nevery = atoi(arg[3]); if (nevery <= 0) error->all("Illegal fix heat command"); - heat = atof(arg[4]); - heat *= nevery*update->dt*force->ftm2v; + heat_input = atof(arg[4]); // cannot have 0 atoms in group if (group->count(igroup) == 0.0) error->all("Fix heat group has no atoms"); scale = 1.0; } /* ---------------------------------------------------------------------- */ int FixHeat::setmask() { int mask = 0; mask |= END_OF_STEP; return mask; } /* ---------------------------------------------------------------------- */ void FixHeat::init() { masstotal = group->mass(igroup); } /* ---------------------------------------------------------------------- */ void FixHeat::end_of_step() { double **v = atom->v; int *mask = atom->mask; int nlocal = atom->nlocal; double vsub[3],vcm[3]; + double heat = heat_input*nevery*update->dt*force->ftm2v; double ke = group->ke(igroup)*force->ftm2v; group->vcm(igroup,masstotal,vcm); double vcmsq = vcm[0]*vcm[0] + vcm[1]*vcm[1] + vcm[2]*vcm[2]; double escale = (ke + heat - 0.5*vcmsq*masstotal)/(ke - 0.5*vcmsq*masstotal); if (escale < 0.0) error->all("Fix heat kinetic energy went negative"); scale = sqrt(escale); vsub[0] = (scale-1.0) * vcm[0]; vsub[1] = (scale-1.0) * vcm[1]; vsub[2] = (scale-1.0) * vcm[2]; for (int i = 0; i < nlocal; i++) if (mask[i] & groupbit) { v[i][0] = scale*v[i][0] - vsub[0]; v[i][1] = scale*v[i][1] - vsub[1]; v[i][2] = scale*v[i][2] - vsub[2]; } } /* ---------------------------------------------------------------------- */ double FixHeat::compute_scalar() { return scale; } diff --git a/src/fix_heat.h b/src/fix_heat.h index 6fc70e552..fc47c21b4 100644 --- a/src/fix_heat.h +++ b/src/fix_heat.h @@ -1,37 +1,37 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef FIX_HEAT_H #define FIX_HEAT_H #include "fix.h" namespace LAMMPS_NS { class FixHeat : public Fix { public: FixHeat(class LAMMPS *, int, char **); int setmask(); void init(); void end_of_step(); double compute_scalar(); private: - double heat; + double heat_input; double masstotal; double scale; }; } #endif diff --git a/src/input.h b/src/input.h index 161241efa..e87da3804 100644 --- a/src/input.h +++ b/src/input.h @@ -1,118 +1,117 @@ /* ---------------------------------------------------------------------- LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator http://lammps.sandia.gov, Sandia National Laboratories Steve Plimpton, sjplimp@sandia.gov Copyright (2003) Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software. This software is distributed under the GNU General Public License. See the README file in the top-level LAMMPS directory. ------------------------------------------------------------------------- */ #ifndef INPUT_H #define INPUT_H #include "stdio.h" #include "pointers.h" namespace LAMMPS_NS { class Input : protected Pointers { - public: public: int narg; // # of command args char **arg; // parsed args for command class Variable *variable; // defined variables Input(class LAMMPS *, int, char **); ~Input(); void file(); // process all input void file(const char *); // process an input script char *one(const char *); // process a single command void substitute(char *, int); // substitute for variables in a string private: int me; // proc ID char *command; // ptr to current command int maxarg; // max # of args in arg char *line,*copy,*work; // input line & copy of it int echo_screen; // 0 = no, 1 = yes int echo_log; // 0 = no, 1 = yes int nfile,maxfile; // current # and max # of open input files int label_active; // 0 = no label, 1 = looking for label char *labelstr; // label string being looked for int jump_skip; // 1 if skipping next jump, 0 otherwise FILE **infiles; // list of open input files void parse(); // parse an input text line int execute_command(); // execute a single command void clear(); // input script commands void echo(); void ifthenelse(); void include(); void jump(); void label(); void log(); void next_command(); void print(); void variable_command(); void angle_coeff(); // LAMMPS commands void angle_style(); void atom_modify(); void atom_style(); void bond_coeff(); void bond_style(); void boundary(); void communicate(); void compute(); void compute_modify(); void dielectric(); void dihedral_coeff(); void dihedral_style(); void dimension(); void dipole(); void dump(); void dump_modify(); void fix(); void fix_modify(); void group_command(); void improper_coeff(); void improper_style(); void kspace_modify(); void kspace_style(); void lattice(); void mass(); void min_modify(); void min_style(); void neigh_modify(); void neighbor_command(); void newton(); void pair_coeff(); void pair_modify(); void pair_style(); void pair_write(); void processors(); void region(); void reset_timestep(); void restart(); void run_style(); void shape(); void special_bonds(); void thermo(); void thermo_modify(); void thermo_style(); void timestep(); void uncompute(); void undump(); void unfix(); void units(); }; } #endif