DFNFlow engine

Asked by ahmad mostafa

Hello,

I am trying to work with the DFNflow.cpp engine. Unfortunately there is a compilation error and interrupted ,when uncommenting line 17 as Recommended.

Can you help please to solve this problem ?!

The error is :

"/yade/trunk/pkg/pfv/DFNFlow.cpp: In member function ‘void yade::DFNBoundingSphere::saveVtk(const char*, bool)’:
/yade/trunk/pkg/pfv/DFNFlow.cpp:60:40: error: unused parameter ‘withBoundaries’ [-Werror=unused-parameter]
  void saveVtk(const char* folder, bool withBoundaries) //FIXME: withBoundaries does nothing in DFNFlow right now. Needed for consistent templating.
                                        ^~~~~~~~~~~~~~
/yade/trunk/pkg/pfv/DFNFlow.cpp: At global scope:
/yade/trunk/pkg/pfv/DFNFlow.cpp:163:7: error: ‘virtual void yade::DFNFlowEngine::trickPermeability(yade::TemplateFlowEngine_DFNFlowEngineT<yade::DFNCellInfo, yade::DFNVertexInfo, yade::CGT::_Tesselation<yade::CGT::TriangulationTypes<yade::DFNVertexInfo, yade::DFNCellInfo> >, yade::DFNBoundingSphere>::Solver*)’ can be marked override [-Werror=suggest-override]
  void trickPermeability(Solver* flow);
       ^~~~~~~~~~~~~~~~~
/yade/trunk/pkg/pfv/DFNFlow.cpp: In member function ‘void yade::DFNFlowEngine::interpolateCrack(yade::TemplateFlowEngine_DFNFlowEngineT<yade::DFNCellInfo, yade::DFNVertexInfo, yade::CGT::_Tesselation<yade::CGT::TriangulationTypes<yade::DFNVertexInfo, yade::DFNCellInfo> >, yade::DFNBoundingSphere>::Tesselation&, yade::TemplateFlowEngine_DFNFlowEngineT<yade::DFNCellInfo, yade::DFNVertexInfo, yade::CGT::_Tesselation<yade::CGT::TriangulationTypes<yade::DFNVertexInfo, yade::DFNCellInfo> >, yade::DFNBoundingSphere>::Tesselation&)’:
/yade/trunk/pkg/pfv/DFNFlow.cpp:232:22: error: variable ‘cellEnd’ set but not used [-Werror=unused-but-set-variable]
  FiniteCellsIterator cellEnd = newTri.finite_cells_end();
                      ^~~~~~~
^CCMakeFiles/pkg_pfv.dir/build.make:62: recipe for target 'CMakeFiles/pkg_pfv.dir/pkg/pfv/DFNFlow.cpp.o' failed
make[2]: *** [CMakeFiles/pkg_pfv.dir/pkg/pfv/DFNFlow.cpp.o] Interrupt
CMakeFiles/Makefile2:584: recipe for target 'CMakeFiles/pkg_pfv.dir/all' failed
make[1]: *** [CMakeFiles/pkg_pfv.dir/all] Interrupt
Makefile:129: recipe for target 'all' failed
make: *** [all] Interrupt"

Best wishes,

Question information

Language:
English Edit question
Status:
Solved
For:
Yade Edit question
Assignee:
No assignee Edit question
Solved by:
Robert Caulk
Solved:
Last query:
Last reply:
Revision history for this message
Best Robert Caulk (rcaulk) said :
#1

Hello,

The error says it all: '/yade/trunk/pkg/pfv/DFNFlow.cpp:60:40: error: unused parameter ‘withBoundaries’ '

So compiler doesn't like when we define variables/parameters without using them. i.e. "unused parameter."

So, you need to either remove the 'withBoundaries' argument from the function definition:

void saveVtk(const char* folder)

or change what the compiler considers an error by compiling with the following flag:

-DENABLE_USEFUL_ERRORS=OFF

Cheers,

Robert

Revision history for this message
ahmad mostafa (ahmadmo) said :
#2

-Thank you Robert for your answer, In fact i have tried to remove "withboundaries" before but it didn't work for me, i don't know if it works with you ?!
I don't think the main problem is the "withboundaries" which is related to the VTKrecorder, i think the problem is in the : void trickPermeability(Solver* flow) in the DFNFlow.cpp

"""/yade/trunk/pkg/pfv/DFNFlow.cpp: At global scope:
/yade/trunk/pkg/pfv/DFNFlow.cpp:163:7: error: ‘virtual void yade::DFNFlowEngine::trickPermeability(yade::TemplateFlowEngine_DFNFlowEngineT<yade::DFNCellInfo, yade::DFNVertexInfo, yade::CGT::_Tesselation<yade::CGT::TriangulationTypes<yade::DFNVertexInfo, yade::DFNCellInfo> >, yade::DFNBoundingSphere>::Solver*)’ can be marked override [-Werror=suggest-override]
  void trickPermeability(Solver* flow);"""

How ever your method for "-DENABLE_USEFUL_ERRORS=OFF" allow me to compile and DFNflow engine is defined on python script but i have errors after running the engine on the python script, I don't know if it is related to the errors we ignored (C++) or to my script :

The errors are :
"IdentificationSpheresOnJoint executed ! Spheres onJoint (and so on...) detected, facets deleted
CHOLMOD warning: matrix not positive definite. file: ../Supernodal/t_cholmod_super_numeric.c line: 911"

I will try to Modify my script then reply if the problem is with my script or the Pkg itself !!

Cheers
Ahmad

Revision history for this message
ahmad mostafa (ahmadmo) said :
#3

Thanks Robert Caulk, that solved my question.

Revision history for this message
Robert Caulk (rcaulk) said :
#4

>don't know if it is related to the errors we ignored (C++) or to my script :

Those errors are not related to this thread. You must open a new question if you seek assistance with that.

Revision history for this message
ahmad mostafa (ahmadmo) said :
#5

You are Right.
"-DENABLE_USEFUL_ERRORS=OFF" Solved my problem.