← Back to team overview

yade-dev team mailing list archive

Re: removing GeometricalModel

 

Hi everybody,

as announced, r1789 (symbolic number: prise de la Bastille) removes
GeometricalModel. I fixed some code by hand, but many classes are not
being compiled now. I added new feature 'shape' that compiles everything
as it used to be.

Classes that are not compiled are marked by YADE_REQUIRE_FEATURE(shape),
blocks that are not compiled are in the #ifdef YADE_SHAPE prison. You
can remove those lines and try to fix all compilation errors, until it
works fine (without GeometricalModel).

That means, extra data you have in GeometricalModel must be moved to
InteractingGeometry; if you need to postprocess them, use
InteractingGeometry::postProcess, instead of conversion using
InteractingGeometryMetaEngine.

For Sphere and InteractingSphere, not extra work is required, you only
have to _not_ assign Body::geometricalModel and use InteractingSphere
instead of Sphere everywhere (both one single variable, radius).

Snow and some lattice classes are disabled now, since they rely heavily
on the difference of GeometricalModel and InteractingGeometry. The
mapping is not obvious and I didn't want to break it.

Many *Triaxial* classes are also disabled; the createSphere function is
copied about 7 times in the source and I fixed only a few of them, which
is a trivial fix.

In some time, I will go through the code and remove all #ifdef
YADE_SHAPE blocks and YADE_REQUIRE_FEATURE(shape) files. (Files that
will not be fixed are probably not interesting for anybody, hence not
needed.)

Classes requiring the shape feature are not supported by me from this
point of time and I don't care if they don't compile even with the shape
feature enabled (they do for now, but it might break along with some
other changes in near future).

Regards, Vaclav

> As suggested earlier on the list, I will be deprecating
> GeometricalModel. Files that need it for functionality will be marked
> YADE_REQUIRE_FEATURE(shape), hence unfunctional in regular builds.
> Later, they will be removed.
> 
> Please adjust your code that relies on GeometricalModel to get the data
> it needs (radius in the majority of cases) from InteractingGeometry
> instead. Don't forget to commit the code to the repository.





Follow ups

References