Commit 4a669bb8 authored by jguenole's avatar jguenole
Browse files

Renamed: adaptglok -> fire2

parent 549c8ee7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@ backtracking method is described in Nocedal and Wright's Numerical
Optimization (Procedure 3.1 on p 41).

The "minimization styles"_min_style.html {quickmin}, {fire} and 
{adaptglok} perform damped dynamics using an Euler integration step.
{fire2} perform damped dynamics using an Euler integration step.
Thus they require a "timestep"_timestep.html be defined.

NOTE: The damped dynamic minimizers use whatever timestep you have
+8 −8
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@
------------------------------------------------------------------------- */

#include <cmath>
#include "min_adaptglok.h"
#include "min_fire2.h"
#include "universe.h"
#include "atom.h"
#include "force.h"
@@ -35,11 +35,11 @@ using namespace LAMMPS_NS;

/* ---------------------------------------------------------------------- */

MinAdaptGlok::MinAdaptGlok(LAMMPS *lmp) : Min(lmp) {}
MinFire2::MinFire2(LAMMPS *lmp) : Min(lmp) {}

/* ---------------------------------------------------------------------- */

void MinAdaptGlok::init()
void MinFire2::init()
{
  Min::init();

@@ -60,18 +60,18 @@ void MinAdaptGlok::init()

/* ---------------------------------------------------------------------- */

void MinAdaptGlok::setup_style()
void MinFire2::setup_style()
{
  double **v = atom->v;
  int nlocal = atom->nlocal;

  // print the parameters used within adaptglok into the log
  // print the parameters used within fire2 into the log

  const char *s1[] = {"eulerimplicit","verlet","leapfrog","eulerexplicit"};
  const char *s2[] = {"no","yes"};

  if (comm->me == 0 && logfile) {
      fprintf(logfile,"  Parameters for adaptglok: \n"
      fprintf(logfile,"  Parameters for fire2: \n"
      "    dmax delaystep dtgrow dtshrink alpha0 alphashrink tmax tmin "
      "   integrator halfstepback relaxbox relaxbox_mod relaxbox_rate ptol \n"
      "    %4g %9i %6g %8g %6g %11g %4g %4g %13s %12s \n",
@@ -90,7 +90,7 @@ void MinAdaptGlok::setup_style()
   called after atoms have migrated
------------------------------------------------------------------------- */

void MinAdaptGlok::reset_vectors()
void MinFire2::reset_vectors()
{
  // atomic dof

@@ -101,7 +101,7 @@ void MinAdaptGlok::reset_vectors()

/* ---------------------------------------------------------------------- */

int MinAdaptGlok::iterate(int maxiter)
int MinFire2::iterate(int maxiter)
{
  bigint ntimestep;
  double vmax,vdotf,vdotfall,vdotv,vdotvall,fdotf,fdotfall;
+6 −6
Original line number Diff line number Diff line
@@ -13,21 +13,21 @@

#ifdef MINIMIZE_CLASS

MinimizeStyle(adaptglok,MinAdaptGlok)
MinimizeStyle(fire2,MinFire2)

#else

#ifndef LMP_MIN_ADAPTGLOK_H
#define LMP_MIN_ADAPTGLOK_H
#ifndef LMP_MIN_FIRE2_H
#define LMP_MIN_FIRE2_H

#include "min.h"

namespace LAMMPS_NS {

class MinAdaptGlok : public Min {
class MinFire2 : public Min {
 public:
  MinAdaptGlok(class LAMMPS *);
  ~MinAdaptGlok() {}
  MinFire2(class LAMMPS *);
  ~MinFire2() {}
  void init();
  void setup_style();
  void reset_vectors();