|
From: <mor...@us...> - 2010-04-13 09:24:49
|
Revision: 3834
http://ecell.svn.sourceforge.net/ecell/?rev=3834&view=rev
Author: moriyoshi
Date: 2010-04-13 09:24:40 +0000 (Tue, 13 Apr 2010)
Log Message:
-----------
* Remove funky macros derived from UtilLinux.
Modified Paths:
--------------
ecell3/trunk/dmtool/SharedModuleMaker.hpp
ecell3/trunk/dmtool/SharedModuleMakerInterface.hpp
ecell3/trunk/ecell/dm/DAEStepper.cpp
ecell3/trunk/ecell/dm/ESSYNSProcessInterface.hpp
ecell3/trunk/ecell/dm/ESSYNSStepper.cpp
ecell3/trunk/ecell/dm/ExpressionAlgebraicProcess.cpp
ecell3/trunk/ecell/dm/ExpressionAssignmentProcess.cpp
ecell3/trunk/ecell/dm/ExpressionFluxProcess.cpp
ecell3/trunk/ecell/dm/ExpressionProcessBase.hpp
ecell3/trunk/ecell/dm/FixedDAE1Stepper.cpp
ecell3/trunk/ecell/dm/FluxDistributionStepper.cpp
ecell3/trunk/ecell/dm/GMAProcess.cpp
ecell3/trunk/ecell/dm/GillespieProcess.cpp
ecell3/trunk/ecell/dm/GillespieProcess.hpp
ecell3/trunk/ecell/dm/GillespieProcessInterface.hpp
ecell3/trunk/ecell/dm/MassActionFluxProcess.cpp
ecell3/trunk/ecell/dm/ODE23Stepper.cpp
ecell3/trunk/ecell/dm/ODE45Stepper.cpp
ecell3/trunk/ecell/dm/ODEStepper.cpp
ecell3/trunk/ecell/dm/PythonFluxProcess.cpp
ecell3/trunk/ecell/dm/PythonProcess.cpp
ecell3/trunk/ecell/dm/PythonProcessBase.hpp
ecell3/trunk/ecell/dm/QuasiDynamicFluxProcess.cpp
ecell3/trunk/ecell/dm/QuasiDynamicFluxProcess.hpp
ecell3/trunk/ecell/dm/QuasiDynamicFluxProcessInterface.hpp
ecell3/trunk/ecell/dm/SSystemProcess.cpp
ecell3/trunk/ecell/dm/TauLeapProcess.cpp
ecell3/trunk/ecell/dm/TauLeapStepper.cpp
ecell3/trunk/ecell/libecs/AdaptiveDifferentialStepper.hpp
ecell3/trunk/ecell/libecs/ContinuousProcess.hpp
ecell3/trunk/ecell/libecs/DataPoint.cpp
ecell3/trunk/ecell/libecs/DataPoint.hpp
ecell3/trunk/ecell/libecs/DataPointVector.cpp
ecell3/trunk/ecell/libecs/DataPointVector.hpp
ecell3/trunk/ecell/libecs/Defs.hpp.in
ecell3/trunk/ecell/libecs/DifferentialStepper.cpp
ecell3/trunk/ecell/libecs/DifferentialStepper.hpp
ecell3/trunk/ecell/libecs/DiscreteEventStepper.cpp
ecell3/trunk/ecell/libecs/DiscreteEventStepper.hpp
ecell3/trunk/ecell/libecs/DiscreteTimeStepper.hpp
ecell3/trunk/ecell/libecs/EcsObject.cpp
ecell3/trunk/ecell/libecs/EcsObject.hpp
ecell3/trunk/ecell/libecs/EcsObjectMaker.hpp
ecell3/trunk/ecell/libecs/Entity.cpp
ecell3/trunk/ecell/libecs/Entity.hpp
ecell3/trunk/ecell/libecs/EntityType.cpp
ecell3/trunk/ecell/libecs/EntityType.hpp
ecell3/trunk/ecell/libecs/EventScheduler.hpp
ecell3/trunk/ecell/libecs/Exceptions.hpp
ecell3/trunk/ecell/libecs/FullID.cpp
ecell3/trunk/ecell/libecs/FullID.hpp
ecell3/trunk/ecell/libecs/Interpolant.hpp
ecell3/trunk/ecell/libecs/Logger.cpp
ecell3/trunk/ecell/libecs/Logger.hpp
ecell3/trunk/ecell/libecs/LoggerBroker.cpp
ecell3/trunk/ecell/libecs/LoggerBroker.hpp
ecell3/trunk/ecell/libecs/MethodProxy.hpp
ecell3/trunk/ecell/libecs/Model.cpp
ecell3/trunk/ecell/libecs/Model.hpp
ecell3/trunk/ecell/libecs/PassiveStepper.cpp
ecell3/trunk/ecell/libecs/PassiveStepper.hpp
ecell3/trunk/ecell/libecs/PhysicalLogger.cpp
ecell3/trunk/ecell/libecs/PhysicalLogger.hpp
ecell3/trunk/ecell/libecs/Polymorph.hpp
ecell3/trunk/ecell/libecs/Process.cpp
ecell3/trunk/ecell/libecs/Process.hpp
ecell3/trunk/ecell/libecs/ProcessEvent.hpp
ecell3/trunk/ecell/libecs/PropertyInterface.hpp
ecell3/trunk/ecell/libecs/PropertySlot.hpp
ecell3/trunk/ecell/libecs/PropertySlotProxyLoggerAdapter.hpp
ecell3/trunk/ecell/libecs/Stepper.cpp
ecell3/trunk/ecell/libecs/Stepper.hpp
ecell3/trunk/ecell/libecs/StepperEvent.cpp
ecell3/trunk/ecell/libecs/StepperEvent.hpp
ecell3/trunk/ecell/libecs/System.cpp
ecell3/trunk/ecell/libecs/System.hpp
ecell3/trunk/ecell/libecs/SystemStepper.cpp
ecell3/trunk/ecell/libecs/SystemStepper.hpp
ecell3/trunk/ecell/libecs/Util.cpp
ecell3/trunk/ecell/libecs/Util.hpp
ecell3/trunk/ecell/libecs/Variable.cpp
ecell3/trunk/ecell/libecs/Variable.hpp
ecell3/trunk/ecell/libecs/VariableReference.cpp
ecell3/trunk/ecell/libecs/VariableReference.hpp
ecell3/trunk/ecell/libecs/convertTo.hpp
ecell3/trunk/ecell/libecs/scripting/Assembler.cpp
ecell3/trunk/ecell/libecs/scripting/ExpressionCompiler.cpp
ecell3/trunk/ecell/libecs/scripting/ExpressionCompiler.hpp
ecell3/trunk/ecell/libecs/scripting/VirtualMachine.cpp
ecell3/trunk/ecell/libecs/scripting/VirtualMachine.hpp
ecell3/trunk/ecell/libecs/tests/LoggerBroker_test.cpp
ecell3/trunk/ecell/libecs/tests/Model_test.cpp
ecell3/trunk/ecell/libecs/tests/Polymorph_test.cpp
ecell3/trunk/ecell/libemc/LocalSimulatorImplementation.cpp
ecell3/trunk/ecell/libemc/LocalSimulatorImplementation.hpp
ecell3/trunk/ecell/libemc/Simulator.hpp
ecell3/trunk/ecell/libemc/SimulatorImplementation.hpp
ecell3/trunk/ecell/libemc/libemc.hpp
ecell3/trunk/ecell/pyecell/ecell/_ecs.cpp
Modified: ecell3/trunk/dmtool/SharedModuleMaker.hpp
===================================================================
--- ecell3/trunk/dmtool/SharedModuleMaker.hpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/dmtool/SharedModuleMaker.hpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -54,7 +54,7 @@
}
}
- virtual const std::string getSearchPath() const
+ virtual std::string getSearchPath() const
{
typedef std::set< std::string > StringSet;
std::string retval;
Modified: ecell3/trunk/dmtool/SharedModuleMakerInterface.hpp
===================================================================
--- ecell3/trunk/dmtool/SharedModuleMakerInterface.hpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/dmtool/SharedModuleMakerInterface.hpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -38,7 +38,7 @@
virtual void setSearchPath( const std::string& path ) = 0;
- virtual const std::string getSearchPath() const = 0;
+ virtual std::string getSearchPath() const = 0;
public:
static const char PATH_SEPARATOR = LT_PATHSEP_CHAR;
Modified: ecell3/trunk/ecell/dm/DAEStepper.cpp
===================================================================
--- ecell3/trunk/ecell/dm/DAEStepper.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/DAEStepper.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -43,10 +43,10 @@
USE_LIBECS;
-DECLARE_VECTOR( Integer, IntVector );
-
LIBECS_DM_CLASS( DAEStepper, DifferentialStepper )
{
+public:
+ typedef std::vector< Integer > IntegerVector;
public:
@@ -67,27 +67,27 @@
DAEStepper( void )
: theSystemSize( -1 ),
- theJacobianMatrix1( NULLPTR ),
- thePermutation1( NULLPTR ),
- theVelocityVector1( NULLPTR ),
- theSolutionVector1( NULLPTR ),
- theJacobianMatrix2( NULLPTR ),
- thePermutation2( NULLPTR ),
- theVelocityVector2( NULLPTR ),
- theSolutionVector2( NULLPTR ),
+ theContinuousVariableVector( 0 ),
+ theJacobianMatrix1( 0 ),
+ thePermutation1( 0 ),
+ theVelocityVector1( 0 ),
+ theSolutionVector1( 0 ),
+ theJacobianMatrix2( 0 ),
+ thePermutation2( 0 ),
+ theVelocityVector2( 0 ),
+ theSolutionVector2( 0 ),
theMaxIterationNumber( 7 ),
+ theStoppingCriterion( 0.0 ),
eta( 1.0 ),
Uround( 1e-10 ),
theAbsoluteTolerance( 1e-6 ),
theRelativeTolerance( 1e-6 ),
- theStoppingCriterion( 0.0 ),
theFirstStepFlag( true ),
theRejectedStepFlag( false ),
- theJacobianCalculateFlag( true ),
theAcceptedError( 0.0 ),
theAcceptedStepInterval( 0.0 ),
- theJacobianRecalculateTheta( 0.001 ),
- theContinuousVariableVector( NULLPTR )
+ theJacobianCalculateFlag( true ),
+ theJacobianRecalculateTheta( 0.001 )
{
const Real pow913( pow( 9.0, 1.0 / 3.0 ) );
@@ -229,7 +229,7 @@
if ( theJacobianMatrix1 )
{
gsl_matrix_free( theJacobianMatrix1 );
- theJacobianMatrix1 = NULLPTR;
+ theJacobianMatrix1 = 0;
}
if ( aSize > 0 )
@@ -242,7 +242,7 @@
if ( thePermutation1 )
{
gsl_permutation_free( thePermutation1 );
- thePermutation1 = NULLPTR;
+ thePermutation1 = 0;
}
if ( aSize > 0 )
@@ -255,7 +255,7 @@
if ( theVelocityVector1 )
{
gsl_vector_free( theVelocityVector1 );
- theVelocityVector1 = NULLPTR;
+ theVelocityVector1 = 0;
}
if ( aSize > 0 )
{
@@ -267,7 +267,7 @@
if ( theSolutionVector1 )
{
gsl_vector_free( theSolutionVector1 );
- theSolutionVector1 = NULLPTR;
+ theSolutionVector1 = 0;
}
if ( aSize > 0 )
{
@@ -281,7 +281,7 @@
if ( theJacobianMatrix2 )
{
gsl_matrix_complex_free( theJacobianMatrix2 );
- theJacobianMatrix2 = NULLPTR;
+ theJacobianMatrix2 = 0;
}
if ( aSize > 0 )
{
@@ -293,7 +293,7 @@
if ( thePermutation2 )
{
gsl_permutation_free( thePermutation2 );
- thePermutation2 = NULLPTR;
+ thePermutation2 = 0;
}
if ( aSize > 0 )
{
@@ -305,7 +305,7 @@
if ( theVelocityVector2 )
{
gsl_vector_complex_free( theVelocityVector2 );
- theVelocityVector2 = NULLPTR;
+ theVelocityVector2 = 0;
}
if ( aSize > 0 )
{
@@ -318,7 +318,7 @@
if ( theSolutionVector2 )
{
gsl_vector_complex_free( theSolutionVector2 );
- theSolutionVector2 = NULLPTR;
+ theSolutionVector2 = 0;
}
if ( aSize > 0 )
{
@@ -332,7 +332,7 @@
{
const VariableVector::size_type aSize( getReadOnlyVariableOffset() );
Real aNewStepInterval;
- Real aNorm;
+ Real aNorm( 0. );
Real theta( fabs( theJacobianRecalculateTheta ) );
Integer anIterator( 0 );
@@ -609,22 +609,22 @@
aDiscreteProcessOffset( getDiscreteProcessOffset() );
for ( ProcessVector::size_type c( 0 ); c < aDiscreteProcessOffset; c++ )
{
- ProcessPtr aProcess( theProcessVector[ c ] );
+ Process const* const aProcess( theProcessVector[ c ] );
- VariableReferenceVectorCref aVariableReferenceVector(
+ Process::VariableReferenceVector const& aVariableReferenceVector(
aProcess->getVariableReferenceVector() );
- const VariableReferenceVector::size_type
+ const Process::VariableReferenceVector::size_type
aPositiveVariableReferenceOffset(
aProcess->getPositiveVariableReferenceOffset() );
- const VariableReferenceVector::size_type
+ const Process::VariableReferenceVector::size_type
aZeroVariableReferenceOffset(
aProcess->getZeroVariableReferenceOffset() );
const bool aContinuity( aProcess->isContinuous() );
if ( aContinuity )
{
- for ( VariableReferenceVector::size_type i( 0 );
+ for ( Process::VariableReferenceVector::size_type i( 0 );
i < aVariableReferenceVector.size(); i++)
{
if ( i == aZeroVariableReferenceOffset )
@@ -637,7 +637,7 @@
i = aPositiveVariableReferenceOffset;
}
- VariablePtr const aVariable(
+ Variable* const aVariable(
aVariableReferenceVector[ i ].getVariable() );
const VariableVector::size_type anIndex(
getVariableIndex( aVariable ) );
@@ -686,7 +686,7 @@
theDiscreteActivityBuffer[ c - aDiscreteProcessOffset ] );
}
- for ( IntVector::size_type c( 0 );
+ for ( IntegerVector::size_type c( 0 );
c < theContinuousVariableVector.size(); c++ )
{
const std::size_t anIndex( theContinuousVariableVector[ c ] );
@@ -734,7 +734,7 @@
theProcessVector[ c ]->getActivity() );
}
- for ( IntVector::size_type c( 0 );
+ for ( IntegerVector::size_type c( 0 );
c < theContinuousVariableVector.size(); c++ )
{
const std::size_t anIndex( theContinuousVariableVector[ c ] );
@@ -774,7 +774,7 @@
for ( VariableVector::size_type i( 0 ); i < aSize; ++i )
{
- const VariablePtr aVariable( theVariableVector[ i ] );
+ Variable* const aVariable( theVariableVector[ i ] );
const Real aValue( aVariable->getValue() );
aPerturbation = sqrt( Uround * std::max( 1e-5, fabs( aValue ) ) );
@@ -798,7 +798,7 @@
aPerturbation;
}
- for ( IntVector::size_type j( 0 );
+ for ( IntegerVector::size_type j( 0 );
j < theContinuousVariableVector.size(); ++j )
{
// int as VariableVector::size_type
@@ -812,8 +812,6 @@
void setJacobianMatrix( Real const aStepInterval )
{
- VariableVector::size_type aSize( getReadOnlyVariableOffset() );
-
const Real alphah( alpha / aStepInterval );
const Real betah( beta / aStepInterval );
const Real gammah( gamma / aStepInterval );
@@ -832,7 +830,7 @@
}
}
- for ( IntVector::size_type c( 0 );
+ for ( IntegerVector::size_type c( 0 );
c < theContinuousVariableVector.size(); c++ )
{
const std::size_t anIndex( theContinuousVariableVector[ c ] );
@@ -898,14 +896,14 @@
{
const ProcessVector::size_type anIndex(
theContinuousVariableVector.size() + c - aDiscreteProcessOffset );
- const ProcessPtr aProcess( theProcessVector[ c ] );
+ const Process* const aProcess( theProcessVector[ c ] );
aTIF[ anIndex ] = aProcess->getActivity() * 4.3255798900631553510;
aTIF[ anIndex + aSize ] = aProcess->getActivity() * -4.1787185915519047273;
aTIF[ anIndex + aSize*2 ] = aProcess->getActivity() * -0.50287263494578687595;
}
- for ( IntVector::size_type c( 0 );
+ for ( IntegerVector::size_type c( 0 );
c < theContinuousVariableVector.size(); c++ )
{
const std::size_t anIndex( theContinuousVariableVector[ c ] );
@@ -935,14 +933,14 @@
{
const ProcessVector::size_type anIndex(
theContinuousVariableVector.size() + c - aDiscreteProcessOffset );
- const ProcessPtr aProcess( theProcessVector[ c ] );
+ const Process* const aProcess( theProcessVector[ c ] );
aTIF[ anIndex ] += aProcess->getActivity() * 0.33919925181580986954;
aTIF[ anIndex + aSize ] -= aProcess->getActivity() * 0.32768282076106238708;
aTIF[ anIndex + aSize*2 ] += aProcess->getActivity() * 2.5719269498556054292;
}
- for ( IntVector::size_type c( 0 );
+ for ( IntegerVector::size_type c( 0 );
c < theContinuousVariableVector.size(); c++ )
{
const std::size_t anIndex( theContinuousVariableVector[ c ] );
@@ -970,7 +968,7 @@
{
const ProcessVector::size_type anIndex(
theContinuousVariableVector.size() + c - aDiscreteProcessOffset );
- const ProcessPtr aProcess( theProcessVector[ c ] );
+ const Process* const aProcess( theProcessVector[ c ] );
aTIF[ anIndex ] += aProcess->getActivity() * 0.54177053993587487119;
aTIF[ anIndex + aSize ] += aProcess->getActivity() * 0.47662355450055045196;
@@ -983,7 +981,7 @@
gsl_vector_complex_set( theVelocityVector2, anIndex, comp );
}
- for ( IntVector::size_type c( 0 );
+ for ( IntegerVector::size_type c( 0 );
c < theContinuousVariableVector.size(); c++ )
{
const std::size_t anIndex( theContinuousVariableVector[ c ] );
Modified: ecell3/trunk/ecell/dm/ESSYNSProcessInterface.hpp
===================================================================
--- ecell3/trunk/ecell/dm/ESSYNSProcessInterface.hpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ESSYNSProcessInterface.hpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -33,8 +33,6 @@
struct ESSYNSProcessInterface
{
- DECLARE_VECTOR( libecs::Real, RealVector );
-
virtual const boost::multi_array< libecs::Real, 2 >& getESSYNSMatrix() = 0;
virtual libecs::Integer getSystemSize() const = 0;
Modified: ecell3/trunk/ecell/dm/ESSYNSStepper.cpp
===================================================================
--- ecell3/trunk/ecell/dm/ESSYNSStepper.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ESSYNSStepper.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -61,7 +61,7 @@
}
ESSYNSStepper()
- : theESSYNSProcessPtr( NULLPTR, NULLPTR ), theTaylorOrder( 1 )
+ : theTaylorOrder( 1 ), theESSYNSProcessPtr( 0, 0 )
{
;
}
@@ -95,15 +95,15 @@
theESSYNSMatrix.resize( boost::extents[ theSystemSize + 1 ][ theTaylorOrder + 1 ] );
theIndexVector.resize( theSystemSize );
- VariableReferenceVectorCref aVariableReferenceVectorCref(
+ Process::VariableReferenceVector const& aVariableReferenceVectorCref(
theESSYNSProcessPtr.second->getVariableReferenceVector() );
- for ( VariableReferenceVector::size_type c(
+ for ( Integer c(
theESSYNSProcessPtr.second->getPositiveVariableReferenceOffset() );
c < theSystemSize; ++c )
{
- VariableReferenceCref aVariableReferenceCref( aVariableReferenceVectorCref[ c ] );
- const VariablePtr aVariablePtr( aVariableReferenceCref.getVariable() );
+ VariableReference const& aVariableReferenceCref( aVariableReferenceVectorCref[ c ] );
+ Variable* const aVariablePtr( aVariableReferenceCref.getVariable() );
theIndexVector[ c ] = getVariableIndex( aVariablePtr );
}
@@ -113,8 +113,6 @@
{
const VariableVector::size_type aSize( getReadOnlyVariableOffset() );
- Real aCurrentTime( getCurrentTime() );
-
// write step() function
theESSYNSMatrix = theESSYNSProcessPtr.first->getESSYNSMatrix();
@@ -132,10 +130,10 @@
}
//set value
- for( int c( 0 ); c < aSize; ++c )
+ for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
const VariableVector::size_type anIndex( theIndexVector[ c ] );
- VariablePtr const aVariable( theVariableVector[ anIndex ] );
+ Variable* const aVariable( theVariableVector[ anIndex ] );
const Real aVelocity( ( exp( (theESSYNSMatrix[c])[0] ) - ( aVariable->getValue() ) ) / aStepInterval );
Modified: ecell3/trunk/ecell/dm/ExpressionAlgebraicProcess.cpp
===================================================================
--- ecell3/trunk/ecell/dm/ExpressionAlgebraicProcess.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ExpressionAlgebraicProcess.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -59,22 +59,22 @@
}
virtual void defaultSetProperty( libecs::String const& aPropertyName,
- libecs::PolymorphCref aValue )
+ libecs::Polymorph const& aValue )
{
return _LIBECS_MIXIN_CLASS_::defaultSetProperty( aPropertyName, aValue );
}
- virtual const libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
+ virtual libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_::defaultGetProperty( aPropertyName );
}
- virtual const libecs::StringVector defaultGetPropertyList() const
+ virtual std::vector< libecs::String > defaultGetPropertyList() const
{
return _LIBECS_MIXIN_CLASS_::defaultGetPropertyList();
}
- virtual const libecs::PropertyAttributes
+ virtual libecs::PropertyAttributes
defaultGetPropertyAttributes( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_::defaultGetPropertyAttributes( aPropertyName );
Modified: ecell3/trunk/ecell/dm/ExpressionAssignmentProcess.cpp
===================================================================
--- ecell3/trunk/ecell/dm/ExpressionAssignmentProcess.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ExpressionAssignmentProcess.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -69,22 +69,22 @@
}
virtual void defaultSetProperty( libecs::String const& aPropertyName,
- libecs::PolymorphCref aValue )
+ libecs::Polymorph const& aValue )
{
return _LIBECS_MIXIN_CLASS_::defaultSetProperty( aPropertyName, aValue );
}
- virtual const libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
+ virtual libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_::defaultGetProperty( aPropertyName );
}
- virtual const libecs::StringVector defaultGetPropertyList() const
+ virtual std::vector< libecs::String > defaultGetPropertyList() const
{
return _LIBECS_MIXIN_CLASS_::defaultGetPropertyList();
}
- virtual const libecs::PropertyAttributes
+ virtual libecs::PropertyAttributes
defaultGetPropertyAttributes( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_::defaultGetPropertyAttributes( aPropertyName );
@@ -95,7 +95,7 @@
Process::initialize();
_LIBECS_MIXIN_CLASS_::initialize();
- for( VariableReferenceVectorConstIterator i(
+ for( VariableReferenceVector::const_iterator i(
getVariableReferenceVector().begin() );
i != getVariableReferenceVector().end(); ++i )
{
Modified: ecell3/trunk/ecell/dm/ExpressionFluxProcess.cpp
===================================================================
--- ecell3/trunk/ecell/dm/ExpressionFluxProcess.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ExpressionFluxProcess.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -66,22 +66,22 @@
}
virtual void defaultSetProperty( libecs::String const& aPropertyName,
- libecs::PolymorphCref aValue )
+ libecs::Polymorph const& aValue )
{
return _LIBECS_MIXIN_CLASS_::defaultSetProperty( aPropertyName, aValue );
}
- virtual const libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
+ virtual libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_::defaultGetProperty( aPropertyName );
}
- virtual const libecs::StringVector defaultGetPropertyList() const
+ virtual std::vector< libecs::String > defaultGetPropertyList() const
{
return _LIBECS_MIXIN_CLASS_::defaultGetPropertyList();
}
- virtual const libecs::PropertyAttributes
+ virtual libecs::PropertyAttributes
defaultGetPropertyAttributes( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_::defaultGetPropertyAttributes( aPropertyName );
Modified: ecell3/trunk/ecell/dm/ExpressionProcessBase.hpp
===================================================================
--- ecell3/trunk/ecell/dm/ExpressionProcessBase.hpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ExpressionProcessBase.hpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -48,12 +48,8 @@
class ExpressionProcessBase
{
protected:
- DECLARE_ASSOCVECTOR(
- libecs::String,
- libecs::Real,
- std::less<const libecs::String>,
- PropertyMap
- );
+ typedef Loki::AssocVector< libecs::String, libecs::Real,
+ std::less<const libecs::String> > PropertyMap;
private:
class PropertyAccess
@@ -67,7 +63,7 @@
virtual libecs::Real* get( const libecs::String& name )
{
- PropertyMapIterator pos = outer_.thePropertyMap.find( name );
+ PropertyMap::iterator pos = outer_.thePropertyMap.find( name );
return pos == outer_.thePropertyMap.end() ? 0: &(pos->second);
}
@@ -160,7 +156,7 @@
ExpressionProcessBase()
- : theRecompileFlag( true ), theCompiledCode( 0 )
+ : theCompiledCode( 0 ), theRecompileFlag( true )
{
// ; do nothing
}
@@ -182,14 +178,14 @@
}
void defaultSetProperty( libecs::String const& aPropertyName,
- libecs::PolymorphCref aValue )
+ libecs::Polymorph const& aValue )
{
thePropertyMap[ aPropertyName ] = aValue.as< libecs::Real >();
}
- const libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
+ libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
{
- PropertyMapConstIterator aPropertyMapIterator(
+ PropertyMap::const_iterator aPropertyMapIterator(
thePropertyMap.find( aPropertyName ) );
if ( aPropertyMapIterator != thePropertyMap.end() ) {
@@ -203,9 +199,9 @@
}
}
- const libecs::StringVector defaultGetPropertyList() const
+ std::vector< libecs::String > defaultGetPropertyList() const
{
- libecs::StringVector aVector;
+ std::vector< libecs::String> aVector;
std::transform( thePropertyMap.begin(), thePropertyMap.end(),
std::back_inserter( aVector ),
@@ -214,7 +210,7 @@
return aVector;
}
- const libecs::PropertyAttributes
+ libecs::PropertyAttributes
defaultGetPropertyAttributes( libecs::String const& aPropertyName ) const
{
return libecs::PropertyAttributes( libecs::PropertySlotBase::POLYMORPH,
@@ -239,7 +235,7 @@
theCompiledCode = theCompiler.compileExpression( theExpression );
}
- PropertyMapCref getPropertyMap() const
+ PropertyMap const& getPropertyMap() const
{
return thePropertyMap;
}
@@ -262,7 +258,7 @@
protected:
- PropertyMapRef getPropertyMap()
+ PropertyMap& getPropertyMap()
{
return thePropertyMap;
}
Modified: ecell3/trunk/ecell/dm/FixedDAE1Stepper.cpp
===================================================================
--- ecell3/trunk/ecell/dm/FixedDAE1Stepper.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/FixedDAE1Stepper.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -37,10 +37,10 @@
USE_LIBECS;
-DECLARE_VECTOR( int, IntVector );
-
LIBECS_DM_CLASS( FixedDAE1Stepper, DifferentialStepper )
{
+private:
+ typedef std::vector< Integer > IntegerVector;
public:
@@ -53,16 +53,16 @@
}
FixedDAE1Stepper()
- : theJacobianMatrix( NULLPTR ),
- theVelocityVector( NULLPTR ),
- theSolutionVector( NULLPTR ),
- thePermutation( NULLPTR ),
- theSystemSize( 0 ),
- theTolerance( 1e-10 ),
+ : theSystemSize( 0 ),
thePerturbationRate( 1e-9 ),
- theDependentProcessVector( NULLPTR ),
- theContinuousVariableVector( NULLPTR ),
- theActivityBuffer( NULLPTR )
+ theTolerance( 1e-10 ),
+ theDependentProcessVector( 0 ),
+ theJacobianMatrix( 0 ),
+ theVelocityVector( 0 ),
+ theSolutionVector( 0 ),
+ thePermutation( 0 ),
+ theContinuousVariableVector( 0 ),
+ theActivityBuffer( 0 )
{
; // do nothing
}
@@ -197,7 +197,7 @@
theActivityBuffer[ c ] = theProcessVector[ c ]->getActivity();
}
- for( IntVector::size_type i( 0 );
+ for( IntegerVector::size_type i( 0 );
i < theContinuousVariableVector.size(); ++i )
{
const int anIndex( theContinuousVariableVector[ i ] );
@@ -213,8 +213,6 @@
for( ProcessVector::size_type c( aDiscreteProcessOffset );
c < theProcessVector.size(); ++c )
{
- const Real anActivity( theProcessVector[ c ]->getActivity() );
-
gsl_vector_set( theVelocityVector,
theContinuousVariableVector.size() + c
- aDiscreteProcessOffset,
@@ -240,14 +238,14 @@
for( VariableVector::size_type c( 0 ); c < aReadOnlyVariableOffset;
++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
const Real aValue( aVariable->getValue() );
aVariable->setValue( aValue + aPerturbation );
- FOR_ALL( IntVector, theDependentProcessVector[ c ] )
+ FOR_ALL( IntegerVector, theDependentProcessVector[ c ] )
{
- const Integer anIndex( *i );
+ const VariableVector::size_type anIndex( *i );
theProcessVector[ anIndex ]->fire();
const Real aDifference( theProcessVector[ anIndex ]->getActivity() - theActivityBuffer[ anIndex ] );
@@ -275,7 +273,7 @@
}
}
- for ( IntVector::size_type i( 0 );
+ for ( IntegerVector::size_type i( 0 );
i < theContinuousVariableVector.size(); ++i )
{
// this calculation already includes negative factor
@@ -292,7 +290,7 @@
aVariable->setValue( aValue );
}
- for ( IntVector::size_type c( 0 );
+ for ( IntegerVector::size_type c( 0 );
c < theContinuousVariableVector.size(); c++ )
{
const int anIndex( theContinuousVariableVector[ c ] );
@@ -316,27 +314,27 @@
theContinuousVariableVector.clear();
- IntVector anIndexVector;
- IntVectorConstIterator aWriteVariableIterator;
+ IntegerVector anIndexVector;
+ IntegerVector::const_iterator aWriteVariableIterator;
- ProcessVectorConstIterator anIterator( theProcessVector.begin() );
+ ProcessVector::const_iterator anIterator( theProcessVector.begin() );
for( ProcessVector::size_type c( 0 ); c < theProcessVector.size(); ++c )
{
- VariableReferenceVectorCref aVariableReferenceVector(
+ Process::VariableReferenceVector const& aVariableReferenceVector(
(*anIterator)->getVariableReferenceVector() );
- const VariableReferenceVector::size_type aZeroVariableReferenceOffset(
+ const Process::VariableReferenceVector::size_type aZeroVariableReferenceOffset(
(*anIterator)->getZeroVariableReferenceOffset() );
- const VariableReferenceVector::size_type
+ const Process::VariableReferenceVector::size_type
aPositiveVariableReferenceOffset(
(*anIterator)->getPositiveVariableReferenceOffset() );
anIndexVector.clear();
- for ( VariableReferenceVector::size_type i(
+ for ( Process::VariableReferenceVector::size_type i(
aZeroVariableReferenceOffset );
i != aPositiveVariableReferenceOffset; ++i )
{
- VariablePtr const aVariable(
+ Variable* const aVariable(
aVariableReferenceVector[ i ].getVariable() );
const VariableVector::size_type anIndex(
@@ -352,10 +350,10 @@
}
}
- const IntVector::size_type aNonZeroOffset( anIndexVector.size() );
+ const IntegerVector::size_type aNonZeroOffset( anIndexVector.size() );
const bool aContinuity( (*anIterator)->isContinuous() );
- for( VariableReferenceVector::size_type i( 0 );
+ for( Process::VariableReferenceVector::size_type i( 0 );
i < aVariableReferenceVector.size(); ++i )
{
if ( i == aZeroVariableReferenceOffset )
@@ -367,7 +365,7 @@
i = aPositiveVariableReferenceOffset;
}
- VariablePtr const aVariable(
+ Variable* const aVariable(
aVariableReferenceVector[ i ].getVariable() );
const VariableVector::size_type anIndex(
@@ -393,9 +391,9 @@
}
}
- FOR_ALL( IntVector, anIndexVector )
+ FOR_ALL( IntegerVector, anIndexVector )
{
- for( IntVector::size_type j( aNonZeroOffset );
+ for( IntegerVector::size_type j( aNonZeroOffset );
j != anIndexVector.size(); ++j )
{
const int anIndex( anIndexVector[ j ] );
@@ -438,7 +436,7 @@
for( VariableVector::size_type c( 0 ); c < aReadOnlyVariableOffset;
++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
const Real aDifference( gsl_vector_get( theSolutionVector, c ) );
aVariable->addValue( aDifference );
@@ -459,16 +457,16 @@
Real thePerturbationRate;
Real theTolerance;
- std::vector<IntVector> theDependentProcessVector;
- std::vector<IntVector> theDependentVariableVector;
+ std::vector<IntegerVector> theDependentProcessVector;
+ std::vector<IntegerVector> theDependentVariableVector;
gsl_matrix* theJacobianMatrix;
gsl_vector* theVelocityVector;
gsl_vector* theSolutionVector;
gsl_permutation* thePermutation;
- IntVector theContinuousVariableVector;
- RealVector theActivityBuffer;
+ IntegerVector theContinuousVariableVector;
+ RealVector theActivityBuffer;
};
LIBECS_DM_INIT( FixedDAE1Stepper, Stepper );
Modified: ecell3/trunk/ecell/dm/FluxDistributionStepper.cpp
===================================================================
--- ecell3/trunk/ecell/dm/FluxDistributionStepper.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/FluxDistributionStepper.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -71,7 +71,7 @@
typedef Caster< QuasiDynamicFluxProcessInterface*, Process* > QDFPCaster;
-DECLARE_VECTOR( QDFPCaster::result_type, QuasiDynamicFluxProcessVector );
+typedef std::vector< QDFPCaster::result_type > QuasiDynamicFluxProcessVector;
LIBECS_DM_CLASS( FluxDistributionStepper, DifferentialStepper )
{
@@ -84,12 +84,12 @@
}
FluxDistributionStepper()
- : theUnknownMatrix( NULLPTR ),
- theInverseMatrix( NULLPTR ),
- theVariableVelocityVector( NULLPTR ),
- theFluxVector( NULLPTR ),
- theIrreversibleFlag( false ),
- Epsilon( 1e-6 )
+ : theUnknownMatrix( 0 ),
+ theInverseMatrix( 0 ),
+ theVariableVelocityVector( 0 ),
+ theFluxVector( 0 ),
+ Epsilon( 1e-6 ),
+ theIrreversibleFlag( false )
{
initializeStepInterval( INF );
}
@@ -140,7 +140,7 @@
theMatrixSize = theVariableVector.size();
}
- if( theUnknownMatrix != NULLPTR )
+ if( theUnknownMatrix != 0 )
{
gsl_matrix_free( theUnknownMatrix );
gsl_vector_free( theVariableVelocityVector );
@@ -176,12 +176,12 @@
for( QuasiDynamicFluxProcessVector::size_type i( 0 );
i < aProcessVectorSize; ++i )
{
- VariableReferenceVector aVariableReferenceVector(
+ Process::VariableReferenceVector aVariableReferenceVector(
theQuasiDynamicFluxProcessVector[ i ].first->getFluxDistributionVector() );
- VariableReferenceVector::size_type aVariableReferenceVectorSize(
+ Process::VariableReferenceVector::size_type aVariableReferenceVectorSize(
aVariableReferenceVector.size() );
- for( VariableReferenceVector::size_type j( 0 ); j < aVariableReferenceVectorSize; ++j )
+ for( Process::VariableReferenceVector::size_type j( 0 ); j < aVariableReferenceVectorSize; ++j )
{
gsl_matrix_set( theUnknownMatrix,
theVariableMap.find(
@@ -216,7 +216,7 @@
// generate inverse matrix
//
- if( theInverseMatrix != NULLPTR )
+ if( theInverseMatrix != 0 )
{
gsl_matrix_free( theInverseMatrix );
}
@@ -224,7 +224,7 @@
theInverseMatrix = generateInverse( theUnknownMatrix , theMatrixSize );
}
- virtual void interrupt( StepperPtr const aCaller )
+ virtual void interrupt( Stepper* aCaller )
{
integrate( aCaller->getCurrentTime() );
@@ -276,9 +276,9 @@
if ( gsl_vector_get( theFluxVector, i ) < 0 )
{
aFlag = true;
- VariableReferenceVector aVariableReferenceVector( theQuasiDynamicFluxProcessVector[i].first->getFluxDistributionVector() );
- VariableReferenceVector::size_type aVariableReferenceVectorSize( aVariableReferenceVector.size() );
- for ( VariableReferenceVector::size_type k( 0 ); k < aVariableReferenceVectorSize; ++k )
+ Process::VariableReferenceVector aVariableReferenceVector( theQuasiDynamicFluxProcessVector[i].first->getFluxDistributionVector() );
+ Process::VariableReferenceVector::size_type aVariableReferenceVectorSize( aVariableReferenceVector.size() );
+ for ( Process::VariableReferenceVector::size_type k( 0 ); k < aVariableReferenceVectorSize; ++k )
{
gsl_matrix_set( aTmpUnknownMatrix, theVariableMap.find( aVariableReferenceVector[k].getVariable() )->second, i, 0.0 );
}
@@ -383,7 +383,7 @@
Real Epsilon;
- std::map< VariablePtr, VariableVector::size_type > theVariableMap;
+ std::map< Variable*, VariableVector::size_type > theVariableMap;
std::size_t theMatrixSize;
bool theIrreversibleFlag;
Modified: ecell3/trunk/ecell/dm/GMAProcess.cpp
===================================================================
--- ecell3/trunk/ecell/dm/GMAProcess.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/GMAProcess.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -61,7 +61,7 @@
}
GMAProcess()
- : theSystemSize(0), Order(3)
+ : Order(3), theSystemSize(0)
{
; // do nothing.
}
@@ -158,7 +158,7 @@
// get theY
Integer anIndex( 0 );
- for ( VariableReferenceVectorConstIterator
+ for ( VariableReferenceVector::const_iterator
i ( thePositiveVariableReferenceIterator );
i != theVariableReferenceVector.end(); ++i )
{
Modified: ecell3/trunk/ecell/dm/GillespieProcess.cpp
===================================================================
--- ecell3/trunk/ecell/dm/GillespieProcess.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/GillespieProcess.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -95,12 +95,12 @@
}
}
-const Real GillespieProcess::getPD( VariablePtr aVariable ) const
+Real GillespieProcess::getPD( Variable const* aVariable ) const
{
return ( this->*theGetPDMethodPtr )( aVariable );
}
-const bool GillespieProcess::isContinuous() const
+bool GillespieProcess::isContinuous() const
{
return true;
}
@@ -131,7 +131,7 @@
Real velocity( getk() * N_A );
velocity *= getSuperSystem()->getSize();
- for( VariableReferenceVectorConstIterator
+ for( VariableReferenceVector::const_iterator
s( theVariableReferenceVector.begin() );
s != theZeroVariableReferenceIterator; ++s )
{
@@ -159,17 +159,17 @@
PROPERTYSLOT_GET_NO_LOAD_SAVE( Integer, Order );
}
-const Real GillespieProcess::getZero() const
+Real GillespieProcess::getZero() const
{
return 0.0;
}
-const Real GillespieProcess::getPD_Zero( VariablePtr aVariable ) const
+Real GillespieProcess::getPD_Zero( Variable const* aVariable ) const
{
return 0.0;
}
-const Real GillespieProcess::getPD_SecondOrder_OneSubstrate( VariablePtr aVariable ) const
+Real GillespieProcess::getPD_SecondOrder_OneSubstrate( Variable const* aVariable ) const
{
if( theVariableReferenceVector[ 0 ].getVariable() == aVariable )
{
@@ -190,12 +190,12 @@
}
}
-const Real GillespieProcess::getMinValue_SecondOrder_OneSubstrate() const
+Real GillespieProcess::getMinValue_SecondOrder_OneSubstrate() const
{
return theVariableReferenceVector[ 0 ].getVariable()->getValue() * 0.5;
}
-const Real GillespieProcess::getPropensity_SecondOrder_OneSubstrate() const
+Real GillespieProcess::getPropensity_SecondOrder_OneSubstrate() const
{
const Real aValue( theVariableReferenceVector[ 0 ].getVariable()->getValue() );
@@ -209,7 +209,7 @@
}
}
-const Real GillespieProcess::getPD_SecondOrder_TwoSubstrates( VariablePtr aVariable ) const
+Real GillespieProcess::getPD_SecondOrder_TwoSubstrates( Variable const* aVariable ) const
{
if ( theVariableReferenceVector[ 0 ].getVariable() == aVariable )
{
@@ -225,7 +225,7 @@
}
}
-const Real GillespieProcess::getPropensity_FirstOrder() const
+Real GillespieProcess::getPropensity_FirstOrder() const
{
const Real aValue( theVariableReferenceVector[ 0 ].getVariable()->getValue() );
@@ -239,12 +239,12 @@
}
}
-const Real GillespieProcess::getMinValue_FirstOrder() const
+Real GillespieProcess::getMinValue_FirstOrder() const
{
return theVariableReferenceVector[ 0 ].getVariable()->getValue();
}
-const Real GillespieProcess::getPD_FirstOrder( VariablePtr aVariable ) const
+Real GillespieProcess::getPD_FirstOrder( Variable const* aVariable ) const
{
if ( theVariableReferenceVector[ 0 ].getVariable() == aVariable )
{
@@ -256,7 +256,7 @@
}
}
-const Real GillespieProcess::getPropensity_SecondOrder_TwoSubstrates() const
+Real GillespieProcess::getPropensity_SecondOrder_TwoSubstrates() const
{
const Real aValue1( theVariableReferenceVector[ 0 ].getVariable()->getValue() );
const Real aValue2( theVariableReferenceVector[ 1 ].getVariable()->getValue() );
@@ -271,7 +271,7 @@
}
}
-const Real GillespieProcess::getMinValue_SecondOrder_TwoSubstrates() const
+Real GillespieProcess::getMinValue_SecondOrder_TwoSubstrates() const
{
const Real aFirstValue( theVariableReferenceVector[ 0 ].getVariable()->getValue() );
const Real aSecondValue( theVariableReferenceVector[ 1 ].getVariable()->getValue() );
@@ -283,7 +283,7 @@
{
theOrder = 0;
- for( libecs::VariableReferenceVectorConstIterator i(
+ for( VariableReferenceVector::const_iterator i(
theVariableReferenceVector.begin() );
i != theVariableReferenceVector.end() ; ++i )
{
Modified: ecell3/trunk/ecell/dm/GillespieProcess.hpp
===================================================================
--- ecell3/trunk/ecell/dm/GillespieProcess.hpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/GillespieProcess.hpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -46,7 +46,7 @@
GillespieProcessInterface )
{
typedef libecs::MethodProxy< GillespieProcess, libecs::Real > RealMethodProxy;
- typedef const libecs::Real( GillespieProcess::* PDMethodPtr )( libecs::Variable* ) const;
+ typedef libecs::Real( GillespieProcess::* PDMethodPtr )( libecs::Variable const* ) const;
public:
LIBECS_DM_OBJECT( GillespieProcess, Process );
@@ -65,9 +65,9 @@
GET_METHOD( libecs::Real, Propensity_R );
- virtual const libecs::Real getPD( libecs::Variable* aVariable ) const;
+ virtual libecs::Real getPD( libecs::Variable const* aVariable ) const;
- virtual const bool isContinuous() const;
+ virtual bool isContinuous() const;
// The order of the reaction, i.e. 1 for a unimolecular reaction.
@@ -83,44 +83,43 @@
protected:
- const libecs::Real getZero() const;
+ libecs::Real getZero() const;
- const libecs::Real getPD_Zero( libecs::Variable* aVariable ) const;
+ libecs::Real getPD_Zero( libecs::Variable const* aVariable ) const;
/**
FirstOrder_OneSubstrate
*/
- const libecs::Real getPropensity_FirstOrder() const;
+ libecs::Real getPropensity_FirstOrder() const;
- const libecs::Real getMinValue_FirstOrder() const;
+ libecs::Real getMinValue_FirstOrder() const;
- const libecs::Real getPD_FirstOrder( libecs::Variable* aVariable ) const;
+ libecs::Real getPD_FirstOrder( libecs::Variable const* aVariable ) const;
/**
SecondOrder_TwoSubstrates
*/
- const libecs::Real getPropensity_SecondOrder_TwoSubstrates() const;
+ libecs::Real getPropensity_SecondOrder_TwoSubstrates() const;
- const libecs::Real getMinValue_SecondOrder_TwoSubstrates() const;
+ libecs::Real getMinValue_SecondOrder_TwoSubstrates() const;
- const libecs::Real getPD_SecondOrder_TwoSubstrates( libecs::Variable* aVariable ) const;
+ libecs::Real getPD_SecondOrder_TwoSubstrates( libecs::Variable const* aVariable ) const;
/**
SecondOrder_OneSubstrate
*/
- const libecs::Real getPropensity_SecondOrder_OneSubstrate() const;
+ libecs::Real getPropensity_SecondOrder_OneSubstrate() const;
- const libecs::Real getMinValue_SecondOrder_OneSubstrate() const;
+ libecs::Real getMinValue_SecondOrder_OneSubstrate() const;
- const libecs::Real getPD_SecondOrder_OneSubstrate( libecs::Variable* aVariable ) const;
+ libecs::Real getPD_SecondOrder_OneSubstrate( libecs::Variable const* aVariable ) const;
protected:
- libecs::Real k;
+ libecs::Integer theOrder;
libecs::Real c;
+ libecs::Real k;
- libecs::Integer theOrder;
-
RealMethodProxy theGetPropensityMethodPtr;
RealMethodProxy theGetMinValueMethodPtr;
PDMethodPtr theGetPDMethodPtr; // this should be MethodProxy
Modified: ecell3/trunk/ecell/dm/GillespieProcessInterface.hpp
===================================================================
--- ecell3/trunk/ecell/dm/GillespieProcessInterface.hpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/GillespieProcessInterface.hpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -34,7 +34,7 @@
{
virtual GET_METHOD( libecs::Real, Propensity ) = 0;
- virtual const libecs::Real getPD( libecs::Variable* aVariable ) const = 0;
+ virtual libecs::Real getPD( libecs::Variable const* aVariable ) const = 0;
};
#endif /* __GILLESPIEPROCESSINTERFACE_HPP */
Modified: ecell3/trunk/ecell/dm/MassActionFluxProcess.cpp
===================================================================
--- ecell3/trunk/ecell/dm/MassActionFluxProcess.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/MassActionFluxProcess.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -66,7 +66,7 @@
Real velocity( k * N_A );
velocity *= getSuperSystem()->getSize();
- for( VariableReferenceVectorConstIterator s(
+ for( VariableReferenceVector::const_iterator s(
theVariableReferenceVector.begin() );
s != theZeroVariableReferenceIterator; ++s )
{
Modified: ecell3/trunk/ecell/dm/ODE23Stepper.cpp
===================================================================
--- ecell3/trunk/ecell/dm/ODE23Stepper.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ODE23Stepper.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -85,7 +85,7 @@
for( VariableVector::size_type c( 0 );
c != theVariableVector.size(); ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue( theValueBuffer[ c ] );
aVariable->interIntegrate( aCurrentTime );
Modified: ecell3/trunk/ecell/dm/ODE45Stepper.cpp
===================================================================
--- ecell3/trunk/ecell/dm/ODE45Stepper.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ODE45Stepper.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -121,7 +121,7 @@
for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue( theTaylorSeries[ 0 ][ c ] * ( 1.0 / 5.0 )
* aStepInterval + theValueBuffer[ c ] );
@@ -131,7 +131,7 @@
{
for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
// get k1
theTaylorSeries[ 0 ][ c ] = theRungeKuttaBuffer[ 5 ][ c ];
@@ -149,7 +149,7 @@
for ( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable ->setValue( ( theTaylorSeries[ 0 ][ c ] * ( 3.0 / 40.0 )
+ theRungeKuttaBuffer[ 0 ][ c ] * ( 9.0 / 40.0 ) )
@@ -164,7 +164,7 @@
for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue(
( theTaylorSeries[ 0 ][ c ] * ( 44.0 / 45.0 )
@@ -181,7 +181,7 @@
for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue(
( theTaylorSeries[ 0 ][ c ] * ( 19372.0 / 6561.0 )
@@ -199,7 +199,7 @@
for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
// temporarily set Y^6
theTaylorSeries[ 1 ][ c ] =
@@ -226,7 +226,7 @@
for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
theTaylorSeries[ 2 ][ c ] =
theTaylorSeries[ 0 ][ c ] * ( 35.0 / 384.0 )
@@ -256,8 +256,6 @@
for( VariableVector::size_type c( 0 ); c < aSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
-
// calculate error
const Real anEstimatedError(
( theTaylorSeries[ 0 ][ c ] * ( 71.0 / 57600.0 )
Modified: ecell3/trunk/ecell/dm/ODEStepper.cpp
===================================================================
--- ecell3/trunk/ecell/dm/ODEStepper.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/ODEStepper.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -97,7 +97,7 @@
initializeStepper();
}
- const Integer getIntegrationType() const { return isStiff; }
+ Integer getIntegrationType() const { return isStiff; }
SET_METHOD( Real, JacobianRecalculateTheta )
{
@@ -142,14 +142,14 @@
std::pair< bool, Real > calculateRadauIIA( Real const aStepInterval, Real const aPreviousStepInterval );
void updateInternalStateRadauIIA( Real const aStepInterval );
- void initializeTolerance( RealParam value )
+ void initializeTolerance( Real value )
{
setTolerance( value ); // AdaptiveDifferentialStepper::
rtoler = 0.1 * pow( getTolerance(), 2.0 / 3.0 );
atoler = rtoler * getAbsoluteToleranceFactor();
}
- void initializeAbsoluteToleranceFactor( RealParam value )
+ void initializeAbsoluteToleranceFactor( Real value )
{
setAbsoluteToleranceFactor( value ); // AdaptiveDifferentialStepper::
atoler = rtoler * getAbsoluteToleranceFactor();
@@ -196,7 +196,7 @@
Real theJacobianRecalculateTheta;
Real theSpectralRadius;
- UnsignedInteger theStiffnessCounter, theRejectedStepCounter;
+ Integer theStiffnessCounter, theRejectedStepCounter;
Integer CheckIntervalCount, SwitchingCount;
bool theFirstStepFlag, theJacobianCalculateFlag;
@@ -210,30 +210,30 @@
ODEStepper::ODEStepper()
: theSystemSize( -1 ),
- theJacobianMatrix1( NULLPTR ),
- thePermutation1( NULLPTR ),
- theVelocityVector1( NULLPTR ),
- theSolutionVector1( NULLPTR ),
- theJacobianMatrix2( NULLPTR ),
- thePermutation2( NULLPTR ),
- theVelocityVector2( NULLPTR ),
- theSolutionVector2( NULLPTR ),
+ theJacobianMatrix1( 0 ),
+ thePermutation1( 0 ),
+ theVelocityVector1( 0 ),
+ theSolutionVector1( 0 ),
+ theJacobianMatrix2( 0 ),
+ thePermutation2( 0 ),
+ theVelocityVector2( 0 ),
+ theSolutionVector2( 0 ),
theMaxIterationNumber( 7 ),
+ theStoppingCriterion( 0.0 ),
eta( 1.0 ),
Uround( 1e-10 ),
- theStoppingCriterion( 0.0 ),
- theFirstStepFlag( true ),
- theRejectedStepCounter( 0 ),
- theJacobianCalculateFlag( true ),
+ rtoler( 1e-6 ),
+ atoler( 1e-6 ),
theAcceptedError( 0.0 ),
theAcceptedStepInterval( 0.0 ),
theJacobianRecalculateTheta( 0.001 ),
- rtoler( 1e-6 ),
- atoler( 1e-6 ),
theSpectralRadius( 0.0 ),
theStiffnessCounter( 0 ),
+ theRejectedStepCounter( 0 ),
CheckIntervalCount( 100 ),
SwitchingCount( 20 ),
+ theFirstStepFlag( true ),
+ theJacobianCalculateFlag( true ),
isStiff( true )
{
const Real pow913( pow( 9.0, 1.0 / 3.0 ) );
@@ -405,7 +405,7 @@
for ( VariableVector::size_type i( 0 ); i < theSystemSize; ++i )
{
- const VariablePtr aVariable1( theVariableVector[ i ] );
+ Variable* const aVariable1( theVariableVector[ i ] );
const Real aValue( aVariable1->getValue() );
aPerturbation = sqrt( Uround * std::max( 1e-5, fabs( aValue ) ) );
@@ -416,8 +416,6 @@
for ( VariableVector::size_type j( 0 ); j < theSystemSize; ++j )
{
- const VariablePtr aVariable2( theVariableVector[ j ] );
-
theJacobian[ j ][ i ] =
- ( theW[ 4 ][ j ] - theW[ 3 ][ j ] ) / aPerturbation;
}
@@ -627,7 +625,7 @@
Real aNorm( 0. );
Real theta( fabs( theJacobianRecalculateTheta ) );
- UnsignedInteger anIterator( 0 );
+ Integer anIterator( 0 );
if ( !isInterrupted )
{
@@ -982,7 +980,7 @@
for( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue( theTaylorSeries[ 0 ][ c ] * ( 1.0 / 5.0 )
* aStepInterval
@@ -993,7 +991,7 @@
{
for( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
// get k1
theTaylorSeries[ 0 ][ c ] = theW[ 5 ][ c ];
@@ -1011,7 +1009,7 @@
for( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue( ( theTaylorSeries[ 0 ][ c ] * ( 3.0 / 40.0 )
+ theW[ 0 ][ c ] * ( 9.0 / 40.0 ) )
@@ -1026,7 +1024,7 @@
for( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue( ( theTaylorSeries[ 0 ][ c ] * ( 44.0 / 45.0 )
- theW[ 0 ][ c ] * ( 56.0 / 15.0 )
@@ -1042,7 +1040,7 @@
for( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
aVariable->setValue( ( theTaylorSeries[ 0 ][ c ] * ( 19372.0 / 6561.0 )
- theW[ 0 ][ c ] * ( 25360.0 / 2187.0 )
@@ -1059,7 +1057,7 @@
for( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
// temporarily set Y^6
theTaylorSeries[ 1 ][ c ] = theTaylorSeries[ 0 ][ c ] * ( 9017.0 / 3168.0 )
@@ -1085,7 +1083,7 @@
for ( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
+ Variable* const aVariable( theVariableVector[ c ] );
theTaylorSeries[ 2 ][ c ] =
theTaylorSeries[ 0 ][ c ] * ( 35.0 / 384.0 )
@@ -1114,8 +1112,6 @@
for( VariableVector::size_type c( 0 ); c < theSystemSize; ++c )
{
- VariablePtr const aVariable( theVariableVector[ c ] );
-
// calculate error
const Real anEstimatedError(
( theTaylorSeries[ 0 ][ c ] * ( 71.0 / 57600.0 )
Modified: ecell3/trunk/ecell/dm/PythonFluxProcess.cpp
===================================================================
--- ecell3/trunk/ecell/dm/PythonFluxProcess.cpp 2010-04-07 05:34:30 UTC (rev 3833)
+++ ecell3/trunk/ecell/dm/PythonFluxProcess.cpp 2010-04-13 09:24:40 UTC (rev 3834)
@@ -77,22 +77,22 @@
}
virtual void defaultSetProperty( libecs::String const& aPropertyName,
- libecs::PolymorphCref aValue )
+ libecs::Polymorph const& aValue )
{
return _LIBECS_MIXIN_CLASS_::defaultSetProperty( aPropertyName, aValue );
}
- virtual const libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
+ virtual libecs::Polymorph defaultGetProperty( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_::defaultGetProperty( aPropertyName );
}
- virtual const libecs::StringVector defaultGetPropertyList() const
+ virtual std::vector< libecs::String > defaultGetPropertyList() const
{
return _LIBECS_MIXIN_CLASS_::defaultGetPropertyList();
}
- virtual const libecs::PropertyAttributes
+ virtual libecs::PropertyAttributes
defaultGetPropertyAttributes( libecs::String const& aPropertyName ) const
{
return _LIBECS_MIXIN_CLASS_...
[truncated message content] |