Commit 355f1ee3 authored by Janek Kozicki's avatar Janek Kozicki Committed by Janek Kozicki
Browse files

Fix 'unused parameter' and 'ignored "const" qualifier' and few other warnings.

parent b04a205f
......@@ -21,7 +21,7 @@ boost::python::list Body::py_intrs(){
}
// return number of interactions of this particle
const unsigned int Body::coordNumber() const {
unsigned int Body::coordNumber() const {
unsigned int intrSize = 0;
for(auto it=this->intrs.begin(),end=this->intrs.end(); it!=end; ++it) { //Iterate over all bodie's interactions
if(!(*it).second->isReal()) continue;
......
......@@ -65,9 +65,9 @@ class Body: public Serializable{
boost::python::list py_intrs();
Body::id_t getId() const {return id;};
const unsigned int coordNumber() const; // Number of neighboring particles
unsigned int coordNumber() const; // Number of neighboring particles
const mask_t getGroupMask() const {return groupMask; };
mask_t getGroupMask() const {return groupMask; };
bool maskOk(int mask) const;
bool maskCompatible(int mask) const;
#ifdef YADE_MASK_ARBITRARY
......
......@@ -46,7 +46,7 @@ class BodyContainer: public Serializable{
smart_iterator& operator=(const smart_iterator& rhs) {ContainerT::iterator::operator=(rhs); end=rhs.end; return *this;}
smart_iterator() {}
smart_iterator(const ContainerT::iterator& source) {(*this)=source;}
smart_iterator(const smart_iterator& source) {(*this)=source; end=source.end;}
smart_iterator(const smart_iterator& source) : ContainerT::iterator() {(*this)=source; end=source.end;}
};
using iterator = smart_iterator ;
using const_iterator = const smart_iterator ;
......@@ -67,11 +67,11 @@ class BodyContainer: public Serializable{
return temp;
}
const size_t size() const { return body.size(); }
size_t size() const { return body.size(); }
shared_ptr<Body>& operator[](unsigned int id){ return body[id];}
const shared_ptr<Body>& operator[](unsigned int id) const { return body[id]; }
const bool exists(Body::id_t id) const {
bool exists(Body::id_t id) const {
return ((id>=0) && ((size_t)id<body.size()) && ((bool)body[id]));
}
bool erase(Body::id_t id, bool eraseClumpMembers);
......
......@@ -44,7 +44,7 @@ Because we need literal functor and class names for registration in python, we p
BOOST_PP_CAT(_YADE_DISPATCHER,BOOST_PP_CAT(Dim,D_FUNCTOR_ADD))(FunctorT,f) \
boost::python::list functors_get(void) const { boost::python::list ret; FOREACH(const shared_ptr<FunctorT>& f, functors){ ret.append(f); } return ret; } \
void functors_set(const vector<shared_ptr<FunctorT> >& ff){ functors.clear(); FOREACH(const shared_ptr<FunctorT>& f, ff) add(f); postLoad(*this); } \
void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){ if(boost::python::len(t)==0)return; if(boost::python::len(t)!=1) throw invalid_argument("Exactly one list of " BOOST_PP_STRINGIZE(FunctorT) " must be given."); typedef std::vector<shared_ptr<FunctorT> > vecF; vecF vf=boost::python::extract<vecF>(t[0])(); functors_set(vf); t=boost::python::tuple(); } \
void pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& /*d*/){ if(boost::python::len(t)==0)return; if(boost::python::len(t)!=1) throw invalid_argument("Exactly one list of " BOOST_PP_STRINGIZE(FunctorT) " must be given."); typedef std::vector<shared_ptr<FunctorT> > vecF; vecF vf=boost::python::extract<vecF>(t[0])(); functors_set(vf); t=boost::python::tuple(); } \
YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(DispatcherT,Dispatcher,"Dispatcher calling :yref:`functors<" BOOST_PP_STRINGIZE(FunctorT) ">` based on received argument type(s).\n\n" doc, \
((vector<shared_ptr<FunctorT> >,functors,,,"Functors active in the dispatch mechanism [overridden below].")) /*additional attrs*/ attrs, \
/*ctor*/ ctor, /*py*/ py .add_property("functors",&DispatcherT::functors_get,&DispatcherT::functors_set,"Functors associated with this dispatcher." " :yattrtype:`vector<shared_ptr<" BOOST_PP_STRINGIZE(FunctorT) "> >` ") \
......
......@@ -13,7 +13,7 @@
CREATE_LOGGER(FileGenerator);
bool FileGenerator::generate(std::string& msg){ throw invalid_argument("Calling abstract FileGenerator::generate() does not make sense."); }
bool FileGenerator::generate(std::string& /*msg*/){ throw invalid_argument("Calling abstract FileGenerator::generate() does not make sense."); }
bool FileGenerator::generateAndSave(const string& outputFileName, string& message)
......
......@@ -125,9 +125,9 @@ class ForceContainer {
// perhaps should be private and friend Scene or whatever the only caller should be
void reset(long iter, bool resetAll=false);
//! say for how many threads we have allocated space
const int getNumAllocatedThreads() const;
const bool getMoveRotUsed() const;
const bool getPermForceUsed() const;
int getNumAllocatedThreads() const;
bool getMoveRotUsed() const;
bool getPermForceUsed() const;
DECLARE_LOGGER;
};
......@@ -239,9 +239,9 @@ void ForceContainer::resize(size_t newSize, int threadN) {
syncedSizes=false;
}
const int ForceContainer::getNumAllocatedThreads() const {return nThreads;}
const bool ForceContainer::getMoveRotUsed() const {return moveRotUsed;}
const bool ForceContainer::getPermForceUsed() const {return permForceUsed;}
int ForceContainer::getNumAllocatedThreads() const {return nThreads;}
bool ForceContainer::getMoveRotUsed() const {return moveRotUsed;}
bool ForceContainer::getPermForceUsed() const {return permForceUsed;}
void ForceContainer::syncSizesOfContainers() {
if (syncedSizes) return;
......
......@@ -17,7 +17,7 @@ const shared_ptr<Material> Material::byLabel(const std::string& label, Scene* w_
throw std::runtime_error(("No material labeled `"+label+"'.").c_str());
}
const int Material::byLabelIndex(const std::string& label, Scene* w_){
int Material::byLabelIndex(const std::string& label, Scene* w_){
Scene* w=w_?w_:Omega::instance().getScene().get(); size_t iMax=w->materials.size();
for(size_t i=0; i<iMax; i++){
if(w->materials[i]->label==label) return i;
......
......@@ -33,7 +33,7 @@ class Material: public Serializable, public Indexable{
static const shared_ptr<Material> byLabel(const std::string& label, Scene* scene=NULL);
static const shared_ptr<Material> byLabel(const std::string& label, shared_ptr<Scene> scene) {return byLabel(label,scene.get());}
// return index of material, given its label
static const int byLabelIndex(const std::string& label, Scene* scene=NULL);
static int byLabelIndex(const std::string& label, Scene* scene=NULL);
YADE_CLASS_BASE_DOC_ATTRS_CTOR_PY(Material,Serializable,"Material properties of a :yref:`body<Body>`.",
((int,id,((void)"not shared",-1),Attr::readonly,"Numeric id of this material; is non-negative only if this Material is shared (i.e. in O.materials), -1 otherwise. This value is set automatically when the material is inserted to the simulation via :yref:`O.materials.append<MaterialContainer.append>`. (This id was necessary since before boost::serialization was used, shared pointers were not tracked properly; it might disappear in the future)"))
......
......@@ -81,7 +81,7 @@ boost::python::list Subdomain::mIntrs_get(){
return ret;
}
void Bo1_Subdomain_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* b){
void Bo1_Subdomain_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& /*se3*/, const Body* /*b*/){
// LOG_WARN("Bo1_Subdomain_Aabb::go()")
Subdomain* domain = static_cast<Subdomain*>(cm.get());
if(!bv){ bv=shared_ptr<Bound>(new Aabb);}
......@@ -288,7 +288,7 @@ void Subdomain::recvBodyContainersFromWorkers() {
// set all body properties from the recvd MPIBodyContainer
void Subdomain::setBodiesToBodyContainer(Scene* scene ,std::vector<shared_ptr<MPIBodyContainer> >& containers, bool ifMerge, bool resetInteractions) {
void Subdomain::setBodiesToBodyContainer(Scene* scene ,std::vector<shared_ptr<MPIBodyContainer> >& containers, bool ifMerge, bool /*resetInteractions*/) {
// to be used when deserializing a recieved container.
shared_ptr<BodyContainer>& bodyContainer = scene->bodies;
shared_ptr<InteractionContainer>& interactionContainer = scene->interactions;
......
......@@ -378,7 +378,7 @@ void GLViewer::centerScene(){
// new object selected.
// set frame coordinates, and isDynamic=false;
void GLViewer::postSelection(const QPoint& point)
void GLViewer::postSelection(const QPoint& /*point*/)
{
LOG_DEBUG("Selection is "<<selectedName());
int selection = selectedName();
......
......@@ -15,7 +15,7 @@ OpenGLManager::OpenGLManager(QObject* parent): QObject(parent){
connect(this,SIGNAL(startTimerSignal()),this,SLOT(startTimerSlot()),Qt::QueuedConnection);
}
void OpenGLManager::timerEvent(QTimerEvent* event){
void OpenGLManager::timerEvent(QTimerEvent* /*event*/){
//cerr<<".";
boost::mutex::scoped_lock lock(viewsMutex);
// when sharing the 0th view widget, it should be enough to update the primary view only
......
......@@ -300,57 +300,57 @@ namespace boost {
namespace serialization {
template<class Archive>
void serialize(Archive & ar, Vector2r & g, const unsigned int version){
void serialize(Archive & ar, Vector2r & g, const unsigned int /*version*/){
Real &x=g[0], &y=g[1];
ar & BOOST_SERIALIZATION_NVP(x) & BOOST_SERIALIZATION_NVP(y);
}
template<class Archive>
void serialize(Archive & ar, Vector2i & g, const unsigned int version){
void serialize(Archive & ar, Vector2i & g, const unsigned int /*version*/){
int &x=g[0], &y=g[1];
ar & BOOST_SERIALIZATION_NVP(x) & BOOST_SERIALIZATION_NVP(y);
}
template<class Archive>
void serialize(Archive & ar, Vector3r & g, const unsigned int version)
void serialize(Archive & ar, Vector3r & g, const unsigned int /*version*/)
{
Real &x=g[0], &y=g[1], &z=g[2];
ar & BOOST_SERIALIZATION_NVP(x) & BOOST_SERIALIZATION_NVP(y) & BOOST_SERIALIZATION_NVP(z);
}
template<class Archive>
void serialize(Archive & ar, Vector3i & g, const unsigned int version){
void serialize(Archive & ar, Vector3i & g, const unsigned int /*version*/){
int &x=g[0], &y=g[1], &z=g[2];
ar & BOOST_SERIALIZATION_NVP(x) & BOOST_SERIALIZATION_NVP(y) & BOOST_SERIALIZATION_NVP(z);
}
template<class Archive>
void serialize(Archive & ar, Vector6r & g, const unsigned int version){
void serialize(Archive & ar, Vector6r & g, const unsigned int /*version*/){
Real &v0=g[0], &v1=g[1], &v2=g[2], &v3=g[3], &v4=g[4], &v5=g[5];
ar & BOOST_SERIALIZATION_NVP(v0) & BOOST_SERIALIZATION_NVP(v1) & BOOST_SERIALIZATION_NVP(v2) & BOOST_SERIALIZATION_NVP(v3) & BOOST_SERIALIZATION_NVP(v4) & BOOST_SERIALIZATION_NVP(v5);
}
template<class Archive>
void serialize(Archive & ar, Vector6i & g, const unsigned int version){
void serialize(Archive & ar, Vector6i & g, const unsigned int /*version*/){
int &v0=g[0], &v1=g[1], &v2=g[2], &v3=g[3], &v4=g[4], &v5=g[5];
ar & BOOST_SERIALIZATION_NVP(v0) & BOOST_SERIALIZATION_NVP(v1) & BOOST_SERIALIZATION_NVP(v2) & BOOST_SERIALIZATION_NVP(v3) & BOOST_SERIALIZATION_NVP(v4) & BOOST_SERIALIZATION_NVP(v5);
}
template<class Archive>
void serialize(Archive & ar, Quaternionr & g, const unsigned int version)
void serialize(Archive & ar, Quaternionr & g, const unsigned int /*version*/)
{
Real &w=g.w(), &x=g.x(), &y=g.y(), &z=g.z();
ar & BOOST_SERIALIZATION_NVP(w) & BOOST_SERIALIZATION_NVP(x) & BOOST_SERIALIZATION_NVP(y) & BOOST_SERIALIZATION_NVP(z);
}
template<class Archive>
void serialize(Archive & ar, Se3r & g, const unsigned int version){
void serialize(Archive & ar, Se3r & g, const unsigned int /*version*/){
Vector3r& position=g.position; Quaternionr& orientation=g.orientation;
ar & BOOST_SERIALIZATION_NVP(position) & BOOST_SERIALIZATION_NVP(orientation);
}
template<class Archive>
void serialize(Archive & ar, Matrix3r & m, const unsigned int version){
void serialize(Archive & ar, Matrix3r & m, const unsigned int /*version*/){
Real &m00=m(0,0), &m01=m(0,1), &m02=m(0,2), &m10=m(1,0), &m11=m(1,1), &m12=m(1,2), &m20=m(2,0), &m21=m(2,1), &m22=m(2,2);
ar & BOOST_SERIALIZATION_NVP(m00) & BOOST_SERIALIZATION_NVP(m01) & BOOST_SERIALIZATION_NVP(m02) &
BOOST_SERIALIZATION_NVP(m10) & BOOST_SERIALIZATION_NVP(m11) & BOOST_SERIALIZATION_NVP(m12) &
......@@ -358,7 +358,7 @@ void serialize(Archive & ar, Matrix3r & m, const unsigned int version){
}
template<class Archive>
void serialize(Archive & ar, Matrix6r & m, const unsigned int version){
void serialize(Archive & ar, Matrix6r & m, const unsigned int /*version*/){
Real &m00=m(0,0), &m01=m(0,1), &m02=m(0,2), &m03=m(0,3), &m04=m(0,4), &m05=m(0,5);
Real &m10=m(1,0), &m11=m(1,1), &m12=m(1,2), &m13=m(1,3), &m14=m(1,4), &m15=m(1,5);
Real &m20=m(2,0), &m21=m(2,1), &m22=m(2,2), &m23=m(2,3), &m24=m(2,4), &m25=m(2,5);
......@@ -375,7 +375,7 @@ void serialize(Archive & ar, Matrix6r & m, const unsigned int version){
#ifdef YADE_MASK_ARBITRARY
template<class Archive>
void serialize(Archive & ar, mask_t& v, const unsigned int version){
void serialize(Archive & ar, mask_t& v, const unsigned int /*version*/){
std::string str = v.to_string();
ar & BOOST_SERIALIZATION_NVP(str);
v = mask_t(str);
......
......@@ -191,11 +191,11 @@ template <typename T> using OpenMPVector=std::vector <T>;
// boost serialization
BOOST_SERIALIZATION_SPLIT_FREE(OpenMPAccumulator<int>);
template<class Archive> void save(Archive &ar, const OpenMPAccumulator<int>& a, unsigned int version){ int value=a.get(); ar & BOOST_SERIALIZATION_NVP(value); }
template<class Archive> void load(Archive &ar, OpenMPAccumulator<int>& a, unsigned int version){ int value; ar & BOOST_SERIALIZATION_NVP(value); a.set(value); }
template<class Archive> void save(Archive &ar, const OpenMPAccumulator<int>& a, unsigned int /*version*/){ int value=a.get(); ar & BOOST_SERIALIZATION_NVP(value); }
template<class Archive> void load(Archive &ar, OpenMPAccumulator<int>& a, unsigned int /*version*/){ int value; ar & BOOST_SERIALIZATION_NVP(value); a.set(value); }
BOOST_SERIALIZATION_SPLIT_FREE(OpenMPAccumulator<Real>);
template<class Archive> void save(Archive &ar, const OpenMPAccumulator<Real>& a, unsigned int version){ Real value=a.get(); ar & BOOST_SERIALIZATION_NVP(value); }
template<class Archive> void load(Archive &ar, OpenMPAccumulator<Real>& a, unsigned int version){ Real value; ar & BOOST_SERIALIZATION_NVP(value); a.set(value); }
template<class Archive> void save(Archive &ar, const OpenMPAccumulator<Real>& a, unsigned int /*version*/){ Real value=a.get(); ar & BOOST_SERIALIZATION_NVP(value); }
template<class Archive> void load(Archive &ar, OpenMPAccumulator<Real>& a, unsigned int /*version*/){ Real value; ar & BOOST_SERIALIZATION_NVP(value); a.set(value); }
BOOST_SERIALIZATION_SPLIT_FREE(OpenMPArrayAccumulator<Real>);
template<class Archive> void save(Archive &ar, const OpenMPArrayAccumulator<Real>& a, unsigned int version){ size_t size=a.size(); ar & BOOST_SERIALIZATION_NVP(size); for(size_t i=0; i<size; i++) { Real item(a.get(i)); ar & boost::serialization::make_nvp(("item"+boost::lexical_cast<std::string>(i)).c_str(),item); } }
template<class Archive> void load(Archive &ar, OpenMPArrayAccumulator<Real>& a, unsigned int version){ size_t size; ar & BOOST_SERIALIZATION_NVP(size); a.resize(size); for(size_t i=0; i<size; i++){ Real item; ar & boost::serialization::make_nvp(("item"+boost::lexical_cast<std::string>(i)).c_str(),item); a.set(i,item); } }
template<class Archive> void save(Archive &ar, const OpenMPArrayAccumulator<Real>& a, unsigned int /*version*/){ size_t size=a.size(); ar & BOOST_SERIALIZATION_NVP(size); for(size_t i=0; i<size; i++) { Real item(a.get(i)); ar & boost::serialization::make_nvp(("item"+boost::lexical_cast<std::string>(i)).c_str(),item); } }
template<class Archive> void load(Archive &ar, OpenMPArrayAccumulator<Real>& a, unsigned int /*version*/){ size_t size; ar & BOOST_SERIALIZATION_NVP(size); a.resize(size); for(size_t i=0; i<size; i++){ Real item; ar & boost::serialization::make_nvp(("item"+boost::lexical_cast<std::string>(i)).c_str(),item); a.set(i,item); } }
......@@ -62,15 +62,11 @@ class Factorable
Factorable() {}
virtual ~Factorable() {}
virtual string getBaseClassName(unsigned int i=0) const { return "";} // FIXME[1]
virtual int getBaseClassNumber() { return 0;} // FIXME[1]
virtual string getBaseClassName(unsigned int = 0) const { return "";}
virtual int getBaseClassNumber() { return 0;}
REGISTER_CLASS_NAME(Factorable);
// FIXME - virtual function to return version, long and short description, OR
// maybe just a file with the same name as class with description inside
// public : virtual std::string getVersion(); // FIXME[1] - we can make a class Plugin for all that extra stuff:
// shortDescription(), longDescription(), baseClassName(), baseClassNumber()
};
......@@ -18,9 +18,9 @@
#include <lib/pyutil/doc_opts.hpp>
template<typename T> void preLoad(T&){};
template<typename T> void postLoad(T& obj){};
template<typename T> void preSave(T&){};
template<typename T> void preLoad(T&){};
template<typename T> void postLoad(T&){};
template<typename T> void preSave(T&){};
template<typename T> void postSave(T&){};
......@@ -150,7 +150,7 @@ if(key==BOOST_PP_STRINGIZE(_DEPREC_OLDNAME(z))){ \
#define _REGISTER_BOOST_ATTRIBUTES_REPEAT(x,y,z) if((_ATTR_FLG(z) & yade::Attr::noSave)==0) { ar & BOOST_SERIALIZATION_NVP(_ATTR_NAM(z)); }
#define _REGISTER_BOOST_ATTRIBUTES(baseClass,attrs) \
friend class boost::serialization::access; \
private: template<class ArchiveT> void serialize(ArchiveT & ar, unsigned int version){ \
private: template<class ArchiveT> void serialize(ArchiveT & ar, unsigned int /*version*/){ \
ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(baseClass); \
/* with ADL, either the generic (empty) version above or baseClass::preLoad etc will be called (compile-time resolution) */ \
if(ArchiveT::is_loading::value) preLoad(*this); else preSave(*this); \
......@@ -266,7 +266,7 @@ if(key==BOOST_PP_STRINGIZE(_DEPREC_OLDNAME(z))){ \
class Serializable: public Factorable {
public:
template <class ArchiveT> void serialize(ArchiveT & ar, unsigned int version){ };
template <class ArchiveT> void serialize(ArchiveT & /*ar*/, unsigned int /*version*/){ };
// lovely cast members like in eigen :-)
template <class DerivedT> const DerivedT& cast() const { return *static_cast<DerivedT*>(this); }
template <class DerivedT> DerivedT& cast(){ return *static_cast<DerivedT*>(this); }
......@@ -280,7 +280,7 @@ class Serializable: public Factorable {
void pyUpdateAttrs(const boost::python::dict& d);
//static void pyUpdateAttrs(const shared_ptr<Serializable>&, const boost::python::dict& d);
virtual void pySetAttr(const std::string& key, const boost::python::object& value){ PyErr_SetString(PyExc_AttributeError,(std::string("No such attribute: ")+key+".").c_str()); boost::python::throw_error_already_set(); };
virtual void pySetAttr(const std::string& key, const boost::python::object& /*value*/){ PyErr_SetString(PyExc_AttributeError,(std::string("No such attribute: ")+key+".").c_str()); boost::python::throw_error_already_set(); };
//virtual boost::python::list pyKeys() const { return boost::python::list(); };
virtual boost::python::dict pyDict() const { return boost::python::dict(); }
virtual void callPostLoad(void){ postLoad(*this); }
......@@ -291,7 +291,7 @@ class Serializable: public Factorable {
virtual void pyRegisterClass(boost::python::object _scope);
// perform any manipulation of arbitrary constructor arguments coming from python, manipulating them in-place;
// the remainder is passed to the Serializable_ctor_kwAttrs of the respective class (note: args must be empty)
virtual void pyHandleCustomCtorArgs(boost::python::tuple& args, boost::python::dict& kw){ return; }
virtual void pyHandleCustomCtorArgs(boost::python::tuple& /*args*/, boost::python::dict& /*kw*/){ return; }
//! string representation of this object
std::string pyStr() { return "<"+getClassName()+" instance at "+boost::lexical_cast<string>(this)+">"; }
......
......@@ -1172,7 +1172,7 @@ double FlowBoundingSphere<Tesselation>::getCavityFlux()
}
template <class Tesselation>
void FlowBoundingSphere<Tesselation>::adjustCavityVolumeChange(double dt, int stepsSinceLastMesh, double pZero)
void FlowBoundingSphere<Tesselation>::adjustCavityVolumeChange(double dt, int stepsSinceLastMesh, double /*pZero*/)
{
double totalStep = dt*stepsSinceLastMesh;
//double Q1=0;
......@@ -1198,7 +1198,7 @@ void FlowBoundingSphere<Tesselation>::adjustCavityVolumeChange(double dt, int st
}
template <class Tesselation>
void FlowBoundingSphere<Tesselation>::adjustCavityPressure(double dt, int stepsSinceLastMesh, double pZero)
void FlowBoundingSphere<Tesselation>::adjustCavityPressure(double dt, int stepsSinceLastMesh, double /*pZero*/)
{
double totalStep = dt*stepsSinceLastMesh;
//double Q1=0;
......@@ -1846,7 +1846,7 @@ Vector3r FlowBoundingSphere<Tesselation>::computeViscousShearForce(const Vector3
}
template <class Tesselation>
Vector3r FlowBoundingSphere<Tesselation>::computeShearLubricationForce(const Vector3r& deltaShearV, const Real& dist, const int& edge_id, const Real& eps, const Real& centerDist, const Real& meanRad )
Vector3r FlowBoundingSphere<Tesselation>::computeShearLubricationForce(const Vector3r& deltaShearV, const Real& dist, const int& /*edge_id*/, const Real& eps, const Real& centerDist, const Real& meanRad )
{
Real d = max(dist,0.) + 2.*eps*meanRad;
Vector3r viscLubF = 0.5 * Mathr::PI * viscosity * (-2*meanRad + centerDist*log(centerDist/d)) * deltaShearV;
......@@ -1854,7 +1854,7 @@ Vector3r FlowBoundingSphere<Tesselation>::computeShearLubricationForce(const Vec
}
template <class Tesselation>
Vector3r FlowBoundingSphere<Tesselation>::computePumpTorque(const Vector3r& deltaShearAngV, const Real& dist, const int& edge_id, const Real& eps, const Real& meanRad )
Vector3r FlowBoundingSphere<Tesselation>::computePumpTorque(const Vector3r& deltaShearAngV, const Real& dist, const int& /*edge_id*/, const Real& eps, const Real& meanRad )
{
Real d = max(dist,0.) + 2.*eps*meanRad;
Vector3r viscPumpC = Mathr::PI * viscosity * pow(meanRad,3) *(3./20. * log(meanRad/d) + 63./500. * (d/meanRad) * log(meanRad/d)) * deltaShearAngV;
......@@ -1862,7 +1862,7 @@ Vector3r FlowBoundingSphere<Tesselation>::computePumpTorque(const Vector3r& delt
}
template <class Tesselation>
Vector3r FlowBoundingSphere<Tesselation>::computeTwistTorque(const Vector3r& deltaNormAngV, const Real& dist, const int& edge_id, const Real& eps, const Real& meanRad )
Vector3r FlowBoundingSphere<Tesselation>::computeTwistTorque(const Vector3r& deltaNormAngV, const Real& dist, const int& /*edge_id*/, const Real& eps, const Real& meanRad )
{
Real d = max(dist,0.) + 2.*eps*meanRad;
Vector3r twistC = Mathr::PI * viscosity * pow(meanRad,2) * d * log(meanRad/d) * deltaNormAngV;
......
......@@ -801,7 +801,7 @@ void FlowBoundingSphereLinSolv<_Tesselation,FlowType>::setNewCellTemps(bool addT
}
template<class _Tesselation, class FlowType>
int FlowBoundingSphereLinSolv<_Tesselation,FlowType>::taucsSolve(Real dt)
int FlowBoundingSphereLinSolv<_Tesselation,FlowType>::taucsSolve(Real /*dt*/)
{
#ifdef TAUCS_LIB
if (debugOut) cerr <<endl<<"TAUCS solve"<<endl;
......@@ -857,7 +857,7 @@ int FlowBoundingSphereLinSolv<_Tesselation,FlowType>::taucsSolve(Real dt)
return 0;
}
template<class _Tesselation, class FlowType>
int FlowBoundingSphereLinSolv<_Tesselation,FlowType>::pardisoSolve(Real dt)
int FlowBoundingSphereLinSolv<_Tesselation,FlowType>::pardisoSolve(Real /*dt*/)
{
cerr <<endl<<"PardisoSolve solve"<<endl;
#ifndef PARDISO
......
......@@ -45,7 +45,7 @@ KinematicLocalisationAnalyser::~KinematicLocalisationAnalyser()
delete(TS0);
}
KinematicLocalisationAnalyser::KinematicLocalisationAnalyser(const char* state_file1, bool usebz2)
KinematicLocalisationAnalyser::KinematicLocalisationAnalyser(const char* state_file1, bool /*usebz2*/)
{
sphere_discretisation = SPHERE_DISCRETISATION;
linear_discretisation = LINEAR_DISCRETISATION;
......@@ -346,7 +346,7 @@ long KinematicLocalisationAnalyser::Filtered_grains(TriaxialState& state)
return ng1;
}
Real KinematicLocalisationAnalyser::Filtered_volume(TriaxialState& state)
Real KinematicLocalisationAnalyser::Filtered_volume(TriaxialState& /*state*/)
{
return 0;
}
......
......@@ -34,7 +34,7 @@ class Tens
public:
Tens ( void ) {}
virtual ~Tens ( void ) {}
virtual Real operator() ( int i, int j ) const {return 0;}
virtual Real operator() ( int /*i*/, int /*j*/ ) const {return 0;}
Real Norme2 ( void );
Real Norme ( void ) {return sqrt ( Norme2() );}
Real Trace ( void )
......
......@@ -565,7 +565,7 @@ double _Tesselation<TT>::computeVFacetArea ( FiniteEdgesIterator ed_it )
}
template<class TT>
CVector _Tesselation<TT>::alphaVoronoiFaceArea (const Edge& ed_it, const AlphaShape& as, const RTriangulation& Tro)
CVector _Tesselation<TT>::alphaVoronoiFaceArea (const Edge& ed_it, const AlphaShape& as, const RTriangulation& /*Tro*/)
{
//Overall, we calculate the area vector of the polygonal Voronoi face between two spheres, this is done by integrating x×dx
......
......@@ -10,7 +10,7 @@
YADE_PLUGIN((Bo1_Sphere_Aabb)(Bo1_Facet_Aabb)(Bo1_Box_Aabb));
void Bo1_Sphere_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* b){
void Bo1_Sphere_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* /*b*/){
Sphere* sphere = static_cast<Sphere*>(cm.get());
if(!bv){ bv=shared_ptr<Bound>(new Aabb); }
Aabb* aabb=static_cast<Aabb*>(bv.get());
......@@ -38,7 +38,7 @@ void Bo1_Sphere_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, con
void Bo1_Facet_Aabb::go( const shared_ptr<Shape>& cm
, shared_ptr<Bound>& bv
, const Se3r& se3
, const Body* b)
, const Body* /*b*/)
{
if(!bv){ bv=shared_ptr<Bound>(new Aabb); }
Aabb* aabb=static_cast<Aabb*>(bv.get());
......@@ -68,7 +68,7 @@ void Bo1_Facet_Aabb::go( const shared_ptr<Shape>& cm
void Bo1_Box_Aabb::go( const shared_ptr<Shape>& cm,
shared_ptr<Bound>& bv,
const Se3r& se3,
const Body* b)
const Body* /*b*/)
{
Box* box = static_cast<Box*>(cm.get());
if(!bv){ bv=shared_ptr<Bound>(new Aabb); }
......
......@@ -40,7 +40,7 @@ bool Collider::mayCollide(const Body* b1, const Body* b2
;
}
void Collider::pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& d){
void Collider::pyHandleCustomCtorArgs(boost::python::tuple& t, boost::python::dict& /*d*/){
if(boost::python::len(t)==0) return; // nothing to do
if(boost::python::len(t)!=1) throw invalid_argument(("Collider optionally takes exactly one list of BoundFunctor's as non-keyword argument for constructor ("+boost::lexical_cast<string>(boost::python::len(t))+" non-keyword ards given instead)").c_str());
typedef std::vector<shared_ptr<BoundFunctor> > vecBound;
......
......@@ -29,7 +29,7 @@ REGISTER_SERIALIZABLE(CylScGeom);
class CylScGeom6D: public ScGeom6D {
public:
virtual ~CylScGeom6D() {};
void precomputeRotations(const State& rbp1, const State& rbp2, bool isNew, bool creep=false) {
void precomputeRotations(const State& rbp1, const State& rbp2, bool /*isNew*/, bool /*creep*/=false) {
initRotations(rbp1,rbp2);
}
void initRotations(const State& rbp1, const State& rbp2){
......
......@@ -30,7 +30,7 @@ unsigned int ChainedState::currentChain=0;
//!Sphere-cylinder or cylinder-cylinder not implemented yet, see Ig2_ChainedCylinder_ChainedCylinder_ScGeom6D and test/chained-cylinder-spring.py
bool Ig2_Sphere_ChainedCylinder_CylScGeom::go( const shared_ptr<Shape>& cm1,
const shared_ptr<Shape>& cm2,
const State& state1, const State& state2, const Vector3r& shift2, const bool& force,
const State& state1, const State& state2, const Vector3r& shift2, const bool& /*force*/,
const shared_ptr<Interaction>& c)
{
const State* sphereSt=YADE_CAST<const State*>(&state1);
......@@ -203,7 +203,7 @@ bool Ig2_Sphere_ChainedCylinder_CylScGeom::goReverse( const shared_ptr<Shape>& c
bool Ig2_Sphere_ChainedCylinder_CylScGeom6D::go( const shared_ptr<Shape>& cm1,
const shared_ptr<Shape>& cm2,
const State& state1, const State& state2, const Vector3r& shift2, const bool& force,
const State& state1, const State& state2, const Vector3r& shift2, const bool& /*force*/,
const shared_ptr<Interaction>& c)
{
const State* sphereSt=YADE_CAST<const State*>(&state1);
......@@ -367,7 +367,7 @@ bool Ig2_Sphere_ChainedCylinder_CylScGeom6D::goReverse( const shared_ptr<Shape>&
bool Ig2_ChainedCylinder_ChainedCylinder_ScGeom6D::go( const shared_ptr<Shape>& cm1,
const shared_ptr<Shape>& cm2,
const State& state1, const State& state2, const Vector3r& shift2, const bool& force,
const State& state1, const State& state2, const Vector3r& shift2, const bool& /*force*/,
const shared_ptr<Interaction>& c)
{
const ChainedState *pChain1, *pChain2;
......@@ -626,7 +626,7 @@ void Gl1_Cylinder::drawCylinder(bool wire, Real radius, Real length, const Quate
#endif
void Bo1_Cylinder_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* b){
void Bo1_Cylinder_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* /*b*/){
Cylinder* cylinder = static_cast<Cylinder*>(cm.get());
if(!bv){ bv=shared_ptr<Bound>(new Aabb); }
Aabb* aabb=static_cast<Aabb*>(bv.get());
......@@ -642,7 +642,7 @@ void Bo1_Cylinder_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, c
}
}
void Bo1_ChainedCylinder_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* b){
void Bo1_ChainedCylinder_Aabb::go(const shared_ptr<Shape>& cm, shared_ptr<Bound>& bv, const Se3r& se3, const Body* /*b*/){
ChainedCylinder* cylinder = static_cast<ChainedCylinder*>(cm.get());
if(!bv){ bv=shared_ptr<Bound>(new Aabb); }
Aabb* aabb=static_cast<Aabb*>(bv.get());
......
......@@ -22,7 +22,7 @@
int Gl1_NormPhys::weakFilter;
Real Gl1_NormPhys::weakScale;
void Gl1_NormPhys::go(const shared_ptr<IPhys>& ip, const shared_ptr<Interaction>& i, const shared_ptr<Body>& b1, const shared_ptr<Body>& b2, bool wireFrame){
void Gl1_NormPhys::go(const shared_ptr<IPhys>& ip, const shared_ptr<Interaction>& i, const shared_ptr<Body>& b1, const shared_ptr<Body>& b2, bool /*wireFrame*/){
if(!gluQuadric){ gluQuadric=gluNewQuadric(); if(!gluQuadric) throw runtime_error("Gl1_NormPhys::go unable to allocate new GLUquadric object (out of memory?)."); }
NormPhys* np=static_cast<NormPhys*>(ip.get());
shared_ptr<IGeom> ig(i->geom); if(!ig) return; // changed meanwhile?
......
......@@ -252,14 +252,14 @@ bool P_volume_centroid(Polyhedron P, Real * volume, Vector3r * centroid);
};
// Evaluate gradient for function
void EvaluateGradient(double x[3], double n[3]){ };
void EvaluateGradient(double /*x*/[3], double /*n*/[3]){ }; // FIXME - better use Vector3r here instead of Real[3] (here I only fix the unused parameter warning).
// If you need to set parameters, add methods here
protected:
ImpFuncPB();