Skip to content

Commit

Permalink
Merge branch 'master' into malloc
Browse files Browse the repository at this point in the history
  • Loading branch information
fweik committed Jul 31, 2015
2 parents f36edad + 612cf60 commit 34a7988
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 22 deletions.
5 changes: 3 additions & 2 deletions configure.ac
Expand Up @@ -701,8 +701,7 @@ cat <<EOF
****************************************************************
EOF
AC_MSG_CHECKING([whether to build with h5md support])
AC_ARG_WITH(h5md, AS_HELP_STRING([--with-h5md],[wether to build with h5mdsupport]),
, [with_h5md=yes])
AC_ARG_WITH(h5md, AS_HELP_STRING([--with-h5md],[wether to build with h5mdsupport]), , [with_h5md=no])
AC_MSG_RESULT($with_h5md)
if test .$with_h5md = .yes; then
ES_ADDPATH_CHECK_LIB(hdf5,H5open,,AC_MSG_FAILURE([could not link against the hdf5 library]),)
Expand All @@ -713,6 +712,7 @@ if test .$with_h5md = .yes; then
]
,$extrapaths)
fi
AM_CONDITIONAL(H5MD, [test x$with_h5md == xyes])
cat <<EOF
****************************************************************
* Other settings *
Expand Down Expand Up @@ -842,6 +842,7 @@ Libraries
---------
FFTW = $fftw_found
efence = $with_efence
h5md = $with_h5md

EOF

Expand Down
2 changes: 1 addition & 1 deletion maintainer/jenkins/configs/maxset.hpp
Expand Up @@ -75,4 +75,4 @@
#define BOND_ENDANGLEDIST_HARMONIC

#define VIRTUAL_SITES_RELATIVE
#define H5MD

4 changes: 4 additions & 0 deletions maintainer/jenkins/configs/nocheck-maxset.hpp
Expand Up @@ -106,6 +106,10 @@
#define LB_DEBUG
#define VIRTUAL_SITES_DEBUG
#define LE_DEBUG
#ifdef
#define CUDA_DEBUG
#endif
#define ESIF_DEBUG

#define MPI_CORE
#define FORCE_CORE
Expand Down
3 changes: 2 additions & 1 deletion src/core/Makefile.am
Expand Up @@ -215,7 +215,8 @@ CUDA_HEADER_FILES = \
integrate_sd_cuda.hpp \
integrate_sd_cuda_device.hpp \
integrate_sd_matrix.hpp \
fd-electrostatics.hpp
fd-electrostatics.hpp \
actor/DipolarDirectSum_cuda.hpp

CUDA_SOURCE_FILES = \
cuda_init_cuda.cu \
Expand Down
1 change: 0 additions & 1 deletion src/core/actor/dds-tiled.cpp

This file was deleted.

8 changes: 7 additions & 1 deletion src/core/constraint.cpp
Expand Up @@ -1088,6 +1088,9 @@ void calculate_pore_dist(Particle *p1, double ppos[3], Particle *c_p, Constraint
/* upper left smoothing circle */
if (p2_z <= c1_z && r >= c1_or ) {
/* distance from the smoothing center */
// Since: c2_or_or seems to be set to numeric_limits<double>max(),
// this case being true means, that r is out of numerical limits.
// I suggest deleting it!
norm = sqrt( (z - c1_z)*(z - c1_z) + (r - c1_or)*(r - c1_or) );
*dist = norm - c->smoothing_radius;
dist_vector_r=(c->smoothing_radius/norm -1)*(r - c1_or);
Expand All @@ -1099,13 +1102,16 @@ void calculate_pore_dist(Particle *p1, double ppos[3], Particle *c_p, Constraint
if (p1_z >= c2_z && r <= c2_r ) {
norm = sqrt( (z - c2_z)*(z - c2_z) + (r - c2_r)*(r - c2_r) );
*dist = norm - c->smoothing_radius;
dist_vector_r=(c->smoothing_radius/norm -1)*(r - c2_or);
dist_vector_r=(c->smoothing_radius/norm -1)*(r - c2_r);
dist_vector_z=(c->smoothing_radius/norm - 1)*(z - c2_z);
for (i=0; i<3; i++) vec[i]=-dist_vector_r*e_r[i] - dist_vector_z*e_z[i];
return;
}
/* Check if we are in the range of the upper right smoothing circle */
if (p2_z >= c2_z && r >= c2_or ) {
// Since: c2_or_or seems to be set to numeric_limits<double>max(),
// this case being true means, that r is out of numerical limits.
// I suggest deleting it!
norm = sqrt( (z - c2_z)*(z - c2_z) + (r - c2_or)*(r - c2_or) );
*dist = norm - c->smoothing_radius;
dist_vector_r=(c->smoothing_radius/norm -1)*(r - c2_or);
Expand Down
15 changes: 3 additions & 12 deletions src/core/forces_inline.hpp
Expand Up @@ -153,18 +153,9 @@ inline void init_local_particle_force(Particle *part) {
// the particle's orientation axis
if ( part->swim.swimming )
{
if ( thermo_switch & THERMO_LANGEVIN )
{
part->f.f[0] += part->swim.f_swim * part->p.mass * part->r.quatu[0];
part->f.f[1] += part->swim.f_swim * part->p.mass * part->r.quatu[1];
part->f.f[2] += part->swim.f_swim * part->p.mass * part->r.quatu[2];
}
else
{
part->f.f[0] += part->swim.f_swim * part->r.quatu[0];
part->f.f[1] += part->swim.f_swim * part->r.quatu[1];
part->f.f[2] += part->swim.f_swim * part->r.quatu[2];
}
part->f.f[0] += part->swim.f_swim * part->r.quatu[0];
part->f.f[1] += part->swim.f_swim * part->r.quatu[1];
part->f.f[2] += part->swim.f_swim * part->r.quatu[2];
}
#endif

Expand Down
3 changes: 1 addition & 2 deletions src/features.def
Expand Up @@ -227,6 +227,5 @@ ONEPART_DEBUG
CUDA external
FFTW external
TK external
H5MD external

/*Else*/
H5MD
2 changes: 1 addition & 1 deletion src/tcl/Makefile.am
Expand Up @@ -65,7 +65,7 @@ libEspressoTcl_la_SOURCES = \
pressure_tcl.cpp pressure_tcl.hpp \
random_tcl.cpp random_tcl.hpp \
reaction_tcl.cpp reaction_tcl.hpp \
rattle_tcl.cpp rattle_ tcl.hpp \
rattle_tcl.cpp rattle_tcl.hpp \
statistics_chain_tcl.cpp statistics_chain_tcl.hpp \
statistics_cluster_tcl.cpp statistics_cluster_tcl.hpp \
statistics_correlation_tcl.cpp statistics_correlation_tcl.hpp \
Expand Down
1 change: 0 additions & 1 deletion src/tcl/h5mdfile_tcl.cpp
Expand Up @@ -9,7 +9,6 @@
#include <iostream>

#ifdef H5MD

#include "hdf5.h"

typedef char h5string[1000];
Expand Down
26 changes: 26 additions & 0 deletions src/tcl/h5mdfile_tcl.hpp
@@ -1,7 +1,33 @@
/*
Copyright (C) 2010,2012,2013,2014 The ESPResSo project
Copyright (C) 2002,2003,2004,2005,2006,2007,2008,2009,2010
Max-Planck-Institute for Polymer Research, Theory Group
This file is part of ESPResSo.
ESPResSo is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ESPResSo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __H5MD_HPP
#define __H5MD_HPP

#ifdef H5MD
#include "parser.hpp"
#include "config.hpp"
#include <hdf5.h>

int tclcommand_h5mdfile(ClientData data, Tcl_Interp *interp, int argc, char **argv);
#endif

#endif

0 comments on commit 34a7988

Please sign in to comment.