From 1564e1cbf6834a8b4c9b392e8fa2020470f29f5e Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Wed, 9 Jul 2014 14:53:15 +0000 Subject: [PATCH] Python predicate methods return 'bool' now. This used to be 'int', because dunepython didn't support the python-to-C conversion for bool. [[Imported from SVN: r9819]] --- cosserat-continuum.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cosserat-continuum.cc b/cosserat-continuum.cc index f9d529d7..b3e92704 100644 --- a/cosserat-continuum.cc +++ b/cosserat-continuum.cc @@ -257,19 +257,19 @@ int main (int argc, char *argv[]) try // Make Python function that computes which vertices are on the Dirichlet boundary, // based on the vertex positions. std::string lambda = std::string("lambda x: (") + parameterSet.get<std::string>("dirichletVerticesPredicate") + std::string(")"); - PythonFunction<FieldVector<double,dim>, int> pythonDirichletVertices(Python::evaluate(lambda)); + PythonFunction<FieldVector<double,dim>, bool> pythonDirichletVertices(Python::evaluate(lambda)); // Same for the Neumann boundary lambda = std::string("lambda x: (") + parameterSet.get<std::string>("neumannVerticesPredicate", "0") + std::string(")"); - PythonFunction<FieldVector<double,dim>, int> pythonNeumannVertices(Python::evaluate(lambda)); + PythonFunction<FieldVector<double,dim>, bool> pythonNeumannVertices(Python::evaluate(lambda)); for (; vIt!=vEndIt; ++vIt) { - int isDirichlet; + bool isDirichlet; pythonDirichletVertices.evaluate(vIt->geometry().corner(0), isDirichlet); dirichletVertices[indexSet.index(*vIt)] = isDirichlet; - int isNeumann; + bool isNeumann; pythonNeumannVertices.evaluate(vIt->geometry().corner(0), isNeumann); neumannNodes[indexSet.index(*vIt)] = isNeumann; -- GitLab