Commit 8343f3a0 authored by Christoph Junghans's avatar Christoph Junghans

more int -> long int

parent a348f0f5
Pipeline #90742443 failed with stages
in 5 minutes and 7 seconds
......@@ -120,7 +120,6 @@ class BeadMotif : public BeadStructure<BaseBead> {
};
BeadMotif() = default;
;
BeadMotif(const BeadStructure &structure) : BeadStructure(structure){};
......
......@@ -27,7 +27,6 @@ class BoundaryCondition {
public:
virtual ~BoundaryCondition() = default;
;
/**
* set the simulation box
......
......@@ -32,9 +32,7 @@ namespace csg {
class CsgApplication : public tools::Application {
public:
CsgApplication() = default;
;
~CsgApplication() override = default;
;
void Initialize() override;
bool EvaluateOptions() override;
......@@ -103,7 +101,6 @@ class CsgApplication : public tools::Application {
class Worker : public tools::Thread {
public:
Worker() = default;
;
~Worker() override;
/// \brief overload with the actual computation
......
......@@ -50,7 +50,6 @@ class Map {
class BeadMap {
public:
virtual ~BeadMap() = default;
;
virtual void Apply() = 0;
virtual void Initialize(Molecule *in, Bead *out, tools::Property *opts_map,
tools::Property *opts_bead);
......
......@@ -113,7 +113,6 @@ class NBList : public PairList<Bead *, BeadPair> {
virtual bool operator()(Bead *, Bead *, const Eigen::Vector3d &,
const double dist) = 0;
virtual ~Functor() = default;
;
};
/// Functor for member functions
......
......@@ -142,7 +142,6 @@ class NBList_3Body : public TripleList<Bead *, BeadTriple> {
const double dist12, const double dist13,
const double dist23) = 0;
virtual ~Functor() = default;
;
};
/// Functor for member functions
......
......@@ -31,7 +31,6 @@ class PotentialFunctionLJ126 : public PotentialFunction {
PotentialFunctionLJ126(const std::string &name_, const double min_ = 0.0,
const double max_ = 10.0);
~PotentialFunctionLJ126() override = default;
;
// calculate function value for given r
double CalculateF(const double r) const override;
// calculate first derivative w.r.t. ith parameter
......
......@@ -28,7 +28,6 @@ class PotentialFunctionLJG : public PotentialFunction {
PotentialFunctionLJG(const std::string &name_, const double min_ = 0.0,
const double max_ = 10.0);
~PotentialFunctionLJG() override = default;
;
// calculate function value for given r
double CalculateF(const double r) const override;
// calculate first derivative w.r.t. ith parameter
......
......@@ -83,7 +83,6 @@ class CsgTestApp : public CsgApplication {
class RDFWorker : public CsgApplication::Worker {
public:
~RDFWorker() override = default;
;
// override EvalConfiguration with your analysis routine
void EvalConfiguration(Topology *top, Topology *top_ref) override;
// data belonging to this particular worker
......
......@@ -28,9 +28,7 @@ namespace csg {
class StdAnalysis : public AnalysisTool {
public:
StdAnalysis() = default;
;
~StdAnalysis() override = default;
;
void Register(std::map<std::string, AnalysisTool *> &lib) override;
......
......@@ -105,7 +105,6 @@ class TabulatedPotential : public AnalysisTool {
public:
TabulatedPotential();
~TabulatedPotential() override = default;
;
void Register(std::map<std::string, AnalysisTool *> &lib) override;
......
......@@ -85,8 +85,8 @@ void Map_Sphere::Initialize(Molecule *in, Bead *out, Property *opts_bead,
// get the d vector if exists or initialize same as weights
vector<double> d;
if (_opts_map->exists("d")) {
Tokenizer tok_weights(_opts_map->get("d").value(), " \n\t");
tok_weights.ConvertToVector(d);
Tokenizer tok_weights2(_opts_map->get("d").value(), " \n\t");
tok_weights2.ConvertToVector(d);
// normalize d coefficients
norm = 1. / std::accumulate(d.begin(), d.end(), 0.);
transform(d.begin(), d.end(), d.begin(),
......
......@@ -219,7 +219,7 @@ bool DLPOLYTopologyReader::ReadTopology(string file, Topology &top) {
#endif
// read molecule
int id_map[natoms];
int *id_map= new int[natoms];
for (int i = 0; i < natoms;) { // i is altered in repeater loop
stringstream sl(_NextKeyline(fl, WhiteSpace));
......@@ -376,6 +376,7 @@ bool DLPOLYTopologyReader::ReadTopology(string file, Topology &top) {
mi_replica->AddInteraction(ic_replica);
}
}
delete [] id_map;
}
top.RebuildExclusions();
}
......
......@@ -52,7 +52,6 @@ class XMLBead {
double _q = 0.0)
: name(_name), type(_type), mass(_mass), q(_q){};
XMLBead() = default;
;
int pid;
std::string name;
......
......@@ -130,8 +130,8 @@ void NBListGrid::InitializeGrid(const Eigen::Matrix3d &box) {
for (int aa = a + a1; aa <= a + a2; ++aa) {
for (int bb = b + b1; bb <= b + b2; ++bb) {
for (int cc = c + c1; cc <= c + c2; ++cc) {
cell_t *c = &getCell(aa % _box_Na, bb % _box_Nb, cc % _box_Nc);
if (c == &cell) {
cell_t *cell2 = &getCell(aa % _box_Na, bb % _box_Nb, cc % _box_Nc);
if (cell2 == &cell) {
continue; // ignore self
}
cell._neighbours.push_back(
......
......@@ -69,7 +69,6 @@ void NBListGrid_3Body::Generate(BeadList &list1, BeadList &list2,
void NBListGrid_3Body::Generate(BeadList &list1, BeadList &list2,
bool do_exclusions) {
BeadList::iterator iter;
_do_exclusions = do_exclusions;
if (list1.empty()) {
return;
......@@ -85,12 +84,12 @@ void NBListGrid_3Body::Generate(BeadList &list1, BeadList &list2,
InitializeGrid(top->getBox());
// Add all beads of list1 to _beads1
for (iter = list1.begin(); iter != list1.end(); ++iter) {
for (BeadList::iterator iter = list1.begin(); iter != list1.end(); ++iter) {
getCell((*iter)->getPos())._beads1.push_back(*iter);
}
// Add all beads of list2 to _beads2
for (iter = list2.begin(); iter != list2.end(); ++iter) {
for (BeadList::iterator iter = list2.begin(); iter != list2.end(); ++iter) {
getCell((*iter)->getPos())._beads2.push_back(*iter);
}
......@@ -100,14 +99,13 @@ void NBListGrid_3Body::Generate(BeadList &list1, BeadList &list2,
}
// loop over beads of list 1 again to get the correlations
for (iter = list1.begin(); iter != list1.end(); ++iter) {
for (BeadList::iterator iter = list1.begin(); iter != list1.end(); ++iter) {
cell_t &cell = getCell((*iter)->getPos());
TestBead(cell, *iter);
}
}
void NBListGrid_3Body::Generate(BeadList &list, bool do_exclusions) {
BeadList::iterator iter;
_do_exclusions = do_exclusions;
if (list.empty()) {
return;
......@@ -118,7 +116,7 @@ void NBListGrid_3Body::Generate(BeadList &list, bool do_exclusions) {
InitializeGrid(top->getBox());
// Add all beads of list to all! bead lists of the cell
for (iter = list.begin(); iter != list.end(); ++iter) {
for (BeadList::iterator iter = list.begin(); iter != list.end(); ++iter) {
getCell((*iter)->getPos())._beads1.push_back(*iter);
}
......@@ -129,7 +127,7 @@ void NBListGrid_3Body::Generate(BeadList &list, bool do_exclusions) {
// loop over beads again to get the correlations (as all of the same type
// here)
for (iter = list.begin(); iter != list.end(); ++iter) {
for (BeadList::iterator iter = list.begin(); iter != list.end(); ++iter) {
cell_t &cell = getCell((*iter)->getPos());
TestBead(cell, *iter);
}
......
......@@ -86,6 +86,8 @@ double PotentialFunctionLJG::CalculateD2F(const int i, const int j,
case 4:
return 2.0 * _lam(3) * (r - _lam(4)) *
exp(-1.0 * _lam(3) * (r - _lam(4)) * (r - _lam(4)));
default:
return 0.0;
}
case 3:
switch (j) {
......@@ -103,6 +105,8 @@ double PotentialFunctionLJG::CalculateD2F(const int i, const int j,
return 2.0 * _lam(2) * (r - _lam(4)) *
(1.0 - _lam(3) * pow((r - _lam(4)), 2)) *
exp(-1.0 * _lam(3) * (r - _lam(4)) * (r - _lam(4)));
default:
return 0.0;
}
case 4:
switch (j) {
......
......@@ -216,4 +216,4 @@ BOOST_AUTO_TEST_CASE(test_beadstructure_breakIntoStructures) {
BOOST_CHECK_EQUAL(structure2_count, 2);
}
BOOST_AUTO_TEST_SUITE_END();
BOOST_AUTO_TEST_SUITE_END()
......@@ -194,7 +194,7 @@ void CsgMapApp::BeginEvaluate(Topology *top, Topology *top_atom) {
}
_writer->Open(out);
};
}
int main(int argc, char **argv) {
CsgMapApp app;
......
......@@ -106,16 +106,16 @@ int main(int argc, char **argv) {
}
}
Property *p = &(prop->get(print));
Property *p2 = &(prop->get(print));
if (!short_output && with_path) {
cout << p->path() << ".";
cout << p2->path() << ".";
}
if (!short_output) {
cout << p->name() << " = ";
cout << p2->name() << " = ";
}
// if(!p->HasChilds())
cout << p->value();
// if(!p2->HasChilds())
cout << p2->value();
cout << endl;
}
} catch (std::exception &error) {
......
......@@ -130,7 +130,6 @@ class CsgREupdate : public CsgApplication {
class CsgREupdateWorker : public CsgApplication::Worker {
public:
~CsgREupdateWorker() override = default;
;
Property _options;
std::vector<Property *> _nonbonded;
......
......@@ -65,7 +65,7 @@ void Imc::Initialize() {
if (_do_imc) {
InitializeGroups();
}
};
}
void Imc::BeginEvaluate(Topology *top, Topology *top_atom) {
// we didn't process any frames so far
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment