Skip to content
Snippets Groups Projects
Commit cd7d2c52 authored by Sebastian Eibl's avatar Sebastian Eibl
Browse files

Merge branch 'implict' into 'master'

[API] Fix implict/explict typos in pe::cr

See merge request !90
parents bfb3b85e 09046b4a
Branches
Tags
No related merge requests found
...@@ -79,7 +79,7 @@ private: ...@@ -79,7 +79,7 @@ private:
size_t numberOfContactsTreated_; size_t numberOfContactsTreated_;
}; };
class DEM : public DEMSolver<IntegrateImplictEuler, ResolveContactSpringDashpotHaffWerner> class DEM : public DEMSolver<IntegrateImplicitEuler, ResolveContactSpringDashpotHaffWerner>
{ {
public: public:
DEM( const shared_ptr<BodyStorage>& globalBodyStorage DEM( const shared_ptr<BodyStorage>& globalBodyStorage
...@@ -88,8 +88,8 @@ public: ...@@ -88,8 +88,8 @@ public:
, domain_decomposition::BlockDataID ccdID , domain_decomposition::BlockDataID ccdID
, domain_decomposition::BlockDataID fcdID , domain_decomposition::BlockDataID fcdID
, WcTimingTree* tt = NULL) , WcTimingTree* tt = NULL)
: DEMSolver<IntegrateImplictEuler, ResolveContactSpringDashpotHaffWerner>( : DEMSolver<IntegrateImplicitEuler, ResolveContactSpringDashpotHaffWerner>(
IntegrateImplictEuler(), ResolveContactSpringDashpotHaffWerner(), IntegrateImplicitEuler(), ResolveContactSpringDashpotHaffWerner(),
globalBodyStorage, blockStorage, storageID, ccdID, fcdID, tt ) globalBodyStorage, blockStorage, storageID, ccdID, fcdID, tt )
{ {
} }
......
...@@ -128,7 +128,7 @@ void DEMSolver<Integrator,ContactResolver>::timestep( real_t dt ) ...@@ -128,7 +128,7 @@ void DEMSolver<Integrator,ContactResolver>::timestep( real_t dt )
WALBERLA_ASSERT( bodyIt->checkInvariants(), "Invalid body state detected" ); WALBERLA_ASSERT( bodyIt->checkInvariants(), "Invalid body state detected" );
WALBERLA_ASSERT( !bodyIt->hasSuperBody(), "Invalid superordinate body detected" ); WALBERLA_ASSERT( !bodyIt->hasSuperBody(), "Invalid superordinate body detected" );
// Moving the capsule according to the acting forces (don't move a sleeping capsule) // Moving the body according to the acting forces (don't move a sleeping body)
if( bodyIt->isAwake() && !bodyIt->hasInfiniteMass() ) if( bodyIt->isAwake() && !bodyIt->hasInfiniteMass() )
{ {
integrate_( *bodyIt, dt, *this ); integrate_( *bodyIt, dt, *this );
...@@ -138,7 +138,7 @@ void DEMSolver<Integrator,ContactResolver>::timestep( real_t dt ) ...@@ -138,7 +138,7 @@ void DEMSolver<Integrator,ContactResolver>::timestep( real_t dt )
bodyIt->resetForceAndTorque(); bodyIt->resetForceAndTorque();
// Checking the state of the rigid body // Checking the state of the rigid body
WALBERLA_ASSERT( bodyIt->checkInvariants(), "Invalid capsule state detected" ); WALBERLA_ASSERT( bodyIt->checkInvariants(), "Invalid body state detected" );
// Resetting the acting forces // Resetting the acting forces
bodyIt->resetForceAndTorque(); bodyIt->resetForceAndTorque();
......
...@@ -30,7 +30,7 @@ namespace pe { ...@@ -30,7 +30,7 @@ namespace pe {
namespace cr { namespace cr {
//************************************************************************************************* //*************************************************************************************************
/*!\brief Integrate the trajectory of one body using implict Euler. /*!\brief Integrate the trajectory of one body using implicit Euler.
* *
* \param id Body ID. * \param id Body ID.
* \param dt Time step size. * \param dt Time step size.
...@@ -40,7 +40,7 @@ namespace cr { ...@@ -40,7 +40,7 @@ namespace cr {
* The implicit Euler algorithm, also known as backward Euler, is used. It is a first-order * The implicit Euler algorithm, also known as backward Euler, is used. It is a first-order
* integrator that does conserves energy (i.e. it is symplectic.) * integrator that does conserves energy (i.e. it is symplectic.)
*/ */
class IntegrateImplictEuler { class IntegrateImplicitEuler {
public: public:
void operator()( BodyID id, real_t dt, ICR & solver ) const void operator()( BodyID id, real_t dt, ICR & solver ) const
{ {
...@@ -72,7 +72,7 @@ public: ...@@ -72,7 +72,7 @@ public:
// Setting the axis-aligned bounding box // Setting the axis-aligned bounding box
id->calcBoundingBox(); id->calcBoundingBox();
// Calculating the current motion of the capsule // Calculating the current motion of the body
id->calcMotion(); id->calcMotion();
} }
}; };
...@@ -88,7 +88,7 @@ public: ...@@ -88,7 +88,7 @@ public:
* The explicit Euler algorithm, also known as forward Euler, is used. It is a first-order * The explicit Euler algorithm, also known as forward Euler, is used. It is a first-order
* integrator that does not conserve energy (i.e. it is not symplectic.) * integrator that does not conserve energy (i.e. it is not symplectic.)
*/ */
class IntegrateExplictEuler { class IntegrateExplicitEuler {
public: public:
void operator()( BodyID id, real_t dt, ICR & solver ) const void operator()( BodyID id, real_t dt, ICR & solver ) const
{ {
...@@ -120,7 +120,7 @@ public: ...@@ -120,7 +120,7 @@ public:
// Setting the axis-aligned bounding box // Setting the axis-aligned bounding box
id->calcBoundingBox(); id->calcBoundingBox();
// Calculating the current motion of the capsule // Calculating the current motion of the body
id->calcMotion(); id->calcMotion();
} }
}; };
......
...@@ -61,14 +61,14 @@ private: ...@@ -61,14 +61,14 @@ private:
WcTimingTree* tt_; WcTimingTree* tt_;
}; };
class PlainIntegrator : public PlainIntegratorSolver<IntegrateImplictEuler> class PlainIntegrator : public PlainIntegratorSolver<IntegrateImplicitEuler>
{ {
public: public:
PlainIntegrator( const shared_ptr<BodyStorage>& globalBodyStorage PlainIntegrator( const shared_ptr<BodyStorage>& globalBodyStorage
, const shared_ptr<BlockStorage>& blockStorage , const shared_ptr<BlockStorage>& blockStorage
, domain_decomposition::BlockDataID storageID , domain_decomposition::BlockDataID storageID
, WcTimingTree* tt = NULL) , WcTimingTree* tt = NULL)
: PlainIntegratorSolver<IntegrateImplictEuler>( IntegrateImplictEuler(), globalBodyStorage, blockStorage, : PlainIntegratorSolver<IntegrateImplicitEuler>( IntegrateImplicitEuler(), globalBodyStorage, blockStorage,
storageID, tt ) storageID, tt )
{ {
} }
......
...@@ -65,14 +65,14 @@ void PlainIntegratorSolver<Integrator>::timestep( const real_t dt ) ...@@ -65,14 +65,14 @@ void PlainIntegratorSolver<Integrator>::timestep( const real_t dt )
BodyStorage& localStorage = (*storage)[0]; BodyStorage& localStorage = (*storage)[0];
for (auto bd = localStorage.begin(); bd != localStorage.end(); ++bd){ for (auto bd = localStorage.begin(); bd != localStorage.end(); ++bd){
// Checking the state of the body // Checking the state of the body
WALBERLA_ASSERT( bd->checkInvariants(), "Invalid capsule state detected" ); WALBERLA_ASSERT( bd->checkInvariants(), "Invalid body state detected" );
WALBERLA_ASSERT( !bd->hasSuperBody(), "Invalid superordinate body detected" ); WALBERLA_ASSERT( !bd->hasSuperBody(), "Invalid superordinate body detected" );
// Resetting the contact node and removing all attached contacts // Resetting the contact node and removing all attached contacts
// bd->resetNode(); // bd->resetNode();
bd->clearContacts(); bd->clearContacts();
// Moving the capsule according to the acting forces (don't move a sleeping capsule) // Moving the body according to the acting forces (don't move a sleeping body)
if( bd->isAwake() && !bd->hasInfiniteMass() ) { if( bd->isAwake() && !bd->hasInfiniteMass() ) {
integrate_( *bd, dt, *this ); integrate_( *bd, dt, *this );
} }
...@@ -80,8 +80,8 @@ void PlainIntegratorSolver<Integrator>::timestep( const real_t dt ) ...@@ -80,8 +80,8 @@ void PlainIntegratorSolver<Integrator>::timestep( const real_t dt )
// Resetting the acting forces // Resetting the acting forces
bd->resetForceAndTorque(); bd->resetForceAndTorque();
// Checking the state of the capsule // Checking the state of the body
WALBERLA_ASSERT( bd->checkInvariants(), "Invalid capsule state detected" ); WALBERLA_ASSERT( bd->checkInvariants(), "Invalid body state detected" );
} }
} }
if (tt_!=NULL) tt_->stop("Integrate Bodies"); if (tt_!=NULL) tt_->stop("Integrate Bodies");
......
...@@ -56,7 +56,7 @@ namespace pe { ...@@ -56,7 +56,7 @@ namespace pe {
CylindricalBoundary::CylindricalBoundary( id_t sid, id_t uid, const Vec3& gpos, const real_t radius, CylindricalBoundary::CylindricalBoundary( id_t sid, id_t uid, const Vec3& gpos, const real_t radius,
MaterialID material ) MaterialID material )
: GeomPrimitive( getStaticTypeID(), sid, uid, material ) // Initializing the base object : GeomPrimitive( getStaticTypeID(), sid, uid, material ) // Initializing the base object
, radius_(radius) // Radius of the cylinder // Length of the capsule , radius_(radius) // Radius of the cylinder
{ {
//boundaries are always considered locally and have infinite mass //boundaries are always considered locally and have infinite mass
setGlobal( true ); setGlobal( true );
...@@ -66,11 +66,11 @@ CylindricalBoundary::CylindricalBoundary( id_t sid, id_t uid, const Vec3& gpos, ...@@ -66,11 +66,11 @@ CylindricalBoundary::CylindricalBoundary( id_t sid, id_t uid, const Vec3& gpos,
// Checking the radius // Checking the radius
// Since the constructor is never directly called but only used in a small number // Since the constructor is never directly called but only used in a small number
// of functions that already check the capsule arguments, only asserts are used here to // of functions that already check the cylinder arguments, only asserts are used here to
// double check the arguments. // double check the arguments.
WALBERLA_ASSERT_GREATER( radius, real_t(0), "Invalid capsule radius" ); WALBERLA_ASSERT_GREATER( radius, real_t(0), "Invalid cylinder radius" );
// Initializing the instantiated capsule // Initializing the instantiated cylinder
gpos_ = gpos; gpos_ = gpos;
q_ = Quat(); // Setting the orientation q_ = Quat(); // Setting the orientation
R_ = q_.toRotationMatrix(); // Setting the rotation matrix R_ = q_.toRotationMatrix(); // Setting the rotation matrix
......
...@@ -175,7 +175,7 @@ inline id_t CylindricalBoundary::getStaticTypeID() ...@@ -175,7 +175,7 @@ inline id_t CylindricalBoundary::getStaticTypeID()
//================================================================================================= //=================================================================================================
//************************************************************************************************* //*************************************************************************************************
/*!\name Capsule operators */ /*!\name Cylinder operators */
//@{ //@{
std::ostream& operator<<( std::ostream& os, const CylindricalBoundary& cb ); std::ostream& operator<<( std::ostream& os, const CylindricalBoundary& cb );
std::ostream& operator<<( std::ostream& os, CylindricalBoundaryID cb ); std::ostream& operator<<( std::ostream& os, CylindricalBoundaryID cb );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment