← Back to team overview

yade-users team mailing list archive

Re: recorder problems

 

Benjamin Fragneaud a écrit :
> Benjamin Fragneaud wrote:
>   
>> Thanks Jerome,
>> I try it right now and let you know if I have other issues concerning 
>> this problem. Sorry for this kind of details, I'm just starting with C++ 
>> and debugging is always obvious.
>> Thanks again,
>> Ben
>> P.D: yes I read the getting started, that's an excellent first step for 
>> beginners.
>>
>>
>> Jerome Duriez wrote:
>>   
>>     
>>>     Hello. The problem is that the lines you wrote in the mail allow 
>>> only to define the Engines which will record all that you want. That's 
>>> neccessary to define them but not at all enough !
>>>     Once they are correctly defined you have to make so that these 
>>> Engines will indeed be executed when they have to. To make simple that 
>>> is done in the lines occuring at the end of the createActors function
>>>
>>>     //rootBody->engines.push_back(averagePositionRecorder);
>>>     //rootBody->engines.push_back(velocityRecorder);
>>>     //rootBody->engines.push_back(forcerec);
>>>
>>> And as you see they are commented...!! whereas the line about the 
>>> triaxialtest recorder :
>>> rootBody->engines.push_back(triaxialStateRecorder);
>>> (above) is not commented...
>>>
>>> In fact these lines allow to access to the list of the Engines of the 
>>> simulation will we be executed every time step (this list is the 
>>> variable "engines" of the "rootBody" object, which you have to consider 
>>> as the whole simulation). And so you have to put in this list (with the 
>>> C++ function "push_back") the engines you want to be executed.
>>> Did you read my small "Getting started" ? ;-) 
>>> Good luck
>>>
>>> Jerome
>>>
>>> Benjamin Fragneaud a écrit :
>>>   
>>>     
>>>       
>>>> Hi Lionel,
>>>> This problem occurs also with Yade´s default preprocessor, for 
>>>> expample with cohesiveTriaxialTest. In this preprocessor file, there 
>>>> is two types of recorders:
>>>>
>>>> - AveragePositionRecorder, ForceRecorder, VelocityRecorder -> doesn´t 
>>>> work (empty recorded files)
>>>>
>>>> Code used:
>>>>
>>>> void CohesiveTriaxialTest::createActors(shared_ptr<MetaBody>& rootBody)
>>>> 00557 {
>>>> 00558 // recording average positions
>>>> 00559         averagePositionRecorder = 
>>>> shared_ptr<AveragePositionRecorder>(new AveragePositionRecorder);
>>>> 00560         averagePositionRecorder -> outputFile           = 
>>>> positionRecordFile;
>>>> 00561         averagePositionRecorder -> interval             = 
>>>> recordIntervalIter;
>>>> 00562 // recording forces
>>>> 00563         forcerec = shared_ptr<ForceRecorder>(new ForceRecorder);
>>>> 00564         forcerec -> outputFile  = forceRecordFile;
>>>> 00565         forcerec -> interval    = recordIntervalIter;
>>>> 00566 // recording velocities
>>>> 00567         velocityRecorder = shared_ptr<VelocityRecorder>(new 
>>>> VelocityRecorder);
>>>> 00568         velocityRecorder-> outputFile   = velocityRecordFile;
>>>> 00569         velocityRecorder-> interval     = recordIntervalIter;
>>>> 00570
>>>>
>>>> - TriaxialTestRecorder -> works
>>>>
>>>> The main preprocessor is available in 
>>>> pkg/dem/PreProcessor/CohesiveTriaxialTest.cpp; it is also attached to 
>>>> this mail.
>>>>
>>>> Since my preprocessor is just on test, I preferred to use as an 
>>>> example which is supposed to work properly, and that I'm using as an 
>>>> example in order to understand the structure of the recorder egines.
>>>>
>>>> Let me know if some more information is required.
>>>> Thanks again your help and time,
>>>>
>>>> Ben
>>>>
>>>>
>>>> Lionel Favier <lfavier@xxxxxxxxxxxxxxx> ha escrito:
>>>>
>>>>     
>>>>       
>>>>         
>>>>> Benjamin Fragneaud a écrit :
>>>>>       
>>>>>         
>>>>>           
>>>>>> Hi everybody,
>>>>>>
>>>>>> I´d like to know if anybody already had problems with some recorders
>>>>>> like ForceRecorder engine, VelocityRecorder engine etc... this engines
>>>>>> seem to be constructed on the same basis. By using yade prepocessor
>>>>>> examples, I found out that this recorders create a document, but this
>>>>>> document remain empty (no data). The only recorders wich are working
>>>>>> properly are the stressWallRecorder as well as the snaprecorder, which
>>>>>> both belong to the triaxialTestEngine.
>>>>>>
>>>>>> I´m not an expert in C++ programmation, I just started to deal with
>>>>>> this stuff one month ago, so I beleive that I must do something wrong.
>>>>>> Yade is actually  running (one of the last svn subversion) on kubuntu
>>>>>> 8.04 hardy and all the yade components appear to run perfectly on this
>>>>>> platform.
>>>>>>
>>>>>> Thanks a lot for your help,
>>>>>>
>>>>>> Ben
>>>>>>
>>>>>> _______________________________________________
>>>>>> Yade-users mailing list
>>>>>> Yade-users@xxxxxxxxxxxxxxxx
>>>>>> https://lists.berlios.de/mailman/listinfo/yade-users
>>>>>>
>>>>>>
>>>>>>         
>>>>>>           
>>>>>>             
>>>>> Hello Ben,
>>>>>
>>>>> I think you should add an enclosure of your Preprocessor example,
>>>>> because a lot of various worries could happen ...
>>>>>
>>>>> -- 
>>>>> Lionel FAVIER
>>>>> Doctorant
>>>>> Laboratoire Sols Solides Structures, Risques (3S-R)
>>>>> Equipe Risques et Vulnérabilité (RV)
>>>>>
>>>>> Domaine Universitaire - BP 53
>>>>> 38041 Grenoble Cedex 9
>>>>> France
>>>>>
>>>>> Tél: +33 (0)4 56 52 86 36
>>>>> lionel.favier@xxxxxxxxxxx
>>>>>
>>>>> _______________________________________________
>>>>> Yade-users mailing list
>>>>> Yade-users@xxxxxxxxxxxxxxxx
>>>>> https://lists.berlios.de/mailman/listinfo/yade-users
>>>>>
>>>>>       
>>>>>         
>>>>>           
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> Yade-users mailing list
>>>> Yade-users@xxxxxxxxxxxxxxxx
>>>> https://lists.berlios.de/mailman/listinfo/yade-users
>>>>     
>>>>       
>>>>         
>>> _______________________________________________
>>> Yade-users mailing list
>>> Yade-users@xxxxxxxxxxxxxxxx
>>> https://lists.berlios.de/mailman/listinfo/yade-users
>>>   
>>>     
>>>       
>> _______________________________________________
>> Yade-users mailing list
>> Yade-users@xxxxxxxxxxxxxxxx
>> https://lists.berlios.de/mailman/listinfo/yade-users
>>   
>>     
> Hi,
> I got to the lab, and checked it again. With the CohesiveTriaxialTest, 
> once the engines are setup the be run at each loop: uncommented
>
> rootBody->engines.push_back(engine_corresponding_to_the_one_I_want_to_use); the file are created when at the first step (generate step),but when I stop the model they remain empty.
> Any idea?
> Thanks, 
>
> Ben 
>
>
> _______________________________________________
> Yade-users mailing list
> Yade-users@xxxxxxxxxxxxxxxx
> https://lists.berlios.de/mailman/listinfo/yade-users
>
>   
If you push the "stop" button during a simulation, the code is going to 
reset every informations in your txt files, corresponding to "forces", 
"positions" and "velocities". Actually the code considers that you're 
going to make another computation, so he creates others "forces" .. 
files, but empty because you're in the first step.
If you want to keep your informations, you can push the pause button, 
afterwards you remove your files from the temporary folder (../bin).

Good luck

Lionel

-- 
Lionel FAVIER
Doctorant
Laboratoire Sols Solides Structures, Risques (3S-R)
Equipe Risques et Vulnérabilité (RV)

Domaine Universitaire - BP 53
38041 Grenoble Cedex 9
France

Tél: +33 (0)4 56 52 86 36
lionel.favier@xxxxxxxxxxx

_______________________________________________
Yade-users mailing list
Yade-users@xxxxxxxxxxxxxxxx
https://lists.berlios.de/mailman/listinfo/yade-users



References