|
From: | Wink, Markus |
Subject: | [ESPResSo-users] Bug in C++-code of LB-Algorithm (??) |
Date: | Tue, 17 Jun 2014 15:29:20 +0000 |
Dear all,
I have downloaded Espresso version 3.3 from git://git.savannah.nongnu.org/espressomd.git. I have created a “test-binary” with the default myconfig header, which
worked fine. Now I wanted to create a binary to simulate a lattice Boltzmann fluid. I am able to run configure, but by typing make, I get the following error messages (no binary
is produced): /usr/local/src/espressomd/src/core/lb.cpp:100: error: conversion from 'Lattice*' to non-scalar type 'Lattice' requested /usr/local/src/espressomd/src/core/lb.cpp: In function 'int lb_lbfluid_get_interpolated_velocity_global(double*, double*)': /usr/local/src/espressomd/src/core/lb.cpp:1082: error: 'map_position_to_lattice_global' was not declared in this scope The source code of lb.cpp looks like this (line 100):
Lattice lblattice=new Lattice(); As far, as I understood, the command new is a language construct to dynamically allocate an array. So shouldn’t it be something like
(I am not exactly sure) Lattice *lblattice=new Lattice();
? In an older code, I found the line
Lattice lblattice = { {0,0,0}, {0,0,0}, 0, 0, 0, 0, -1.0, -1.0, NULL, NULL };
instead. Replacing that line did not work with the newer code, the error message there is: /usr/local/src/espressomd/src/core/lb.cpp:100: error: in C++98 'lblattice' must be initialized by constructor, not by '{...}' /usr/local/src/espressomd/src/core/lb.cpp:100: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x /usr/local/src/espressomd/src/core/lb.cpp:100: error: no matching function for call to 'Lattice::Lattice(<brace-enclosed initializer
list>)' /usr/local/src/espressomd/src/core/lattice.hpp:85: note: candidates are: Lattice::Lattice() /usr/local/src/espressomd/src/core/lattice.hpp:53: note: Lattice::Lattice(const Lattice&) Concerning the second error message: where do I exactly have to declare the function
'map_position_to_lattice_global'? Thank you in advance, Greetings Markus |
[Prev in Thread] | Current Thread | [Next in Thread] |