diff --git a/README b/README index ba1fd830..b2b1e7cc 100644 --- a/README +++ b/README @@ -1,4 +1,5 @@ -This is the LIGGGHTS software package. +This is the LIGGGHTS software package, released by DCS Computing +www.dcs-computing.com LIGGGHTS - LAMMPS Improved for General Granular and Granular Heat Transfer Simulations @@ -6,7 +7,7 @@ Transfer Simulations LIGGGHTS is part of the CFDEMproject www.liggghts.com | www.cfdem.com -Christoph Kloss, christoph.kloss@cfdem.com +Christoph Kloss, christoph.kloss@dcs-computing.com Copyright 2009-2012 JKU Linz Copyright 2012- DCS Computing GmbH, Linz diff --git a/doc/Eqs/fix_sph_density_driftcorr_eq1.jpg b/doc/Eqs/fix_sph_density_driftcorr_eq1.jpg new file mode 100755 index 00000000..94042559 Binary files /dev/null and b/doc/Eqs/fix_sph_density_driftcorr_eq1.jpg differ diff --git a/doc/Eqs/fix_sph_integrity_eq1.jpg b/doc/Eqs/fix_sph_integrity_eq1.jpg new file mode 100755 index 00000000..8b8ca552 Binary files /dev/null and b/doc/Eqs/fix_sph_integrity_eq1.jpg differ diff --git a/doc/Eqs/fix_sph_mixidx_eq1.jpg b/doc/Eqs/fix_sph_mixidx_eq1.jpg new file mode 100755 index 00000000..9ad823a7 Binary files /dev/null and b/doc/Eqs/fix_sph_mixidx_eq1.jpg differ diff --git a/doc/Eqs/fix_sph_mixidx_eq2.jpg b/doc/Eqs/fix_sph_mixidx_eq2.jpg new file mode 100755 index 00000000..b005dbc5 Binary files /dev/null and b/doc/Eqs/fix_sph_mixidx_eq2.jpg differ diff --git a/doc/Eqs/fix_sph_mixidx_eq3.jpg b/doc/Eqs/fix_sph_mixidx_eq3.jpg new file mode 100755 index 00000000..7c7615c3 Binary files /dev/null and b/doc/Eqs/fix_sph_mixidx_eq3.jpg differ diff --git a/doc/Eqs/fix_sph_mixidx_eq4.jpg b/doc/Eqs/fix_sph_mixidx_eq4.jpg new file mode 100755 index 00000000..58f12326 Binary files /dev/null and b/doc/Eqs/fix_sph_mixidx_eq4.jpg differ diff --git a/doc/Eqs/fix_sph_mixidx_eq5.jpg b/doc/Eqs/fix_sph_mixidx_eq5.jpg new file mode 100755 index 00000000..2e7e1ef8 Binary files /dev/null and b/doc/Eqs/fix_sph_mixidx_eq5.jpg differ diff --git a/doc/Eqs/fix_sph_mixidx_eq6.jpg b/doc/Eqs/fix_sph_mixidx_eq6.jpg new file mode 100755 index 00000000..c3a07589 Binary files /dev/null and b/doc/Eqs/fix_sph_mixidx_eq6.jpg differ diff --git a/doc/Eqs/fix_sph_velgrad_eq1.jpg b/doc/Eqs/fix_sph_velgrad_eq1.jpg new file mode 100755 index 00000000..03bf8044 Binary files /dev/null and b/doc/Eqs/fix_sph_velgrad_eq1.jpg differ diff --git a/doc/Eqs/model_C2_part_1.png b/doc/Eqs/model_C2_part_1.png new file mode 100644 index 00000000..99c095c5 Binary files /dev/null and b/doc/Eqs/model_C2_part_1.png differ diff --git a/doc/Eqs/pair_sph_morris_tenscorr_eq1.jpg b/doc/Eqs/pair_sph_morris_tenscorr_eq1.jpg index ac2b4f8f..9194a537 100755 Binary files a/doc/Eqs/pair_sph_morris_tenscorr_eq1.jpg and b/doc/Eqs/pair_sph_morris_tenscorr_eq1.jpg differ diff --git a/doc/Eqs/pair_sph_morris_tenscorr_eq2.jpg b/doc/Eqs/pair_sph_morris_tenscorr_eq2.jpg index 7b71eae0..09fd4504 100755 Binary files a/doc/Eqs/pair_sph_morris_tenscorr_eq2.jpg and b/doc/Eqs/pair_sph_morris_tenscorr_eq2.jpg differ diff --git a/doc/Eqs/pair_sph_morris_tenscorr_eq3.jpg b/doc/Eqs/pair_sph_morris_tenscorr_eq3.jpg index ebcd01c4..1672061e 100755 Binary files a/doc/Eqs/pair_sph_morris_tenscorr_eq3.jpg and b/doc/Eqs/pair_sph_morris_tenscorr_eq3.jpg differ diff --git a/doc/Eqs/pair_sph_morris_tenscorr_eq4.jpg b/doc/Eqs/pair_sph_morris_tenscorr_eq4.jpg index e8f40205..7b71eae0 100755 Binary files a/doc/Eqs/pair_sph_morris_tenscorr_eq4.jpg and b/doc/Eqs/pair_sph_morris_tenscorr_eq4.jpg differ diff --git a/doc/Eqs/pair_sph_morris_tenscorr_eq5.jpg b/doc/Eqs/pair_sph_morris_tenscorr_eq5.jpg index 1903e9d0..ebcd01c4 100755 Binary files a/doc/Eqs/pair_sph_morris_tenscorr_eq5.jpg and b/doc/Eqs/pair_sph_morris_tenscorr_eq5.jpg differ diff --git a/doc/Eqs/pair_sph_morris_tenscorr_eq6.jpg b/doc/Eqs/pair_sph_morris_tenscorr_eq6.jpg new file mode 100755 index 00000000..e8f40205 Binary files /dev/null and b/doc/Eqs/pair_sph_morris_tenscorr_eq6.jpg differ diff --git a/doc/Eqs/pair_sph_morris_tenscorr_eq7.jpg b/doc/Eqs/pair_sph_morris_tenscorr_eq7.jpg new file mode 100755 index 00000000..1903e9d0 Binary files /dev/null and b/doc/Eqs/pair_sph_morris_tenscorr_eq7.jpg differ diff --git a/doc/Eqs/roughnessLength.png b/doc/Eqs/roughnessLength.png new file mode 100644 index 00000000..dd8f9a0b Binary files /dev/null and b/doc/Eqs/roughnessLength.png differ diff --git a/doc/Manual.pdf b/doc/Manual.pdf index f582f015..d1f5fc60 100644 Binary files a/doc/Manual.pdf and b/doc/Manual.pdf differ diff --git a/doc/atom_style.txt b/doc/atom_style.txt index e576061d..de334081 100644 --- a/doc/atom_style.txt +++ b/doc/atom_style.txt @@ -14,7 +14,7 @@ atom_style style args :pre style = {angle} or {atomic} or {body} or {bond} or {charge} or {dipole} or \ {electron} or {ellipsoid} or {full} or {line} or {meso} or \ - {molecular} or {peri} or {sphere} or {granular} or {tri} or {hybrid} or {sph} :ul + {molecular} or {peri} or {sphere} or {granular} or {bond/gran} or {tri} or {hybrid} or {sph} :ul args = none for any style except {body} and {hybrid} {body} args = bstyle bstyle-args bstyle = style of body particles @@ -60,6 +60,7 @@ quantities. {atomic} | only the default values | coarse-grain liquids, solids, metals | {body} | mass, inertia moments, quaternion, angular momentum | arbitrary bodies | {bond} | bonds | bead-spring polymers | +{bond/gran} | number of bonds and bond information | granular bond models | {charge} | charge | atomic system with charges | {dipole} | charge and dipole moment | system with dipolar particles | {electron} | charge and spin and eradius | electronic force field | @@ -97,7 +98,23 @@ basis. For the {sphere} style, the particles are spheres and each stores a per-particle diameter and mass. If the diameter > 0.0, the particle is a finite-size sphere. If the diameter = 0.0, it is a point -particle. +particle. This is typically used for granular models. Instead of +{sphere}, keyword {granular} can be used. + +For the {bond/gran} style, the number of granular bonds per atom is +stored, and the information associated to it: the type of each bond, +the ID of the bonded partner atom and the so-called bond history. +The bond history is similar to the contact history for granular +interaction, it stores the internal state of the bond. What exactly +is stored in this internal state is defined by the granular +"bond style"_bond_gran.html used. There are 2 parameters: The number +of bond types, and the maximum number of bonds that each atom can +have. For each bond type, the parameters have to be specified via the +"bond_coeff"_bond_coeff.html command (see example "here"_bond_gran.html ) +Note that {bond/gran} is an experimental code which is may not be +available in your release of LIGGGHTS. An example for the sytnax is given below: + +atom_style bond/gran n_bondtypes 1 bonds_per_atom 6 :pre For the {ellipsoid} style, the particles are ellipsoids and each stores a flag which indicates whether it is a finite-size ellipsoid or diff --git a/doc/fix_mesh_surface_stress_6dof.txt b/doc/fix_mesh_surface_stress_6dof.txt index 9c204a12..0c3ae2ed 100644 --- a/doc/fix_mesh_surface_stress_6dof.txt +++ b/doc/fix_mesh_surface_stress_6dof.txt @@ -81,7 +81,8 @@ separately for the x-, y-, and z-axis. This fix stores a global vector with 6 components for access by various "output commands"_Section_howto.html#4_15. The first 3 components are equal to the total force on the mesh, the last 3 components store the total torque -on the body. Please note that as opposed to "fix mesh/surface/stress"_fix_mesh_surface_stress.html, +on the body. The last 3 components store the position of the center of mass of the body. +Please note that as opposed to "fix mesh/surface/stress"_fix_mesh_surface_stress.html, the total force and torque contain the contributions of the particles, gravity and the suspension model (if activated). Furthermore, this fix writes the state of the rigid body (translational and rotational) to binary restart files so diff --git a/doc/fix_particletemplate_multisphere.txt b/doc/fix_particletemplate_multisphere.txt index f9a629b5..405f615b 100644 --- a/doc/fix_particletemplate_multisphere.txt +++ b/doc/fix_particletemplate_multisphere.txt @@ -29,10 +29,12 @@ values_spheres = one out of the following options :l option 3 = {x1 y1 z1 r1 x2 y2 r2...} where x/y/z are sphere positions and r are the radii :pre type = obligatory keyword :l mt = multisphere type of the template :l -opt_keyword = {mass} or {inertia_tensor} :l +opt_keyword = {mass} or {inertia_tensor} or {use_volume} or {use_density} :l {mass} value = mass assigned to this particle template {inertia_tensor} values = Ixx Ixy Ixz Iyy Iyz Izz - Ixx Ixy Ixz Iyy Iyz Izz = 6 independant components of the inertia tensor :pre + Ixx Ixy Ixz Iyy Iyz Izz = 6 independant components of the inertia tensor +{use_volume} = particle density calculated from mass and volume (only if keyword 'mass' is used') +{use_density} = particle volume calculated from mass and density (only if keyword 'mass' is used') :pre :ule @@ -70,7 +72,19 @@ and the inertia tensor including its eigensystem. As an alternative, the body's mass and inertia tensor can be specified directly via keywords {mass} and {inertia_tensor}. Note that you can use these keywords only together, i.e. defining only {mass} but not -{inertia_tensor} will throw an error. +{inertia_tensor} will throw an error. Also note that only 2 out of the +3 variables density, mass and volume are independant. Thus, you are +offered two options when {mass} and {inertia_tensor} are used: +(a) if keyword {use_volume} is specified, LIGGGHTS will use the +specified {mass} and volume_mc (the volume of the particle template +calculated by the Monte Carlo procedure), and calculate the density from +these two variables. +(b) if keyword {use_density} is used, LIGGGHTS will use the specified +{mass} and the specified {density} (see doc of +"fix particletemplate/sphere"_fix_particletemplate_sphere.html command), +and the volume of the clump is then calculated from these two variables. +Note you have to use either {use_volume} or {use_density} in case +{mass} and {inertia_tensor} are used. The multisphere type or shape type as defined via the {type} keyword must be unique integer given to each fix particletemplate/multisphere diff --git a/doc/fix_wall_gran.txt b/doc/fix_wall_gran.txt index d15c1d94..eb11fefa 100644 --- a/doc/fix_wall_gran.txt +++ b/doc/fix_wall_gran.txt @@ -52,8 +52,8 @@ general_keyword = {shear} or {store_force} or {store_force_contact} :l {store_force_contact} value = 'yes' or 'no' yes, no = determines if the force for each particle-wall contact is stored in a "fix property/atom"_fix_property.html with id contactforces_(ID), where (ID) is the id of the fix wall/gran command. :pre -following the general_keyword/value pairs, zero or more model_keyword/model_valuezero pairs may be appended in arbitrary order :l - model_type/model_name pairs = described for each model separately "here"_Section_gran_models.html +following the general_keyword/value pairs, zero or more model_keyword/model_value pairs may be appended in arbitrary order :l + model_keyword/model_value pairs = described for each model separately "here"_Section_gran_models.html :ule [Examples:] diff --git a/doc/gran_model_hertz.txt b/doc/gran_model_hertz.txt index ddc93f26..aaa2308e 100644 --- a/doc/gran_model_hertz.txt +++ b/doc/gran_model_hertz.txt @@ -11,7 +11,7 @@ gran model hertz :h3 [Syntax:] -model hertz [other model_type/model_name pairs as described "here"_pair_gran.html] keyword values :pre +model hertz \[other model_type/model_name pairs as described "here"_pair_gran.html \] keyword values :pre zero or more keyword/value pairs may be appended :l {limitForce} values = 'on' or 'off' on = ensures that the normal force is never attractive (an artefact that can occur at the end of a collision). diff --git a/doc/gran_model_hertz_stiffness.txt b/doc/gran_model_hertz_stiffness.txt index d76eae5c..ccf8cc71 100644 --- a/doc/gran_model_hertz_stiffness.txt +++ b/doc/gran_model_hertz_stiffness.txt @@ -11,7 +11,7 @@ gran model hertz/stiffness :h3 [Syntax:] -model hertz [other model_type/model_name pairs as described "here"_pair_gran.html] keyword values :pre +model hertz \[other model_type/model_name pairs as described "here"_pair_gran.html \] keyword values :pre zero or more keyword/value pairs may be appended :l {limitForce} values = 'on' or 'off' on = ensures that the normal force is never attractive (an artefact that can occur at the end of a collision). diff --git a/doc/gran_model_hooke.txt b/doc/gran_model_hooke.txt index 49b29bbb..f06b55d8 100644 --- a/doc/gran_model_hooke.txt +++ b/doc/gran_model_hooke.txt @@ -11,7 +11,7 @@ gran model hooke :h3 [Syntax:] -model hertz [other model_type/model_name pairs as described "here"_pair_gran.html] keyword values :pre +model hertz \[other model_type/model_name pairs as described "here"_pair_gran.html \] keyword values :pre zero or more keyword/value pairs may be appended :l {tangential_damping} values = 'on' or 'off' on = activates tangential damping diff --git a/doc/gran_model_hooke_stiffness.txt b/doc/gran_model_hooke_stiffness.txt index 271aac4a..453adc65 100644 --- a/doc/gran_model_hooke_stiffness.txt +++ b/doc/gran_model_hooke_stiffness.txt @@ -11,7 +11,7 @@ gran model hooke/stiffness :h3 [Syntax:] -model hooke/stiffness [other model_type/model_name pairs as described "here"_pair_gran.html] keyword values :pre +model hooke/stiffness \[other model_type/model_name pairs as described "here"_pair_gran.html \] keyword values :pre zero or more keyword/value pairs may be appended :l {absolute_damping} values = 'on' or 'off' on = activates tangential damping diff --git a/doc/gran_tangential_history.txt b/doc/gran_tangential_history.txt index 35a78ae8..edd4fd26 100644 --- a/doc/gran_tangential_history.txt +++ b/doc/gran_tangential_history.txt @@ -28,9 +28,8 @@ The spring part of the tangential force (k_t) is a "history" effect that accounts for the tangential displacement ("tangential overlap") between the particles for the duration of the time they are in contact. -If this model is chose, then this "tangential overlap" spring force is +If this model is chosen, then this "tangential overlap" spring force is actually calculated / taken into account. - The coefficient of friction cof is the upper limit of the tangential force through the Coulomb criterion Ft = cof*Fn, where Ft and Fn are the tangential spring and normal force components in the formulas above. diff --git a/lib/poems/Makefile.lammps b/lib/poems/Makefile.lammps new file mode 100755 index 00000000..3d333660 --- /dev/null +++ b/lib/poems/Makefile.lammps @@ -0,0 +1,5 @@ +# Settings that the LAMMPS build will import when this package library is used + +poems_SYSINC = +poems_SYSLIB = +poems_SYSPATH = diff --git a/src/MAKE/Makefile.ubuntuVTK_fpic b/src/MAKE/Makefile.ubuntuVTK_fpic new file mode 100644 index 00000000..83830793 --- /dev/null +++ b/src/MAKE/Makefile.ubuntuVTK_fpic @@ -0,0 +1,117 @@ +# openmpi = Ubuntu 12.04, mpic++, OpenMPI-1.6 + +SHELL = /bin/sh + +# --------------------------------------------------------------------- +# compiler/linker settings +# specify flags and libraries needed for your compiler + +CC = mpic++ +CCFLAGS = -O2 \ + -funroll-loops -fstrict-aliasing -Wall -Wno-uninitialized -fPIC +SHFLAGS = -fPIC +DEPFLAGS = -M +LINK = mpic++ +LINKFLAGS = -O2 +LIB = -lstdc++ +ARCHIVE = ar +ARFLAGS = -rcsv +SIZE = size +SHLIBFLAGS = -shared + +# --------------------------------------------------------------------- +# LAMMPS-specific settings +# specify settings for LAMMPS features you will use +# if you change any -D setting, do full re-compile after "make clean" + +# LAMMPS ifdef settings, OPTIONAL +# see possible settings in doc/Section_start.html#2_2 (step 4) + +LMP_INC = -DLAMMPS_GZIP -DLAMMPS_VTK + +# MPI library, REQUIRED +# see discussion in doc/Section_start.html#2_2 (step 5) +# can point to dummy MPI library in src/STUBS as in Makefile.serial +# INC = path for mpi.h, MPI compiler settings +# PATH = path for MPI library +# LIB = name of MPI library + +MPI_INC = +MPI_PATH = +MPI_LIB = + +# FFT library, OPTIONAL +# see discussion in doc/Section_start.html#2_2 (step 6) +# can be left blank to use provided KISS FFT library +# INC = -DFFT setting, e.g. -DFFT_FFTW, FFT compiler settings +# PATH = path for FFT library +# LIB = name of FFT library + +FFT_INC = +FFT_PATH = +FFT_LIB = + +# JPEG and/or PNG library, OPTIONAL +# see discussion in doc/Section_start.html#2_2 (step 7) +# only needed if -DLAMMPS_JPEG or -DLAMMPS_PNG listed with LMP_INC +# INC = path(s) for jpeglib.h and/or png.h +# PATH = path(s) for JPEG library and/or PNG library +# LIB = name(s) of JPEG library and/or PNG library + +JPG_INC = +JPG_PATH = +JPG_LIB = + +# VTK library, OPTIONAL +# INC = path for VTK header files +# PATH = path for VTK library +# LIB = name of VTK library +##################################### ADD THESE ITEMS TO OPTIONS FILE OF SOLVER APP IN CFDEM + +VTK_INC = -I/usr/include/vtk-5.8 +VTK_PATH = +VTK_LIB = -lvtkCommon -lvtkFiltering -lvtkIO + +# --------------------------------------------------------------------- +# build rules and dependencies +# no need to edit this section + +include Makefile.package.settings +include Makefile.package + +EXTRA_INC = $(LMP_INC) $(PKG_INC) $(MPI_INC) $(FFT_INC) $(JPG_INC) $(VTK_INC) $(PKG_SYSINC) +EXTRA_PATH = $(PKG_PATH) $(MPI_PATH) $(FFT_PATH) $(JPG_PATH) $(VTK_PATH) $(PKG_SYSPATH) +EXTRA_LIB = $(PKG_LIB) $(MPI_LIB) $(FFT_LIB) $(JPG_LIB) $(VTK_LIB) $(PKG_SYSLIB) + +# Path to src files + +vpath %.cpp .. +vpath %.h .. + +# Link target + +$(EXE): $(OBJ) + $(LINK) $(LINKFLAGS) $(EXTRA_PATH) $(OBJ) $(EXTRA_LIB) $(LIB) -o $(EXE) + $(SIZE) $(EXE) + +# Library target + +lib: $(OBJ) + $(ARCHIVE) $(ARFLAGS) $(EXE) $(OBJ) + +shlib: $(OBJ) + $(CC) $(CCFLAGS) $(SHFLAGS) $(SHLIBFLAGS) $(EXTRA_PATH) -o $(EXE) \ + $(OBJ) $(EXTRA_LIB) $(LIB) + +# Compilation rules + +%.o:%.cpp + $(CC) $(CCFLAGS) $(SHFLAGS) $(EXTRA_INC) -c $< + +%.d:%.cpp + $(CC) $(CCFLAGS) $(EXTRA_INC) $(DEPFLAGS) $< > $@ + +# Individual dependencies + +DEPENDS = $(OBJ:.o=.d) +sinclude $(DEPENDS) diff --git a/src/PASCAL/Install.sh b/src/PASCAL/Install.sh new file mode 100644 index 00000000..dd154355 --- /dev/null +++ b/src/PASCAL/Install.sh @@ -0,0 +1,66 @@ +# Install/unInstall package files in LAMMPS +# mode = 0/1/2 for uninstall/install/update + +mode=$1 + +# arg1 = file, arg2 = file it depends on + +action () { + if (test $mode = 0) then + rm -f ../$1 + elif (! cmp -s $1 ../$1) then + if (test -z "$2" || test -e ../$2) then + cp $1 .. + if (test $mode = 2) then + echo " updating src/$1" + fi + fi + elif (test -n "$2") then + if (test ! -e ../$2) then + rm -f ../$1 + fi + fi +} + +# all package files with no dependencies + +for file in *.cpp *.h; do + action $file +done + +# edit 2 Makefile.package files to include/exclude package info + +if (test $1 = 1) then + echo "...updating Makefile.package" + if (test -e ../Makefile.package) then + sed -i -e 's/[^ \t]*pascal[^ \t]* //' ../Makefile.package + sed -i -e 's|^PKG_INC =[ \t]*|&-I$(PASCAL_SRC_DIR) |' ../Makefile.package + sed -i -e 's|^PKG_PATH =[ \t]*|&-L$(PASCAL_SRC_DIR) -L$(PASCAL_INST_DIR)/lib64 -L$(PASCAL_INST_DIR)/lib -L$(PASCAL_QT5_DIR)/lib -L$(PASCAL_HDF5_DIR)/lib |' ../Makefile.package + sed -i -e 's|^PKG_LIB =[ \t]*|&-lpasc_fedora_fpic -lsundials_cvode -lsundials_nvecparallel -lsundials_nvecserial -lQt5Core -lhdf5 -lhdf5_hl -lhdf5_cpp |' ../Makefile.package + fi + +# if (test -e ../Makefile.package.settings) then +# sed -i -e '/^include.*pascal.*$/d' ../Makefile.package.settings + # multiline form needed for BSD sed on Macs +# sed -i -e '4 i \include $(PASCAL_SRC_DIR) ' ../Makefile.package.settings +# fi + +elif (test $1 = 0) then + + if (test -e ../Makefile.package) then + sed -i -e 's/[^ \t]*PASCAL[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*pasc[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*sundial[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*Qt5[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*nvecserial[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*nvecparallel[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*PASCAL_INST_DIR[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*PASCAL_INST_DIR[^ \t]* //' ../Makefile.package + sed -i -e 's/[^ \t]*PASCAL_QT5_DIR[^ \t]* //' ../Makefile.package + fi + +# if (test -e ../Makefile.package.settings) then +# sed -i -e '/^include.*pascal.*$/d' ../Makefile.package.settings +# fi + +fi diff --git a/src/PASCAL/fix_pascal_couple.cpp b/src/PASCAL/fix_pascal_couple.cpp new file mode 100644 index 00000000..c0468c44 --- /dev/null +++ b/src/PASCAL/fix_pascal_couple.cpp @@ -0,0 +1,311 @@ +/* ---------------------------------------------------------------------- + LIGGGHTS - LAMMPS Improved for General Granular and Granular Heat + Transfer Simulations + + LIGGGHTS is part of the CFDEMproject + www.liggghts.com | www.cfdem.com + + + Copyright (C): 2014 DCS Computing GmbH (www.dcs-computing.com), Linz, Austria + 2014 Graz University of Technology (ippt.tugraz.at), Graz, Austria + + LIGGGHTS is based on LAMMPS + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + This software is distributed under the GNU General Public License. + + Parts of the code were developped in the frame of the NanoSim project funded + by the European Commission through FP7 Grant agreement no. 604656. +------------------------------------------------------------------------- */ + +#include "mpi.h" +#include "math.h" +#include "stdio.h" +#include "string.h" +#include "stdlib.h" +#include "pascal.h" // these are PASCAL include files +#include "fix_pascal_couple.h" +#include "atom.h" +#include "domain.h" +#include "update.h" +#include "modify.h" +#include "force.h" +#include "output.h" +#include "group.h" +#include "comm.h" +#include "memory.h" +#include "error.h" +#include "fix_property_atom.h" +#include "cfd_datacoupling_simple.h" + +using namespace LAMMPS_NS; +using namespace PASCAL_NS; +using namespace FixConst; + +/* ---------------------------------------------------------------------- + Constructor, calls PaScal's constructor +------------------------------------------------------------------------- */ +FixPaScalCouple::FixPaScalCouple(LAMMPS *lmp, int narg, char **arg) : + Fix(lmp, narg, arg), + fix_shellTemperature_(0), + fix_shellHeatFlux_(0), + dc_(0), + verbose_(false), + couple_at_least_every_(0), + couple_this_step_(false), + pascal_setup_(0), + pasc_(0), + time_(0.) +{ + iarg_ = 3; + + int me, nprocs; + MPI_Comm_rank(world,&me); + MPI_Comm_size(MPI_COMM_WORLD,&nprocs); + + if (narg < 5) + error->fix_error(FLERR,this,"not enough arguments"); + + if (strcmp(arg[iarg_++],"couple_at_least_every")) + error->fix_error(FLERR,this,"expecting keyword 'couple_at_least_every'"); + + couple_at_least_every_ = force->inumeric(FLERR,arg[iarg_++]); + if (couple_at_least_every_ <= 0) + error->fix_error(FLERR,this,"'couple_at_least_every' > 0 required"); + + nevery = 1; + + //Create datacoupling + dc_ = new CfdDatacouplingSimple(lmp,iarg_+1,narg,arg,this); + + // set next reneighbor + force_reneighbor = 1; + next_reneighbor = update->ntimestep + couple_at_least_every_; + + // TODO: meed parsing here! + // TODO: need to parse filename with pascal input + + // create PaScal instance + int pascal; + if (me < nprocs) pascal = 1; + else pascal = MPI_UNDEFINED; + + MPI_Comm comm_pascal; + MPI_Comm_split(MPI_COMM_WORLD,pascal,0,&comm_pascal); + + // Open PaScal input script and create PaScal Object + if(0 == me) + fprintf(screen, "\n...creating PaScal object... \n"); + if(pascal == 1) pasc_ = new PASCAL_NS::PaScal(0, NULL, comm_pascal,lmp); + pascal_setup_ = true; + + char *runDirectory = new char[128]; + int nStrLength = 0; + if (me == 0) + { + sprintf(runDirectory,"%s", "pascal"); //TODO: add option to specify via parsing + nStrLength = strlen(runDirectory) + 1; + } + MPI_Bcast(&nStrLength,1,MPI_INT,0,MPI_COMM_WORLD); + if (nStrLength > 0) + { + MPI_Bcast(runDirectory,nStrLength,MPI_CHAR,0,MPI_COMM_WORLD); + if (pascal == 1) pasc_->set_dir(runDirectory); + } + + char *pascalFile = new char[256]; + nStrLength = 0; + if (me == 0) + { + sprintf(pascalFile, "./%s/%s", runDirectory, "in.pascal"); //TODO: add option to specify via parsing + nStrLength = strlen(pascalFile) + 1; + } + MPI_Bcast(&nStrLength,1,MPI_INT,0,MPI_COMM_WORLD); + if (nStrLength > 0) + { + MPI_Bcast(pascalFile,nStrLength,MPI_CHAR,0,MPI_COMM_WORLD); + if (pascal == 1) pasc_->set_input(pascalFile); + } + + pasc_->input(); + + //Finalized initialization + delete [] pascalFile; + delete [] runDirectory; + + fprintf(screen, "...PaScal object initialized! \n\n"); +} + +/* ---------------------------------------------------------------------- + free all memory for PaScal +------------------------------------------------------------------------- */ + +FixPaScalCouple::~FixPaScalCouple() +{ + delete pasc_; +} + +/* ---------------------------------------------------------------------- */ + +void FixPaScalCouple::post_create() +{ + if(dc_) + dc_->post_create(); + else + error->all(FLERR,"internal error"); + + + if(verbose_) fprintf(screen, "PaScal::post_create()!\n"); + // register fixes for quantities to be saved to disk + // see fix_property_atom.cpp for meaning of fixargs + if(!fix_shellTemperature_) + { + const char* fixarg[9]; + fixarg[0]="shellT"; + fixarg[1]="all"; + fixarg[2]="property/atom"; + fixarg[3]="shellT"; + fixarg[4]="scalar"; + fixarg[5]="no"; + fixarg[6]="yes"; + fixarg[7]="no"; + fixarg[8]="0."; + fix_shellTemperature_ = + modify->add_fix_property_atom(9, + const_cast(fixarg), + style); + } +} + +/* ---------------------------------------------------------------------- */ + +void FixPaScalCouple::updatePtrs() +{ + //TODO +} + +/* ---------------------------------------------------------------------- */ + +int FixPaScalCouple::setmask() +{ + int mask = 0; + mask |= PRE_EXCHANGE; + mask |= END_OF_STEP; + return mask; +} + +/* ---------------------------------------------------------------------- */ + +void FixPaScalCouple::init() +{ + // TODO: warn if something is wrong + + dc_->init(); + + if(0 == atom->map_style) + error->fix_error(FLERR,this,"requires an 'atom_modify map' command to allocate an atom map"); + + //TODO +// error->all(FLERR,"TODO: add more properties here to be pushed/pulled"); +// error->all(FLERR,"TODO: separate framework and model; put this in derived class"); + + // values to be transfered to OF + + dc_->add_push_property("x","vector-atom"); + dc_->add_push_property("v","vector-atom"); + dc_->add_push_property("radius","scalar-atom"); + dc_->add_push_property("id","scalar-atom"); +} + +/* ---------------------------------------------------------------------- + make some setup calls to PaScal if necessary + set-up is +------------------------------------------------------------------------- */ + +void FixPaScalCouple::setup(int vflag) +{ + +} + +/* ---------------------------------------------------------------------- + detect neigh list build / exchange and trigger coupling + schedule next coupling +------------------------------------------------------------------------- */ + +int* FixPaScalCouple::get_liggghts_map(int &length) +{ + + int size_map = atom->get_map_size(); + length = size_map; + + int *map_copy = NULL; + map_copy = memory->create(map_copy, size_map,"map"); + memcpy(map_copy,atom->get_map_array(),size_map); + return map_copy; +} + +/* ---------------------------------------------------------------------- + detect neigh list build / exchange and trigger coupling + schedule next coupling +------------------------------------------------------------------------- */ + +void FixPaScalCouple::pre_exchange() +{ + couple_this_step_ = true; + + if (next_reneighbor != update->ntimestep) + fprintf(screen,"'premature' LIGGGHTS-PaScal coupling because of high flow dynamics\n"); + + next_reneighbor = update->ntimestep + couple_at_least_every_; +} + +/* ---------------------------------------------------------------------- + call PaScal to catch up with LIGGGHTS +------------------------------------------------------------------------- */ +void FixPaScalCouple::end_of_step() +{ + time_ += update->dt; + + if(!couple_this_step_) + return; + + // assemble command and run in PaScal + // init upon first use of PaScal, but not afterwards + + char commandstr[200]; + sprintf(commandstr,"control run %f init %s",time_,pascal_setup_?"yes":"no"); + fprintf(screen,"PaScal::runCommand()!\n"); + pasc_->runCommand(commandstr); + + // reset flags and time counter + + couple_this_step_ = false; + pascal_setup_ = false; + time_ = 0.; + + +#if 0 + int currAtom=1; + fprintf(screen, "currAtom: %d xcm %g %g %g,vcm %g %g %g ,omega %g %g %g, torque %g %g %g, fcm %g %g %g\n", + currAtom, + xcm[currAtom][0], xcm[currAtom][1], xcm[currAtom][2], + vcm[currAtom][0], vcm[currAtom][1], vcm[currAtom][2], + omega[currAtom][0], omega[currAtom][1], omega[currAtom][2], + torque[currAtom][0],torque[currAtom][1],torque[currAtom][2], + fcm[currAtom][0],fcm[currAtom][1],fcm[currAtom][2]); +#endif + +} + +////////////////////////////////////////////////////////////// +void* LAMMPS_NS::FixPaScalCouple::find_pull_property(const char *name, const char *type, int &len1, int &len2) +{ + return dc_->find_pull_property(name,type,len1,len2); +} + +void* LAMMPS_NS::FixPaScalCouple::find_push_property(const char *name, const char *type, int &len1, int &len2) +{ + return dc_->find_push_property(name,type,len1,len2); +} diff --git a/src/PASCAL/fix_pascal_couple.h b/src/PASCAL/fix_pascal_couple.h new file mode 100644 index 00000000..fd6a0f8e --- /dev/null +++ b/src/PASCAL/fix_pascal_couple.h @@ -0,0 +1,81 @@ +/* ---------------------------------------------------------------------- + LIGGGHTS - LAMMPS Improved for General Granular and Granular Heat + Transfer Simulations + + LIGGGHTS is part of the CFDEMproject + www.liggghts.com | www.cfdem.com + + + Copyright (C): 2014 DCS Computing GmbH (www.dcs-computing.com), Linz, Austria + 2014 Graz University of Technology (ippt.tugraz.at), Graz, Austria + + LIGGGHTS is based on LAMMPS + LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator + http://lammps.sandia.gov, Sandia National Laboratories + Steve Plimpton, sjplimp@sandia.gov + + This software is distributed under the GNU General Public License. + + Parts of the code were developped in the frame of the NanoSim project funded + by the European Commission through FP7 Grant agreement no. 604656. +------------------------------------------------------------------------- */ + +#ifdef FIX_CLASS + +FixStyle(couple/pascal,FixPaScalCouple) + +#else + +#ifndef LMP_FIX_PASCAL_COUPLE_H +#define LMP_FIX_PASCAL_COUPLE_H + +#include "fix.h" +namespace PASCAL_NS { class PaScal; } + +namespace LAMMPS_NS { + +class FixPaScalCouple : public Fix { + public: + FixPaScalCouple(class LAMMPS *, int narg, char **arg); + ~FixPaScalCouple(); + virtual void post_create(); + void updatePtrs(); + + int setmask(); + void init(); + void setup(int); + + void pre_exchange(); + void end_of_step(); + + int* get_liggghts_map(int &length); + + void* find_pull_property(const char *name, const char *type, int &len1, int &len2); + + void* find_push_property(const char *name, const char *type, int &len1, int &len2); + + protected: + + class FixPropertyAtom* fix_shellTemperature_; + class FixPropertyAtom* fix_shellHeatFlux_; + + private: + + // data transfer is handled by this class + class CfdDatacouplingSimple *dc_; + + bool verbose_; + int couple_at_least_every_; + bool couple_this_step_; + bool pascal_setup_; + double time_; + int iarg_; + + // PaScal Object + PASCAL_NS::PaScal *pasc_; +}; + +} //end namespace +#endif +#endif + diff --git a/src/WINDOWS/LAMMPS.sln b/src/WINDOWS/LAMMPS.sln deleted file mode 100644 index 6f8ba82f..00000000 --- a/src/WINDOWS/LAMMPS.sln +++ /dev/null @@ -1,36 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "STUBS", "STUBS.vcproj", "{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LAMMPS", "LAMMPS.vcproj", "{74AC9767-A52F-47BD-BB26-07C739DA3EA5}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug_STUBS|Win32 = Debug_STUBS|Win32 - Debug|Win32 = Debug|Win32 - Release_STUBS|Win32 = Release_STUBS|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug_STUBS|Win32.ActiveCfg = Debug_STUBS|Win32 - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug_STUBS|Win32.Build.0 = Debug_STUBS|Win32 - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug|Win32.ActiveCfg = Debug_STUBS|Win32 - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Debug|Win32.Build.0 = Debug_STUBS|Win32 - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release_STUBS|Win32.ActiveCfg = Release_STUBS|Win32 - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release_STUBS|Win32.Build.0 = Release_STUBS|Win32 - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release|Win32.ActiveCfg = Release_STUBS|Win32 - {FD83089F-1BF6-455F-9BEA-BB1C21FC137C}.Release|Win32.Build.0 = Release_STUBS|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug_STUBS|Win32.ActiveCfg = Debug_STUBS|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug_STUBS|Win32.Build.0 = Debug_STUBS|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug|Win32.ActiveCfg = Debug|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Debug|Win32.Build.0 = Debug|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release_STUBS|Win32.ActiveCfg = Release_STUBS|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release_STUBS|Win32.Build.0 = Release_STUBS|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release|Win32.ActiveCfg = Release|Win32 - {74AC9767-A52F-47BD-BB26-07C739DA3EA5}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/src/WINDOWS/LAMMPS.vcproj b/src/WINDOWS/LAMMPS.vcproj deleted file mode 100644 index 67581baa..00000000 --- a/src/WINDOWS/LAMMPS.vcproj +++ /dev/null @@ -1,2957 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/WINDOWS/LAMMPS.vsmacros b/src/WINDOWS/LAMMPS.vsmacros deleted file mode 100644 index 629be59a..00000000 Binary files a/src/WINDOWS/LAMMPS.vsmacros and /dev/null differ diff --git a/src/WINDOWS/LIGGGHTS-PUBLIC.vcxproj b/src/WINDOWS/LIGGGHTS-PUBLIC.vcxproj deleted file mode 100644 index 04c56360..00000000 --- a/src/WINDOWS/LIGGGHTS-PUBLIC.vcxproj +++ /dev/null @@ -1,1194 +0,0 @@ - - - - - Debug_STUBS - Win32 - - - Debug_STUBS - x64 - - - Debug - Win32 - - - Debug - x64 - - - Release_STUBS - Win32 - - - Release_STUBS - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {74AC9767-A52F-47BD-BB26-07C739DA3EA5} - testmacro - Win32Proj - - - - Application - Unicode - true - v110 - - - Application - Unicode - true - v110 - - - Application - Unicode - v110 - - - Application - Unicode - v110 - - - Application - Unicode - true - v110 - - - Application - Unicode - true - v110 - - - Application - Unicode - v110 - - - Application - Unicode - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - AllRules.ruleset - AllRules.ruleset - - - - - C:\Program Files\MPICH2\include;$(IncludePath) - C:\Program Files\MPICH2\lib;$(LibraryPath) - C:\Program Files\MPICH2\include;$(IncludePath) - C:\Program Files\MPICH2\lib;$(LibraryPath) - - - C:\Program Files (x86)\MPICH2\include;$(IncludePath) - C:\Program Files (x86)\MPICH2\lib;$(LibraryPath) - - - C:\Program Files (x86)\MPICH2\include;$(IncludePath) - C:\Program Files (x86)\MPICH2\lib;$(LibraryPath) - - - - Disabled - ..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - mpi.lib;cxx.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) - true - Console - MachineX86 - - - - - Disabled - ..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - mpi.lib;cxx.lib;extra/fftw2/x64/FFTW2dll.lib;%(AdditionalDependencies) - true - Console - - - - - ..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - mpi.lib;cxx.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) - true - Console - true - true - MachineX86 - - - - - ..;extra;settings;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - mpi.lib;cxx.lib;extra/fftw2/x64/FFTW2dll.lib;%(AdditionalDependencies) - false - Console - true - true - - - - - Disabled - ..;extra;settings;../STUBS;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) - true - Console - MachineX86 - - - - - Disabled - ..;extra;settings;../STUBS;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) - true - Console - - - - - ..;extra;settings;../STUBS;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) - true - Console - true - true - MachineX86 - - - - - ..;extra;settings;../STUBS;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - 4267;4244;4101;4996;%(DisableSpecificWarnings) - - - $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) - true - Console - true - true - - - - - - diff --git a/src/WINDOWS/LIGGGHTS.vcxproj b/src/WINDOWS/LIGGGHTS.vcxproj new file mode 100644 index 00000000..d6250b04 --- /dev/null +++ b/src/WINDOWS/LIGGGHTS.vcxproj @@ -0,0 +1,349 @@ + + + + + Debug_STUBS + Win32 + + + Debug_STUBS + x64 + + + Debug + Win32 + + + Debug + x64 + + + Release_STUBS + Win32 + + + Release_STUBS + x64 + + + Release + Win32 + + + Release + x64 + + + + + + + + + + + + + {74AC9767-A52F-47BD-BB26-07C739DA3EA5} + testmacro + Win32Proj + LIGGGHTS + + + + Application + Unicode + true + v120 + + + Application + Unicode + true + v120 + + + Application + Unicode + v120 + + + Application + Unicode + v120 + + + Application + Unicode + true + v120 + + + Application + Unicode + true + v120 + + + Application + Unicode + v120 + + + Application + Unicode + v120 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + true + true + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + false + false + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + true + true + $(SolutionDir)$(Configuration)\ + $(SolutionDir)$(Configuration)\ + $(Configuration)\ + $(Configuration)\ + false + false + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + AllRules.ruleset + AllRules.ruleset + + + + + C:\Program Files\Microsoft MPI\Inc;$(IncludePath) + C:\Program Files\Microsoft MPI\Lib\amd64;$(LibraryPath) + C:\Program Files\Microsoft MPI\Inc;$(IncludePath) + C:\Program Files\Microsoft MPI\Lib\amd64;$(LibraryPath) + + + C:\Program Files\Microsoft MPI\Inc;$(IncludePath) + C:\Program Files\Microsoft MPI\Lib\i386;$(LibraryPath) + + + C:\Program Files\Microsoft MPI\Inc;$(IncludePath) + C:\Program Files\Microsoft MPI\Lib\i386;$(LibraryPath) + + + + Disabled + ..;extra;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + msmpi.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + + + + Disabled + ..;extra;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + msmpi.lib;extra/fftw2/x64/FFTW2dll.lib;%(AdditionalDependencies) + true + Console + + + + + ..;extra;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + msmpi.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + + + + ..;extra;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + msmpi.lib;extra/fftw2/x64/FFTW2dll.lib;%(AdditionalDependencies) + false + Console + true + true + + + + + Disabled + ..;extra;../STUBS;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + true + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) + true + Console + MachineX86 + + + + + Disabled + ..;extra;../STUBS;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + EnableFastChecks + MultiThreadedDebugDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) + true + Console + + + + + ..;extra;../STUBS;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) + true + Console + true + true + MachineX86 + + + + + ..;extra;../STUBS;../../lib/awpmd/systems/interact/TCP;../MOLECULE;../KSPACE;extra/fftw2;../MANYBODY;%(AdditionalIncludeDirectories) + WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;FFT_FFTW;_USE_MATH_DEFINES;NOMINMAX;%(PreprocessorDefinitions) + MultiThreadedDLL + + + Level3 + ProgramDatabase + 4267;4244;4101;4996;%(DisableSpecificWarnings) + + + $(OutDir)stubs.lib;extra/fftw2/FFTW2dll.lib;%(AdditionalDependencies) + true + Console + true + true + + + + + + \ No newline at end of file diff --git a/src/WINDOWS/LIGGGHTS-PUBLIC_VS2012.sln b/src/WINDOWS/LIGGGHTS_VS2013.sln similarity index 96% rename from src/WINDOWS/LIGGGHTS-PUBLIC_VS2012.sln rename to src/WINDOWS/LIGGGHTS_VS2013.sln index a5f1b70a..4baf3165 100644 --- a/src/WINDOWS/LIGGGHTS-PUBLIC_VS2012.sln +++ b/src/WINDOWS/LIGGGHTS_VS2013.sln @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Express 2012 for Windows Desktop Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "STUBS", "STUBS.vcxproj", "{FD83089F-1BF6-455F-9BEA-BB1C21FC137C}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LIGGGHTS", "LIGGGHTS-PUBLIC.vcxproj", "{74AC9767-A52F-47BD-BB26-07C739DA3EA5}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LIGGGHTS", "LIGGGHTS.vcxproj", "{74AC9767-A52F-47BD-BB26-07C739DA3EA5}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/WINDOWS/README-PUBLIC_VS2012.txt b/src/WINDOWS/README-PUBLIC_VS2012.txt deleted file mode 100644 index eefd7fff..00000000 --- a/src/WINDOWS/README-PUBLIC_VS2012.txt +++ /dev/null @@ -1,33 +0,0 @@ -INSTRUCTIONS FOR COMPILING LIGGGHTS WITH VISUAL STUDIO 2010/2012 -(Ultimate, Professional or Express Versions) - -To compile LIGGGHTS open the LIGGGHTS-PUBLIC_VS2012 Solution - -The LIGGGHTS project has configurations to compile either with MPI -support or with MPI stubs. * - -To compile with MPI: - -1. Install MPICH for Windows (http://www.mpich.org/), validate the - corresponding include and lib directories in the project properties - of LIGGGHTS: LIGGGHTS/Properties/Configuration Properties/VC++ Directories ** - -2. Compile LIGGGHTS using Debug or Release configurations from the - provided projects (use x64 for 64bit binary) - -To compile with MPI STUBS - -1. Compile STUBS.vcproj - -2. Compile LIGGGHTS using Debug_STUBS or Release_STUBS configurations -from the provided project (use x64 for 64bit binary) - - -* For Visual Studio versions prior to 2012 the Platform Toolset setting has to -be adjusted for each project. This setting can be changed under: -Properties/Configuration Properties/General/General/Platform Toolset - -** Note: Depending on your MPICH Installation (32bit, 64bit) and your Windows -Installation (32bit, 64bit) you might have to change the 32bit paths from -c:\Program Files (x86)\ to C:\Program Files\. The supplied solution was created -on a 64bit system. \ No newline at end of file diff --git a/src/WINDOWS/README.txt b/src/WINDOWS/README.txt index b1c606ca..b213fd36 100644 --- a/src/WINDOWS/README.txt +++ b/src/WINDOWS/README.txt @@ -1,78 +1,78 @@ -INSTRUCTIONS FOR COMPILING LAMMPS WITH VISUAL STUDIO 2005 +INSTRUCTIONS FOR COMPILING LIGGGHTS WITH VISUAL STUDIO 2010/2012/2013 +(Ultimate, Professional or Express Versions) -The provided project +####################################################################################### +IMPORTANT: If you used Git on Windows to get this code, ensure that Unix-style line +endings are used throughout the project. "Git for Windows" will ask during installation +how it should handle newlines, we recommend Option 2. "Checkout as-is, commit Unix-style +line endings". The simplest way to check if everything is alright is opening +Make.sh in the source folder using a text editor such as Notepad++. Verify that lines +end with LF and not CR LF. +####################################################################################### -LAMMPS.vcproj +####################################################################################### +IMPORTANT: Prior to opening the Visual Studio project, some files must be generated and +updated. This is why the project file only contains lammps.cpp and lammps.h in the +beginning. -includes the minimal package set: KSPACE, MANYBODY, MOLECULE. +LIGGGHTS build routine uses GNU tools before compilation to generate headers. +The easiest way to generate these files is to install Cygwin, a utility which allows +many Unix utilities to run on Windows. Using these ported unix utilties one can +trigger the file generation. -The package set may be reconfiured with the help of the supplied VS -macro (see below). +1. Download the Cygwin installer (https://www.cygwin.com/) +2. Install Cygwin: Beside the core installation, also install Python +2. Open a Cygwin shell and go to source folder (parent folder of this one) -The project has configurations to compile either with MPI support or -with MPI stubs. + $ cd /cygdrive/c/your-windows-path-to-your-liggghts-folder/ -To compile with MPI: +3. Run the following commands in that folder -1. Install MPICH for Windows, specify the corresponding include and - lib directories in MSVS/Tools/Options/Projects and Solutions/VC++ - Directories + $ sh Make.sh style + $ sh Make.sh models -2. Compile LAMMPS using Debug or Release configurations from the - provided projects +4. Verify if files were generated: -To compile with MPI STUBS + $ ls style_* + should output a list of style file headers + + $ cat style_contact_model.h + should output a long list of GRAN_MODEL(....) lines + +5. Finally one must update the Visual Studio project in the WINDOWS folder. To do this, + run the following Python script inside of the WINDOWS folder + + $ cd WINDOWS/ + $ python update_project.py LIGGGHTS.vcxproj + + This will update all headers and implementation files from the LIGGGHTS source + directory and insert them into the Visual Studio project. +####################################################################################### + +To compile LIGGGHTS open the LIGGGHTS_VS2013 Solution + +The LIGGGHTS project has configurations to compile either with MPI +support or with MPI stubs. * + +To compile WITH MPI: + +1. Install MS-MPI by downloading the HPC Pack MS-MPI Redistributable Package + from http://www.microsoft.com/en-us/download/details.aspx?id=41634 + Validate corresponding include and lib directories in the project properties + of LIGGGHTS: LIGGGHTS/Properties/Configuration Properties/VC++ Directories ** + Here is a tutorial on MS-MPI: http://www.cs.ucla.edu/~zhu/tutorial/Using_MS-MPI.pdf + +2. Compile LIGGGHTS using Debug or Release configurations from the + provided projects (use x64 for 64bit binary) + +To compile WITHOUT MPI, but instead using MPI STUBS 1. Compile STUBS.vcproj -2. Compile LAMMPS using Debug_STUBS or Release_STUBS configurations -from the provided project - -To run the code you may need mpich and fftw213 dlls accessible by the -system search (they may be copied to Windows/system32 directory). The -fftw213 dlls can be found in vs9/extra/fftw213 or downloaded from the -fftw site - -To customise the packages via a Visual Basic macro: - -1. Load LAMMPS solution in Visual Studio IDE -2. Select in the main menu "Tools/Macros/Load Macro Project..." - and load the file src/WINDOWS/LAMMPS.vsmacros -3. In the "Macro Explorer" on the right panel open LAMMPS and LAMMPS_settings -4. Double click on "ManagePackages" to run the configuration - macro. Please note that the window for running macro sometimes - opens in the background, so use Alt-TAB to locate it. -5. Configure a custom set of packages and press Ok. Wait till the - macro completes. -6. Rebuild the LAMMPS project - -Before the first build or after an update from LAMMPS src repository -it is recommended to run "ManagePackages" macro an check "Refresh file -list in src filter" to get an up to date list of source files in the -"src" project filter. This may be needed as the file composition in -src may change between LAMMPS releases. - -Some of the packages were not tested to be compatible with VS compiler -or require additional libraries. They are marked with asterics in the -package list displayed when the macro is running. If you wish to try -those packages, install them using the macro and then change the -project properties (libraries, includes, etc.) manually. - -Please note that "ManagePackages" macro works on the project named -LAMMPS. So if you rename the LAMMPS project and still want to use -automatic package configuration, please specify the new name in the -line "Dim LAMMPS_project_name As String =" at the beginning of the -macro code. - -The default package options such as the path to include and library -files, description, etc can also be changed by editing the -"ManagePackages" macro code. To do this right click on -"ManagePackages" in the "Macro Explorer" and select Edit. Then go to -the section named - -"===================== Custom Package options ========================", - -find the required package and change its properties by modyfing the -corresponding PKG_OPTS(...) entry. +2. Compile LIGGGHTS using Debug_STUBS or Release_STUBS configurations +from the provided project (use x64 for 64bit binary) +* For Visual Studio versions prior to 2013 the Platform Toolset setting has to +be adjusted for each project. This setting can be changed under: +Properties/Configuration Properties/General/General/Platform Toolset \ No newline at end of file diff --git a/src/WINDOWS/README_VS2012.txt b/src/WINDOWS/README_VS2012.txt deleted file mode 100644 index 4af2acdf..00000000 --- a/src/WINDOWS/README_VS2012.txt +++ /dev/null @@ -1,33 +0,0 @@ -INSTRUCTIONS FOR COMPILING LIGGGHTS WITH VISUAL STUDIO 2010/2012 -(Ultimate, Professional or Express Versions) - -To compile LIGGGHTS open the LIGGGHTS_VS2012 Solution - -The LIGGGHTS project has configurations to compile either with MPI -support or with MPI stubs. * - -To compile with MPI: - -1. Install MPICH for Windows (http://www.mpich.org/), validate the - corresponding include and lib directories in the project properties - of LIGGGHTS: LIGGGHTS/Properties/Configuration Properties/VC++ Directories ** - -2. Compile LIGGGHTS using Debug or Release configurations from the - provided projects (use x64 for 64bit binary) - -To compile with MPI STUBS - -1. Compile STUBS.vcproj - -2. Compile LIGGGHTS using Debug_STUBS or Release_STUBS configurations -from the provided project (use x64 for 64bit binary) - - -* For Visual Studio versions prior to 2012 the Platform Toolset setting has to -be adjusted for each project. This setting can be changed under: -Properties/Configuration Properties/General/General/Platform Toolset - -** Note: Depending on your MPICH Installation (32bit, 64bit) and your Windows -Installation (32bit, 64bit) you might have to change the 32bit paths from -c:\Program Files (x86)\ to C:\Program Files\. The supplied solution was created -on a 64bit system. \ No newline at end of file diff --git a/src/WINDOWS/STUBS.vcxproj b/src/WINDOWS/STUBS.vcxproj index 379ee136..8659040e 100644 --- a/src/WINDOWS/STUBS.vcxproj +++ b/src/WINDOWS/STUBS.vcxproj @@ -1,5 +1,5 @@  - + Debug_STUBS @@ -26,19 +26,19 @@ StaticLibrary - v110 + v120 StaticLibrary - v110 + v120 StaticLibrary - v110 + v120 StaticLibrary - v110 + v120 diff --git a/src/WINDOWS/settings/style_angle.h b/src/WINDOWS/settings/style_angle.h deleted file mode 100644 index 6ced4aec..00000000 --- a/src/WINDOWS/settings/style_angle.h +++ /dev/null @@ -1,9 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\MOLECULE\angle_charmm.h" -#include "..\..\MOLECULE\angle_cosine.h" -#include "..\..\MOLECULE\angle_cosine_delta.h" -#include "..\..\MOLECULE\angle_cosine_periodic.h" -#include "..\..\MOLECULE\angle_cosine_squared.h" -#include "..\..\MOLECULE\angle_harmonic.h" -#include "..\..\MOLECULE\angle_hybrid.h" -#include "..\..\MOLECULE\angle_table.h" diff --git a/src/WINDOWS/settings/style_atom.h b/src/WINDOWS/settings/style_atom.h deleted file mode 100644 index 597883b3..00000000 --- a/src/WINDOWS/settings/style_atom.h +++ /dev/null @@ -1,12 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\atom_vec_atomic.h" -#include "..\..\atom_vec_charge.h" -#include "..\..\atom_vec_ellipsoid.h" -#include "..\..\atom_vec_hybrid.h" -#include "..\..\atom_vec_line.h" -#include "..\..\atom_vec_sphere.h" -#include "..\..\atom_vec_tri.h" -#include "..\..\MOLECULE\atom_vec_angle.h" -#include "..\..\MOLECULE\atom_vec_bond.h" -#include "..\..\MOLECULE\atom_vec_full.h" -#include "..\..\MOLECULE\atom_vec_molecular.h" diff --git a/src/WINDOWS/settings/style_bond.h b/src/WINDOWS/settings/style_bond.h deleted file mode 100644 index 76a00800..00000000 --- a/src/WINDOWS/settings/style_bond.h +++ /dev/null @@ -1,9 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\bond_hybrid.h" -#include "..\..\MOLECULE\bond_fene.h" -#include "..\..\MOLECULE\bond_fene_expand.h" -#include "..\..\MOLECULE\bond_harmonic.h" -#include "..\..\MOLECULE\bond_morse.h" -#include "..\..\MOLECULE\bond_nonlinear.h" -#include "..\..\MOLECULE\bond_quartic.h" -#include "..\..\MOLECULE\bond_table.h" diff --git a/src/WINDOWS/settings/style_command.h b/src/WINDOWS/settings/style_command.h deleted file mode 100644 index 9f7ada55..00000000 --- a/src/WINDOWS/settings/style_command.h +++ /dev/null @@ -1,16 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\balance.h" -#include "..\..\change_box.h" -#include "..\..\create_atoms.h" -#include "..\..\create_box.h" -#include "..\..\delete_atoms.h" -#include "..\..\delete_bonds.h" -#include "..\..\displace_atoms.h" -#include "..\..\minimize.h" -#include "..\..\read_data.h" -#include "..\..\read_restart.h" -#include "..\..\replicate.h" -#include "..\..\run.h" -#include "..\..\set.h" -#include "..\..\velocity.h" -#include "..\..\write_restart.h" diff --git a/src/WINDOWS/settings/style_compute.h b/src/WINDOWS/settings/style_compute.h deleted file mode 100644 index 14f13441..00000000 --- a/src/WINDOWS/settings/style_compute.h +++ /dev/null @@ -1,44 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\compute_angle_local.h" -#include "..\..\compute_atom_molecule.h" -#include "..\..\compute_bond_local.h" -#include "..\..\compute_centro_atom.h" -#include "..\..\compute_cluster_atom.h" -#include "..\..\compute_cna_atom.h" -#include "..\..\compute_com.h" -#include "..\..\compute_com_molecule.h" -#include "..\..\compute_coord_atom.h" -#include "..\..\compute_dihedral_local.h" -#include "..\..\compute_displace_atom.h" -#include "..\..\compute_erotate_sphere.h" -#include "..\..\compute_group_group.h" -#include "..\..\compute_gyration.h" -#include "..\..\compute_gyration_molecule.h" -#include "..\..\compute_heat_flux.h" -#include "..\..\compute_improper_local.h" -#include "..\..\compute_ke.h" -#include "..\..\compute_ke_atom.h" -#include "..\..\compute_msd.h" -#include "..\..\compute_msd_molecule.h" -#include "..\..\compute_pair.h" -#include "..\..\compute_pair_local.h" -#include "..\..\compute_pe.h" -#include "..\..\compute_pe_atom.h" -#include "..\..\compute_pressure.h" -#include "..\..\compute_property_atom.h" -#include "..\..\compute_property_local.h" -#include "..\..\compute_property_molecule.h" -#include "..\..\compute_rdf.h" -#include "..\..\compute_reduce.h" -#include "..\..\compute_reduce_region.h" -#include "..\..\compute_slice.h" -#include "..\..\compute_stress_atom.h" -#include "..\..\compute_temp.h" -#include "..\..\compute_temp_com.h" -#include "..\..\compute_temp_deform.h" -#include "..\..\compute_temp_partial.h" -#include "..\..\compute_temp_profile.h" -#include "..\..\compute_temp_ramp.h" -#include "..\..\compute_temp_region.h" -#include "..\..\compute_temp_sphere.h" -#include "..\..\compute_ti.h" diff --git a/src/WINDOWS/settings/style_dihedral.h b/src/WINDOWS/settings/style_dihedral.h deleted file mode 100644 index db1ab37c..00000000 --- a/src/WINDOWS/settings/style_dihedral.h +++ /dev/null @@ -1,7 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\MOLECULE\dihedral_charmm.h" -#include "..\..\MOLECULE\dihedral_harmonic.h" -#include "..\..\MOLECULE\dihedral_helix.h" -#include "..\..\MOLECULE\dihedral_hybrid.h" -#include "..\..\MOLECULE\dihedral_multi_harmonic.h" -#include "..\..\MOLECULE\dihedral_opls.h" diff --git a/src/WINDOWS/settings/style_dump.h b/src/WINDOWS/settings/style_dump.h deleted file mode 100644 index db2021e5..00000000 --- a/src/WINDOWS/settings/style_dump.h +++ /dev/null @@ -1,8 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\dump_atom.h" -#include "..\..\dump_cfg.h" -#include "..\..\dump_custom.h" -#include "..\..\dump_dcd.h" -#include "..\..\dump_image.h" -#include "..\..\dump_local.h" -#include "..\..\dump_xyz.h" diff --git a/src/WINDOWS/settings/style_fix.h b/src/WINDOWS/settings/style_fix.h deleted file mode 100644 index 7466ba9c..00000000 --- a/src/WINDOWS/settings/style_fix.h +++ /dev/null @@ -1,69 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\fix_adapt.h" -#include "..\..\fix_addforce.h" -#include "..\..\fix_aveforce.h" -#include "..\..\fix_ave_atom.h" -#include "..\..\fix_ave_correlate.h" -#include "..\..\fix_ave_histo.h" -#include "..\..\fix_ave_spatial.h" -#include "..\..\fix_ave_time.h" -#include "..\..\fix_box_relax.h" -#include "..\..\fix_deform.h" -#include "..\..\fix_deposit.h" -#include "..\..\fix_drag.h" -#include "..\..\fix_dt_reset.h" -#include "..\..\fix_efield.h" -#include "..\..\fix_enforce2d.h" -#include "..\..\fix_evaporate.h" -#include "..\..\fix_external.h" -#include "..\..\fix_gravity.h" -#include "..\..\fix_heat.h" -#include "..\..\fix_indent.h" -#include "..\..\fix_langevin.h" -#include "..\..\fix_lineforce.h" -#include "..\..\fix_minimize.h" -#include "..\..\fix_momentum.h" -#include "..\..\fix_move.h" -#include "..\..\fix_nph.h" -#include "..\..\fix_nph_sphere.h" -#include "..\..\fix_npt.h" -#include "..\..\fix_npt_sphere.h" -#include "..\..\fix_nve.h" -#include "..\..\fix_nve_limit.h" -#include "..\..\fix_nve_noforce.h" -#include "..\..\fix_nve_sphere.h" -#include "..\..\fix_nvt.h" -#include "..\..\fix_nvt_sllod.h" -#include "..\..\fix_nvt_sphere.h" -#include "..\..\fix_orient_fcc.h" -#include "..\..\fix_planeforce.h" -#include "..\..\fix_press_berendsen.h" -#include "..\..\fix_print.h" -#include "..\..\fix_read_restart.h" -#include "..\..\fix_recenter.h" -#include "..\..\fix_respa.h" -#include "..\..\fix_restrain.h" -#include "..\..\fix_rigid.h" -#include "..\..\fix_rigid_nve.h" -#include "..\..\fix_rigid_nvt.h" -#include "..\..\fix_setforce.h" -#include "..\..\fix_shake.h" -#include "..\..\fix_shear_history.h" -#include "..\..\fix_spring.h" -#include "..\..\fix_spring_rg.h" -#include "..\..\fix_spring_self.h" -#include "..\..\fix_store_force.h" -#include "..\..\fix_store_state.h" -#include "..\..\fix_temp_berendsen.h" -#include "..\..\fix_temp_rescale.h" -#include "..\..\fix_thermal_conductivity.h" -#include "..\..\fix_tmd.h" -#include "..\..\fix_ttm.h" -#include "..\..\fix_viscosity.h" -#include "..\..\fix_viscous.h" -#include "..\..\fix_wall_harmonic.h" -#include "..\..\fix_wall_lj126.h" -#include "..\..\fix_wall_lj93.h" -#include "..\..\fix_wall_reflect.h" -#include "..\..\fix_wall_region.h" -#include "..\..\MANYBODY\fix_qeq_comb.h" diff --git a/src/WINDOWS/settings/style_improper.h b/src/WINDOWS/settings/style_improper.h deleted file mode 100644 index 729ae3a7..00000000 --- a/src/WINDOWS/settings/style_improper.h +++ /dev/null @@ -1,5 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\MOLECULE\improper_cvff.h" -#include "..\..\MOLECULE\improper_harmonic.h" -#include "..\..\MOLECULE\improper_hybrid.h" -#include "..\..\MOLECULE\improper_umbrella.h" diff --git a/src/WINDOWS/settings/style_integrate.h b/src/WINDOWS/settings/style_integrate.h deleted file mode 100644 index b3c83a9e..00000000 --- a/src/WINDOWS/settings/style_integrate.h +++ /dev/null @@ -1,3 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\respa.h" -#include "..\..\verlet.h" diff --git a/src/WINDOWS/settings/style_kspace.h b/src/WINDOWS/settings/style_kspace.h deleted file mode 100644 index 86247b3f..00000000 --- a/src/WINDOWS/settings/style_kspace.h +++ /dev/null @@ -1,5 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\KSPACE\ewald.h" -#include "..\..\KSPACE\pppm.h" -#include "..\..\KSPACE\pppm_cg.h" -#include "..\..\KSPACE\pppm_tip4p.h" diff --git a/src/WINDOWS/settings/style_minimize.h b/src/WINDOWS/settings/style_minimize.h deleted file mode 100644 index d7e5368a..00000000 --- a/src/WINDOWS/settings/style_minimize.h +++ /dev/null @@ -1,6 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\min_cg.h" -#include "..\..\min_fire.h" -#include "..\..\min_hftn.h" -#include "..\..\min_quickmin.h" -#include "..\..\min_sd.h" diff --git a/src/WINDOWS/settings/style_pair.h b/src/WINDOWS/settings/style_pair.h deleted file mode 100644 index bd5c8808..00000000 --- a/src/WINDOWS/settings/style_pair.h +++ /dev/null @@ -1,49 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\pair_beck.h" -#include "..\..\pair_born.h" -#include "..\..\pair_born_coul_wolf.h" -#include "..\..\pair_buck.h" -#include "..\..\pair_buck_coul_cut.h" -#include "..\..\pair_coul_cut.h" -#include "..\..\pair_coul_debye.h" -#include "..\..\pair_coul_wolf.h" -#include "..\..\pair_dpd.h" -#include "..\..\pair_dpd_tstat.h" -#include "..\..\pair_gauss.h" -#include "..\..\pair_hybrid.h" -#include "..\..\pair_hybrid_overlay.h" -#include "..\..\pair_lj96_cut.h" -#include "..\..\pair_lj_cubic.h" -#include "..\..\pair_lj_cut.h" -#include "..\..\pair_lj_cut_coul_cut.h" -#include "..\..\pair_lj_cut_coul_debye.h" -#include "..\..\pair_lj_expand.h" -#include "..\..\pair_lj_gromacs.h" -#include "..\..\pair_lj_gromacs_coul_gromacs.h" -#include "..\..\pair_lj_smooth.h" -#include "..\..\pair_lj_smooth_linear.h" -#include "..\..\pair_morse.h" -#include "..\..\pair_soft.h" -#include "..\..\pair_table.h" -#include "..\..\pair_yukawa.h" -#include "..\..\MANYBODY\pair_adp.h" -#include "..\..\MANYBODY\pair_airebo.h" -#include "..\..\MANYBODY\pair_comb.h" -#include "..\..\MANYBODY\pair_eam.h" -#include "..\..\MANYBODY\pair_eam_alloy.h" -#include "..\..\MANYBODY\pair_eam_fs.h" -#include "..\..\MANYBODY\pair_eim.h" -#include "..\..\MANYBODY\pair_rebo.h" -#include "..\..\MANYBODY\pair_sw.h" -#include "..\..\MANYBODY\pair_tersoff.h" -#include "..\..\MANYBODY\pair_tersoff_zbl.h" -#include "..\..\KSPACE\pair_born_coul_long.h" -#include "..\..\KSPACE\pair_buck_coul_long.h" -#include "..\..\KSPACE\pair_coul_long.h" -#include "..\..\KSPACE\pair_lj_charmm_coul_long.h" -#include "..\..\KSPACE\pair_lj_cut_coul_long.h" -#include "..\..\KSPACE\pair_lj_cut_coul_long_tip4p.h" -#include "..\..\MOLECULE\pair_hbond_dreiding_lj.h" -#include "..\..\MOLECULE\pair_hbond_dreiding_morse.h" -#include "..\..\MOLECULE\pair_lj_charmm_coul_charmm.h" -#include "..\..\MOLECULE\pair_lj_charmm_coul_charmm_implicit.h" diff --git a/src/WINDOWS/settings/style_region.h b/src/WINDOWS/settings/style_region.h deleted file mode 100644 index 3d060c4d..00000000 --- a/src/WINDOWS/settings/style_region.h +++ /dev/null @@ -1,9 +0,0 @@ -// File is generaged by ListModules() macro -#include "..\..\region_block.h" -#include "..\..\region_cone.h" -#include "..\..\region_cylinder.h" -#include "..\..\region_intersect.h" -#include "..\..\region_plane.h" -#include "..\..\region_prism.h" -#include "..\..\region_sphere.h" -#include "..\..\region_union.h" diff --git a/src/abstract_mesh.h b/src/abstract_mesh.h index 77c106ab..ba96ce85 100644 --- a/src/abstract_mesh.h +++ b/src/abstract_mesh.h @@ -115,6 +115,8 @@ namespace LAMMPS_NS virtual void setVerbose() = 0; + virtual void check_element_property_consistency() = 0; + //NP *************************************** //NP interface to SurfaceMesh //NP *************************************** diff --git a/src/associative_pointer_array.h b/src/associative_pointer_array.h index eee3fcd7..e74d2255 100644 --- a/src/associative_pointer_array.h +++ b/src/associative_pointer_array.h @@ -61,12 +61,15 @@ class AssociativePointerArray int size(); + bool sameLength(int _len); + inline void copyElement(int from, int to); inline void addUninitializedElement(); inline void addZeroElement(); inline void deleteElement(int n); inline void deleteForwardElement(int n,bool scale,bool translate,bool rotate); inline void deleteRestartElement(int n,bool scale,bool translate,bool rotate); + inline void deleteRestartGlobal(bool scale,bool translate,bool rotate); inline void clearReverse(bool scale,bool translate,bool rotate); diff --git a/src/associative_pointer_array_I.h b/src/associative_pointer_array_I.h index cd5c8967..de800e02 100644 --- a/src/associative_pointer_array_I.h +++ b/src/associative_pointer_array_I.h @@ -88,6 +88,19 @@ content_[index] = content_[numElem_]; } + /* ---------------------------------------------------------------------- + check if all have the same length + ------------------------------------------------------------------------- */ + + template + bool AssociativePointerArray::sameLength(int _len) + { + for(int i = 0; i < numElem_; i++) + if(content_[i]->size() != _len) + return false; + return true; + } + /* ---------------------------------------------------------------------- get pointer to property ------------------------------------------------------------------------- */ @@ -240,6 +253,17 @@ content_[i]->delRestart(n,scale,translate,rotate); } + /* ---------------------------------------------------------------------- + delete restart properties + ------------------------------------------------------------------------- */ + + template + void AssociativePointerArray::deleteRestartGlobal(bool scale,bool translate,bool rotate) + { + for(int i=0;idelRestart(scale,translate,rotate); + } + /* ---------------------------------------------------------------------- clear reverse properties, i.e. reset all of them to 0 ------------------------------------------------------------------------- */ diff --git a/src/bounding_box.h b/src/bounding_box.h index 2e0ab4b6..93909501 100644 --- a/src/bounding_box.h +++ b/src/bounding_box.h @@ -117,7 +117,7 @@ class BoundingBox if(zLo < sublo[2]) zLo = sublo[2]; - if(xHi > subhi[2]) + if(zHi > subhi[2]) zHi = subhi[2]; } diff --git a/src/cfd_datacoupling.h b/src/cfd_datacoupling.h index e28b3bc9..b8085cd3 100644 --- a/src/cfd_datacoupling.h +++ b/src/cfd_datacoupling.h @@ -62,8 +62,8 @@ class CfdDatacoupling : protected Pointers { void grow_(); // used to find properties - void* find_pull_property(const char *name, const char *type, int &len1, int &len2); - void* find_push_property(const char *name, const char *type, int &len1, int &len2); + virtual void* find_pull_property(const char *name, const char *type, int &len1, int &len2); + virtual void* find_push_property(const char *name, const char *type, int &len1, int &len2); void* find_property(int, const char*, const char*, int&, int&); // data members diff --git a/src/cohesion_model_hamaker.h b/src/cohesion_model_hamaker.h index 5897d046..b8a9bf02 100644 --- a/src/cohesion_model_hamaker.h +++ b/src/cohesion_model_hamaker.h @@ -117,7 +117,7 @@ namespace ContactModels { // * the calculation of the displacement (hIJ) is not required (no cdata.r) const double ri = cdata.radi; const double rj = cdata.radj; - const double reff = (ri*rj)/(ri+rj); + const double reff = cdata.is_wall ? cdata.radi : (ri*rj/(ri+rj)); const int itype = cdata.itype; const int jtype = cdata.jtype; @@ -166,8 +166,8 @@ namespace ContactModels { const int itype = atom->type[cdata.i]; const int jtype = atom->type[cdata.j]; - const double reff = (ri*rj)/(ri+rj); - const double hIJ = (r-ri-rj); + const double reff = cdata.is_wall ? ri : (ri*rj/(ri+rj)); + const double hIJ = cdata.is_wall ? (r-ri) : (r-ri-rj); const double Fn_coh = calcCohesiveForce(cdata,hIJ, reff, itype, jtype); diff --git a/src/container_base.cpp b/src/container_base.cpp index 4f9c3433..1daab938 100644 --- a/src/container_base.cpp +++ b/src/container_base.cpp @@ -41,7 +41,8 @@ using namespace LAMMPS_NS; communicationType_(COMM_TYPE_MANUAL), refFrame_(REF_FRAME_UNDEFINED), restartType_(RESTART_TYPE_UNDEFINED), - scalePower_(-1) + scalePower_(-1), + useDefault_(false) { } @@ -50,10 +51,14 @@ using namespace LAMMPS_NS; communicationType_(COMM_TYPE_MANUAL), refFrame_(REF_FRAME_UNDEFINED), restartType_(RESTART_TYPE_UNDEFINED), - scalePower_(-1) + scalePower_(-1), + useDefault_(false) { - id_ = new char[strlen(_id)+1]; - strcpy(id_,_id); + if(id_) + { + id_ = new char[strlen(_id)+1]; + strcpy(id_,_id); + } } ContainerBase::ContainerBase(const char *_id, const char* _comm, const char* _ref, const char *_restart,int _scalePower) @@ -61,7 +66,8 @@ using namespace LAMMPS_NS; communicationType_(COMM_TYPE_MANUAL), refFrame_(REF_FRAME_UNDEFINED), restartType_(RESTART_TYPE_UNDEFINED), - scalePower_(-1) + scalePower_(-1), + useDefault_(false) { setProperties(_id, _comm, _ref,_restart,_scalePower); } @@ -71,7 +77,8 @@ using namespace LAMMPS_NS; communicationType_(orig.communicationType_), refFrame_(orig.refFrame_), restartType_(orig.restartType_), - scalePower_(orig.scalePower_) + scalePower_(orig.scalePower_), + useDefault_(orig.useDefault_) { } diff --git a/src/container_base.h b/src/container_base.h index 1fe19225..9395c3c9 100644 --- a/src/container_base.h +++ b/src/container_base.h @@ -71,6 +71,7 @@ namespace LAMMPS_NS virtual void del(int n) = 0; virtual void delForward(int n,bool scale,bool translate,bool rotate) = 0; virtual void delRestart(int n,bool scale,bool translate,bool rotate) = 0; + virtual void delRestart(bool scale,bool translate,bool rotate) = 0; virtual void clearReverse(bool scale,bool translate,bool rotate) = 0; virtual bool setFromContainer(ContainerBase *cont) = 0; @@ -80,6 +81,11 @@ namespace LAMMPS_NS virtual void moveElement(int i,double *dx) = 0; virtual void rotate(double *dQ) = 0; + virtual void setToDefault(int n) = 0; + + inline bool useDefault() + { return useDefault_ ; } + // buffer functions for parallelization virtual int bufSize(int operation = OPERATION_UNDEFINED, @@ -132,6 +138,8 @@ namespace LAMMPS_NS int restartType_; int scalePower_; + bool useDefault_; + private: ContainerBase(); diff --git a/src/custom_value_tracker.cpp b/src/custom_value_tracker.cpp index 57a5b383..8d5a8409 100644 --- a/src/custom_value_tracker.cpp +++ b/src/custom_value_tracker.cpp @@ -60,6 +60,20 @@ using namespace LAMMPS_NS; return capacityElement_; } + /* ---------------------------------------------------------------------- + check if all containers have same length + ------------------------------------------------------------------------- */ + + void CustomValueTracker::check_element_property_consistency(int _len) + { + if (!elementProperties_.sameLength(_len)) + { + error->one(FLERR,"all element properties must have the same length.\n" + "For meshes, all elem properties with restart must be added in post_create_pre_restart().\n" + "For meshes, all elem properties without restart must be added after the constructor()\n"); + } + } + /* ---------------------------------------------------------------------- remove property ------------------------------------------------------------------------- */ diff --git a/src/custom_value_tracker.h b/src/custom_value_tracker.h index a0d16be6..c549fd09 100644 --- a/src/custom_value_tracker.h +++ b/src/custom_value_tracker.h @@ -50,6 +50,7 @@ namespace LAMMPS_NS T* getElementProperty(const char *_id); inline ContainerBase* getElementPropertyBase(const char *_id); + inline ContainerBase* getElementPropertyBase(int i); inline int getElementPropertyIndex(const char *_id); @@ -58,6 +59,8 @@ namespace LAMMPS_NS void removeElementProperty(const char *_id); + void check_element_property_consistency(int _len); + // global (e.g. mesh) properties template @@ -80,6 +83,7 @@ namespace LAMMPS_NS inline void deleteElement(int i); inline void deleteForwardElement(int i,bool scale,bool translate,bool rotate); inline void deleteRestartElement(int i,bool scale,bool translate,bool rotate); + inline void deleteRestartGlobal(bool scale,bool translate,bool rotate); void clearReverse(bool scale,bool translate,bool rotate); void storeOrig(); diff --git a/src/custom_value_tracker_I.h b/src/custom_value_tracker_I.h index 5cd45390..45634527 100644 --- a/src/custom_value_tracker_I.h +++ b/src/custom_value_tracker_I.h @@ -58,9 +58,12 @@ } // allocate memory and initialize - //NP have to do this in case of mesh, since elements are generated before properties + //NP have to do this in case of mesh, since elements are generated before properties at times + //NP (restart vs non-restart) if(ownerMesh_) + { elementProperties_.getPointerById(_id)->addUninitialized(ownerMesh_->sizeLocal()+ownerMesh_->sizeGhost()); + } if(_init_len > 0) elementProperties_.getPointerById(_id)->addUninitialized(_init_len); @@ -128,6 +131,11 @@ return elementProperties_.getBasePointerById(_id); } + inline ContainerBase* CustomValueTracker::getElementPropertyBase(int i) + { + return elementProperties_.getBasePointerByIndex(i); + } + inline int CustomValueTracker::getElementPropertyIndex(const char *_id) { return elementProperties_.idToIndex(_id); @@ -237,6 +245,16 @@ elementProperties_.deleteRestartElement(i,scale,translate,rotate); } + /* ---------------------------------------------------------------------- + delete global restart properties + ------------------------------------------------------------------------- */ + + void CustomValueTracker::deleteRestartGlobal(bool scale,bool translate,bool rotate) + { + globalProperties_.deleteRestartGlobal(scale,translate,rotate); + globalProperties_orig_.deleteRestartGlobal(scale,translate,rotate); + } + /* ---------------------------------------------------------------------- move element i ------------------------------------------------------------------------- */ diff --git a/src/domain.h b/src/domain.h index 6f61a50d..99e48c0a 100644 --- a/src/domain.h +++ b/src/domain.h @@ -169,6 +169,7 @@ class Domain : protected Pointers { int is_in_subdomain(double* pos); //NP modified C.K. int is_in_extended_subdomain(double* pos); //NP modified C.K. double dist_subbox_borders(double* pos); //NP modified C.K. + void min_subbox_extent(double &min_extent,int &dim); //NP modified C.K. int is_periodic_ghost(int i); //NP modified C.K. bool is_owned_or_first_ghost(int i); //NP modified C.K. diff --git a/src/domain_I.h b/src/domain_I.h index d5704a9b..a5daea59 100644 --- a/src/domain_I.h +++ b/src/domain_I.h @@ -134,6 +134,21 @@ inline double Domain::dist_subbox_borders(double* pos) //NP modified C.K. return dhi; } +/* ---------------------------------------------------------------------- + return smallest extent ob subbox +------------------------------------------------------------------------- */ + +inline void Domain::min_subbox_extent(double &min_extent,int &dim) //NP modified C.K. +{ + if(is_wedge) + error->one(FLERR,"missing implementation"); + + double delta[3]; + vectorSubtract3D(subhi,sublo,delta); + /*NL*/ //printVec3D(screen,"delta",delta); + min_extent = vectorMin3D(delta,dim); +} + /* ---------------------------------------------------------------------- domain check - not used very often, so not inlined ------------------------------------------------------------------------- */ diff --git a/src/dump_atom_vtk.h b/src/dump_atom_vtk.h index ef82eca3..27b90746 100644 --- a/src/dump_atom_vtk.h +++ b/src/dump_atom_vtk.h @@ -24,7 +24,7 @@ Anton Gladky(TU Bergakademie Freiberg), gladky.anton@gmail.com ------------------------------------------------------------------------- */ -#ifdef LAMMPS_VTK +#if defined(LAMMPS_VTK) // NP do not use #ifdef here (VS C++ bug) #ifdef DUMP_CLASS DumpStyle(atom/vtk,DumpATOMVTK) diff --git a/src/dump_custom_vtk.h b/src/dump_custom_vtk.h index ed6e0dd2..237aec17 100644 --- a/src/dump_custom_vtk.h +++ b/src/dump_custom_vtk.h @@ -22,9 +22,10 @@ /* ---------------------------------------------------------------------- Contributing author: Daniel Queteschiner, daniel.queteschiner@dcs-computing.com + Richard Berger, richard.berger@jku.at ------------------------------------------------------------------------- */ -#ifdef LAMMPS_VTK +#if defined(LAMMPS_VTK) //NP do not use #ifdef here (VS C++ bug) #ifdef DUMP_CLASS DumpStyle(custom/vtk,DumpCustomVTK) diff --git a/src/fix_bond_create_gran.cpp b/src/fix_bond_create_gran.cpp index ab7d6318..e2450fcd 100644 --- a/src/fix_bond_create_gran.cpp +++ b/src/fix_bond_create_gran.cpp @@ -90,24 +90,24 @@ FixBondCreateGran::FixBondCreateGran(LAMMPS *lmp, int narg, char **arg) : while (iarg < narg) { if (strcmp(arg[iarg],"iparam") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal fix bond/create command"); - imaxbond = atoi(arg[iarg+1]); - inewtype = atoi(arg[iarg+2]); + imaxbond = force->inumeric(FLERR,arg[iarg+1]); + inewtype = force->inumeric(FLERR,arg[iarg+2]); if (imaxbond < 0) error->all(FLERR,"Illegal fix bond/create command"); if (inewtype < 1 || inewtype > atom->ntypes) error->all(FLERR,"Invalid atom type in fix bond/create command"); iarg += 3; } else if (strcmp(arg[iarg],"jparam") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal fix bond/create command"); - jmaxbond = atoi(arg[iarg+1]); - jnewtype = atoi(arg[iarg+2]); + jmaxbond = force->inumeric(FLERR,arg[iarg+1]); + jnewtype = force->inumeric(FLERR,arg[iarg+2]); if (jmaxbond < 0) error->all(FLERR,"Illegal fix bond/create command"); if (jnewtype < 1 || jnewtype > atom->ntypes) error->all(FLERR,"Invalid atom type in fix bond/create command"); iarg += 3; } else if (strcmp(arg[iarg],"prob") == 0) { if (iarg+3 > narg) error->all(FLERR,"Illegal fix bond/create command"); - fraction = atof(arg[iarg+1]); - seed = atoi(arg[iarg+2]); + fraction = force->numeric(FLERR,arg[iarg+1]); + seed = force->inumeric(FLERR,arg[iarg+2]); if (fraction < 0.0 || fraction > 1.0) error->all(FLERR,"Illegal fix bond/create command"); if (seed <= 0) error->all(FLERR,"Illegal fix bond/create command"); diff --git a/src/fix_check_timestep_gran.cpp b/src/fix_check_timestep_gran.cpp index f9d2c084..5f97a13b 100644 --- a/src/fix_check_timestep_gran.cpp +++ b/src/fix_check_timestep_gran.cpp @@ -222,6 +222,9 @@ void FixCheckTimestepGran::calc_rayleigh_hertz_estims() mesh = (mesh_list[imesh])->triMesh(); if(mesh->isMoving()) { + // check if perElementProperty 'v' exists + if (mesh->prop().getElementPropertyIndex("v") == -1) + error->one(FLERR,"Internal error - mesh has no perElementProperty 'v' \n"); // loop local elements only for(int itri=0;itrisizeLocal();itri++) for(int inode=0;inode<3;inode++) diff --git a/src/fix_contact_history_mesh.cpp b/src/fix_contact_history_mesh.cpp index 624f6a00..d46f3373 100644 --- a/src/fix_contact_history_mesh.cpp +++ b/src/fix_contact_history_mesh.cpp @@ -312,6 +312,8 @@ void FixContactHistoryMesh::pre_force(int dummy) //NP get new storage for partner at next //NP get new storage for contact history at next partner_[i] = ipage_next->get(nneighs_next); + if (!partner_[i]) + error->one(FLERR,"mesh neighbor list overflow, boost neigh_modify one and/or page"); vectorInitializeN(partner_[i],nneighs_next,-1); /*NL*/ //fprintf(screen,"nneighs_next %d\n",nneighs_next); contacthistory_[i] = dpage_next->get(nneighs_next*dnum_); diff --git a/src/fix_dummy.h b/src/fix_dummy.h index 701dd8fb..25a0e204 100644 --- a/src/fix_dummy.h +++ b/src/fix_dummy.h @@ -2,6 +2,7 @@ #define LMP_FIX_DUMMY_H #include "fix_rigid.h" +#include "custom_value_tracker.h" namespace LAMMPS_NS { @@ -23,6 +24,12 @@ class MultisphereParallel { return 0.; } + inline class CustomValueTracker& prop() + { + LAMMPS *dptr = 0; + return *(new CustomValueTracker(dptr)); + } + inline double mass(int i) { return 0.; @@ -48,6 +55,8 @@ class FixMultisphere : public Fix { void* extract(const char*& a, int& b, int& c) {return NULL;} + void release(int,double*,double*) {} + int calc_n_steps(int iatom,double *p_ref,double *normalvec,double *v_normal) { return 0; } diff --git a/src/fix_insert.cpp b/src/fix_insert.cpp index 6dbf4101..0bdc8c37 100644 --- a/src/fix_insert.cpp +++ b/src/fix_insert.cpp @@ -605,7 +605,20 @@ void FixInsert::pre_exchange() else if(ninsert_this < 0) { /*NL*/ //fprintf(screen,"ninsert_this %d\n",ninsert_this); - error->one(FLERR,"Particle insertion: Internal error"); + error->fix_error(FLERR,this,"Particle insertion: Internal error"); + } + + double min_subbox_extent; + int min_dim; + domain->min_subbox_extent(min_subbox_extent,min_dim); + + if(min_subbox_extent < 2.2 *max_r_bound()) + { + char msg[200]; + sprintf(msg,"Particle insertion on proc %d: sub-domain too small to insert particles: \nMax. bounding " + "sphere diameter is %f sub-domain extent in %s direction is only %f ", + comm->me,2.*max_r_bound(),0==min_dim?"x":(1==min_dim?"y":"z"),min_subbox_extent); + error->warning(FLERR,msg); } /*NL*/ if(LMP_DEBUGMODE_FIXINSERT) {MPI_Barrier(world); fprintf(LMP_DEBUG_OUT_FIXINSERT,"FixInsert::pre_exchange 4a\n");} diff --git a/src/fix_insert_stream.cpp b/src/fix_insert_stream.cpp index 58156230..cf43d92c 100644 --- a/src/fix_insert_stream.cpp +++ b/src/fix_insert_stream.cpp @@ -285,7 +285,7 @@ void FixInsertStream::calc_insertion_properties() { // no duration allowed here (checked before) - if(extrude_length < 3.*max_r_bound()) + if(extrude_length < 3.*max_r_bound() && (all_in_flag || check_ol_flag)) error->fix_error(FLERR,this,"'extrude_length' is too small"); // add TINY for resolving round-off insert_every = static_cast((extrude_length+FIX_INSERT_STREAM_TINY)/(dt*vectorMag3D(v_normal))); diff --git a/src/fix_massflow_mesh.cpp b/src/fix_massflow_mesh.cpp index 04b9b83b..e53a58bc 100644 --- a/src/fix_massflow_mesh.cpp +++ b/src/fix_massflow_mesh.cpp @@ -32,6 +32,7 @@ #include "error.h" #include "fix_mesh_surface.h" #include "fix_neighlist_mesh.h" +#include "fix_multisphere.h" #include "fix_property_atom.h" #include "mpi_liggghts.h" #include "math_extra_liggghts.h" @@ -55,7 +56,8 @@ FixMassflowMesh::FixMassflowMesh(LAMMPS *lmp, int narg, char **arg) : once_(false), mass_(0.), nparticles_(0), - ignore_ms_(false), + fix_property_(0), + property_sum_(0.), screenflag_(false), fp_(0), mass_last_(0.), @@ -65,7 +67,10 @@ FixMassflowMesh::FixMassflowMesh(LAMMPS *lmp, int narg, char **arg) : reset_t_count_(true), delete_atoms_(false), mass_deleted_(0.), - nparticles_deleted_(0) + nparticles_deleted_(0), + fix_ms_(0), + ms_(0), + ms_counter_(0) { vectorZeroize3D(nvec_); vectorZeroize3D(pref_); @@ -99,6 +104,12 @@ FixMassflowMesh::FixMassflowMesh(LAMMPS *lmp, int narg, char **arg) : if(!fix_mesh_) error->fix_error(FLERR,this,"fix mesh ID does not exist"); hasargs = true; + } else if(strcmp(arg[iarg],"sum_property") == 0) { + if(narg < iarg+2) + error->fix_error(FLERR,this,"not enough arguments for 'sum_property'"); + iarg++; + fix_property_ = static_cast(modify->find_fix_property(arg[iarg++],"property/atom","scalar",0,0,style)); + hasargs = true; } else if(strcmp(arg[iarg],"count") == 0) { if(narg < iarg+2) error->fix_error(FLERR,this,"not enough arguments for 'insert_stream'"); @@ -164,14 +175,6 @@ FixMassflowMesh::FixMassflowMesh(LAMMPS *lmp, int narg, char **arg) : else error->all(FLERR,"Illegal delete command"); iarg += 2; hasargs = true; - } else if (strcmp(arg[iarg],"ignore_ms") == 0) { - if(narg < iarg+2) - error->fix_error(FLERR,this,"Illegal keyword entry"); - if (strcmp(arg[iarg+1],"yes") == 0) ignore_ms_ = true; - else if (strcmp(arg[iarg+1],"no") == 0) ignore_ms_ = false; - else error->fix_error(FLERR,this,"unknown keyword"); - iarg += 2; - hasargs = true; } else error->fix_error(FLERR,this,"unknown keyword"); } @@ -210,6 +213,8 @@ FixMassflowMesh::FixMassflowMesh(LAMMPS *lmp, int narg, char **arg) : vector_flag = 1; size_vector = 6; + if(fix_property_) + size_vector = 7; global_freq = 1; //NP available always } @@ -245,6 +250,21 @@ void FixMassflowMesh::post_create() // add neighbor list fix_neighlist_ = fix_mesh_->createOtherNeighList(igroup,id); + + // need to find multisphere here to be able to add property + + fix_ms_ = static_cast(modify->find_fix_style_strict("multisphere",0)); + if(fix_ms_) + { + ms_ = &fix_ms_->data(); + ms_counter_ = ms_->prop().addElementProperty< ScalarContainer >("counter_ms","comm_exchange_borders","frame_invariant", "restart_yes"); + ms_counter_->setDefaultValue(-1); + + if(delete_atoms_) + error->fix_error(FLERR,this,"can not use 'delete_atoms' with fix multisphere"); + if(!once_) + error->fix_error(FLERR,this,"must use 'count once' with fix multisphere"); + } } /* ---------------------------------------------------------------------- */ @@ -263,11 +283,11 @@ void FixMassflowMesh::init() if (atom->rmass_flag == 0) error->fix_error(FLERR,this,"requires atoms have mass"); - if(modify->n_fixes_style("multisphere") && !ignore_ms_) - error->fix_error(FLERR,this,"does not support multi-sphere"); - if(delete_atoms_ && 1 != atom->map_style) error->fix_error(FLERR,this,"requires an atom map of type 'array', via an 'atom_modify map array' command"); + + if(!fix_ms_ && static_cast(modify->find_fix_style_strict("multisphere",0))) + error->fix_error(FLERR,this,"fix multisphere must come before fix massflow/mesh in input script"); } /* ---------------------------------------------------------------------- */ @@ -311,13 +331,14 @@ void FixMassflowMesh::post_integrate() double dot,delta[3]; double mass_this = 0.; int nparticles_this = 0.; + double property_this = 0.; double deltan; int *tag = atom->tag; class FixPropertyAtom* fix_color=static_cast(modify->find_fix_property("color","property/atom","scalar",0,0,style,false)); - bool fixColFound = false; + bool fixColFound = false; if (fix_color) fixColFound=true; - + TriMesh *mesh = fix_mesh_->triMesh(); int nTriAll = mesh->sizeLocal() + mesh->sizeGhost(); @@ -331,6 +352,9 @@ void FixMassflowMesh::post_integrate() reset_t_count_ = true; } + /*NL*///if(fix_property_) + /*NL*/// fprintf(screen,"FOUNDE PROP, id %s style %s\n",fix_property_->id,fix_property_->style); + // loop owned and ghost triangles // count only if owned particle @@ -350,9 +374,10 @@ void FixMassflowMesh::post_integrate() // skip ghost particles if(iPart >= nlocal) continue; - // in case of once_ == true, ignore - // everything which has been already counted - if(compDouble(counter[iPart],2.)) continue; + const int ibody = fix_ms_ ? ( (fix_ms_->belongs_to(iPart) > -1) ? (ms_->map(fix_ms_->belongs_to(iPart))) : -1 ) : -1; + + // in case of once_ == true, ignore everything which has been already counted + if((ibody > -1) ? ((*ms_counter_)(ibody) == 2) : (compDouble(counter[iPart],2.)) ) continue; if(havePointAtOutlet_) { @@ -376,9 +401,12 @@ void FixMassflowMesh::post_integrate() } // first-time, just set 0 or 1 depending on what side of the mesh - if(compDouble(counter[iPart],-1.)) + if((ibody > -1) ? ((*ms_counter_)(ibody) == -1) : (compDouble(counter[iPart],-1.)) ) { - counter[iPart] = (dot <= 0.) ? 0. : 1.; + if(ibody > -1) + (*ms_counter_)(ibody) = (dot <= 0.) ? 0. : 1.; + else + counter[iPart] = (dot <= 0.) ? 0. : 1.; /*NL*/ //if(523 == atom->tag[iPart]) fprintf(screen," 1 counter set to %f\n",counter[iPart]); continue; } @@ -386,10 +414,18 @@ void FixMassflowMesh::post_integrate() // particle is now on nvec_ side if(dot > 0.) { - if(compDouble(counter[iPart],0.)) //particle was not on nvec_ side before + //particle was not on nvec_ side before + if((ibody > -1) ? ((*ms_counter_)(ibody) == 0) : (compDouble(counter[iPart],0.)) ) // compDouble(counter[iPart],0.)) { + //NP each particle holds whole MS mass mass_this += rmass[iPart]; nparticles_this ++; + if(fix_property_) + { + /*NL*/ //fprintf(screen,"adding %e\n",fix_property_->vector_atom[iPart]); + property_this += fix_property_->vector_atom[iPart]; + } + if(delete_atoms_) { atom_tags_delete_.push_back(atom->tag[iPart]); @@ -400,19 +436,19 @@ void FixMassflowMesh::post_integrate() tag[iPart],2.*radius[iPart]/force->cg(), x[iPart][0],x[iPart][1],x[iPart][2], v[iPart][0],v[iPart][1],v[iPart][2]); - if (fp_) + if(fp_) { if (fixColFound) { - fprintf(fp_," %d %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g %4.0g \n ", + fprintf(fp_," %d %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g %4.0g \n ", tag[iPart],2.*radius[iPart]/force->cg(), x[iPart][0],x[iPart][1],x[iPart][2], v[iPart][0],v[iPart][1],v[iPart][2], fix_color->vector_atom[iPart]); } else - { - fprintf(fp_," %d %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g \n ", + { + fprintf(fp_," %d %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g %4.4g \n ", tag[iPart],2.*radius[iPart]/force->cg(), x[iPart][0],x[iPart][1],x[iPart][2], v[iPart][0],v[iPart][1],v[iPart][2]); @@ -421,23 +457,32 @@ void FixMassflowMesh::post_integrate() } } - counter[iPart] = once_ ? 2. : 1.; + if(ibody > -1) + (*ms_counter_)(ibody) = once_ ? 2. : 1.; + else + counter[iPart] = once_ ? 2. : 1.; /*NL*/ //if(523 == atom->tag[iPart]) fprintf(screen," 2 counter set to %f\n",counter[iPart]); } else // dot <= 0 { - counter[iPart] = 0.; + if(ibody > -1) + (*ms_counter_)(ibody) = 0; + else + counter[iPart] = 0.; /*NL*/ //if(523 == atom->tag[iPart]) fprintf(screen," 3 counter set to %f\n",counter[iPart]); } - } } MPI_Sum_Scalar(mass_this,world); MPI_Sum_Scalar(nparticles_this,world); + if(fix_property_) MPI_Sum_Scalar(property_this,world); + + /*NL*/ //fprintf(screen,"property_this %e\n",property_this); mass_ += mass_this; nparticles_ += nparticles_this; + property_sum_ += property_this; } @@ -561,6 +606,8 @@ double FixMassflowMesh::compute_vector(int index) return mass_deleted_; if(index == 5) return static_cast(nparticles_deleted_); + if(index == 6 && fix_property_) + return property_sum_; return 0.; } diff --git a/src/fix_massflow_mesh.h b/src/fix_massflow_mesh.h index e1a39b1f..af27f306 100644 --- a/src/fix_massflow_mesh.h +++ b/src/fix_massflow_mesh.h @@ -75,10 +75,13 @@ class FixMassflowMesh : public Fix { // counted only once bool once_; + // mass and particles which was counted double mass_; int nparticles_; - bool ignore_ms_; + // additional property to sum + class FixPropertyAtom *fix_property_; + double property_sum_; // data write bool screenflag_; @@ -96,6 +99,10 @@ class FixMassflowMesh : public Fix { double mass_deleted_; double nparticles_deleted_; + class FixMultisphere* fix_ms_; + class MultisphereParallel *ms_; + class ScalarContainer *ms_counter_; + }; //end class } diff --git a/src/fix_mesh.cpp b/src/fix_mesh.cpp index 6390cba2..2f96bc0d 100644 --- a/src/fix_mesh.cpp +++ b/src/fix_mesh.cpp @@ -183,7 +183,10 @@ FixMesh::~FixMesh() void FixMesh::post_create() { - + // check if all element property container have same length + // could potentially be whacked by adding element properties + // at the wrong place in code + mesh_->check_element_property_consistency(); } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_mesh_surface_stress.cpp b/src/fix_mesh_surface_stress.cpp index 85ba1990..543429dd 100644 --- a/src/fix_mesh_surface_stress.cpp +++ b/src/fix_mesh_surface_stress.cpp @@ -120,26 +120,85 @@ FixMeshSurfaceStress::~FixMeshSurfaceStress() { } + /* ---------------------------------------------------------------------- */ void FixMeshSurfaceStress::post_create_pre_restart() { + //NP called after constructor and before restart + //NP i.e. no restart: mesh elements present at this point + //NP restart: no mesh elements present because created in restart() + //Np -->register properties and set values for non-restart properties here + if(stress_flag_) - initStress(); + regStress(); if(wear_flag_) - initWear(); + regWear(); } /* ---------------------------------------------------------------------- */ +//NP in case of no restart, mem for properties is allocated directly +//NP by addElementProperty because mesh elements are already present + +//NP restart allocates mem for all element properties (unititialized) +//NP (callback via addElement), but are unitilized, so have to init +//NP them in post_create + +/* ---------------------------------------------------------------------- */ + void FixMeshSurfaceStress::post_create() { + //NP called after constructor and restart + //NP i.e. no restart: mesh elements present at this point + //NP restart: no mesh elements present because created in restart() + //Np --> set values for no-restart properties here + + if(stress_flag_) + zeroizeStress(); + + if(wear_flag_) + zeroizeWear(); + FixMeshSurface::post_create(); } /* ---------------------------------------------------------------------- */ +void FixMeshSurfaceStress::regStress() +{ + mesh()->prop().addElementProperty >("f","comm_reverse","frame_invariant","restart_no"); + mesh()->prop().addElementProperty >("sigma_n","comm_none","frame_invariant","restart_no"); + mesh()->prop().addElementProperty >("sigma_t","comm_none","frame_invariant","restart_no"); +} +/* ---------------------------------------------------------------------- */ + +void FixMeshSurfaceStress::zeroizeStress() +{ + mesh()->prop().getElementProperty >("f")->setAll(0.); + mesh()->prop().getElementProperty >("sigma_n")->setAll(0.); + mesh()->prop().getElementProperty >("sigma_t")->setAll(0.); +} + +/* ---------------------------------------------------------------------- */ + +void FixMeshSurfaceStress::regWear() +{ + mesh()->prop().addElementProperty >("wear","comm_exchange_borders","frame_invariant","restart_yes"); + mesh()->prop().getElementProperty >("wear")->setAll(0.); + mesh()->prop().addElementProperty >("wear_step","comm_reverse","frame_invariant","restart_no"); +} + +/* ---------------------------------------------------------------------- */ + +void FixMeshSurfaceStress::zeroizeWear() +{ + mesh()->prop().getElementProperty >("wear_step")->setAll(0.); +} + +/* ---------------------------------------------------------------------- */ + void FixMeshSurfaceStress::init() { if(stress_flag_) @@ -178,28 +237,6 @@ void FixMeshSurfaceStress::setup_pre_force(int vflag) /* ---------------------------------------------------------------------- */ -void FixMeshSurfaceStress::initStress() -{ - mesh()->prop().addElementProperty >("f","comm_reverse","frame_invariant","restart_no"); - mesh()->prop().getElementProperty >("f")->setAll(0.); - mesh()->prop().addElementProperty >("sigma_n","comm_none","frame_invariant","restart_no"); - mesh()->prop().getElementProperty >("sigma_n")->setAll(0.); - mesh()->prop().addElementProperty >("sigma_t","comm_none","frame_invariant","restart_no"); - mesh()->prop().getElementProperty >("sigma_t")->setAll(0.); -} - -/* ---------------------------------------------------------------------- */ - -void FixMeshSurfaceStress::initWear() -{ - mesh()->prop().addElementProperty >("wear","comm_exchange_borders","frame_invariant","restart_yes"); - mesh()->prop().getElementProperty >("wear")->setAll(0.); - mesh()->prop().addElementProperty >("wear_step","comm_reverse","frame_invariant","restart_no"); - mesh()->prop().getElementProperty >("wear_step")->setAll(0.); -} - -/* ---------------------------------------------------------------------- */ - void FixMeshSurfaceStress::pre_force(int vflag) { FixMeshSurface::pre_force(vflag); @@ -241,6 +278,8 @@ void FixMeshSurfaceStress::add_particle_contribution(int ip,double *frc, vectorNegate3D(frc); + vectorAdd3D(x,delta,contactPoint); + if(trackStress()) { /*NL*/ //if(strcmp(id,"servo")==0) printVec3D(screen,"added force",frc); @@ -250,7 +289,6 @@ void FixMeshSurfaceStress::add_particle_contribution(int ip,double *frc, vectorAdd3D(f(iTri),frc,f(iTri)); // add contribution to total body force and torque - vectorAdd3D(x,delta,contactPoint); vectorAdd3D(f_total_,frc,f_total_); vectorSubtract3D(contactPoint,p_ref_(0),tmp); /*NL*/ //fprintf(screen,"p_ref_ %f %f %f\n",p_ref_(0)[0],p_ref_(0)[1],p_ref_(0)[2]); diff --git a/src/fix_mesh_surface_stress.h b/src/fix_mesh_surface_stress.h index ddf3003e..02570851 100644 --- a/src/fix_mesh_surface_stress.h +++ b/src/fix_mesh_surface_stress.h @@ -57,7 +57,7 @@ namespace LAMMPS_NS virtual void pre_force(int vflag); virtual void final_integrate(); - double compute_vector(int n); + virtual double compute_vector(int n); virtual void add_particle_contribution(int ip, double *frc, double *delta, int iTri, double *v_wall); @@ -120,8 +120,10 @@ namespace LAMMPS_NS private: // inititalization fcts - void initStress(); - void initWear(); + void regStress(); + void regWear(); + void zeroizeStress(); + void zeroizeWear(); void calc_total_force(); void add_gravity(); diff --git a/src/fix_mesh_surface_stress_6dof.cpp b/src/fix_mesh_surface_stress_6dof.cpp index 0750c43e..2e9d10a1 100644 --- a/src/fix_mesh_surface_stress_6dof.cpp +++ b/src/fix_mesh_surface_stress_6dof.cpp @@ -93,6 +93,8 @@ FixMeshSurfaceStress6DOF::FixMeshSurfaceStress6DOF(LAMMPS *lmp, int narg, char * init_defaults(); + size_vector = 9; + // parse further args //NP may NOT change quat since MultiNodeMesh::setRotation() assumes is called with //NP unit quat the first time @@ -228,9 +230,6 @@ FixMeshSurfaceStress6DOF::FixMeshSurfaceStress6DOF(LAMMPS *lmp, int narg, char * // store original position and rotation state xcm_orig_.add(xcm_(0)); quat_orig_.add(quat_(0)); - - //NP inform mesh of upcoming movement - mesh()->registerMove(false,true,true); } /* ---------------------------------------------------------------------- */ @@ -241,13 +240,31 @@ FixMeshSurfaceStress6DOF::~FixMeshSurfaceStress6DOF() /* ---------------------------------------------------------------------- */ +void FixMeshSurfaceStress6DOF::post_create_pre_restart() +{ + FixMeshSurfaceStress::post_create_pre_restart(); +} + +/* ---------------------------------------------------------------------- */ + void FixMeshSurfaceStress6DOF::post_create() { + /*NL*/ //fprintf(screen,"after re pref %f %f %f\n",p_ref(0),p_ref(1),p_ref(2)); + /*NL*/ //fprintf(screen,"after re torque_total %f %f %f\n",torque_total(0),torque_total(1),torque_total(2)); + /*NL*/ //printVec3D(screen,"after re xcm",xcm_(0)); + /*NL*/ //printVec4D(screen,"after re quat",quat_(0)); + /*NL*/ //fprintf(screen,"sizes xcm %d mass %d moi %d\n",xcm_.size(),mass_.size(),moi_.size()); + FixMeshSurfaceStress::post_create(); init_rotation_props(); calc_displace(); + + + //NP inform mesh of upcoming movement + //NP has to be done here so that all elements are read in case of restart + mesh()->registerMove(false,true,true); } /* ---------------------------------------------------------------------- */ @@ -388,6 +405,14 @@ void FixMeshSurfaceStress6DOF::init() /* ---------------------------------------------------------------------- */ +void FixMeshSurfaceStress6DOF::setup_pre_force(int vflag) +{ + FixMeshSurfaceStress::setup_pre_force(vflag); + set_p_ref(xcm_(0)); +} + +/* ---------------------------------------------------------------------- */ + void FixMeshSurfaceStress6DOF::setup(int vflag) { vectorCopy3D(xcm_(0),xcm_orig_(0)); @@ -426,6 +451,10 @@ void FixMeshSurfaceStress6DOF::initial_integrate(int vflag) // update angular momentum by 1/2 step + /*NL*/ //fprintf(screen,"pref %f %f %f\n",p_ref(0),p_ref(1),p_ref(2)); + /*NL*/ //fprintf(screen,"torque_total %f %f %f\n",torque_total(0),torque_total(1),torque_total(2)); + /*NL*/// printVec3D(screen,"xcm",xcm_(0)); + if(tflag_(0)[0]) angmom_(0)[0] += dtf_ * torque_total(0); if(tflag_(0)[1]) angmom_(0)[1] += dtf_ * torque_total(1); if(tflag_(0)[2]) angmom_(0)[2] += dtf_ * torque_total(2); @@ -606,3 +635,14 @@ void FixMeshSurfaceStress6DOF::set_vel() memory->destroy(vNodes); } + + +/* ---------------------------------------------------------------------- + return total force or torque component on body or xcm +------------------------------------------------------------------------- */ + +double FixMeshSurfaceStress6DOF::compute_vector(int n) +{ + if(n < 6) return FixMeshSurfaceStress::compute_vector(n); + else return xcm_(0)[n-6]; +} diff --git a/src/fix_mesh_surface_stress_6dof.h b/src/fix_mesh_surface_stress_6dof.h index 88e155ce..8867dfe1 100644 --- a/src/fix_mesh_surface_stress_6dof.h +++ b/src/fix_mesh_surface_stress_6dof.h @@ -42,15 +42,19 @@ class FixMeshSurfaceStress6DOF : public FixMeshSurfaceStress { FixMeshSurfaceStress6DOF(class LAMMPS *, int, char **); virtual ~FixMeshSurfaceStress6DOF(); + virtual void post_create_pre_restart(); virtual void post_create(); void init(); virtual void setup(int vflag); + virtual void setup_pre_force(int vflag); int setmask(); void initial_integrate(int vflag); void final_integrate(); + double compute_vector(int n); + private: void init_defaults(); diff --git a/src/fix_mesh_surface_stress_servo.cpp b/src/fix_mesh_surface_stress_servo.cpp index 243c3c7d..6154e6a6 100644 --- a/src/fix_mesh_surface_stress_servo.cpp +++ b/src/fix_mesh_surface_stress_servo.cpp @@ -27,6 +27,7 @@ #include #include +#include #include "fix_mesh_surface_stress_servo.h" #include "atom.h" #include "force.h" @@ -38,7 +39,6 @@ #include "vector_liggghts.h" #include "fix_property_global.h" #include "modified_andrew.h" -#include using namespace LAMMPS_NS; using namespace FixConst; @@ -58,51 +58,51 @@ enum{NONE,CONSTANT,EQUAL,FORCE,TORQUE}; /* ---------------------------------------------------------------------- */ FixMeshSurfaceStressServo::FixMeshSurfaceStressServo(LAMMPS *lmp, int narg, char **arg) : -FixMeshSurfaceStress(lmp, narg, arg), -xcm_( *mesh()->prop().addGlobalProperty< VectorContainer > ("xcm","comm_none","frame_invariant","restart_yes",3)), -vcm_( *mesh()->prop().addGlobalProperty< VectorContainer > ("vcm","comm_none","frame_invariant","restart_yes",1)), -omegacm_( *mesh()->prop().addGlobalProperty< VectorContainer > ("torquecm","comm_none","frame_invariant","restart_yes",1)), -xcm_orig_( *mesh()->prop().addGlobalProperty< VectorContainer > ("xcm_orig","comm_none","frame_invariant","restart_yes",3)), + FixMeshSurfaceStress(lmp, narg, arg), + xcm_( *mesh()->prop().addGlobalProperty< VectorContainer > ("xcm","comm_none","frame_invariant","restart_yes")), + vcm_( *mesh()->prop().addGlobalProperty< VectorContainer > ("vcm","comm_none","frame_invariant","restart_yes")), + omegacm_( *mesh()->prop().addGlobalProperty< VectorContainer > ("torquecm","comm_none","frame_invariant","restart_yes")), + xcm_orig_( *mesh()->prop().addGlobalProperty< VectorContainer > ("xcm_orig","comm_none","frame_invariant","restart_yes")), -nodes_( mesh()->nodePtr()), -v_( *mesh()->prop().addElementProperty< MultiVectorContainer > ("v","comm_exchange_borders","frame_invariant","restart_no",1)), + nodes_( mesh()->nodePtr()), + v_(0), -totalPhi_( 0.), -ctrl_op_( 0), -pv_vec_( 0), + totalPhi_( 0.), + ctrl_op_( 0), + pv_vec_( 0), -vel_max_( 0.), -vel_min_( 0.), -ctrl_op_max_(0.), -ctrl_op_min_(0.), -ratio_(0.), + vel_max_( 0.), + vel_min_( 0.), + ctrl_op_max_(0.), + ctrl_op_min_(0.), + ratio_(0.), -sp_mag_(0.), -sp_mag_inv_(0.), -pv_mag_(0.), -old_pv_mag_(0.), + sp_mag_(0.), + sp_mag_inv_(0.), + pv_mag_(0.), + old_pv_mag_(0.), -err_( 0.), -sum_err_( 0.), -kp_( 0.01), -ki_( 0.), -kd_( 0.), + err_( 0.), + sum_err_( 0.), + kp_( 0.01), + ki_( 0.), + kd_( 0.), -sp_var_( -1), -sp_style_( NONE), -sp_str_( NULL), + sp_var_( -1), + sp_style_( NONE), + sp_str_( NULL), -int_flag_( true), -mode_flag_(false), -ctrl_style_(NONE), -mod_andrew_(new ModifiedAndrew(lmp)) + int_flag_( true), + mode_flag_(false), + ctrl_style_(NONE), + mod_andrew_(new ModifiedAndrew(lmp)) { if(!trackStress()) error->fix_error(FLERR,this,"stress = 'on' required"); if(verbose() && manipulated()) error->warning(FLERR,"Mesh has been scaled, moved, or rotated.\n" - "Please note that values for 'com', 'vel' refer to the scaled, moved, or rotated configuration"); + "Please note that values for 'com', 'vel' refer to the scaled, moved, or rotated configuration"); // override default from base size_vector = 9; @@ -120,7 +120,7 @@ mod_andrew_(new ModifiedAndrew(lmp)) hasargs = false; if(strcmp(arg[iarg_],"com") == 0) { if (narg < iarg_+4) error->fix_error(FLERR,this,"not enough arguments for 'com'"); - iarg_++; + ++iarg_; double _com[3]; _com[0] = force->numeric(FLERR,arg[iarg_++]); _com[1] = force->numeric(FLERR,arg[iarg_++]); @@ -137,16 +137,16 @@ mod_andrew_(new ModifiedAndrew(lmp)) hasargs = true; } else if(strcmp(arg[iarg_],"vel_max") == 0) { if (narg < iarg_+2) error->fix_error(FLERR,this,"not enough arguments for 'vel'"); - iarg_++; + ++iarg_; vel_max_ = force->numeric(FLERR,arg[iarg_++]); if(vel_max_ <= 0.) error->fix_error(FLERR,this,"vel_max > 0 required"); hasargs = true; } else if(strcmp(arg[iarg_],"target_val") == 0) { if (narg < iarg_+2) error->fix_error(FLERR,this,"not enough arguments for 'target_val'"); - iarg_++; + ++iarg_; if (strstr(arg[iarg_],"v_") == arg[iarg_]) { - int n = strlen(&arg[iarg_][2]) + 1; + const int n = strlen(&arg[iarg_][2]) + 1; sp_str_ = new char[n]; strcpy(sp_str_,&arg[iarg_][2]); sp_style_ = EQUAL; @@ -156,13 +156,15 @@ mod_andrew_(new ModifiedAndrew(lmp)) sp_mag_inv_ = 1./fabs(sp_mag_); sp_style_ = CONSTANT; } - iarg_++; + ++iarg_; hasargs = true; } else if(strcmp(arg[iarg_],"axis") == 0) { if (narg < iarg_+4) error->fix_error(FLERR,this,"not enough arguments for 'axis'"); axis_[0] = force->numeric(FLERR,arg[iarg_+1]); axis_[1] = force->numeric(FLERR,arg[iarg_+2]); axis_[2] = force->numeric(FLERR,arg[iarg_+3]); + // normalize axis + vectorNormalize3D(axis_); iarg_ = iarg_+4; hasargs = true; } else if(strcmp(arg[iarg_],"kp") == 0) { @@ -180,15 +182,15 @@ mod_andrew_(new ModifiedAndrew(lmp)) kd_ = force->numeric(FLERR,arg[iarg_+1]); iarg_ = iarg_+2; hasargs = true; - } else if(strcmp(arg[iarg_],"mode") == 0) { //NP Test Aigner + } else if(strcmp(arg[iarg_],"mode") == 0) { if (narg < iarg_+2) error->fix_error(FLERR,this,"not enough arguments"); - iarg_++; + ++iarg_; if (strcmp("auto",arg[iarg_]) == 0) { mode_flag_ = true; } else error->fix_error(FLERR,this,"mode supports only auto"); - iarg_++; + ++iarg_; hasargs = true; - } else if(strcmp(arg[iarg_],"ratio") == 0) { //NP Test Aigner + } else if(strcmp(arg[iarg_],"ratio") == 0) { if (narg < iarg_+2) error->fix_error(FLERR,this,"not enough arguments"); ratio_ = force->numeric(FLERR,arg[iarg_+1]); iarg_ = iarg_+2; @@ -203,15 +205,6 @@ mod_andrew_(new ModifiedAndrew(lmp)) // store original position xcm_orig_.add(xcm_(0)); - - //NP inform mesh of upcoming movement - if (ctrl_style_ == FORCE) - mesh()->registerMove(false,true,false); - else if(ctrl_style_ == TORQUE) - mesh()->registerMove(false,false,true); - else - error->fix_error(FLERR,this,"Bad registration of upcoming move."); - } /* ---------------------------------------------------------------------- */ @@ -224,9 +217,39 @@ FixMeshSurfaceStressServo::~FixMeshSurfaceStressServo() /* ---------------------------------------------------------------------- */ +void FixMeshSurfaceStressServo::post_create_pre_restart() +{ + FixMeshSurfaceStress::post_create_pre_restart(); + + //NP called after constructor and before restart + //NP i.e. no restart: mesh elements present at this point + //NP restart: no mesh elements present because created in restart() + //Np -->register properties and set values for non-restart properties here + + mesh()->prop().addElementProperty< MultiVectorContainer > ("v","comm_exchange_borders","frame_invariant","restart_no"); +} + +/* ---------------------------------------------------------------------- */ + void FixMeshSurfaceStressServo::post_create() { FixMeshSurfaceStress::post_create(); + + //NP inform mesh of upcoming movement + //NP do here so all mesh elements created already + if (ctrl_style_ == FORCE) + mesh()->registerMove(false,true,false); + else if(ctrl_style_ == TORQUE) + mesh()->registerMove(false,false,true); + else + error->fix_error(FLERR,this,"Bad registration of upcoming move."); + + //NP called after constructor and restart + //NP i.e. no restart: mesh elements present at this point + //NP restart: no mesh elements present because created in restart() + //Np --> set values for no-restart properties here + + mesh()->prop().getElementProperty >("v")->setAll(0.); } /* ---------------------------------------------------------------------- */ @@ -269,6 +292,14 @@ void FixMeshSurfaceStressServo::error_checks() if(mesh()->nMove() > 1) error->fix_error(FLERR,this,"this fix does not allow superposition with moving mesh fixes"); + // check if servo-wall is also a granular wall + if (!fix_mesh_neighlist_) + error->fix_error(FLERR,this,"The servo-wall requires a contact model. Therefore, it has to be used for a fix wall/gran too."); + + // no respa integrator + if (strcmp(update->integrate_style,"respa") == 0) + error->fix_error(FLERR,this,"not respa-compatible"); + /*NL*/ //fprintf(screen,"nmove %d\n",mesh()->nMove() ); } @@ -276,14 +307,26 @@ void FixMeshSurfaceStressServo::error_checks() void FixMeshSurfaceStressServo::init() { + /*NL*/ //int size1 = (mesh()->prop().getElementProperty >("v"))->size(); + /*NL*/ //int size2 = (mesh()->prop().getElementProperty >("id"))->size(); + /*NL*/ //fprintf(screen,"proc %d, size of v container %d\n",comm->me,size1); + /*NL*/ //fprintf(screen,"proc %d, size of ID container %d\n",comm->me,size2); + + FixMeshSurfaceStress::init(); + set_p_ref(xcm_(0)); + // do some error checks error_checks(); // get timestep reset_dt(); + // update ptrs + nodes_ = mesh()->nodePtr(); + v_ = mesh()->prop().getElementProperty >("v"); + // check variables if (sp_str_) { sp_var_ = input->variable->find(sp_str_); @@ -293,14 +336,14 @@ void FixMeshSurfaceStressServo::init() error->fix_error(FLERR,this,"Variable is invalid style"); } - // set pointers for controller + // controller parameters double r_min,r; const int nlocal = atom->nlocal; const double rPaMax = getMaxRad(); r = r_min = BIG; - for (int ii = 0; ii < nlocal; ii++) { - r = atom->radius[ii]; + for (int i = 0; i < nlocal; ++i) { + r = atom->radius[i]; r_min = MIN(r_min,r); } MPI_Min_Scalar(r_min,world); @@ -309,44 +352,34 @@ void FixMeshSurfaceStressServo::init() // set pointers for controller switch (ctrl_style_) { - case FORCE: - pv_vec_ = f_total_; - ctrl_op_ = vcm_(0); - ctrl_op_max_ = vel_max_; - ctrl_op_min_ = vel_min_; - break; - case TORQUE: - pv_vec_ = torque_total_; - ctrl_op_ = omegacm_(0); + case FORCE: + pv_vec_ = f_total_; + ctrl_op_ = vcm_(0); + ctrl_op_max_ = vel_max_; + ctrl_op_min_ = vel_min_; + break; + case TORQUE: + pv_vec_ = torque_total_; + ctrl_op_ = omegacm_(0); - // find maximum distance axis-node - if (rPaMax == 0) - error->fix_error(FLERR,this,"All mesh nodes are located at the rotation axis."); + // find maximum distance axis-node + if (rPaMax == 0) + error->fix_error(FLERR,this,"All mesh nodes are located at the rotation axis."); - // maximum angular velocity - ctrl_op_max_ = vel_max_/rPaMax; - ctrl_op_min_ = vel_min_/rPaMax; - break; - default: - error->fix_error(FLERR,this,"This may not happen!"); - break; + // maximum angular velocity + ctrl_op_max_ = vel_max_/rPaMax; + ctrl_op_min_ = vel_min_/rPaMax; + break; + default: + error->fix_error(FLERR,this,"This may not happen!"); + break; } // check maximal velocity - double skin = neighbor->skin; + const double skin = neighbor->skin; if(vel_max_ >= skin/(2.*dtv_)) error->fix_error(FLERR,this,"vel_max < skin/(2.*dt) required"); - // check if servo-wall is also a granular wall - if (!fix_mesh_neighlist_) - error->fix_error(FLERR,this,"The servo-wall requires a contact model. Therefore, it has to be used for a fix wall/gran too."); - - if (strcmp(update->integrate_style,"respa") == 0) - error->fix_error(FLERR,this,"not respa-compatible"); - - // normalize axis - vectorNormalize3D(axis_); - // compute global number of contacts fix_mesh_neighlist_->enableTotalNumContacts(true); } @@ -379,43 +412,42 @@ void FixMeshSurfaceStressServo::initial_integrate(int vflag) UNUSED(vflag); double dX[3],dx[3]; - double incrementalPhi; // only if the wall should move if (int_flag_) { switch (ctrl_style_) { - case FORCE: + case FORCE: - // update xcm by full step + // update xcm by full step - dx[0] = dtv_ * vcm_(0)[0]; - dx[1] = dtv_ * vcm_(0)[1]; - dx[2] = dtv_ * vcm_(0)[2]; - vectorAdd3D(xcm_(0),dx,xcm_(0)); - vectorSubtract3D(xcm_(0),xcm_orig_(0),dX); + dx[0] = dtv_ * vcm_(0)[0]; + dx[1] = dtv_ * vcm_(0)[1]; + dx[2] = dtv_ * vcm_(0)[2]; + vectorAdd3D(xcm_(0),dx,xcm_(0)); + vectorSubtract3D(xcm_(0),xcm_orig_(0),dX); - mesh()->move(dX,dx); + mesh()->move(dX,dx); - // update reference point to COM - //NP would not be necessary b/c p_ref_ is moved, rotated automatically - //NP do it anyway to avoid long-term divergence - //NP which could happen b/c move, rotate is done incrementally + // update reference point to COM + //NP would not be necessary b/c p_ref_ is moved, rotated automatically + //NP do it anyway to avoid long-term divergence + //NP which could happen b/c move, rotate is done incrementally - set_p_ref(xcm_(0)); - /*NL*/ //fprintf(screen,"p_ref %g %g %g\n",p_ref(0),p_ref(1),p_ref(2)); - /*NL*/ //printVec3D(screen,"xcm",xcm_(0)); + set_p_ref(xcm_(0)); + /*NL*/ //fprintf(screen,"p_ref %g %g %g\n",p_ref(0),p_ref(1),p_ref(2)); + /*NL*/ //printVec3D(screen,"xcm",xcm_(0)); - break; + break; - case TORQUE: - incrementalPhi = dtv_ * vectorDot3D(omegacm_(0),axis_); - totalPhi_ += incrementalPhi; + case TORQUE: + const double incrementalPhi = dtv_ * vectorDot3D(omegacm_(0),axis_); + totalPhi_ += incrementalPhi; - //rotate the mesh - mesh()->rotate(totalPhi_,incrementalPhi,axis_,xcm_(0)); + //rotate the mesh + mesh()->rotate(totalPhi_,incrementalPhi,axis_,xcm_(0)); - break; + break; } } @@ -457,16 +489,13 @@ void FixMeshSurfaceStressServo::final_integrate() } - // auto mode - //NP TEST AIGNER + // auto mode - p-controller with variable proportional gain if (mode_flag_) { pv_mag_ = vectorDot3D(pv_vec_,axis_); err_ = (sp_mag_ - pv_mag_) * sp_mag_inv_; - // TODO: Valid or trash? - // Hard coded test for piecewise controller - // This setting works, but doesn't speed up most cases + // Hard coded piecewise controller double ctrl_kp; const double err_low = 0.9; const double err_high = 1.0; @@ -520,12 +549,12 @@ void FixMeshSurfaceStressServo::final_integrate() limit_vel(); switch (ctrl_style_) { - case FORCE: - set_v_node(); - break; - case TORQUE: - set_v_node_rotate(); - break; + case FORCE: + set_v_node(); + break; + case TORQUE: + set_v_node_rotate(); + break; } } @@ -571,12 +600,12 @@ void FixMeshSurfaceStressServo::limit_vel() void FixMeshSurfaceStressServo::set_v_node() { - int nall = mesh()->size(); - int nnodes = mesh()->numNodes(); + const int nall = mesh()->size(); + const int nnodes = mesh()->numNodes(); - for(int i = 0; i < nall; i++) - for(int j = 0; j < nnodes; j++) - v_.set(i,j,vcm_(0)); + for(int i = 0; i < nall; ++i) + for(int j = 0; j < nnodes; ++j) + v_->set(i,j,vcm_(0)); } @@ -586,17 +615,17 @@ void FixMeshSurfaceStressServo::set_v_node_rotate() { double node[3],rPA[3],vRot[3]; - int nall = mesh()->size(); - int nnodes = mesh()->numNodes(); + const int nall = mesh()->size(); + const int nnodes = mesh()->numNodes(); - for(int i = 0; i < nall; i++) + for(int i = 0; i < nall; ++i) { - for(int j = 0; j < nnodes; j++) + for(int j = 0; j < nnodes; ++j) { vectorCopy3D(nodes_[i][j],node); vectorSubtract3D(node,xcm_(0),rPA); vectorCross3D(omegacm_(0),rPA,vRot); - v_.set(i,j,vRot); + v_->set(i,j,vRot); } } } @@ -616,7 +645,7 @@ void FixMeshSurfaceStressServo::reset_dt() ------------------------------------------------------------------------- */ void FixMeshSurfaceStressServo::add_particle_contribution(int ip, double *frc, - double *delta, int iTri, double *v_wall) + double *delta, int iTri, double *v_wall) { FixMeshSurfaceStress::add_particle_contribution(ip,frc,delta,iTri,v_wall); @@ -637,12 +666,12 @@ double FixMeshSurfaceStressServo::getMaxRad() double node[3],rPA[3],vRot[3]; double rPaMax = 0; - int nall = mesh()->size(); - int nnodes = mesh()->numNodes(); + const int nall = mesh()->size(); + const int nnodes = mesh()->numNodes(); - for(int i = 0; i < nall; i++) + for(int i = 0; i < nall; ++i) { - for(int j = 0; j < nnodes; j++) + for(int j = 0; j < nnodes; ++j) { vectorCopy3D(nodes_[i][j],node); vectorSubtract3D(node,xcm_(0),rPA); @@ -650,11 +679,15 @@ double FixMeshSurfaceStressServo::getMaxRad() rPaMax = MAX(rPaMax,vectorMag3D(vRot)); } } + + // get max for all processors + MPI_Max_Scalar(rPaMax,world); + /*NL*/// fprintf(screen,"rPaMax = %f \n",rPaMax); return rPaMax; } /* ---------------------------------------------------------------------- - return total force or torque component on body + return total force or torque component on body or xcm ------------------------------------------------------------------------- */ double FixMeshSurfaceStressServo::compute_vector(int n) @@ -678,11 +711,10 @@ int FixMeshSurfaceStressServo::modify_param(int narg, char **arg) error->fix_error(FLERR,this,"wrong argument for fix_modify 'integrate'"); return 2; - } else if (strcmp(arg[0],"target_val") == 0) { if (narg < 2) error->fix_error(FLERR,this,"not enough arguments for fix_modify 'target_val'"); if (strstr(arg[1],"v_") == arg[1]) { - int n = strlen(&arg[1][2]) + 1; + const int n = strlen(&arg[1][2]) + 1; sp_str_ = new char[n]; strcpy(sp_str_,&arg[1][2]); diff --git a/src/fix_mesh_surface_stress_servo.h b/src/fix_mesh_surface_stress_servo.h index 458ecc17..8ed4abfa 100644 --- a/src/fix_mesh_surface_stress_servo.h +++ b/src/fix_mesh_surface_stress_servo.h @@ -42,84 +42,85 @@ FixStyle(mesh/surface/stress/servo,FixMeshSurfaceStressServo) namespace LAMMPS_NS { -class FixMeshSurfaceStressServo : public FixMeshSurfaceStress { + class FixMeshSurfaceStressServo : public FixMeshSurfaceStress { - public: + public: - FixMeshSurfaceStressServo(class LAMMPS *, int, char **); - virtual ~FixMeshSurfaceStressServo(); + FixMeshSurfaceStressServo(class LAMMPS *, int, char **); + virtual ~FixMeshSurfaceStressServo(); - virtual void post_create(); + virtual void post_create_pre_restart(); + virtual void post_create(); - void init(); - int setmask(); + void init(); + int setmask(); - virtual void setup_pre_force(int vflag); - void initial_integrate(int vflag); - void add_particle_contribution(int ip, double *frc, - double *delta, int iTri, double *v_wall); - void final_integrate(); + virtual void setup_pre_force(int vflag); + void initial_integrate(int vflag); + void add_particle_contribution(int ip, double *frc, + double *delta, int iTri, double *v_wall); + void final_integrate(); - void reset_dt(); - double compute_vector(int n); + void reset_dt(); + double compute_vector(int n); - private: + private: - void init_defaults(); - void error_checks(); + void init_defaults(); + void error_checks(); - void limit_vel(); - void update_mass(); - void set_v_node(); - void set_v_node_rotate(); - double getMaxRad(); - int modify_param(int, char **); - void resetIntegrator() {sum_err_ = 0;} + void limit_vel(); + void update_mass(); + void set_v_node(); + void set_v_node_rotate(); + double getMaxRad(); + int modify_param(int, char **); + void resetIntegrator() {sum_err_ = 0;} - // properties of mesh + // properties of mesh - VectorContainer &xcm_; - VectorContainer &vcm_; - VectorContainer &omegacm_; - VectorContainer &xcm_orig_; + VectorContainer &xcm_; + VectorContainer &vcm_; + VectorContainer &omegacm_; + VectorContainer &xcm_orig_; - // position and velocity for each node + // position and velocity for each node - double*** nodes_; - MultiVectorContainer &v_; + double*** nodes_; + MultiVectorContainer *v_; - // servo settings and controller + // servo settings and controller - double axis_[3],totalPhi_; - double *ctrl_op_,*pv_vec_; - double vel_max_,vel_min_,ctrl_op_max_,ctrl_op_min_,ratio_; - double sp_mag_,sp_mag_inv_; - double pv_mag_,old_pv_mag_; - double err_, sum_err_; - double kp_,ki_,kd_; + double axis_[3],totalPhi_; + double *ctrl_op_,*pv_vec_; + double vel_max_,vel_min_,ctrl_op_max_,ctrl_op_min_,ratio_; + double sp_mag_,sp_mag_inv_; + double pv_mag_,old_pv_mag_; + double err_, sum_err_; + double kp_,ki_,kd_; - // variable set point - int sp_var_, sp_style_; - char *sp_str_; + // variable set point + int sp_var_, sp_style_; + char *sp_str_; - // flags - bool int_flag_; - bool mode_flag_; - int ctrl_style_; + // flags + bool int_flag_; + bool mode_flag_; + int ctrl_style_; - // timesteps - double dtf_,dtv_; + // timesteps + double dtf_,dtv_; - // for area calculation - class ModifiedAndrew *mod_andrew_; + // for area calculation + class ModifiedAndrew *mod_andrew_; - //NP TODO: Is somewhere a better place for this function?! - // signum function - template int sgn(T val) { - return (T(0) < val) - (val < T(0)); - } + //NP TODO: Is somewhere a better place for this function?! + // signum function + template int sgn(T val) { + return (T(0) < val) - (val < T(0)); + } -}; //end class + }; //end class } diff --git a/src/fix_move_mesh.cpp b/src/fix_move_mesh.cpp index f90ce85f..0d3a5136 100644 --- a/src/fix_move_mesh.cpp +++ b/src/fix_move_mesh.cpp @@ -80,6 +80,15 @@ FixMoveMesh::FixMoveMesh(LAMMPS *lmp, int narg, char **arg) /* ---------------------------------------------------------------------- */ +void FixMoveMesh:: post_create() +{ + //NP must register move here in case of restart so that all + //NP elements are created already + move_->post_create(); +} + +/* ---------------------------------------------------------------------- */ + void FixMoveMesh::pre_delete(bool unfixflag) { // check if another fix move operates on the same mesh @@ -157,7 +166,7 @@ void FixMoveMesh::setup(int vflag) if(!mesh_->prop().getElementProperty >("v")) { - //NP need to have borders comm in order not to loose vel information + //NP need to have borders comm in order not to loose vel information //NP for ghost elements on reneighboring steps mesh_->prop().addElementProperty >("v","comm_exchange_borders","frame_invariant","restart_no"); /*NL*/// int size = mesh_->prop().getElementProperty >("v")->size(); @@ -165,6 +174,14 @@ void FixMoveMesh::setup(int vflag) } move_->setup(); + + // do set-up in case velocity is dumped (called via set-up) + if(move_->isFirst()) + { + MultiVectorContainer *v; + v = mesh_->prop().getElementProperty >("v"); + v->setAll(0.); + } } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_move_mesh.h b/src/fix_move_mesh.h index dc95a537..a25482f4 100644 --- a/src/fix_move_mesh.h +++ b/src/fix_move_mesh.h @@ -48,6 +48,8 @@ namespace LAMMPS_NS FixMoveMesh(LAMMPS *lmp, int narg, char **arg); virtual ~FixMoveMesh(); + void post_create(); + void setup(int vflag); void pre_delete(bool unfixflag); int setmask(); diff --git a/src/fix_property_atom.h b/src/fix_property_atom.h index 021f1d72..448342e4 100644 --- a/src/fix_property_atom.h +++ b/src/fix_property_atom.h @@ -41,6 +41,7 @@ enum class FixPropertyAtom : public Fix { friend class Set; + friend class FixPropertyAtomUpdateFix; public: FixPropertyAtom(class LAMMPS *, int, char **,bool parse = true); ~FixPropertyAtom(); diff --git a/src/fix_scalar_transport_equation.cpp b/src/fix_scalar_transport_equation.cpp index ccb097a6..24b986de 100644 --- a/src/fix_scalar_transport_equation.cpp +++ b/src/fix_scalar_transport_equation.cpp @@ -90,6 +90,9 @@ FixScalarTransportEquation::FixScalarTransportEquation(LAMMPS *lmp, int narg, ch int_flag = true; + nevery_ = 1; + performedIntegrationLastStep_ = true; //ensure flux is reset at the very first time step + peratom_flag = 1; //NP 0/1 if per-atom data is stored size_peratom_cols = 0; //NP 0 = scalar, N = columns in peratom array peratom_freq = 1; @@ -252,6 +255,14 @@ int FixScalarTransportEquation::modify_param(int narg, char **arg) return 2; } + if (strcmp(arg[0],"every") == 0) { + if (narg < 2) error->fix_error(FLERR,this,"not enough arguments for fix_modify 'every'"); + + nevery_ = force->inumeric(FLERR,arg[1]); +// printf("FixScalarTransportEquation: will perform update every %d time steps. \n", nevery_); + + return 1; + } return 0; } @@ -262,6 +273,10 @@ void FixScalarTransportEquation::initial_integrate(int vflag) //NP update because re-allocation might have taken place updatePtrs(); + //Skip in case there was NO Integration the last time step (to keep flux in mem) + if(!performedIntegrationLastStep_) + return; + //reset heat flux //sources are not reset int *mask = atom->mask; @@ -305,6 +320,13 @@ void FixScalarTransportEquation::final_integrate() if(!int_flag) return; + // skip if integration not wanted at this timestep + if (update->ntimestep % nevery_) + { + performedIntegrationLastStep_ = false; + return; + } + //NP update because re-allocation might have taken place updatePtrs(); @@ -317,7 +339,11 @@ void FixScalarTransportEquation::final_integrate() { if (mask[i] & groupbit){ capacity = fix_capacity->compute_vector(type[i]-1); - if(fabs(capacity) > SMALL) quantity[i] += (flux[i] + source[i]) * dt / (rmass[i]*capacity); + if(fabs(capacity) > SMALL) quantity[i] += ( + flux[i] + + source[i]*double(nevery_) //multiply source to account for missing steps + ) * dt + / (rmass[i]*capacity); } } } @@ -326,10 +352,14 @@ void FixScalarTransportEquation::final_integrate() for (int i = 0; i < nlocal; i++) { if (mask[i] & groupbit){ - quantity[i] += (flux[i] + source[i]) * dt; + quantity[i] += ( + flux[i] + + source[i]*double(nevery_) //multiply source to account for missing steps + ) * dt ; } } } + performedIntegrationLastStep_ = true; } /* ---------------------------------------------------------------------- */ diff --git a/src/fix_scalar_transport_equation.h b/src/fix_scalar_transport_equation.h index a6598088..12a03288 100644 --- a/src/fix_scalar_transport_equation.h +++ b/src/fix_scalar_transport_equation.h @@ -68,14 +68,16 @@ class FixScalarTransportEquation : public Fix { double *capacity; char *capacity_name; - double quantity_0; //NP default value for potential - double *quantity; //NP particle Temperature + double quantity_0; //NP default value for potential + double *quantity; //NP particle Temperature double *flux; //NP heat flux from/to the particle double *source; //NP heat source // flag if integrate quantity or not bool int_flag; + int nevery_; //integrate only this many time steps (to avoid round-off issues) + bool performedIntegrationLastStep_; }; } diff --git a/src/fix_sph_density_continuity.cpp b/src/fix_sph_density_continuity.cpp index bbd67ff7..f5ba0296 100644 --- a/src/fix_sph_density_continuity.cpp +++ b/src/fix_sph_density_continuity.cpp @@ -216,6 +216,7 @@ void FixSphDensityContinuity::pre_force_eval(int vflag) r = sqrt(rsq); if (r == 0.) { + fprintf(screen,"Particle %i and %i are at same position (%f, %f, %f)\n",i,j,xtmp,ytmp,ztmp); error->one(FLERR,"Zero distance between SPH particles!"); } rinv = 1./r; diff --git a/src/fix_template_multiplespheres.cpp b/src/fix_template_multiplespheres.cpp index 5f20ea97..b5840ecc 100644 --- a/src/fix_template_multiplespheres.cpp +++ b/src/fix_template_multiplespheres.cpp @@ -331,7 +331,8 @@ void FixTemplateMultiplespheres::calc_center_of_mass() r_equiv = pow(6.*mass_expect/(8.*expectancy(pdf_density)*M_PI),1./3.); /*NL*/ if(LMP_DEBUGMODE_MULTIPLESPHERES) - /*NL*/ fprintf(screen,"MC integration done: mass=%f, volume=%f, xcm=%f|%f|%f, r_equiv=%f\n",mass_expect,volume_expect,xcm[0],xcm[1],xcm[2],r_equiv); + /*NL*/ fprintf(screen,"MC integration done: mass=%e, volume=%e, xcm=%e|%e|%e, r_equiv=%e, nsuccess %d, ntry %d vol_box %f\n", + /*NL*/ mass_expect,volume_expect,xcm[0],xcm[1],xcm[2],r_equiv,nsuccess,ntry,(x_max[0]-x_min[0])*(x_max[1]-x_min[1])*(x_max[2]-x_min[2])); // transform into a system with center of mass=0/0/0 diff --git a/src/fix_template_multisphere.cpp b/src/fix_template_multisphere.cpp index 07bb4a7f..d1e58de5 100644 --- a/src/fix_template_multisphere.cpp +++ b/src/fix_template_multisphere.cpp @@ -67,7 +67,8 @@ using namespace FixConst; FixTemplateMultisphere::FixTemplateMultisphere(LAMMPS *lmp, int narg, char **arg) : FixTemplateMultiplespheres(lmp, narg, arg), mass_set_(false), - moi_set_(false) + moi_set_(false), + use_density_(-1) { delete pti; pti = new ParticleToInsertMultisphere(lmp,nspheres); @@ -109,6 +110,12 @@ FixTemplateMultisphere::FixTemplateMultisphere(LAMMPS *lmp, int narg, char **arg mass_expect = atof(arg[iarg++]); mass_set_ = true; hasargs = true; + } else if(strcmp(arg[iarg],"use_volume") == 0) { + iarg++; + use_density_ = 0; + } else if(strcmp(arg[iarg],"use_density") == 0) { + iarg++; + use_density_ = 1; } else if(strcmp(arg[iarg],"inertia_tensor") == 0) { if (iarg+7 > narg) error->fix_error(FLERR,this,"not enough arguments for 'inertia_tensor'"); @@ -135,6 +142,9 @@ FixTemplateMultisphere::FixTemplateMultisphere(LAMMPS *lmp, int narg, char **arg if((mass_set_ && !moi_set_) || (!mass_set_ && moi_set_)) error->fix_error(FLERR,this,"have to define either both 'mass' and 'inertia_tensor' or none of the two"); + + if(mass_set_ && -1 == use_density_) + error->fix_error(FLERR,this,"have to use either 'use_volume' or 'use_density' in case 'mass' and 'moi' are specified"); } /* ---------------------------------------------------------------------- */ @@ -144,14 +154,38 @@ void FixTemplateMultisphere::post_create() // bounding sphere, center of mass calculations in mother class // calculate inertia_ tensor and its eigensystem + // use density and volume from MC; mass calculated if(!mass_set_) { + // bounding sphere and center of mass + FixTemplateMultiplespheres::post_create(); calc_inertia(); calc_eigensystem(); calc_displace_xcm_x_body(); } + // use mass specified and volume_mc; density calculated + else if(0 == use_density_) + { + // store mass read in from input script + double mass = mass_expect; + // bounding sphere and center of mass + // calculates mass_expect, volume_expect, r_equiv + FixTemplateMultiplespheres::post_create(); + + // re-apply mass read in from input script + // re-calc r_equiv without using density + mass_expect = mass; + r_equiv = pow(3.*volume_expect/(4.*M_PI),1./3.); + pdf_density->set_params(mass_expect/volume_expect); + /*NL*/ if(LMP_DEBUGMODE_MULTISPHERE) fprintf(screen,"overwrote MC values; now: mass_expect %e, r_equiv %f\n",mass_expect,r_equiv); + + // calc rest of stuff + calc_eigensystem(); + calc_displace_xcm_x_body(); + } + // use density specified and mass specified; volume calculated else { calc_bounding_sphere(); @@ -162,8 +196,10 @@ void FixTemplateMultisphere::post_create() // calc expectancy values volume_expect = mass_expect / expectancy(pdf_density); r_equiv = pow(6.*mass_expect/(8.*expectancy(pdf_density)*M_PI),1./3.); + /*NL*/ if(LMP_DEBUGMODE_MULTISPHERE) fprintf(screen,"overwrote MC values; now: volume_expect %e, r_equiv %f\n",volume_expect,r_equiv); } + print_info(); } diff --git a/src/fix_template_multisphere.h b/src/fix_template_multisphere.h index ee1f389e..2d213729 100644 --- a/src/fix_template_multisphere.h +++ b/src/fix_template_multisphere.h @@ -68,6 +68,7 @@ class FixTemplateMultisphere : public FixTemplateMultiplespheres { // flags bool mass_set_, moi_set_; + int use_density_; // inertia of clump double moi_[3][3]; // 3x3 inertia tensor diff --git a/src/fix_template_sphere.cpp b/src/fix_template_sphere.cpp index 4610223c..21e90c88 100644 --- a/src/fix_template_sphere.cpp +++ b/src/fix_template_sphere.cpp @@ -390,8 +390,11 @@ double FixTemplateSphere::max_r_bound() double FixTemplateSphere::volexpect() { if(volume_expect < vol_limit) + { + /*NL*/ fprintf(screen,"volume_expect %f\n",volume_expect); error->fix_error(FLERR,this,"Volume expectancy too small. Change 'volume_limit' " "if you are sure you know what you're doing"); + } return volume_expect; } diff --git a/src/general_container.h b/src/general_container.h index 41eb9a8c..af1b48d6 100644 --- a/src/general_container.h +++ b/src/general_container.h @@ -55,10 +55,12 @@ namespace LAMMPS_NS void del(int n); void delForward(int n,bool scale,bool translate,bool rotate); void delRestart(int n,bool scale,bool translate,bool rotate); + void delRestart(bool scale,bool translate,bool rotate); void clearReverse(bool scale,bool translate,bool rotate); void get(int n, T** elem); + void setToDefault(int n); void setAll(T def); void setAll(int to, T def); void set(int i, T** elem); @@ -138,6 +140,8 @@ namespace LAMMPS_NS void copy(GeneralContainer const & other); void copy_n(GeneralContainer const & other, const size_t n); + inline void setDefaultValue(T val) + { defaultValue_ = val; useDefault_ = true; } protected: @@ -160,6 +164,7 @@ namespace LAMMPS_NS T* _end() const { return &arr_[0][0][0] + numElem_*(NUM_VEC*LEN_VEC); } + T defaultValue_; }; // ************************************* diff --git a/src/general_container_I.h b/src/general_container_I.h index f9b0f1d8..674b0375 100644 --- a/src/general_container_I.h +++ b/src/general_container_I.h @@ -36,7 +36,8 @@ GeneralContainer::GeneralContainer(const char *_id) : ContainerBase(_id), numElem_(0), - maxElem_(GROW) + maxElem_(GROW), + defaultValue_(0) { create(arr_,GROW,NUM_VEC,LEN_VEC); } @@ -45,7 +46,8 @@ GeneralContainer::GeneralContainer(const char *_id, const char *_comm, const char *_ref, const char *_restart, int _scalePower) : ContainerBase(_id, _comm, _ref, _restart, _scalePower), numElem_(0), - maxElem_(GROW) + maxElem_(GROW), + defaultValue_(0) { create(arr_,GROW,NUM_VEC,LEN_VEC); } @@ -54,7 +56,8 @@ GeneralContainer::GeneralContainer(GeneralContainer const &orig) : ContainerBase(orig), numElem_(orig.numElem_), - maxElem_(orig.numElem_) + maxElem_(orig.numElem_), + defaultValue_(orig.defaultValue_) { create(arr_,maxElem_,NUM_VEC,LEN_VEC); for(int i=0;i @@ -235,6 +241,21 @@ arr_[n][i][j] = arr_[numElem_][i][j]; } + /* ---------------------------------------------------------------------- + delete all elements if restart + ------------------------------------------------------------------------- */ + + template + void GeneralContainer::delRestart(bool scale,bool translate,bool rotate) + { + // do only delete property if it is a restart property + if(!decidePackUnpackOperation(OPERATION_RESTART, scale, translate, rotate)) + return; + + /*NL*/ //printf("del restart for %s, numElem_ %d, n %d\n",this->id_,numElem_,n); + numElem_ = 0; + } + /* ---------------------------------------------------------------------- get an element ------------------------------------------------------------------------- */ @@ -297,6 +318,15 @@ /* ---------------------------------------------------------------------- */ + template + void GeneralContainer::setToDefault(int n) + { + /*NL*/ //printf("setting for body # %d\n",n); + for(int i = 0; i < NUM_VEC; i++) + for(int j = 0; j < LEN_VEC; j++) + arr_[n][i][j] = defaultValue_; + } + template void GeneralContainer::set(int n, T** elem) { diff --git a/src/global_properties.h b/src/global_properties.h index 175854c4..55e18ed9 100644 --- a/src/global_properties.h +++ b/src/global_properties.h @@ -24,6 +24,7 @@ Christoph Kloss (JKU Linz, DCS Computing GmbH, Linz) Richard Berger (JKU Linz) ------------------------------------------------------------------------- */ + #ifndef GLOBAL_PROPERTIES_H_ #define GLOBAL_PROPERTIES_H_ diff --git a/src/library.cpp b/src/library.cpp index 2e282324..75951112 100644 --- a/src/library.cpp +++ b/src/library.cpp @@ -135,6 +135,24 @@ void *lammps_extract_global(void *ptr, char *name) if (strcmp(name,"boxyhi") == 0) return (void *) &lmp->domain->boxhi[1]; if (strcmp(name,"boxzlo") == 0) return (void *) &lmp->domain->boxlo[2]; if (strcmp(name,"boxzhi") == 0) return (void *) &lmp->domain->boxhi[2]; + if (strcmp(name,"subxlo") == 0) return (void *) &lmp->domain->sublo[0]; + if (strcmp(name,"subxhi") == 0) return (void *) &lmp->domain->subhi[0]; + if (strcmp(name,"subylo") == 0) return (void *) &lmp->domain->sublo[1]; + if (strcmp(name,"subyhi") == 0) return (void *) &lmp->domain->subhi[1]; + if (strcmp(name,"subzlo") == 0) return (void *) &lmp->domain->sublo[2]; + if (strcmp(name,"subzhi") == 0) return (void *) &lmp->domain->subhi[2]; + if (strcmp(name,"procx") == 0) return (void *) &lmp->comm->procgrid[0]; + if (strcmp(name,"procy") == 0) return (void *) &lmp->comm->procgrid[1]; + if (strcmp(name,"procz") == 0) return (void *) &lmp->comm->procgrid[2]; + if (strcmp(name,"procneighxleft") == 0) return (void *) &lmp->comm->procneigh[0][0]; + if (strcmp(name,"procneighxright") == 0) return (void *) &lmp->comm->procneigh[0][1]; + if (strcmp(name,"procneighyleft") == 0) return (void *) &lmp->comm->procneigh[1][0]; + if (strcmp(name,"procneighyright") == 0) return (void *) &lmp->comm->procneigh[1][1]; + if (strcmp(name,"procneighzleft") == 0) return (void *) &lmp->comm->procneigh[2][0]; + if (strcmp(name,"procneighzright") == 0) return (void *) &lmp->comm->procneigh[2][1]; + if (strcmp(name,"mylocx") == 0) return (void *) &lmp->comm->myloc[0]; + if (strcmp(name,"mylocy") == 0) return (void *) &lmp->comm->myloc[1]; + if (strcmp(name,"mylocz") == 0) return (void *) &lmp->comm->myloc[2]; if (strcmp(name,"natoms") == 0) return (void *) &lmp->atom->natoms; if (strcmp(name,"nlocal") == 0) return (void *) &lmp->atom->nlocal; return NULL; @@ -378,7 +396,7 @@ int lammps_get_natoms(void *ptr) data must be pre-allocated by caller to correct length ------------------------------------------------------------------------- */ -void lammps_gather_atoms(void *ptr, char *name, +void lammps_gather_atoms(void *ptr, char *name, int type, int count, void *data) { LAMMPS *lmp = (LAMMPS *) ptr; diff --git a/src/mesh_mover.cpp b/src/mesh_mover.cpp index 2a285fe2..8fbea437 100644 --- a/src/mesh_mover.cpp +++ b/src/mesh_mover.cpp @@ -48,7 +48,10 @@ MeshMoverLinear::MeshMoverLinear(LAMMPS *lmp,AbstractMesh *_mesh, vel_[0] = vx; vel_[1] = vy; vel_[2] = vz; +} +void MeshMoverLinear::post_create() +{ isFirst_ = mesh_->registerMove(false,true,false); } @@ -120,7 +123,12 @@ MeshMoverLinearVariable::MeshMoverLinearVariable(LAMMPS *lmp,AbstractMesh *_mesh vel_[1] = input->variable->compute_equal(myvar2_); vel_[2] = input->variable->compute_equal(myvar3_); - isFirst_ = mesh_->registerMove(false,true,false); + +} + +void MeshMoverLinearVariable::post_create() +{ + isFirst_ = mesh_->registerMove(false,true,false); } void MeshMoverLinearVariable::pre_delete() @@ -212,7 +220,10 @@ MeshMoverWiggle::MeshMoverWiggle(LAMMPS *lmp,AbstractMesh *_mesh, amplitude_[0] = ax; amplitude_[1] = ay; amplitude_[2] = az; +} +void MeshMoverWiggle::post_create() +{ isFirst_ = mesh_->registerMove(false,true,false); } @@ -283,7 +294,10 @@ MeshMoverRotate::MeshMoverRotate(LAMMPS *lmp,AbstractMesh *_mesh, point_[2] = pz; add_reference_point(point_); +} +void MeshMoverRotate::post_create() +{ isFirst_ = mesh_->registerMove(false,true,true); } @@ -371,7 +385,10 @@ MeshMoverRotateVariable::MeshMoverRotateVariable(LAMMPS *lmp,AbstractMesh *_mesh point_[2] = pz; add_reference_point(point_); +} +void MeshMoverRotateVariable::post_create() +{ isFirst_ = mesh_->registerMove(false,true,true); } @@ -481,7 +498,10 @@ MeshMoverRiggle::MeshMoverRiggle(LAMMPS *lmp,AbstractMesh *_mesh, point_[0] = px; point_[1] = py; point_[2] = pz; +} +void MeshMoverRiggle::post_create() +{ isFirst_ = mesh_->registerMove(false,true,true); } @@ -553,7 +573,10 @@ MeshMoverVibLin::MeshMoverVibLin(LAMMPS *lmp,AbstractMesh *_mesh, phi[j] = phase[j]; ampl[j] = amplitude[j]; } +} +void MeshMoverVibLin::post_create() +{ isFirst_ = mesh_->registerMove(false,true,false); } @@ -628,9 +651,13 @@ MeshMoverVibRot::MeshMoverVibRot(LAMMPS *lmp,AbstractMesh *_mesh, phi[j] = phase[j]; ampl[j] = amplitude[j]; } +} +void MeshMoverVibRot::post_create() +{ isFirst_ = mesh_->registerMove(false,true,true); } + void MeshMoverVibRot::pre_delete() { mesh_->unregisterMove(false,true,true); diff --git a/src/mesh_mover.h b/src/mesh_mover.h index 87447444..abed4232 100644 --- a/src/mesh_mover.h +++ b/src/mesh_mover.h @@ -49,6 +49,7 @@ namespace LAMMPS_NS virtual ~MeshMover() {} + virtual void post_create() = 0; virtual void pre_delete() = 0; virtual void setup() {}; @@ -105,6 +106,7 @@ namespace LAMMPS_NS void initial_integrate(double dTAbs,double dTSetup,double dt); void final_integrate(double dTAbs,double dTSetup,double dt) {} void pre_delete(); + void post_create(); private: @@ -122,6 +124,7 @@ namespace LAMMPS_NS virtual ~MeshMoverLinearVariable(); void pre_delete(); + void post_create(); void setup(); void initial_integrate(double dTAbs,double dTSetup,double dt); @@ -153,6 +156,7 @@ namespace LAMMPS_NS void initial_integrate(double dTAbs,double dTSetup,double dt); void final_integrate(double dTAbs,double dTSetup,double dt) {} void pre_delete(); + void post_create(); private: @@ -174,6 +178,7 @@ namespace LAMMPS_NS void initial_integrate(double dTAbs,double dTSetup,double dt); void final_integrate(double dTAbs,double dTSetup,double dt) {} void pre_delete(); + void post_create(); private: @@ -193,6 +198,7 @@ namespace LAMMPS_NS virtual ~MeshMoverRotateVariable(); void pre_delete(); + void post_create(); void setup(); void initial_integrate(double dTAbs,double dTSetup,double dt); @@ -224,6 +230,7 @@ namespace LAMMPS_NS void initial_integrate(double dTAbs,double dTSetup,double dt); void final_integrate(double dTAbs,double dTSetup,double dt) {} void pre_delete(); + void post_create(); private: @@ -245,6 +252,7 @@ namespace LAMMPS_NS void initial_integrate(double dTAbs,double dTSetup,double dt); void final_integrate(double dTAbs,double dTSetup,double dt) {} void pre_delete(); + void post_create(); private: double axis_[3], ord, ampl[10], phi[10], p_[3], omega_; @@ -264,6 +272,7 @@ namespace LAMMPS_NS void initial_integrate(double dTAbs,double dTSetup,double dt); void final_integrate(double dTAbs,double dTSetup,double dt) {} void pre_delete(); + void post_create(); private: double axis_[3], ord, omega_, ampl[10], phi[10]; diff --git a/src/multi_node_mesh_I.h b/src/multi_node_mesh_I.h index bb7d09ea..9597a796 100644 --- a/src/multi_node_mesh_I.h +++ b/src/multi_node_mesh_I.h @@ -340,7 +340,9 @@ double **tmp; this->memory->template create(tmp,NUM_NODES,3,"MultiNodeMesh:tmp"); - if(node_orig_) + //NP IMPORTANT: 0 == nall might be in case registerMove() is called before post_create!! + //NP in case of restart because elements are created/allocated upon restart + if(node_orig_ || (0 == nall && 0 == sizeGlobal())) error->one(FLERR,"Illegal situation in MultiNodeMesh::registerMove"); node_orig_ = new MultiVectorContainer("node_orig"); diff --git a/src/multi_node_mesh_parallel_I.h b/src/multi_node_mesh_parallel_I.h index 5997ef80..e992be1f 100644 --- a/src/multi_node_mesh_parallel_I.h +++ b/src/multi_node_mesh_parallel_I.h @@ -670,7 +670,7 @@ if(sizeGlobal() != sizeGlobalOrig()) { - ///*NL*/ if(this->screen) fprintf(this->screen,"orig %d now %d\n", sizeGlobalOrig(),sizeGlobal()); + /*NL*/ if(this->screen) fprintf(this->screen,"orig %d now %d\n", sizeGlobalOrig(),sizeGlobal()); //this->error->all(FLERR,"Mesh elements have been lost"); char errstr[500]; sprintf(errstr,"Mesh (id %s): Mesh elements have been lost / left the domain. Please use " diff --git a/src/multi_node_mesh_parallel_buffer_I.h b/src/multi_node_mesh_parallel_buffer_I.h index 8362acf8..19d13a51 100644 --- a/src/multi_node_mesh_parallel_buffer_I.h +++ b/src/multi_node_mesh_parallel_buffer_I.h @@ -229,6 +229,11 @@ m += nrecv_this; } + //NP same as done in popElemFromBuffer() for element properties + //NP first delete, then re-add elements with correct restart data + //NP this is necessary since GeneralContainer::popElemFromBuffer + //NP always creates new elements + this->prop().deleteRestartGlobal(dummy,dummy,dummy); popMeshPropsFromBuffer(&list[m],OPERATION_RESTART,dummy,dummy,dummy); } @@ -502,22 +507,26 @@ //NP OPERATION_COMM_REVERSE is a list operation, not per-element operation + //NP restart wants to set restart data for existing elements + //NP this is realized by deleting existing and re-creating new elements with correct data if(OPERATION_RESTART == operation) { MultiVectorContainer nodeTmp("nodeTmp"); //NP pop node info from buffer and call addElement so everything is initialized correctly + //NP calls to TrackingMesh::addElement() nrecv += nodeTmp.popElemFromBuffer(&(buf[nrecv]),operation); this->addElement(nodeTmp.begin()[0],-1); //NP this->addElement() creates properties, calculates everything //NP also adds custom values for which restart data is available - //NP these are now cleared and re-created with correct restart data - //NP in TrackingMesh::popElemFromBuffer + //NP these are now cleared via the call below and afterward + //NP re-created with correct restart data in derived class (TrackingMesh::popElemFromBuffer) this->prop().deleteRestartElement(nLocal_-1,false,false,false); return nrecv; } + //NP exchange and border want to create new elements if(OPERATION_COMM_EXCHANGE == operation || OPERATION_COMM_BORDERS == operation) { nrecv += MultiNodeMesh::center_.popElemFromBuffer(&(buf[nrecv]),operation); diff --git a/src/multisphere.cpp b/src/multisphere.cpp index 804cd2b2..b506a518 100644 --- a/src/multisphere.cpp +++ b/src/multisphere.cpp @@ -164,6 +164,24 @@ void Multisphere::add_body(int nspheres, double *xcm_ins, double *xcm_to_xbound_ angmom_(n) ); + // loop all non-initialized properties and set to their + // default values + int iProperty = 0; + for(ContainerBase *cb = customValues_.getElementPropertyBase(iProperty); cb; cb = customValues_.getElementPropertyBase(++iProperty)) + { + /*NL*///char id[200]; + /*NL*///cb->id(id); + /*NL*///fprintf(screen,"iProperty %d, property %s\n",iProperty,id); + + //NP this funtion is inlinable + if(cb->useDefault()) + { + //NP this is virtual fct + cb->setToDefault(n); + /*NL*///fprintf(screen," setting default here\n"); + } + } + /*NL*/ //fprintf(screen,"start_step_ins %d\n",start_step_ins); /*NL*/ //printVec3D(screen,"vcm(n)",vcm_(n)); /*NL*/// printVec3D(screen,"omega_(n)",omega_(n)); @@ -508,7 +526,7 @@ bool Multisphere::check_lost_atoms(int *body, double *atom_delflag, double *body { if(delflag[ibody] == 1) { - /*NL*/if(screen) fprintf(screen,"DELETING body tag %d ibody %d on step "BIGINT_FORMAT"\n",tag(ibody),ibody,update->ntimestep); + /*NL*///if(screen) fprintf(screen,"DELETING body tag %d ibody %d on step "BIGINT_FORMAT"\n",tag(ibody),ibody,update->ntimestep); delflag[ibody] = delflag[nbody_-1]; remove_body(ibody); /*NL*/ //if(map(7833) >= 0) fprintf(screen,"proc %d has body %d\n",comm->me,7833); diff --git a/src/multisphere.h b/src/multisphere.h index b094bc40..5c39327f 100644 --- a/src/multisphere.h +++ b/src/multisphere.h @@ -98,6 +98,9 @@ namespace LAMMPS_NS { inline int atomtype(int i) { return atomtype_(i); } + inline int nrigid(int i) + { return nrigid_(i); } + inline void xcm(double *x_cm,int i) { vectorCopy3D(xcm_(i),x_cm); } diff --git a/src/neighbor.h b/src/neighbor.h index 83a791fa..921148bc 100644 --- a/src/neighbor.h +++ b/src/neighbor.h @@ -38,6 +38,7 @@ class Neighbor : protected Pointers { /*NL*/ friend class Lbalance; //NP modified St.A. friend class FixHeatGranRad; + friend class FixLiquidTrackingInstant; public: int style; // 0,1,2 = nsq, bin, multi diff --git a/src/normal_model_hertz.h b/src/normal_model_hertz.h index ca707a37..f1f1e189 100644 --- a/src/normal_model_hertz.h +++ b/src/normal_model_hertz.h @@ -112,7 +112,7 @@ namespace ContactModels const double Fn_damping = -gamman*cdata.vn; const double Fn_contact = kn*(cdata.radsum-cdata.r); - double Fn = Fn_damping + Fn_contact; + double Fn = Fn_damping + Fn_contact; //limit force to avoid the artefact of negative repulsion force if(limitForce && (Fn<0.0) ) diff --git a/src/normal_model_hooke_hysteresis.h b/src/normal_model_hooke_hysteresis.h index ba3a0072..b5bffb12 100644 --- a/src/normal_model_hooke_hysteresis.h +++ b/src/normal_model_hooke_hysteresis.h @@ -96,7 +96,7 @@ namespace ContactModels const double deltan = cdata.deltan; double ri = cdata.radi; double rj = cdata.radj; - double reff=ri*rj/(ri+rj); + double reff=cdata.is_wall ? cdata.radi : (ri*rj/(ri+rj)); double meff=cdata.meff; double coeffRestLogChosen; @@ -123,44 +123,57 @@ namespace ContactModels kn /= force->nktv2p; kt /= force->nktv2p; - if(cdata.touch) *cdata.touch |= TOUCH_NORMAL_MODEL; - double * const shear = &cdata.contact_history[history_offset]; - double deltaMax = shear[0]; // the 4th value of the history array is deltaMax - if (deltan > deltaMax) { - shear[0] = deltan; - deltaMax = deltan; - } - + // coefficients /*NL*/ //if(screen) fprintf(screen,"For types %d %d\n",itype,jtype); /*NL*/ //if(screen) fprintf(screen,"kn2k2Max = %f and kn2kc = %f \n",kn2k2Max_[itype][jtype],kn2kc_[itype][jtype]); - const double k2Max = kn * kn2k2Max[itype][jtype]; //NP Test parameter const double kc = kn * kn2kc[itype][jtype]; //NP Test parameter + // get the history value -- maximal overlap + if(cdata.touch) *cdata.touch |= TOUCH_NORMAL_MODEL; + double * const history = &cdata.contact_history[history_offset]; + double deltaMax; // the 4th value of the history array is deltaMax + if (deltan > history[0]) { + history[0] = deltan; + deltaMax = deltan; + } else + deltaMax = history[0]; + // k2 dependent on the maximum overlap // this accounts for an increasing stiffness with deformation const double deltaMaxLim =(k2Max/(k2Max-kn))*phiF[itype][jtype]*2*reff; - double k2; - if (deltaMax >= deltaMaxLim) k2 = k2Max; - else k2 = kn+(k2Max-kn)*deltaMax/deltaMaxLim; + double k2, fHys; + if (deltaMax >= deltaMaxLim) // big overlap ... no kn at all + { + k2 = k2Max; + const double fTmp = k2*(deltan-deltaMaxLim)+kn*deltaMaxLim;//k2*(deltan-delta0); + if (fTmp >= -kc*deltan) { // un-/reloading part (k2) + fHys = fTmp; + } else { // cohesion part + fHys = -kc*deltan; + + const double newDeltaMax = 0.5*(deltan+sqrt(deltan*deltan+4*((kn+kc)*deltan*deltaMaxLim/(k2Max-kn)))); + history[0] = newDeltaMax; + } + } else { + k2 = kn+(k2Max-kn)*deltaMax/deltaMaxLim; + const double fTmp = k2*(deltan-deltaMax)+kn*deltaMax;//k2*(deltan-delta0); + if (fTmp >= kn*deltan) { // loading part (kn) + fHys = kn*deltan; + } else { // un-/reloading part (k2) + if (fTmp > -kc*deltan) { + fHys = fTmp; + } else { // cohesion part + fHys = -kc*deltan; + + const double newDeltaMax = 0.5*(deltan+sqrt(deltan*deltan+4*((kn+kc)*deltan*deltaMaxLim/(k2Max-kn)))); + history[0] = newDeltaMax; + } + } + } /*NL*/ //if(screen) fprintf(screen,"k1 = kn = %f; k2 = %f; kc = %f \n",kn,k2,kc); - //NP original version: - //NP delta0 = (1-kn/k2)*deltaMax; - //NP fTmp = k2*(deltan-delta0); - //NP bad, because division - - const double fTmp = k2*(deltan-deltaMax)+kn*deltaMax;//k2*(deltan-delta0); - double fHys; - if (fTmp >= kn*deltan) { - fHys = kn*deltan; - } else { - if (fTmp > -kc*deltan) { - fHys = fTmp; - } else fHys = -kc*deltan; - } - const double Fn_damping = -gamman*cdata.vn; const double Fn = fHys + Fn_damping; @@ -190,8 +203,8 @@ namespace ContactModels inline void noCollision(ContactData & cdata, ForceData&, ForceData&) { if(cdata.touch) *cdata.touch &= ~TOUCH_NORMAL_MODEL; - double * const shear = &cdata.contact_history[history_offset]; - shear[0] = 0.0; + double * const history = &cdata.contact_history[history_offset]; + history[0] = 0.0; } void beginPass(CollisionData&, ForceData&, ForceData&){} diff --git a/src/normal_model_jkr.h b/src/normal_model_jkr.h index 2c92447e..be733b1d 100644 --- a/src/normal_model_jkr.h +++ b/src/normal_model_jkr.h @@ -32,7 +32,7 @@ NORMAL_MODEL(JKR,jkr,5) #define NORMAL_MODEL_JKR_H_ #include "global_properties.h" #include "math.h" - +#include namespace MODEL_PARAMS { @@ -244,7 +244,7 @@ namespace ContactModels const double coef = coefContactRadius[itype][jtype]*reff*sqrt(cRadOld); cRad = (cRadOld*cRadOld2 + cRadOld*coef + deltan*cRadOld*reff)/(2*cRadOld2 - coef); //NP modified sign of deltan /*NL*/ //fprintf(screen,"Loop: deltan = %f, coefContactRadius = %f, cRad = %f, cRadOld = %f\n",deltan,coefContactRadius[itype][jtype],cRad,cRadOld); - if (fabs(cRad-cRadOld) < __DBL_EPSILON__) break; + if (fabs(cRad-cRadOld) < std::numeric_limits::epsilon()) break; } /*NL*/ //if (isnan(cRad)) lmp->error->all(FLERR,"cRad is NAN. Cohesive surface energy to high?"); /*NL*/ //fprintf(screen,"Final: coefContactRadius = %f, cRad = %f\n",coefContactRadius[itype][jtype],cRad); diff --git a/src/rolling_model_cdt.h b/src/rolling_model_cdt.h index ad46b8ef..3469c905 100644 --- a/src/rolling_model_cdt.h +++ b/src/rolling_model_cdt.h @@ -107,7 +107,7 @@ namespace ContactModels const double enz = cdata.en[2]; // calculate torque - const double reff=radi*radj/(radi+radj); + const double reff= cdata.is_wall ? radi : (radi*radj/(radi+radj)); vectorScalarMult3D(wr_roll,rmu*cdata.kn*cdata.deltan*reff/wr_rollmag,r_torque); // remove normal (torsion) part of torque diff --git a/src/rolling_model_epsd.h b/src/rolling_model_epsd.h index 94770216..6826241d 100644 --- a/src/rolling_model_epsd.h +++ b/src/rolling_model_epsd.h @@ -96,7 +96,7 @@ namespace ContactModels const double radi = cdata.radi; const double radj = cdata.radj; - const double reff=radi*radj/(radi+radj); + const double reff = cdata.is_wall ? radi : (radi*radj/(radi+radj)); const double * const * const omega = atom->omega; const double r_inertia_red_i = cdata.mi*radi*radi; diff --git a/src/rolling_model_epsd2.h b/src/rolling_model_epsd2.h index a359eacd..1dd4c2c8 100644 --- a/src/rolling_model_epsd2.h +++ b/src/rolling_model_epsd2.h @@ -89,7 +89,7 @@ namespace ContactModels const double radi = cdata.radi; const double radj = cdata.radj; - const double reff=radi*radj/(radi+radj); + const double reff = cdata.is_wall ? radi : (radi*radj/(radi+radj)); const double * const * const omega = atom->omega; // relative rotational velocity diff --git a/src/scalar_container.h b/src/scalar_container.h index 1d4a33f4..a1e5f9e5 100644 --- a/src/scalar_container.h +++ b/src/scalar_container.h @@ -38,6 +38,7 @@ namespace LAMMPS_NS class ScalarContainer : public GeneralContainer { public: + ScalarContainer(); ScalarContainer(const char *_id); ScalarContainer(const char *_id, const char *_comm, const char *_ref, const char *_restart, int _scalePower = 1); ScalarContainer(ScalarContainer const &orig); @@ -53,12 +54,21 @@ namespace LAMMPS_NS T const& operator() (int n) const; T max(); T max(int); + int pushToBuffer_plain(double *buf); + int pullFromBuffer_plain(double *buf); }; /* ---------------------------------------------------------------------- constructors ------------------------------------------------------------------------- */ + template + ScalarContainer::ScalarContainer() + : GeneralContainer(0) + { + + } + template ScalarContainer::ScalarContainer(const char *_id) : GeneralContainer(_id) @@ -189,5 +199,31 @@ namespace LAMMPS_NS return maxim; } + + template + int ScalarContainer::pushToBuffer_plain(double *buf) + { + int len = this->size(); + + int m = 0; + + for(int i = 0; i < len; i++) + buf[m++] = static_cast(this->arr_[i][0][0]); + + return len; + } + + template + int ScalarContainer::pullFromBuffer_plain(double *buf) + { + int len = this->size(); + + int m = 0; + + for(int i = 0; i < len; i++) + this->arr_[i][0][0] = static_cast(buf[m++]); + + return len; + } } /* LAMMPS_NS */ #endif /* SCALARCONTAINER_H_ */ diff --git a/src/style_angle.h b/src/style_angle.h deleted file mode 100644 index ed3b570d..00000000 --- a/src/style_angle.h +++ /dev/null @@ -1 +0,0 @@ -#include "angle_hybrid.h" diff --git a/src/style_atom.h b/src/style_atom.h deleted file mode 100644 index e3b73cb0..00000000 --- a/src/style_atom.h +++ /dev/null @@ -1,11 +0,0 @@ -#include "atom_vec_atomic.h" -#include "atom_vec_body.h" -#include "atom_vec_bond_gran.h" -#include "atom_vec_charge.h" -#include "atom_vec_ellipsoid.h" -#include "atom_vec_hybrid.h" -#include "atom_vec_line.h" -#include "atom_vec_sphere.h" -#include "atom_vec_sph.h" -#include "atom_vec_sph_var.h" -#include "atom_vec_tri.h" diff --git a/src/style_body.h b/src/style_body.h deleted file mode 100644 index e69de29b..00000000 diff --git a/src/style_bond.h b/src/style_bond.h deleted file mode 100644 index cbebcbf5..00000000 --- a/src/style_bond.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "bond_gran.h" -#include "bond_hybrid.h" diff --git a/src/style_cfd_datacoupling.h b/src/style_cfd_datacoupling.h deleted file mode 100644 index 8f163409..00000000 --- a/src/style_cfd_datacoupling.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "cfd_datacoupling_file.h" -#include "cfd_datacoupling_mpi.h" diff --git a/src/style_cfd_regionmodel.h b/src/style_cfd_regionmodel.h deleted file mode 100644 index e69de29b..00000000 diff --git a/src/style_cohesion_model.h b/src/style_cohesion_model.h deleted file mode 100644 index db1cabcb..00000000 --- a/src/style_cohesion_model.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "cohesion_model_hamaker.h" -#include "cohesion_model_sjkr2.h" -#include "cohesion_model_sjkr.h" diff --git a/src/style_command.h b/src/style_command.h deleted file mode 100644 index d1796378..00000000 --- a/src/style_command.h +++ /dev/null @@ -1,20 +0,0 @@ -#include "balance.h" -#include "change_box.h" -#include "coarsegraining.h" -#include "create_atoms.h" -#include "create_box.h" -#include "delete_atoms.h" -#include "delete_bonds.h" -#include "displace_atoms.h" -#include "minimize.h" -#include "read_data.h" -#include "read_dump.h" -#include "read_restart.h" -#include "replicate.h" -#include "rerun.h" -#include "run.h" -#include "set.h" -#include "velocity.h" -#include "write_data.h" -#include "write_dump.h" -#include "write_restart.h" diff --git a/src/style_compute.h b/src/style_compute.h deleted file mode 100644 index 9030ad98..00000000 --- a/src/style_compute.h +++ /dev/null @@ -1,54 +0,0 @@ -#include "compute_angle_local.h" -#include "compute_atom_molecule.h" -#include "compute_bond_local.h" -#include "compute_centro_atom.h" -#include "compute_cluster_atom.h" -#include "compute_cna_atom.h" -#include "compute_com.h" -#include "compute_com_molecule.h" -#include "compute_contact_atom.h" -#include "compute_coord_atom.h" -#include "compute_crosssection.h" -#include "compute_dihedral_local.h" -#include "compute_displace_atom.h" -#include "compute_erotate_multisphere.h" -#include "compute_erotate_rigid.h" -#include "compute_erotate_sphere_atom.h" -#include "compute_erotate_sphere.h" -#include "compute_group_group.h" -#include "compute_gyration.h" -#include "compute_gyration_molecule.h" -#include "compute_heat_flux.h" -#include "compute_improper_local.h" -#include "compute_inertia_molecule.h" -#include "compute_ke_atom.h" -#include "compute_ke.h" -#include "compute_ke_multisphere.h" -#include "compute_ke_rigid.h" -#include "compute_msd.h" -#include "compute_msd_molecule.h" -#include "compute_nparticles_tracer_region.h" -#include "compute_pair_gran_local.h" -#include "compute_pair.h" -#include "compute_pair_local.h" -#include "compute_pe_atom.h" -#include "compute_pe.h" -#include "compute_pressure.h" -#include "compute_property_atom.h" -#include "compute_property_local.h" -#include "compute_property_molecule.h" -#include "compute_rdf.h" -#include "compute_reduce.h" -#include "compute_reduce_region.h" -#include "compute_rigid.h" -#include "compute_slice.h" -#include "compute_stress_atom.h" -#include "compute_temp_com.h" -#include "compute_temp_deform.h" -#include "compute_temp.h" -#include "compute_temp_partial.h" -#include "compute_temp_profile.h" -#include "compute_temp_ramp.h" -#include "compute_temp_region.h" -#include "compute_temp_sphere.h" -#include "compute_vacf.h" diff --git a/src/style_contact_model.h b/src/style_contact_model.h deleted file mode 100644 index 3634495e..00000000 --- a/src/style_contact_model.h +++ /dev/null @@ -1,384 +0,0 @@ -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_DEFAULT) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_DEFAULT) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HERTZ_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_HYSTERESIS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(HOOKE_STIFFNESS, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_OFF, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_HAMAKER, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR2, ROLLING_EPSD, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_OFF, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_CDT, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD2, SURFACE_ROUGHNESS) -GRAN_MODEL(JKR, TANGENTIAL_NO_HISTORY, COHESION_SJKR, ROLLING_EPSD, SURFACE_ROUGHNESS) diff --git a/src/style_dihedral.h b/src/style_dihedral.h deleted file mode 100644 index 0462ede6..00000000 --- a/src/style_dihedral.h +++ /dev/null @@ -1 +0,0 @@ -#include "dihedral_hybrid.h" diff --git a/src/style_dump.h b/src/style_dump.h deleted file mode 100644 index b1968de2..00000000 --- a/src/style_dump.h +++ /dev/null @@ -1,14 +0,0 @@ -#include "dump_atom.h" -#include "dump_atom_vtk.h" -#include "dump_cfg.h" -#include "dump_custom.h" -#include "dump_custom_vtk.h" -#include "dump_dcd.h" -#include "dump_decomposition_vtk.h" -#include "dump_euler_vtk.h" -#include "dump_image.h" -#include "dump_local.h" -#include "dump_mesh_stl.h" -#include "dump_mesh_vtk.h" -#include "dump_movie.h" -#include "dump_xyz.h" diff --git a/src/style_fix.h b/src/style_fix.h deleted file mode 100644 index 9aec2f5d..00000000 --- a/src/style_fix.h +++ /dev/null @@ -1,133 +0,0 @@ -#include "fix_adapt.h" -#include "fix_addforce.h" -#include "fix_ave_atom.h" -#include "fix_ave_correlate.h" -#include "fix_ave_euler.h" -#include "fix_aveforce.h" -#include "fix_ave_histo.h" -#include "fix_ave_spatial.h" -#include "fix_ave_time.h" -#include "fix_balance.h" -#include "fix_bond_create_gran.h" -#include "fix_bond_propagate_gran.h" -#include "fix_box_relax.h" -#include "fix_cfd_coupling_convection.h" -#include "fix_cfd_coupling_force.h" -#include "fix_cfd_coupling_force_implicit.h" -#include "fix_cfd_coupling.h" -#include "fix_check_timestep_gran.h" -#include "fix_check_timestep_sph.h" -#include "fix_contact_history.h" -#include "fix_contact_history_mesh.h" -#include "fix_deform.h" -#include "fix_deposit.h" -#include "fix_diam_max.h" -#include "fix_drag.h" -#include "fix_dt_reset.h" -#include "fix_enforce2d.h" -#include "fix_external.h" -#include "fix_freeze.h" -#include "fix_gravity.h" -#include "fix_gravity_omp.h" -#include "fix_gravity_partitioned_omp.h" -#include "fix_heat_gran_conduction.h" -#include "fix_heat_gran_radiation.h" -#include "fix_heat.h" -#include "fix_indent.h" -#include "fix_insert.h" -#include "fix_insert_pack.h" -#include "fix_insert_rate_region.h" -#include "fix_insert_stream.h" -#include "fix_insert_stream_moving.h" -#include "fix_langevin.h" -#include "fix_lb_coupling_onetoone.h" -#include "fix_lineforce.h" -#include "fix_massflow_mesh.h" -#include "fix_mesh.h" -#include "fix_mesh_surface.h" -#include "fix_mesh_surface_omp.h" -#include "fix_mesh_surface_stress_6dof.h" -#include "fix_mesh_surface_stress_contact.h" -#include "fix_mesh_surface_stress.h" -#include "fix_mesh_surface_stress_servo.h" -#include "fix_minimize.h" -#include "fix_momentum.h" -#include "fix_move.h" -#include "fix_move_mesh.h" -#include "fix_multisphere.h" -#include "fix_neighlist_mesh.h" -#include "fix_neighlist_mesh_omp.h" -#include "fix_nph.h" -#include "fix_nph_sphere.h" -#include "fix_npt.h" -#include "fix_npt_sphere.h" -#include "fix_nve.h" -#include "fix_nve_limit.h" -#include "fix_nve_limit_omp.h" -#include "fix_nve_noforce.h" -#include "fix_nve_sphere_aos_omp.h" -#include "fix_nve_sphere.h" -#include "fix_nve_sphere_limit.h" -#include "fix_nve_sphere_omp.h" -#include "fix_nve_sphere_partitioned_omp.h" -#include "fix_nve_sph.h" -#include "fix_nve_sph_limit.h" -#include "fix_nve_sph_stationary.h" -#include "fix_nvt.h" -#include "fix_nvt_sllod.h" -#include "fix_nvt_sphere.h" -#include "fix_omp.h" -#include "fix_particledistribution_discrete.h" -#include "fix_planeforce.h" -#include "fix_pour.h" -#include "fix_press_berendsen.h" -#include "fix_print.h" -#include "fix_property_atom.h" -#include "fix_property_atom_tracer.h" -#include "fix_property_atom_tracer_stream.h" -#include "fix_property_global.h" -#include "fix_read_restart.h" -#include "fix_recenter.h" -#include "fix_region_variable.h" -#include "fix_remove.h" -#include "fix_respa.h" -#include "fix_restrain.h" -#include "fix_rigid.h" -#include "fix_rigid_nph.h" -#include "fix_rigid_npt.h" -#include "fix_rigid_nve.h" -#include "fix_rigid_nvt.h" -#include "fix_rigid_small.h" -#include "fix_roughness.h" -#include "fix_scalar_transport_equation.h" -#include "fix_setforce.h" -#include "fix_shake.h" -#include "fix_shear_history.h" -#include "fix_sph_density_continuity.h" -#include "fix_sph_density_corr.h" -#include "fix_sph_density_summation.h" -#include "fix_sph_pressure.h" -#include "fix_spring.h" -#include "fix_spring_rg.h" -#include "fix_spring_self.h" -#include "fix_store_force.h" -#include "fix_store.h" -#include "fix_store_state.h" -#include "fix_temp_berendsen.h" -#include "fix_template_multiplespheres.h" -#include "fix_template_multisphere.h" -#include "fix_template_sphere.h" -#include "fix_temp_rescale.h" -#include "fix_tmd.h" -#include "fix_viscous.h" -#include "fix_wall_gran.h" -#include "fix_wall_gran_omp.h" -#include "fix_wall_harmonic.h" -#include "fix_wall_lj1043.h" -#include "fix_wall_lj126.h" -#include "fix_wall_lj93.h" -#include "fix_wall_reflect.h" -#include "fix_wall_region.h" -#include "fix_wall_region_sph.h" -#include "fix_wall_sph_general_simple.h" -#include "fix_wall_sph.h" diff --git a/src/style_improper.h b/src/style_improper.h deleted file mode 100644 index 0afda80d..00000000 --- a/src/style_improper.h +++ /dev/null @@ -1 +0,0 @@ -#include "improper_hybrid.h" diff --git a/src/style_integrate.h b/src/style_integrate.h deleted file mode 100644 index fc68b8a4..00000000 --- a/src/style_integrate.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "respa.h" -#include "verlet.h" -#include "verlet_implicit.h" diff --git a/src/style_kspace.h b/src/style_kspace.h deleted file mode 100644 index e69de29b..00000000 diff --git a/src/style_lb.h b/src/style_lb.h deleted file mode 100644 index 79d56bb2..00000000 --- a/src/style_lb.h +++ /dev/null @@ -1 +0,0 @@ -#include "lbalance_simple.h" diff --git a/src/style_minimize.h b/src/style_minimize.h deleted file mode 100644 index 05e1db5d..00000000 --- a/src/style_minimize.h +++ /dev/null @@ -1,5 +0,0 @@ -#include "min_cg.h" -#include "min_fire.h" -#include "min_hftn.h" -#include "min_quickmin.h" -#include "min_sd.h" diff --git a/src/style_normal_model.h b/src/style_normal_model.h deleted file mode 100644 index bd3c73b4..00000000 --- a/src/style_normal_model.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "normal_model_hertz.h" -#include "normal_model_hertz_stiffness.h" -#include "normal_model_hooke.h" -#include "normal_model_hooke_hysteresis.h" -#include "normal_model_hooke_stiffness.h" -#include "normal_model_jkr.h" diff --git a/src/style_pair.h b/src/style_pair.h deleted file mode 100644 index f3374992..00000000 --- a/src/style_pair.h +++ /dev/null @@ -1,35 +0,0 @@ -#include "pair_beck.h" -#include "pair_born_coul_wolf.h" -#include "pair_born.h" -#include "pair_buck_coul_cut.h" -#include "pair_buck.h" -#include "pair_coul_cut.h" -#include "pair_coul_debye.h" -#include "pair_coul_dsf.h" -#include "pair_coul_wolf.h" -#include "pair_dpd.h" -#include "pair_dpd_tstat.h" -#include "pair_gauss.h" -#include "pair_gran.h" -#include "pair_gran_proxy.h" -#include "pair_hybrid.h" -#include "pair_hybrid_overlay.h" -#include "pair_lj96_cut.h" -#include "pair_lj_cubic.h" -#include "pair_lj_cut_coul_cut.h" -#include "pair_lj_cut_coul_debye.h" -#include "pair_lj_cut_coul_dsf.h" -#include "pair_lj_cut.h" -#include "pair_lj_expand.h" -#include "pair_lj_gromacs_coul_gromacs.h" -#include "pair_lj_gromacs.h" -#include "pair_lj_smooth.h" -#include "pair_lj_smooth_linear.h" -#include "pair_mie_cut.h" -#include "pair_morse.h" -#include "pair_soft.h" -#include "pair_sph_artvisc_tenscorr.h" -#include "pair_sph.h" -#include "pair_table.h" -#include "pair_yukawa.h" -#include "pair_zbl.h" diff --git a/src/style_partitioner.h b/src/style_partitioner.h deleted file mode 100644 index 555a3766..00000000 --- a/src/style_partitioner.h +++ /dev/null @@ -1 +0,0 @@ -#include "partitioner_zoltan.h" diff --git a/src/style_reader.h b/src/style_reader.h deleted file mode 100644 index b66e91fe..00000000 --- a/src/style_reader.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "reader_native.h" -#include "reader_xyz.h" diff --git a/src/style_region.h b/src/style_region.h deleted file mode 100644 index 25ef73bf..00000000 --- a/src/style_region.h +++ /dev/null @@ -1,10 +0,0 @@ -#include "region_block.h" -#include "region_cone.h" -#include "region_cylinder.h" -#include "region_intersect.h" -#include "region_mesh_tet.h" -#include "region_plane.h" -#include "region_prism.h" -#include "region_sphere.h" -#include "region_union.h" -#include "region_wedge.h" diff --git a/src/style_rolling_model.h b/src/style_rolling_model.h deleted file mode 100644 index 0268c14f..00000000 --- a/src/style_rolling_model.h +++ /dev/null @@ -1,3 +0,0 @@ -#include "rolling_model_cdt.h" -#include "rolling_model_epsd2.h" -#include "rolling_model_epsd.h" diff --git a/src/style_sph_kernel.h b/src/style_sph_kernel.h deleted file mode 100644 index 8cb2773f..00000000 --- a/src/style_sph_kernel.h +++ /dev/null @@ -1,6 +0,0 @@ -#include "sph_kernel_cubicspline2D.h" -#include "sph_kernel_cubicspline.h" -#include "sph_kernel_spiky2D.h" -#include "sph_kernel_spiky.h" -#include "sph_kernel_wendland2D.h" -#include "sph_kernel_wendland.h" diff --git a/src/style_surface_model.h b/src/style_surface_model.h deleted file mode 100644 index dcef12d6..00000000 --- a/src/style_surface_model.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "surface_model_default.h" -#include "surface_model_roughness.h" diff --git a/src/style_tangential_model.h b/src/style_tangential_model.h deleted file mode 100644 index 3c45ab07..00000000 --- a/src/style_tangential_model.h +++ /dev/null @@ -1,2 +0,0 @@ -#include "tangential_model_history.h" -#include "tangential_model_no_history.h" diff --git a/src/tangential_model_history.h b/src/tangential_model_history.h index 3695a2e2..fa5611de 100644 --- a/src/tangential_model_history.h +++ b/src/tangential_model_history.h @@ -24,6 +24,7 @@ Christoph Kloss (JKU Linz, DCS Computing GmbH, Linz) Richard Berger (JKU Linz) ------------------------------------------------------------------------- */ + #ifdef TANGENTIAL_MODEL TANGENTIAL_MODEL(TANGENTIAL_HISTORY,history,1) #else diff --git a/src/tracking_mesh.h b/src/tracking_mesh.h index a5782c6c..24d6e949 100644 --- a/src/tracking_mesh.h +++ b/src/tracking_mesh.h @@ -79,6 +79,9 @@ namespace LAMMPS_NS{ inline bool verbose() { return verbose_; } + inline void check_element_property_consistency() + { customValues_.check_element_property_consistency(this->sizeLocal()+this->sizeGhost()); } + protected: TrackingMesh(LAMMPS *lmp); diff --git a/src/vector_liggghts.h b/src/vector_liggghts.h index fd3d8cef..748f23a3 100644 --- a/src/vector_liggghts.h +++ b/src/vector_liggghts.h @@ -137,6 +137,24 @@ inline void vectorAbs3D(double *v) if(v[2] < 0) v[2] = -v[2]; } +inline double vectorMin3D(double *v,int &dim) +{ + if(v[0] < v[1] && v[0] < v[2]) + { + dim = 0; + return v[0]; + } + + if(v[1] < v[2]) + { + dim = 1; + return v[1]; + } + + dim = 2; + return v[2]; +} + inline double vectorMin3D(double *v) { if(v[0] < v[1] && v[0] < v[2]) diff --git a/src/version_liggghts.h b/src/version_liggghts.h index 7968e222..9b98df95 100644 --- a/src/version_liggghts.h +++ b/src/version_liggghts.h @@ -1 +1 @@ -#define LIGGGHTS_VERSION "LIGGGHTS-PFM 3.0.3, compiled 2014-09-15-13:57:34 by richard" +#define LIGGGHTS_VERSION "LIGGGHTS-PFM 3.0.6, compiled 2015-01-30-01:22:01 by richard" diff --git a/src/version_liggghts.txt b/src/version_liggghts.txt index 75a22a26..818bd47a 100644 --- a/src/version_liggghts.txt +++ b/src/version_liggghts.txt @@ -1 +1 @@ -3.0.3 +3.0.6 diff --git a/tools/restart2data.cpp b/tools/restart2data.cpp index 3b46f331..48a470b1 100755 --- a/tools/restart2data.cpp +++ b/tools/restart2data.cpp @@ -1984,9 +1984,7 @@ void pair(FILE *fp, Data &data, char *style, int flag) } } } - } else if ((strcmp(style,"gran/hooke") == 0) || - (strcmp(style,"gran/hooke/history") == 0) || - (strcmp(style,"gran/hertz/history") == 0)) { + } else if (strcmp(style,"gran") == 0) { //double kn = read_double(fp); //double kt = read_double(fp); @@ -3228,9 +3226,7 @@ void Data::write(FILE *fp, FILE *fp2, int write_coeffs, int write_vels) (strcmp(pair_style,"eff/cut") != 0) && (strcmp(pair_style,"gauss") != 0) && (strcmp(pair_style,"gauss/cut") != 0) && - (strcmp(pair_style,"gran/hertz/history") != 0) && //NP modified C.K. - (strcmp(pair_style,"gran/hooke/history") != 0) && - (strcmp(pair_style,"gran/hooke") != 0) && + (strcmp(pair_style,"gran") != 0) && (strcmp(pair_style,"lubricate2") != 0) && (strcmp(pair_style,"lubricateU") != 0) && (strcmp(pair_style,"meam") != 0) &&