[Yade-users] [Question #679543]: Is class `Bo1_Cylinder_Aabb` to be actually used?
New question #679543 on Yade: https://answers.launchpad.net/yade/+question/679543 Hi everyone! I've got a small technical question: Why does Bound class `Bo1_Cylinder_Aabb` exist, but at the same time examples on cylinders [1] use `Bo1_GridConnection_Aabb` and `Bo1_PFacet_Aabb` instead? Many thanks for your answers, Gaël [1] https://yade-dev.gitlab.io/trunk/tutorial-more-examples-fast.html#cylinders -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #679544]: Best way to fix typos in documentation: source edit + git push?
New question #679544 on Yade: https://answers.launchpad.net/yade/+question/679544 Hi all! I've found a few typos by reading the doc: what is the best way to fix them? Would it be ok if I fix them myself in the source code and git push it? (let's say that it could be a first baby step in contributing to Yade) Thanks for putting together this great piece of software! ;) Gaël -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679543]: Is class `Bo1_Cylinder_Aabb` to be actually used?
Question #679543 on Yade changed: https://answers.launchpad.net/yade/+question/679543 Status: Answered => Open Gael Lorieul is still having a problem: Hi Marcus, Thanks for your answer! El lun, 25-03-2019 a las 17:13 +, Marcus Moravia escribió: > As far as I know, 'Bo1_Cylinder_Aabb' is used for chained cylinder. > 'Bo1_GridConnection_Aabb' is used for cylindrical connections created > by connecting two GridNodes. In that case, why do none of the Chained-Cylinder examples [1] make use of `Bo1_Cylinder_Aabb`, but employ `Bo1_ChainedCylinder_Aabb` instead? Is `Bo1_Cylinder_Aabb` meant to be used as a base abstract class? Or was it meant to be used directly as well? Note: in the documentation, it is not mentioned explicitly that `Bo1_Cylinder_Aabb` is abstract, unlike other classes [3] Note #2: Currently (Yade 2018.02b), `Bo1_ChainedCylinder_Aabb` does not inherit from `Bo1_Cylinder_Aabb` [4], but it seems it did in the past [5]. Gaël [1] https://yade-dev.gitlab.io/trunk/tutorial-more-examples-fast.html#chained-cylinders [2] https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.Bo1_Cylinder_Aabb [3] For instance: https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.GlIPhysFunctor https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.Collider [4] ./pkg/common/Cylinder.hpp:206 class Bo1_ChainedCylinder_Aabb : public BoundFunctor [5] ./pkg/common/Cylinder.hpp:289 // Keep this : Cylinders and ChainedCylinders will have different centers maybe. // class Bo1_ChainedCylinder_Aabb : public Bo1_Cylinder_Aabb -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679543]: Is class `Bo1_Cylinder_Aabb` to be actually used?
Question #679543 on Yade changed: https://answers.launchpad.net/yade/+question/679543 Gael Lorieul gave more information on the question: Hi all, El lun, 25-03-2019 a las 17:13 +, Marcus Moravia escribió: > As far as I know, 'Bo1_Cylinder_Aabb' is used for chained cylinder. > 'Bo1_GridConnection_Aabb' is used for cylindrical connections created > by connecting two GridNodes. El 25-03-19 a las 14:53, Gaël Lorieul escribió: > In that case, why do none of the Chained-Cylinder examples [1] make use > of `Bo1_Cylinder_Aabb`, but employ `Bo1_ChainedCylinder_Aabb` instead? > Is `Bo1_Cylinder_Aabb` meant to be used as a base abstract class? Or was > it meant to be used directly as well? > > Note: in the documentation, it is not mentioned explicitly that > `Bo1_Cylinder_Aabb` is abstract, unlike other classes [3] > > Note #2: Currently (Yade 2018.02b), `Bo1_ChainedCylinder_Aabb` does not > inherit from `Bo1_Cylinder_Aabb` [4], but it seems it did in the past [5]. > [...] > [4] ./pkg/common/Cylinder.hpp:206 > class Bo1_ChainedCylinder_Aabb : public BoundFunctor > > [5] ./pkg/common/Cylinder.hpp:289 > // Keep this : Cylinders and ChainedCylinders will have different centers > maybe. > // class Bo1_ChainedCylinder_Aabb : public Bo1_Cylinder_Aabb I've been retracing the apparition of the `// class Bo1_ChainedCylinder_Aabb : public Bo1_Cylinder_Aabb` code line in the source code. It seems it was first added [1] by `bchareyre` in commit `8ad46e4` [2] and was already in commented-out form. The same commit also added the (uncommented) code line `class Bo1_Cylinder_Aabb : public BoundFunctor` [3] The commit message [4] reads (amongst other things): "cylinder : a new shape, first step in experiments for tracking interactions jumping over chained elements." which seems to confirm Marcus's suggestion that the `Bo1_Cylinder_Aabb` class was added with the idea of supporting ChainedCylinders, more than the Minkowski cylinders created by the `gridpfacet.cylinder()` function. Bruno Chareyre, if are reading this, could you confirm or contradict our conjectures about the `Bo1_Cylinder_Aabb` class? And tell us what is its purpose and how it should be used, please? Gaël [1] pkg/common/DataClass/Shape/Cylinder.hpp : 135 https://github.com/yade/trunk/commit/8ad46e4a13812073aa5a079b236880bdbf65c5f1#diff-6bfc2af24b2f4af9f5bafcaacbff1ca3R135 [2] 8ad46e4a13812073aa5a079b236880bdbf65c5f1 [3] pkg/common/DataClass/Shape/Cylinder.hpp : 146 https://github.com/yade/trunk/commit/8ad46e4a13812073aa5a079b236880bdbf65c5f1#diff-6bfc2af24b2f4af9f5bafcaacbff1ca3R146 [4] https://github.com/yade/trunk/commit/8ad46e4a13812073aa5a079b236880bdbf65c5f1 -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679544]: Best way to fix typos in documentation: source edit + git push?
Question #679544 on Yade changed: https://answers.launchpad.net/yade/+question/679544 Status: Answered => Open Gael Lorieul is still having a problem: Hi, At last I am submitting the typo fixes in the documentation that I promised some time ago already… 😅 Following the documentation [1], I am sending it as a patch file attached to the present e-mail. [2] It's not much, but hopefully it's just a start 😉 Cheers, Gaël PS: perhaps I should be using the yade-dev mailing for such communication? If so I assume all I have to do is send an e-mail to the list? Unlike the yade-users mailing list where it is required to ask questions from the Launchpad interface? [1] https://yade-dev.gitlab.io/trunk/github.html#pushing-changes-to-remote-repository [2] The documentation presents three methods: 1. Merge request from new branch in Yade repository. Requires me to be a member, which I am not. 2. Merge request from a repository of my own. Requires to have "group runners", which I don't think I have. Also GitLab does not allow me to create a merge request to `yade-dev/trunk` from either the `yade-dev/trunk` page (no "Add merge request" item in the "+" menu), nor from the "+" menu of my own branch (which does have an "Add merge request" item, but does not let me select "yade-dev/trunk" as destination. 3. Send git patch by e-mail: that's what I am doing 😉 -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679544]: Best way to fix typos in documentation: source edit + git push?
Hi Bruno (and the team), El 26-04-19 a las 10:03, Bruno Chareyre escribió: > Yes you can write emails to yade-dev. Ok, I'll do that next time ;) But I'll finish the present conversation in yade-users to keep it simple (and avoid possibly a mess). > It would be very helpful if you could try method [1] (gitlab), especially if > you plan to change more later, and it should not be a big deal. > Assuming you are working on source code pulled from the gitlab repository > (else send use the result of "git remote -v"): > > cd trunk > git status #list which files you have modified > git commit file1 file2 file3 #the files you changed > git pull --rebase > git push origin master:fixtypo I tried that last Friday and got: (same thing today…) > GitLab: You are not allowed to push code to this project. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Some info about my `origin` repository i.e. `git remote show origin` remote origin Fetch URL: g...@gitlab.com:yade-dev/trunk.git Push URL: g...@gitlab.com:yade-dev/trunk.git Branch HEAD: master Remote branch: master tracked I am using SSH authentication, and the gitlab server has the corresponding public key (I checked which key I am using with `ssh -vT g...@gitlab.com`). Https authentication also fails (and I checked the credentials I use): Username for 'https://gitlab.com': g* dot l* at coandev dot com Password for 'https://*@gitlab.com': remote: You are not allowed to push code to this project. Although I cannot push, I can pull i.e. `git pull --rebase` succeeds. In the GitLab web interface I can see that I am *not* a member of the `yade-dev/trunk` project (my user name is g* dot l* at coandev dot com i.e. same as the e-mail address I am using but with a different host) Could that be that I would need to be a member of the `yade-dev/trunk` project for approach #1 to succeed? Any ideas? ;) Gaël PS: Result of `git remote -v` origin g...@gitlab.com:yade-dev/trunk.git (fetch) origin g...@gitlab.com:yade-dev/trunk.git (push) origin_https https://gitlab.com/yade-dev/trunk.git (fetch) origin_https https://gitlab.com/yade-dev/trunk.git (push) Note: remote `origin` is the upstream. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679544]: Best way to fix typos in documentation: source edit + git push?
Hi Bruno, Bruno Chareyre Mon, 29 Apr 2019 21:53:51 +0200 > Give me your gitlab.com name. :) That would be `GLorieul` Gaël ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
[Yade-users] [Question #680569]: How to export the edges of a Voronoi tessellation? (no fluid case)
New question #680569 on Yade: https://answers.launchpad.net/yade/+question/680569 Hi all, I've seen a picture of a Voronoi Tesselation obtained with Yade on the wiki [1, Fig.2] where the edges of the Voronoi cells are visible. I want to do that (visualizing the Voronoi cells), but I don't really see how to obtain such a result with Yade… What I've seen: - The example code [3] for `TesselationWrapper` does not present explicit calculation and exporting of the tesselation (tesselation is calculated implicitly through call to `computeVolume()`, exporting this information is not mentioned at all). - This answered question [4] seems to be very similar to what I am looking for, except that it concerns a Fluid-Particles interaction, whereas I only work with particles (no fluid). The solution of [4] uses the `saveVtk()` function of class `TwoPhaseFlowEngine`. The implementation of the logic seems to be in member function `saveVtk()` of class `DFNBoundingSphere` [7]. In other words, the logic is not whithin the `Tesselation` or `TesselationWrapper` classes but within a module for Fluid-particles interaction. Also note that `TwoPhaseFlowEngine::saveVtk()` has now been commented out in the source code [5] although it can still be found in the documentation [6]. - Python class `TesselationWrapper` [2] does not seem to propose a function for explicit calculation of Voronoi tesselation. - C++ class `TesselationWrapper` contains `computeTesselation()` member function which does perform an explicit calculation of Voronoi tesselation, but it is not part of the `YADE_CLASS_BASE_DOC_*()` macro of the class `TesselationWrapper`, so it is not accessible from the Python interface. - The only way to compute the tesselation from Python that I have seen is to call the `TesselationWrapper.computeVolumes()` member function, but it does not output the shape of the cells, only their volume (from what I understand). Moreover (and still from what I understand) volumes can only be obtained one-by-one through successive calls to `TesselationWrapper.volume(sphereId)` for each sphere of the simulation. Is the feature of exporting the geometry of Voronoi Tesselation cells implemented/supported by Yade? If not, what would be the best way for me to achieve the result that I want? Thanks for your answers ;) Gaël PS: what is the mysterious "Alpha" in the `getAlpha*()` functions? (for instance `getAlphaFaces()`) [1] https://www.yade-dem.org/wiki/Triangulation https://www.yade-dem.org/wiki/File:Cell_volume.png [2] https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.TesselationWrapper [3] https://yade-dev.gitlab.io/trunk/tutorial-more-examples-fast.html#tesselationwrapper [4] https://answers.launchpad.net/yade/+question/656046 [5] ./pkg/pfv/TwoPhaseFlowEngine.hpp:438 ./pkg/pfv/TwoPhaseFlowEngine.hpp:613 [6] https://yade-dev.gitlab.io/trunk/yade.wrapper.html#yade.wrapper.FlowEngine.saveVtk [7] ./pkg/pfv/DFNFlow.cpp -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679544]: Best way to fix typos in documentation: source edit + git push?
Hey Janek, Thanks for offering your help! :) El 03-05-19 a las 08:13, Janek Kozicki escribió:> Question #679544 on Yade changed: > https://answers.launchpad.net/yade/+question/679544 > > Janek Kozicki proposed the following answer: >> 2. Merge request from a repository of my own. Requires to have "group > runners" > > I can help with that. Please give me the registration token for your > runners. I will add a runner for you. See https://gitlab.com/yade- > dev/trunk/merge_requests/112 > > You also need to add a tag "fast" after I add this runner for you. First of all, Bruno Chareyre asked me for my GitLab.com user name, which I shared (`@GLorieul` [1]). So I assume he was considering adding me to the list of team members, possibly with reduced permissions? From what I understand, solution 2 (i.e. push to repository of your own, then merge request to official yade branch) is meant for teams of researchers of the same lab who want to work together on a clone of Yade, correct? This is not my case: I am the only person of my team working on granular flows, the others are concerned with subjects that are not even related to mechanics. So would solution #2 be appropriate in that context? In practice, I am not familiar with the concept of runners. I could learn more about them I guess, but if solution #1 (git push to new (temporary) branch of yade) can be worked out, I'd rather do that ;) Janek, what is your opinion on that? Gaël [1] https://gitlab.com/GLorieul ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679544]: Best way to fix typos in documentation: source edit + git push?
Question #679544 on Yade changed: https://answers.launchpad.net/yade/+question/679544 Status: Answered => Open Gael Lorieul is still having a problem: Hi all! On Fri, 3 May 2019 at 23:58, Gael Lorieul > First of all, Bruno Chareyre asked me for my GitLab.com user name, > [...] So I assume he was considering adding me to the list of team > members, possibly with reduced permissions? El 03-05-19 a las 18:20, Bruno Chareyre escribió: > Done, sorry for delay! El 06-05-19 a las 10:46, Janek Kozicki escribió: > Oh good. Now you are part of yade-dev team. Welcome:) > You will push to a branch on gitlab and make merge requests. Awesome, thanks! I will push something small soon to test all works as it should ;) El 03-05-19 a las 18:20, Bruno Chareyre escribió:> > Please note that you sent reply to yade-users, feel free to use > yade-dev for any communication. I will do so for future conversations, I just wanted to avoid a mess where the present conversation would be half in yade-users and half in yade-dev ;) . Now I think the thread has reached to an end (hopefully, if all works as expected… XD ), so it does not matter very much anymore. > Are you french? Your name sounds so. I am ;) but living on the other side of the planet for now! Many thanks for your help! Gaël -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #679543]: Is class `Bo1_Cylinder_Aabb` to be actually used?
Question #679543 on Yade changed: https://answers.launchpad.net/yade/+question/679543 Status: Answered => Solved Gael Lorieul changed the question status: Thanks for your answers! -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp
Re: [Yade-users] [Question #680569]: How to export the edges of a Voronoi tessellation? (no fluid case)
Question #680569 on Yade changed: https://answers.launchpad.net/yade/+question/680569 Gael Lorieul posted a new comment: Hi again, It seemed to me that the Voronoi tessellation implemented in Yade is certainly very good to calculate shear and stresses on homogeneous packings, but its purpose was not to analyse the geometrical properties of a packing (including packing factor), nor to export the Voronoi tessellation, which is what I wanted to do. So instead I am now using the Voro++ (C++) library which was designed for extracting such geometrical information and can handle inhomogeneous packings. I've made a solution involving: 1. A Yade script exporting the particles' positions and radius 2. A small C++ code that parses it and calls the Voro++ library to generate the tessellation, which is exported to a file. 3. A gnuplot script that can visualize that file. I don't think it is the ideal solution, but it works well and could be used as a basis for a better version of it. I copy this solution below. Possibly a better solution could be to include an interface or wrapper to Voro++ from Yade? Enjoy! Gaël File `01_generatePacking.py`: import csv from yade import pack def saveParticles(particles, fileName): with open(fileName, 'w') as csvFile: fieldnames = ['id', 'positionX', 'positionY','positionZ','radius'] csvWriter = csv.DictWriter(csvFile, delimiter=',', quotechar='"', fieldnames=fieldnames) csvWriter.writeheader() for ptcl in particles: pos = ptcl.state.pos radius = ptcl.shape.radius csvWriter.writerow({'id':ptcl.id, 'positionX': pos[0], 'positionY': pos[1], 'positionZ': pos[2], 'radius':radius}) # GENERATE PARTICLES sp = pack.SpherePack() sp.makeCloud((-1,-1,-1),(1,1,1),rMean=.2, rRelFuzz=0.8, seed=1) sp.toSimulation() # SAVE PARTICLES particles = O.bodies # Assumes all bodies are particles saveParticles(particles, 'particles.csv') exit(0) # Exit explicitly otherwise Yade displays the Yade command prompt File `02_generateTesselation.cpp` (to compile as [1], the "csv.h" dependencies can be found here [2]) #include #include #include #include #include #include "voro++.hh" #include "dependencies/fast-cpp-csv-parser/csv.h" struct Particle { public: Particle() = default; Particle(int id, std::array position, double radius) :id(id), position(position), radius(radius) { /*Do nothing*/ } std::string toString() { std::ostringstream os; os << "\tpos = (" << position[0] << "," << position[1] << "," << position[2] << "), "; os << "radius = " << radius << std::endl; return os.str(); } int id; std::array position; double radius; }; int main() { // READ PARTICLES' POSITION AND SIZES io::CSVReader<5> in("particles.csv"); in.read_header(io::ignore_extra_column, "id", "positionX", "positionY", "positionZ", "radius"); int id; double posX, posY, posZ, radius; std::vector particles = {}; while(in.read_row(id, posX, posY, posZ, radius)) { particles.push_back( Particle(id, {posX,posY,posZ}, radius) ); } // GENERATE TESSELATION const std::vector SWCorner = {-1.0,-1.0,-1.0}; const std::vector NECorner = {+1.0,+1.0,+1.0}; const std::vectornbBlocks = {6,6,6}; constexpr bool isPeriodicX = false, isPeriodicY = false, isPeriodicZ = false; const int nbPtclPerBlock = 8; // Is an estimation (initial allocation size) voro::container_poly con(SWCorner[0], NECorner[0], SWCorner[1], NECorner[1], SWCorner[2], NECorner[2], nbBlocks[0], nbBlocks[1], nbBlocks[2], isPeriodicX, isPeriodicY, isPeriodicZ, nbPtclPerBlock); for(auto ptcl : particles) { con.put(ptcl.id, ptcl.position[0], ptcl.position[1], ptcl.position[2], ptcl.radius); } con.draw_cells_gnuplot("tesselation.gp"); } File 03_visualizeTesselation.py: import csv import numpy as np import PyGnuplot as pg def parseParticleFile(fileName): particles = [] with open(fileName, 'r') as csvParticles: csvReader = csv.DictReader(csvParticles) for entry in csvReader: newPart
Re: [Yade-users] [Question #680569]: How to export the edges of a Voronoi tessellation? (no fluid case)
Question #680569 on Yade changed: https://answers.launchpad.net/yade/+question/680569 Status: Expired => Solved Gael Lorieul changed the question status: I've just added the solution I've found to my problem. -- You received this question notification because your team yade-users is an answer contact for Yade. ___ Mailing list: https://launchpad.net/~yade-users Post to : yade-users@lists.launchpad.net Unsubscribe : https://launchpad.net/~yade-users More help : https://help.launchpad.net/ListHelp