Re: [Yade-dev] Fixing the examples FEMxDEM

2019-01-26 Thread Janek Kozicki
Bruno Chareyre said: (by the date of Thu, 24 Jan 2019 19:09:26 +0100)

> FEMxDEM: Ning Guo (if this adress does not work I know Ning has 
> successors in HK)

I am trying to make it work. I found that
https://launchpad.net/escript-finley is probably inside package
python-escript.

I have compiled version python-escript_5.3-1_amd64.deb from source
and installed it, But still I have this error when starting the
FEMxDEM example:

  from esys.escript import *
  ImportError: No module named esys.escript

The strangest thing is that when I do:

  grep esys.escript . -r --color

inside the source of package python-escript_5.3-1_amd64.deb I find
hundreds of lines that are doing this `from esys.escript import *`.
So I conclude that in yade it should work.

However my devuan ascii is based on debian stretch, so maybe some of
my packages are too old. I don't know which ones, though :( Or have a
bug regarding python detecting newly installed modules.

Maybe I should try this in devuan experimental, perhaps there it will
work.

Do you guys have any idea?
-- 
Janek Kozicki

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Bug 1813229] Re: Class Inheritance graphs in Yade.pdf are unreadable

2019-01-26 Thread Janek Kozicki
Same proposed fix, but this time with

git checkout -b fix2/doc_graphviz_inheritance_in_pdf master

so that no extra history is dragger around.

https://gitlab.com/yade-dev/trunk/merge_requests/35

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1813229

Title:
  Class Inheritance graphs in Yade.pdf are unreadable

Status in Yade:
  New

Bug description:
  After documentation is generated, the inheritance graphs on the
  website look good, for example:

  https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Material

  but in the Yade.pdf file the class names are completely unreadable.
  For example look at page 173 in pdf file.

  I would like to fix this before release. If you have any hints about
  where to search for place in code which causes this problem please
  tell!

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1813229/+subscriptions

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Bug 1813229] Re: Class Inheritance graphs in Yade.pdf are unreadable

2019-01-26 Thread Janek Kozicki
Proposed fix: https://gitlab.com/yade-dev/trunk/merge_requests/34

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1813229

Title:
  Class Inheritance graphs in Yade.pdf are unreadable

Status in Yade:
  New

Bug description:
  After documentation is generated, the inheritance graphs on the
  website look good, for example:

  https://yade-dem.org/doc/yade.wrapper.html#yade.wrapper.Material

  but in the Yade.pdf file the class names are completely unreadable.
  For example look at page 173 in pdf file.

  I would like to fix this before release. If you have any hints about
  where to search for place in code which causes this problem please
  tell!

To manage notifications about this bug go to:
https://bugs.launchpad.net/yade/+bug/1813229/+subscriptions

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-dev] Potential Blocks and Potential Particles - Documentation

2019-01-26 Thread Janek Kozicki
Hi Boon,

thanks for you reply. Yes, I think that this marching cubes method
can work really good. The only missing thing is to make the caching
of calculated triangles correctly. Once the triangles for the shape
are calculated you can use them all the time, unless the body deforms or
is cut in half (I'm not sure if this can happen).

A thing to discuss: you could store cached triangles not inside
Gl1_PotentialParticle but inside PotentialParticle with Attr::hidden
or (Attr::hidden|Attr::noSave). For example see into
pkg/common/Cylinder.hpp as an example. In this way you will not need
this loop in pkg/common/Gl1_PotentialParticle.cpp line 112, and
automatically you have solved the problem what to draw when a body
was deleted or added to scene. Because you only recalculate marching
cubes for particular single body when you need to draw it and it
wasn't generated yet.

I hope that the post which I have just sent to mailing list about
object oriented design deficiencies of your code wasn't too harsh.
My apologies.

best regards
Janek

Chia Weng Boon said: (by the date of Sat, 26 Jan 2019 11:12:40 +0800)

> Dear Janek,
> I will look into it. Thanks. In the python script, the vtk files at
> specific time intervals are output into the vtk folder.  I have been using
> ParaView mainly for visualisation for both Potential Particles and
> Potential Blocks.  The colour of the particles can also be changed in
> ParaView.  I suspect that the Marching Cube display is not showing the
> position and size of the particles correctly (I abandoned the marching
> cubes quite long ago, but agree that real time display with simulation is
> more user friendly)
> 
> Let me check the example files again.
> 
> Boon

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Bug 1813401] Re: Potential Particles & Blcoks compilation warnings

2019-01-26 Thread Janek Kozicki
uh, now I see that I shouldn't have pasted them all here. Now this bug
report is unreadable :/

-- 
You received this bug notification because you are a member of Yade
developers, which is subscribed to Yade.
https://bugs.launchpad.net/bugs/1813401

Title:
  Potential Particles & Blcoks compilation warnings

Status in Yade:
  New

Bug description:
  When compiling yade without -DENABLE_POTENTIAL_BLOCKS=ON
  -DENABLE_POTENTIAL_PARTICLES=ON there are only 6 warnings, four of
  which are due to code in external libraries (and thus unfixable).

  When compiling yade with -DENABLE_POTENTIAL_BLOCKS=ON
  -DENABLE_POTENTIAL_PARTICLES=ON there are 198 warnings. Mostly about
  unused variable or narrowing conversion:

  Not sure if I should put them all here, but in any case here they are:

  pkg/common/Gl1_PotentialBlock.cpp:1035:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:1035:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:1035:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:1036:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:1036:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:1036:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:259:13: warning: unused variable ‘sphere’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:286:1: warning: control reaches end of 
non-void function [-Wreturn-type]
  pkg/common/Gl1_PotentialBlock.cpp:432:31: warning: ‘functionBool’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
  pkg/common/Gl1_PotentialBlock.cpp:476:20: warning: comparison between signed 
and unsigned integer expressions [-Wsign-compare]
  pkg/common/Gl1_PotentialBlock.cpp:578:106: warning: unused variable ‘xAxis’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:578:130: warning: unused variable ‘yAxis’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:578:154: warning: unused variable ‘zAxis’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:578:65: warning: unused variable ‘angle’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:717:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:717:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:717:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:718:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:718:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:718:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
  pkg/common/Gl1_PotentialBlock.cpp:877:10: warning: unused variable ‘value’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:928:106: warning: unused variable ‘xAxis’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:928:130: warning: unused variable ‘yAxis’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:928:154: warning: unused variable ‘zAxis’ 
[-Wunused-variable]
  pkg/common/Gl1_PotentialBlock.cpp:928:65: warning: unused variable ‘angle’ 
[-Wunused-variable]
  pkg/dem/BlockGen.cpp:1159:17: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
  pkg/dem/BlockGen.cpp:1162:18: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
  pkg/dem/BlockGen.cpp:1190:20: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
  pkg/dem/BlockGen.cpp:1265:20: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
  pkg/dem/BlockGen.cpp:1332:25: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
  pkg/dem/BlockGen.cpp:1346:16: warning: unused variable ‘clumpId’ 
[-Wunused-variable]
  pkg/dem/BlockGen.cpp:1347:19: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
  pkg/dem/BlockGen.cpp:139:118: warning: unused variable ‘spacing’ 
[-Wunused-variable]
  pkg/dem/BlockGen.cpp:139:72: warning: unused variable ‘persistenceA’ 
[-Wunused-variable]
  pkg/dem/BlockGen.cpp:139:7: warning: unused variable ‘abdCount’ 
[-Wunused-variable]
  pkg/dem/BlockGen.cpp:139:95: warning: unused variable ‘persistenceB’ 
[-Wunused-variable]
  pkg/dem/BlockGen.cpp:1459:7: warning: unused variable ‘converge’ 
[-Wunused-variable]
  pkg/dem/BlockGen.cpp:1460:18: warning: variable ‘startingPt’ set but not used 

[Yade-dev] Potential Blocks and Potential Particles - brief analysis of the Object Oriented C++ source code

2019-01-26 Thread Janek Kozicki
Hi,

I looked a bit more into PotentialBlocks, and there are some things
which surprise me, there seem to be some mistakes.

1. we strive to remove all compiler warnings. Currently when yade is
compiled without PotentialBlocks, there are only 6 warnings, and
four of them are caused by external libraries. Problem is that when
compiling with PotentialBlocks there are 198 warnings, especially
about unused variables and narrowing conversion. I've filed a
respective bug report about that:
https://bugs.launchpad.net/yade/+bug/1813401

2. material parameters (like stiffness or heat capacity) are stored
inside Shape class PotentialBlock.hpp. But they should be stored
inside a class derived from Material. My impression (I might be
wrong, in that case please correct me) is that PotentialParticle is
using default materials and default contact law. Then later you
decided that you need a more customized Material (e.g. with heat
capacity) and you have cloned PotentialParticle into PotentialBlock,
instead of adding a Material class. This error propagates down
through all my next remarks.

3. As a result of above mistake there is no IPhys (interaction
physics) functor. Its main purpose  is to calculate the physical
parameters of the contact. Eg. the heat capacity of two
PotentialBlocks that are in contact. Its contents was put into IGeom
functor Ig2_PB_PB_ScGeom.cpp

4. Ig2_PB_PB_ScGeom.cpp and Ig2_PP_PP_ScGeom.cpp are the duplicates of
each other. The code that is a difference between them is about
physics and would better go to the IPhys functor. Please do not
duplicate code. Duplicate code is the worst source of all bugs.
Because someone after a long debugging session finally corrects some
mistake, and believes that it has been corrected. And later the same
bug resurfaces in the duplicated part of the code.

5. PotentialBlock.hpp and PotentialParticle.hpp are duplicates of each
other, the difference between them is what would better go into
Material class

6. because they are duplicates the drawing of class PotentialBlock is
not implemented, while it would work perfectly well with
Gl1_PotentialParticle functor

I am sorry that my remarks are so fundamental in a sense. But this is
all in good will, I hope that fixing these problems would make the
code much more easier to work with for others, and much less prone to
bugs.

After you make a class derived from Material to handle
PotentialBlocks properly, you will see that it will work best with
interaction physics (IPhys) functor which handlles this material. And
suddenly there is no need to duplicate code from
PotentialParticle.hpp into PotentialBlock.hpp. There will be only
PotentialParticle which sometimes can use the newly created material
and also will work with the default material. And this will cause
Gl1_PotentialParticle functor to draw correctly "both" of them.
"Both" in quotes, because there in fact will be inly one, but with
different material.

I hope that you can see that removing a duplicated code will suddenly
make it all simpler.

I understand that you stopped working on this topic and others are
using this code. Maybe Vasileios will want to fix this? In any case
it is good to discuss this, and if possible try to correct it.

After some discussion, maybe we should turn this Object Oriented
design problems into a bug report about PotentialBlcoks.

best regards
-- 
Janek Kozicki   http://janek.kozicki.pl/  |

___
Mailing list: https://launchpad.net/~yade-dev
Post to : yade-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp


[Yade-dev] [Bug 1813401] [NEW] Potential Particles & Blcoks compilation warnings

2019-01-26 Thread Janek Kozicki
Public bug reported:

When compiling yade without -DENABLE_POTENTIAL_BLOCKS=ON
-DENABLE_POTENTIAL_PARTICLES=ON there are only 6 warnings, four of which
are due to code in external libraries (and thus unfixable).

When compiling yade with -DENABLE_POTENTIAL_BLOCKS=ON
-DENABLE_POTENTIAL_PARTICLES=ON there are 198 warnings. Mostly about
unused variable or narrowing conversion:

Not sure if I should put them all here, but in any case here they are:

pkg/common/Gl1_PotentialBlock.cpp:1035:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:1035:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:1035:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:1036:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:1036:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:1036:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:259:13: warning: unused variable ‘sphere’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:286:1: warning: control reaches end of 
non-void function [-Wreturn-type]
pkg/common/Gl1_PotentialBlock.cpp:432:31: warning: ‘functionBool’ may be used 
uninitialized in this function [-Wmaybe-uninitialized]
pkg/common/Gl1_PotentialBlock.cpp:476:20: warning: comparison between signed 
and unsigned integer expressions [-Wsign-compare]
pkg/common/Gl1_PotentialBlock.cpp:578:106: warning: unused variable ‘xAxis’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:578:130: warning: unused variable ‘yAxis’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:578:154: warning: unused variable ‘zAxis’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:578:65: warning: unused variable ‘angle’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:717:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:717:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:717:81: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:718:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:718:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:718:79: warning: narrowing conversion of 
‘(double)((const Eigen::DenseCoeffsBase, 0>*)
pkg/common/Gl1_PotentialBlock.cpp:877:10: warning: unused variable ‘value’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:928:106: warning: unused variable ‘xAxis’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:928:130: warning: unused variable ‘yAxis’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:928:154: warning: unused variable ‘zAxis’ 
[-Wunused-variable]
pkg/common/Gl1_PotentialBlock.cpp:928:65: warning: unused variable ‘angle’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:1159:17: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
pkg/dem/BlockGen.cpp:1162:18: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
pkg/dem/BlockGen.cpp:1190:20: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
pkg/dem/BlockGen.cpp:1265:20: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
pkg/dem/BlockGen.cpp:1332:25: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
pkg/dem/BlockGen.cpp:1346:16: warning: unused variable ‘clumpId’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:1347:19: warning: comparison between signed and unsigned 
integer expressions [-Wsign-compare]
pkg/dem/BlockGen.cpp:139:118: warning: unused variable ‘spacing’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:139:72: warning: unused variable ‘persistenceA’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:139:7: warning: unused variable ‘abdCount’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:139:95: warning: unused variable ‘persistenceB’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:1459:7: warning: unused variable ‘converge’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:1460:18: warning: variable ‘startingPt’ set but not used 
[-Wunused-but-set-variable]
pkg/dem/BlockGen.cpp:1499:7: warning: unused variable ‘volume’ 
[-Wunused-variable]
pkg/dem/BlockGen.cpp:1501:11: warning: variable ‘boundingDist’ set but not used 
[-Wunused-but-set-variable]
pkg/dem/BlockGen.cpp:1654:12: warning: variable ‘oldmax’ set but not used 
[-Wunused-but-set-variable]
pkg/dem/BlockGen.cpp:1698:14: warning: variable ‘centre’ set but not used 
[-Wunused-but-set-variable]