Skip to content

Commit

Permalink
Minor code updates for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
DominicDirkx committed Jan 12, 2024
1 parent 515423e commit 1be70b5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/astro/gravitation/polyhedronGravityField.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace gravitation

void PolyhedronGravityCache::update (const Eigen::Vector3d& currentBodyFixedPosition)
{
if ( currentBodyFixedPosition != currentBodyFixedPosition_ )
if ( currentBodyFixedPosition_.hasNaN( ) || currentBodyFixedPosition != currentBodyFixedPosition_ )
{
currentBodyFixedPosition_ = currentBodyFixedPosition;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,7 @@ BOOST_AUTO_TEST_CASE( test_GravitationalPotentialAndLaplacianSaving )
moonGravitationalPotential,
moonGravityModel->getGravitationalPotential( moonBodyFixedCartesianPosition ),
1e-15 );*/
std::cout<<"Moon potential "<<moonGravitationalPotential<<" "<<moonGravityModel->getGravitationalPotential( moonBodyFixedCartesianPosition )<<std::endl;
std::cout<<"Moon potential "<<moonGravitationalPotential<<" "<<moonGravityModel->getGravitationalPotential( moonBodyFixedCartesianPosition ) - moonGravitationalPotential<<std::endl;
BOOST_CHECK( std::fabs( moonGravitationalPotential - moonGravityModel->getGravitationalPotential( moonBodyFixedCartesianPosition ) )
< std::fabs( std::min( moonGravitationalPotential, moonGravityModel->getGravitationalPotential( moonBodyFixedCartesianPosition ) ) * 1e-15 ) );

Expand Down

0 comments on commit 1be70b5

Please sign in to comment.