Skip to content

Commit

Permalink
Routine update
Browse files Browse the repository at this point in the history
  • Loading branch information
Penelope L. Slocum of group heeger committed Jan 5, 2017
1 parent 9e0c131 commit c08dbdb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 34 deletions.
8 changes: 0 additions & 8 deletions Kassiopeia/Trajectories/Include/KSTrajInterpolatorHermite.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ namespace Kassiopeia
virtual ~KSTrajInterpolatorHermite();

public:
void GetInterpolate(double aTime,
const KSTrajAdiabaticIntegrator& anIntegrator,
const KSTrajAdiabaticDifferentiator& aDifferentiator,
const KSTrajAdiabaticParticle& anInitialParticle,
const KSTrajAdiabaticParticle& aFinalParticle,
const double& aTimeStep,
KSTrajAdiabaticParticle& anIntermediateParticle ) const;


virtual void Interpolate(double aTime, const KSTrajExactIntegrator& anIntegrator, const KSTrajExactDifferentiator& aDifferentiator, const KSTrajExactParticle& anInitialParticle, const KSTrajExactParticle& aFinalParticle, const double& aTimeStep, KSTrajExactParticle& anIntermediateParticle ) const;

Expand Down
28 changes: 2 additions & 26 deletions Kassiopeia/Trajectories/Source/KSTrajInterpolatorHermite.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,6 @@ namespace Kassiopeia
}
}

void KSTrajInterpolatorHermite::GetInterpolate(double aTime,
const KSTrajAdiabaticIntegrator& anIntegrator,
const KSTrajAdiabaticDifferentiator& aDifferentiator,
const KSTrajAdiabaticParticle& anInitialParticle,
const KSTrajAdiabaticParticle& aFinalParticle,
const double& aTimeStep,
KSTrajAdiabaticParticle& anIntermediateParticle ) const
{
// This is a routine to call the interpolater from a step modifier for Project 8.


KSTrajInterpolatorHermite::Interpolate(aTime, anIntegrator, aDifferentiator, anInitialParticle, aFinalParticle, aTimeStep, anIntermediateParticle);

}



void KSTrajInterpolatorHermite::Interpolate(double aTime,
const KSTrajAdiabaticIntegrator& anIntegrator,
const KSTrajAdiabaticDifferentiator& aDifferentiator,
Expand Down Expand Up @@ -149,14 +132,9 @@ namespace Kassiopeia
CubicHermite(tFraction, h30, h31, h32, h33);

//retrieve the first derivative evaluation from the integrator

KSTrajAdiabaticDerivative initialDerivative;
initialDerivative = 0.0;
// bool isValid = anIntegrator.GetInitialDerivative(initialDerivative);

bool isValid = true; // Project 8 edit


bool isValid = anIntegrator.GetInitialDerivative(initialDerivative);
if(!isValid)
{
aDifferentiator.Differentiate(anInitialParticle.GetTime(), anInitialParticle, initialDerivative);
Expand All @@ -165,8 +143,7 @@ namespace Kassiopeia
//retrieve the final derivative evaluation from the integrator
KSTrajAdiabaticDerivative finalDerivative;
finalDerivative = 0.0;
// isValid = anIntegrator.GetFinalDerivative(finalDerivative);
isValid = true; // Project 8 edit
isValid = anIntegrator.GetFinalDerivative(finalDerivative);
if(!isValid)
{
aDifferentiator.Differentiate(aFinalParticle.GetTime(), aFinalParticle, finalDerivative);
Expand All @@ -177,7 +154,6 @@ namespace Kassiopeia
anIntermediateParticle[0] = tInterpolatedTime; //explicitly set the time variable
}


//interpolate alpha and beta linearly
//(leaving this unchanged from fast interpolator, may need to improve this)
KThreeVector tInitialAlpha = anInitialParticle.GetAlpha().Unit();
Expand Down

0 comments on commit c08dbdb

Please sign in to comment.