Author: gladky_anton Date: 2009-08-06 10:40:14 +0200 (Thu, 06 Aug 2009) New Revision: 1927
Modified: trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp trunk/pkg/dem/meta/RockPM.cpp trunk/pkg/dem/meta/RockPM.hpp Log: 1. All variables initialize in PressTestEngine and RockPm Modified: trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp =================================================================== --- trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp 2009-08-05 18:00:48 UTC (rev 1926) +++ trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.cpp 2009-08-06 08:40:14 UTC (rev 1927) @@ -22,22 +22,22 @@ void PressTestEngine::applyCondition(MetaBody * ncb){ if (curentDirection != stop) { - if (curentDirection==forward) { //Forward direction of the press + if (curentDirection==forward) { ///<Forward direction of the press FOREACH(body_id_t id, subscribedBodies){ assert(ncb->bodies->exists(id)); - currentVerticalForce = ncb->bex.getForce(id)[2]; //Define current vertical force - minimalForce = maxVerticalForce*0.1; //Define minimal edge of the force (10% from Maximal) - minimalPredictedForce = predictedForce*0.1; //Define minimal edge of the Predicted force (10% from Predicted) - if (currentVerticalForce > maxVerticalForce) { //Force increasing. Press is working normally + currentVerticalForce = ncb->bex.getForce(id)[2]; ///<Define current vertical force + minimalForce = maxVerticalForce*0.1; ///<Define minimal edge of the force (10% from Maximal) + minimalPredictedForce = predictedForce*0.1; ///<Define minimal edge of the Predicted force (10% from Predicted) + if (currentVerticalForce > maxVerticalForce) { ///<Force increasing. Press is working normally maxVerticalForce = currentVerticalForce; } else if ((currentVerticalForce<=(minimalForce))&&(maxVerticalForce>minimalPredictedForce)) { - /* + /** * Force is decreased lower, than minimal. The body seems "cracked". * Starting the countdown */ currentIterationAfterDestruction++; if (currentIterationAfterDestruction>=numberIterationAfterDestruction) { - /* + /** * The body definitly cracked. Change the direction of press and increase the velosity in 5 times. */ curentDirection=backward; @@ -45,7 +45,7 @@ currentIterationAfterDestruction = (Omega::instance().getCurrentIteration())/pressVelocityForw2Back*riseUpPressHigher; } } else if (((currentIterationAfterDestruction!=0)&&(maxVerticalForce !=0))) { - /* + /** * We have found, that it was not "Finish destruction" * Abnulling currentIterationAfterDestruction */ @@ -53,13 +53,13 @@ } } TranslationEngine::applyCondition(ncb); - } else if (curentDirection==backward) { //The press returns back to the normal position + } else if (curentDirection==backward) { ///<The press returns back to the normal position if (currentIterationAfterDestruction > 0) { currentIterationAfterDestruction--; TranslationEngine::applyCondition(ncb); } else { - curentDirection=stop; //If the press is in normal position -> STOP - Omega::instance().stopSimulationLoop(); //Stop simulation loop + curentDirection=stop; ///<If the press is in normal position -> STOP + Omega::instance().stopSimulationLoop(); ///<Stop simulation loop } } } Modified: trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp =================================================================== --- trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp 2009-08-05 18:00:48 UTC (rev 1926) +++ trunk/pkg/common/Engine/DeusExMachina/PressTestEngine.hpp 2009-08-06 08:40:14 UTC (rev 1927) @@ -20,7 +20,7 @@ #include<yade/core/DeusExMachina.hpp> class PressTestEngine: public TranslationEngine{ - /* + /** * This class simulates the simple press work * When the press "cracks" the solid brittle material, * it returns back to the initial position @@ -32,7 +32,17 @@ Real currentVerticalForce, maxVerticalForce, minimalForce, predictedForce, minimalPredictedForce, riseUpPressHigher; long int numberIterationAfterDestruction, currentIterationAfterDestruction; int pressVelocityForw2Back; - PressTestEngine(): curentDirection(forward), currentVerticalForce(0), maxVerticalForce(0), currentIterationAfterDestruction(0), pressVelocityForw2Back(25), riseUpPressHigher(1){}; + PressTestEngine(): + curentDirection(forward), + currentVerticalForce(0), + maxVerticalForce(0), + minimalForce(0), + predictedForce(0), + minimalPredictedForce(0), + riseUpPressHigher(1), + numberIterationAfterDestruction (0), + currentIterationAfterDestruction(0), + pressVelocityForw2Back(25) {}; virtual ~PressTestEngine(){}; virtual void applyCondition(MetaBody*); REGISTER_CLASS_AND_BASE(PressTestEngine,TranslationEngine); Modified: trunk/pkg/dem/meta/RockPM.cpp =================================================================== --- trunk/pkg/dem/meta/RockPM.cpp 2009-08-05 18:00:48 UTC (rev 1926) +++ trunk/pkg/dem/meta/RockPM.cpp 2009-08-06 08:40:14 UTC (rev 1927) @@ -57,13 +57,13 @@ const shared_ptr<RpmMat>& rbp1=YADE_PTR_CAST<RpmMat>(body1->physicalParameters); const shared_ptr<RpmMat>& rbp2=YADE_PTR_CAST<RpmMat>(body2->physicalParameters); - //check, whether one of bodies is damaged + ///check, whether one of bodies is damaged if ((rbp1->isDamaged) || (rbp2->isDamaged)) { phys->isCohesive = false; } if(displN<=0){ - /*Normal Interaction*/ + /**Normal Interaction*/ epsN=geom->strainN(); epsT=geom->strainT(); @@ -73,7 +73,7 @@ sigmaT=G*epsT; - /*Check, whether the shear stress more, than normal force multiplicated to tanFrictionAngle*/ + /**Check, whether the shear stress more, than normal force multiplicated to tanFrictionAngle*/ Real maxFsSq = phys->normalForce.SquaredLength()*phys->tanFrictionAngle*phys->tanFrictionAngle; if(sigmaT.SquaredLength()>maxFsSq) { @@ -84,7 +84,7 @@ phys->shearForce = Fs; applyForceAtContactPoint(phys->normalForce + phys->shearForce, geom->contactPoint, contact->getId1(), geom->se31.position, contact->getId2(), geom->se32.position, rootBody); - /*Normal Interaction_____*/ + /**Normal Interaction_____*/ if ((phys->isCohesive)&&(displN<(-phys->lengthMaxCompression))) { //LOG_WARN(displN<<"__COMRESS!!!__"); phys->isCohesive = false; Modified: trunk/pkg/dem/meta/RockPM.hpp =================================================================== --- trunk/pkg/dem/meta/RockPM.hpp 2009-08-05 18:00:48 UTC (rev 1926) +++ trunk/pkg/dem/meta/RockPM.hpp 2009-08-06 08:40:14 UTC (rev 1927) @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * * along with this program. If not, see <http://www.gnu.org/licenses/>* **************************************************************************/ -/* +/** === HIGH LEVEL OVERVIEW OF RockPM === @@ -43,14 +43,20 @@ }; REGISTER_SERIALIZABLE(Law2_Dem3DofGeom_RockPMPhys_Rpm); -/* This class holds information associated with each body */ +/** This class holds information associated with each body */ class RpmMat: public BodyMacroParameters { public: - int exampleNumber; //Number of "stone" + int exampleNumber; ///<Number of "stone" bool initCohesive, isDamaged; - Real stressCompressMax, Brittleness, G_over_E; //Parameters for damaging + Real stressCompressMax, Brittleness, G_over_E; ///<Parameters for damaging - RpmMat(): exampleNumber(0.), initCohesive(false), isDamaged(false), stressCompressMax(0), Brittleness(0), G_over_E(1) {createIndex();}; + RpmMat(): + exampleNumber(0.), + initCohesive(false), + isDamaged(false), + stressCompressMax(0), + Brittleness(0), + G_over_E(1) {createIndex();}; REGISTER_ATTRIBUTES(BodyMacroParameters, (exampleNumber) (initCohesive) @@ -94,7 +100,14 @@ bool isCohesive; - RpmPhys(): NormalShearInteraction(),crossSection(0),E(0),G(0), tanFrictionAngle(0), lengthMaxCompression(0), lengthMaxTension(0), isCohesive(false) { createIndex(); epsT=Vector3r::ZERO; omega=0; Fn=0; Fs=Vector3r::ZERO;} + RpmPhys(): NormalShearInteraction(), + crossSection(0), + E(0), + G(0), + tanFrictionAngle(0), + lengthMaxCompression(0), + lengthMaxTension(0), + isCohesive(false) { createIndex(); epsT=Vector3r::ZERO; omega=0; Fn=0; Fs=Vector3r::ZERO;} virtual ~RpmPhys(); REGISTER_ATTRIBUTES(NormalShearInteraction, _______________________________________________ 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