Small Body Geophysical Analysis Tool (SBGAT)
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
SBGATPolyhedronGravityModelUQ Class Reference

Evaluation of the formal uncertainty in the potential (variance), acceleration (covariance) caused by a constant-density polyhedron. More...

#include <SBGATPolyhedronGravityModelUQ.hpp>

Inheritance diagram for SBGATPolyhedronGravityModelUQ:
Inheritance graph
[legend]
Collaboration diagram for SBGATPolyhedronGravityModelUQ:
Collaboration graph
[legend]

Public Member Functions

double GetVariancePotential (double const *point, bool hold_mass_constant=false) const
 
double GetVariancePotential (const arma::vec::fixed< 3 > &point, bool hold_mass_constant=false) const
 
void GetVariancePotentialAccelerationCovariance (double const *point, double &potential_var, arma::mat::fixed< 3, 3 > &acc_cov, bool hold_mass_constant=false) const
 
double GetVarianceSlope (const unsigned int &f, bool hold_mass_constant=false)
 
void GetVarianceSlopes (std::vector< double > &slope_variances, const std::vector< unsigned int > &facets, bool hold_mass_constant=false)
 
void GetVariancePotentialAccelerationCovariance (const arma::vec::fixed< 3 > &point, double &potential_var, arma::mat::fixed< 3, 3 > &acc_cov, bool hold_mass_constant=false) const
 
arma::rowvec GetPartialUPartialC (const arma::vec::fixed< 3 > &pos, bool hold_mass_constant=false) const
 
arma::mat GetPartialAPartialC (const arma::vec::fixed< 3 > &pos, bool hold_mass_constant=false) const
 
arma::mat::fixed< 3, 3 > GetCovarianceAcceleration (double const *point, bool hold_mass_constant=false) const
 
arma::mat::fixed< 3, 3 > GetCovarianceAcceleration (const arma::vec::fixed< 3 > &point, bool hold_mass_constant=false) const
 
void SetPeriodErrorStandardDeviation (double rotation_period_sd)
 
arma::rowvec GetPartialSlopePartialwPartialC (const int &f, bool hold_mass_constant=false) const
 
virtual void ApplyDeviation (const arma::vec &delta_C)
 
arma::rowvec GetPartialSlopePartialC (const int &f) const
 
- Public Member Functions inherited from SBGATMassPropertiesUQ
virtual void SetModel (vtkSmartPointer< SBGATFilter > model)
 
const arma::mat & GetPartialComPartialC () const
 
const arma::mat & GetPartialIPartialC () const
 
const arma::mat & GetPartialSigmaPartialC () const
 
const arma::rowvec & GetPartialVolumePartialC () const
 
void PrecomputeMassPropertiesPartials ()
 
const arma::mat & GetPartialUnitDensityMomentsPartialI () const
 
const arma::mat::fixed< 3, 6 > & GetPartialSigmaPartialI () const
 
- Public Member Functions inherited from SBGATFilterUQ
vtkSmartPointer< SBGATFilterGetModel ()
 
arma::mat GetCovarianceSquareRoot (std::string method="chol") const
 
void ComputeVerticesCovarianceGlobal (const double &standard_dev, const double &correl_distance)
 
void AddRadialUncertaintyRegionToCovariance (int region_center_index, const double &standard_dev, const double &correl_distance)
 
int RegularizeCovariance ()
 
void AddNormalUncertaintyRegionToCovariance (int region_center_index, const double &standard_dev, const double &correl_distance)
 
void SetCovarianceComponent (const arma::mat::fixed< 3, 3 > &P, const int &v0, const int &v1)
 
void SetCovariance (const arma::mat &P_CC)
 
void SaveVerticesCovariance (std::string path) const
 
arma::mat GetVerticesCovariance () const
 
void SaveNonZeroVerticesCovariance (std::string path) const
 
int LoadVerticesCovarianceFromJson (std::string path)
 
arma::sp_mat PartialTfPartialC (const int &f) const
 
arma::mat::fixed< 3, 9 > PartialNfPartialTf (const int &f) const
 
void TakeAndSaveSlice (int axis, std::string path, const double &c) const
 

Static Public Member Functions

static void TestPartials (std::string input, double tol, bool shape_in_meters)
 
static void RunMCUQPotentialAccelerationInertial (std::string path_to_shape, const double &density, const bool &shape_in_meters, const bool &hold_mass_constant, const arma::mat &C_CC, const unsigned int &N_samples, const std::vector< arma::vec::fixed< 3 > > &all_positions, std::string output_dir, int N_saved_shapes, std::vector< arma::vec > &deviations, std::vector< double > &densities, std::vector< std::vector< arma::vec::fixed< 3 > >> &all_accelerations, std::vector< std::vector< double > > &all_potentials)
 
static void RunMCUQAccelerationInertial (std::string path_to_shape, const double &density, const bool &shape_in_meters, const bool &hold_mass_constant, const arma::mat &C_CC, const unsigned int &N_samples, const std::vector< arma::vec::fixed< 3 > > &all_positions, std::string output_dir, int N_saved_shapes, std::vector< arma::vec > &deviations, std::vector< double > &densities, std::vector< std::vector< arma::vec::fixed< 3 > >> &all_accelerations)
 
static void RunMCUQSlopes (std::string path_to_shape, const double &density, const arma::vec::fixed< 3 > &Omega, const bool &shape_in_meters, const bool &hold_mass_constant, const arma::mat &C_CC, const double &period_standard_deviation, const unsigned int &N_samples, const std::vector< unsigned int > &all_facets, std::string output_dir, int N_saved_shapes, std::vector< arma::vec > &deviations, std::vector< double > &densities, std::vector< double > &period_errors, std::vector< std::vector< double > > &all_slopes)
 
static void RunMCUQPotentialAccelerationInertial (std::string path_to_shape, const double &density, const bool &shape_in_meters, const bool &hold_mass_constant, const arma::mat &C_CC, const unsigned int &N_samples, const arma::vec::fixed< 3 > &position, std::string output_dir, int N_saved_shapes, std::vector< arma::vec > &deviations, std::vector< double > &densities, std::vector< arma::vec::fixed< 3 > > &accelerations, std::vector< double > &potentials)
 
static void RunMCUQAccelerationInertial (std::string path_to_shape, const double &density, const bool &shape_in_meters, const bool &hold_mass_constant, const arma::mat &C_CC, const unsigned int &N_samples, const arma::vec::fixed< 3 > &position, std::string output_dir, int N_saved_shapes, std::vector< arma::vec > &deviations, std::vector< double > &densities, std::vector< arma::vec::fixed< 3 > > &accelerations)
 
static void RunMCUQSlopes (std::string path_to_shape, const double &density, const arma::vec::fixed< 3 > &Omega, const bool &shape_in_meters, const bool &hold_mass_constant, const arma::mat &C_CC, const double &period_standard_deviation, const unsigned int &N_samples, const unsigned int &facet, std::string output_dir, int N_saved_shapes, std::vector< arma::vec > &deviations, std::vector< double > &densities, std::vector< double > &period_errors, std::vector< double > &slopes)
 
- Static Public Member Functions inherited from SBGATMassPropertiesUQ
static void TestPartials (std::string input, double tol, bool shape_in_meters)
 
static void RunMCUQVolumeCOMInertia (std::string path_to_shape, const double &density, const bool &shape_in_meters, const arma::mat &C_CC, const unsigned int &N_samples, std::string output_dir, int N_saved_shapes, arma::mat &deviations, arma::vec &all_volumes, arma::mat &all_com, arma::mat &all_inertia)
 
- Static Public Member Functions inherited from SBGATFilterUQ
static arma::mat GetCovarianceSquareRoot (arma::mat P_CC, std::string method)
 
static double KLDivergence (const arma::vec &m0, const arma::mat &m1, const arma::mat &P0, const arma::mat &P1)
 

Protected Member Functions

arma::vec GetBe () const
 
arma::mat PartialOmegaPartialwC () const
 
arma::sp_mat PartialOmegaCPartialwC () const
 
arma::mat PartialBodyFixedAccelerationfPartialC (const int &f, bool hold_mass_constant=false) const
 
arma::mat PartialBodyFixedAccelerationfPartialOmegaC (const int &f, bool hold_mass_constant=false) const
 
arma::mat::fixed< 3, 3 > PartialBodyFixedAccelerationfPartialOmega (const int &f) const
 
void AddPartialSumUePartialC (const arma::vec::fixed< 3 > &pos, arma::rowvec &partial) const
 
void AddPartialSumUfPartialC (const arma::vec::fixed< 3 > &pos, arma::rowvec &partial) const
 
void AddPartialSumAccePartialC (const arma::vec::fixed< 3 > &pos, arma::mat &partial) const
 
void AddPartialSumAccfPartialC (const arma::vec::fixed< 3 > &pos, arma::mat &partial) const
 
void ApplyAeDeviation (arma::vec::fixed< 6 > delta_Ae, const int &e)
 
void ApplyTfDeviation (arma::vec::fixed< 9 > delta_Tf, const int &f)
 
arma::rowvec::fixed< 10 > PartialUePartialXe (const arma::vec::fixed< 3 > &pos, const int &e) const
 
arma::rowvec::fixed< 10 > PartialUfPartialXf (const arma::vec::fixed< 3 > &pos, const int &f) const
 
arma::mat::fixed< 3, 10 > PartialAccePartialXe (const arma::vec::fixed< 3 > &pos, const int &e) const
 
arma::mat::fixed< 3, 10 > PartialAccfPartialXf (const arma::vec::fixed< 3 > &pos, const int &f) const
 
arma::mat::fixed< 10, 9 > PartialXfPartialTf (const arma::vec::fixed< 3 > &pos, const int &f) const
 
arma::rowvec::fixed< 9 > PartialOmegafPartialTf (const arma::vec::fixed< 3 > &pos, const int &f) const
 
arma::mat::fixed< 6, 9 > PartialFfPartialTf (const int &f) const
 
arma::rowvec::fixed< 6 > PartialLePartialAe (const arma::vec::fixed< 3 > &pos, const int &e) const
 
arma::mat::fixed< 3, 6 > PartialRadiusEePartialAe () const
 
arma::mat::fixed< 3, 9 > PartialRadiusFfPartialTf () const
 
arma::mat::fixed< 10, 24 > PartialXePartialBe (const arma::vec::fixed< 3 > &pos, const int &e) const
 
arma::rowvec::fixed< 6 > PartialEdgeLengthPartialAe (const int &e) const
 
arma::rowvec::fixed< 24 > PartialEqrPartialBe (const int &e, const int &q, const int &r) const
 
arma::rowvec PartialSlopeArgumentPartialOmegaC (const int &f, const arma::vec::fixed< 3 > &body_fixed_acc, bool hold_mass_constant=false) const
 
arma::mat::fixed< 6, 24 > PartialEPartialBe (const int &e) const
 
arma::sp_mat PartialBePartialC (const int &e) const
 
arma::vec ApplyAndGetBeDeviation (const arma::vec &delta)
 
- Protected Member Functions inherited from SBGATMassPropertiesUQ
arma::mat::fixed< 3, 6 > PartialSigmaPartialI () const
 
arma::mat::fixed< 3, 6 > PartialUnitDensityMomentsPartialI () const
 
arma::rowvec::fixed< 9 > PartialEqDeltaIfErPartialTf (const int &f, const int &q, const int &r, const arma::vec::fixed< 9 > &Tf) const
 
arma::mat::fixed< 3, 9 > PartialDeltaComPartialTf (const int &f) const
 
arma::rowvec::fixed< 9 > PartialEqDeltaIOverDeltaVfErPartialTf (const arma::vec::fixed< 3 > &e_q, const arma::vec::fixed< 3 > &e_r, const arma::vec::fixed< 9 > &Tf) const
 
arma::rowvec::fixed< 9 > PartialDeltaVfPartialTf (const int &f) const
 
arma::mat::fixed< 6, 9 > PartialDeltaIfPartialTf (const int &f) const
 
arma::mat::fixed< 6, 9 > PartialDeltaIOverDeltaVPartialTf (const int &f) const
 
- Protected Member Functions inherited from SBGATFilterUQ
void SaveSlice (int axis, std::string path, const std::vector< std::vector< arma::vec > > &lines) const
 
void TakeSlice (int axis, std::vector< std::vector< arma::vec > > &lines, const double &c) const
 

Static Protected Member Functions

static arma::mat::fixed< 2, 9 > PartialZfPartialUnitRf (const arma::vec::fixed< 9 > &UnitRf)
 
static arma::rowvec::fixed< 2 > PartialAtan2PartialZf (const arma::vec::fixed< 2 > &Zf)
 
static arma::rowvec::fixed< 2 > PartialOmegafPartialXY (const arma::vec::fixed< 2 > &xy)
 
static arma::mat::fixed< 3, 3 > PartialNormalizedVPartialNonNormalizedV (const arma::vec::fixed< 3 > &non_normalized_V)
 
static arma::mat::fixed< 6, 3 > PartialFfPartialnf (const arma::vec::fixed< 3 > &nf)
 
static double PartialSlopePartialSlopeArgument (const double &u)
 
static void TestPartialUePartialXe (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialUfPartialXf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialXfPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialOmegafPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialZfPartialUnitRf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialFfPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialNormalizedVPartialNonNormalizedV (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialAtan2PartialZf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialNfPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialFfPartialnf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialFfPartialNonNormalizedNf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialLePartialAe (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialEePartialAe (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialEePartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialXePartialBe (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialEdgeLengthPartialAe (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialEPartialBe (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialUfPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialUePartialBe (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialUPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialAPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialAPartialCConstantMass (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialUPartialCConstantMass (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialUfPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialUePartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestAddPartialSumUePartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestAddPartialSumUfPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestAddPartialSumAccfPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestAddPartialSumAccePartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialBePartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialSlopePartialwPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialBodyFixedAccelerationfPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialBodyFixedAccelerationfPartialwC (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialOmegaPartialwC (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialSlopeArgumentPartialOmegaC (std::string input, double tol, bool shape_in_meters)
 
- Static Protected Member Functions inherited from SBGATMassPropertiesUQ
static arma::mat::fixed< 3, 9 > PartialDeltaCMfPartialTf ()
 
static void TestPartialDeltaVfPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialDeltaIOverDeltaVPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialDeltaIfPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialDeltaVPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialVolumePartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialComPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialIPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialAllInertiaPartialC (std::string input, double tol, bool shape_in_meters)
 
static void TestPartialEqDeltaIfErPartialTf (std::string input, double tol, bool shape_in_meters)
 
static void TestGetPartialSigmaPartialC (std::string input, double tol, bool shape_in_meters)
 

Protected Attributes

double period_standard_deviation
 
- Protected Attributes inherited from SBGATMassPropertiesUQ
arma::rowvec precomputed_partialVpartialC
 
arma::mat precomputed_partialGpartialC
 
arma::mat precomputed_partialSigmapartialC
 
arma::mat precomputed_partialIpartialC
 
arma::mat::fixed< 3, 6 > precomputed_partialUnitDensityMomentsPartialI
 
arma::mat::fixed< 3, 6 > precomputed_partialSigmapartialI
 
- Protected Attributes inherited from SBGATFilterUQ
vtkSmartPointer< SBGATFiltermodel
 
arma::mat P_CC
 
arma::sp_mat P_CC_sparse
 

Detailed Description

Evaluation of the formal uncertainty in the potential (variance), acceleration (covariance) caused by a constant-density polyhedron.

Author
Benjamin Bercovici
Date
January 2019

Computes the potential variance, acceleration covariance associated to the gravity deriving from the polyhedron of constant density assuming that the underlying shape vertices are outcomes of a Gaussian distribution of known mean and covariance The input must be a topologically-closed polyhedron.

See Werner, R. A., & Scheeres, D. J. (1997). Exterior gravitation of a polyhedron derived and compared with harmonic and mascon gravitation representations of asteroid 4769 Castalia. Celestial Mechanics and Dynamical Astronomy, 65(3), 313–344. https://doi.org/10.1007/BF00053511 for further details. Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen

Definition at line 26 of file SBGATPolyhedronGravityModelUQ.hpp.

Member Function Documentation

◆ AddPartialSumAccePartialC()

void SBGATPolyhedronGravityModelUQ::AddPartialSumAccePartialC ( const arma::vec::fixed< 3 > &  pos,
arma::mat &  partial 
) const
protected

Adds to the properly initialized vector the partial derivative of the sum of all Acce

Parameters
[in]posposition where to evaluate the partials
[out]partialpartial derivative being evaluated

Definition at line 2059 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ AddPartialSumAccfPartialC()

void SBGATPolyhedronGravityModelUQ::AddPartialSumAccfPartialC ( const arma::vec::fixed< 3 > &  pos,
arma::mat &  partial 
) const
protected

Add to the properly initialized vector the partial derivative of the sum of all Accf

Parameters
[in]posposition where to evaluate the partials
[out]partialpartial derivative being evaluated

Definition at line 2073 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ AddPartialSumUePartialC()

void SBGATPolyhedronGravityModelUQ::AddPartialSumUePartialC ( const arma::vec::fixed< 3 > &  pos,
arma::rowvec &  partial 
) const
protected

Adds to the properly initialized vector the partial derivative of the sum of all Ue

Parameters
[in]posposition where to evaluate the partials
[out]partialpartial derivative being evaluated

Definition at line 2032 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ AddPartialSumUfPartialC()

void SBGATPolyhedronGravityModelUQ::AddPartialSumUfPartialC ( const arma::vec::fixed< 3 > &  pos,
arma::rowvec &  partial 
) const
protected

Add to the properly initialized vector the partial derivative of the sum of all Uf

Parameters
[in]posposition where to evaluate the partials
[out]partialpartial derivative being evaluated

Definition at line 2046 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ ApplyAeDeviation()

void SBGATPolyhedronGravityModelUQ::ApplyAeDeviation ( arma::vec::fixed< 6 >  delta_Ae,
const int &  e 
)
protected

Applies deviation to the coordinates of the vertices on the prescribed edge and updates the pgm

Parameters
delta_Aedeviation
eedge index

Definition at line 1769 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ ApplyAndGetBeDeviation()

arma::vec SBGATPolyhedronGravityModelUQ::ApplyAndGetBeDeviation ( const arma::vec &  delta)
protected

Given a prescribed global deviation of all of the shape's N control points, applies it and returns the deviation in each of the Be's vector (one per edge in the shape)

Parameters
deltadeviation in all of the shape's N control points (3 x N_vertices)
Returns
deviation in all of the shape's Be vectors (24 x N_edges)

Definition at line 1880 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ ApplyDeviation()

void SBGATPolyhedronGravityModelUQ::ApplyDeviation ( const arma::vec &  delta_C)
virtual

Applies prescribed deviation to all the N_vertices control points and updates model

Parameters
delta_Cdeviation (3 * N_vertices x 1)

Reimplemented from SBGATMassPropertiesUQ.

Definition at line 1740 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ ApplyTfDeviation()

void SBGATPolyhedronGravityModelUQ::ApplyTfDeviation ( arma::vec::fixed< 9 >  delta_Tf,
const int &  f 
)
protectedvirtual

Applies deviation to the coordinates of the vertices in the prescribed facet and updates the pgm

Parameters
delta_Tfdeviation
[in]ffacet index

Reimplemented from SBGATMassPropertiesUQ.

Definition at line 1808 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetBe()

arma::vec SBGATPolyhedronGravityModelUQ::GetBe ( ) const
protected

Definition at line 1849 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetCovarianceAcceleration() [1/2]

arma::mat::fixed< 3, 3 > SBGATPolyhedronGravityModelUQ::GetCovarianceAcceleration ( double const *  point,
bool  hold_mass_constant = false 
) const

Get covariance in acceleration arising from the uncertain shape

Parameters
[in]pointcoordinates where to evaluate the covariance
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
covariance of acceleration

Definition at line 40 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetCovarianceAcceleration() [2/2]

arma::mat::fixed< 3, 3 > SBGATPolyhedronGravityModelUQ::GetCovarianceAcceleration ( const arma::vec::fixed< 3 > &  point,
bool  hold_mass_constant = false 
) const

Get covariance in acceleration arising from the uncertain shape

Parameters
[in]pointcoordinates where to evaluate the covariance
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
covariance of acceleration

Definition at line 49 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetPartialAPartialC()

arma::mat SBGATPolyhedronGravityModelUQ::GetPartialAPartialC ( const arma::vec::fixed< 3 > &  pos,
bool  hold_mass_constant = false 
) const

Obtain the partial derivative of the acceleration at the prescribed location due to a infinitesimal variation in the shape's control points

Parameters
[in]posposition where to evaluate the partial derivative
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
partial derivative of the acceleration with respect to the variation in the shape's control points

Definition at line 2100 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetPartialSlopePartialC()

arma::rowvec SBGATPolyhedronGravityModelUQ::GetPartialSlopePartialC ( const int &  f) const

Return the partial derivative of the gravitation slope at the center of face tf relative to the shape vertices coordinates

Parameters
[in]ffacet index
Returns
partial derivative of the slope at the center of facet f relative to the shape vertices coordinates

◆ GetPartialSlopePartialwPartialC()

arma::rowvec SBGATPolyhedronGravityModelUQ::GetPartialSlopePartialwPartialC ( const int &  f,
bool  hold_mass_constant = false 
) const

Return the partial derivative of the slope at the center of facet f relative to the angular velocity magnitude and shape vertices coordinates

Parameters
[in]ffacet index
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant
Returns
partials

Definition at line 1213 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetPartialUPartialC()

arma::rowvec SBGATPolyhedronGravityModelUQ::GetPartialUPartialC ( const arma::vec::fixed< 3 > &  pos,
bool  hold_mass_constant = false 
) const

Obtain the partial derivative of the potential at the prescribed location due to a infinitesimal variation in the shape's control points

Parameters
[in]posposition where to evaluate the partial derivative
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
partial derivative of the potential with respect to the variation in the shape's control points

Definition at line 2009 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetVariancePotential() [1/2]

double SBGATPolyhedronGravityModelUQ::GetVariancePotential ( double const *  point,
bool  hold_mass_constant = false 
) const

Evaluates the Polyhedron Gravity Model potential variance at the specified point assuming a constant density

Parameters
pointpointer to coordinates of queried point, expressed in the same frame as the polydata
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
PGM potential variance evaluated at the queried point (m ^ 4/ s ^4)

Definition at line 24 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetVariancePotential() [2/2]

double SBGATPolyhedronGravityModelUQ::GetVariancePotential ( const arma::vec::fixed< 3 > &  point,
bool  hold_mass_constant = false 
) const

Evaluates the Polyhedron Gravity Model potential variance at the specified point assuming a constant density

Parameters
pointcoordinates of queried point, expressed in the same frame as the polydata
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
PGM potential variance evaluated at the queried point (m ^ 4 / s ^4)

Definition at line 33 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetVariancePotentialAccelerationCovariance() [1/2]

void SBGATPolyhedronGravityModelUQ::GetVariancePotentialAccelerationCovariance ( double const *  point,
double &  potential_var,
arma::mat::fixed< 3, 3 > &  acc_cov,
bool  hold_mass_constant = false 
) const

Evaluates the Polyhedron Gravity Model potential variance and acceleration covariance at the specified point assuming a constant density

Parameters
pointcoordinates of queried point, expressed in the same frame as the polydata used to construct the PGM
[out]potential_varPGM potential variance evaluated at the queried point (m ^ 4 / s ^4)
[out]acc_covPGM acceleration covariance evaluated at the queried point (m^2 / s ^4)
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false

◆ GetVariancePotentialAccelerationCovariance() [2/2]

void SBGATPolyhedronGravityModelUQ::GetVariancePotentialAccelerationCovariance ( const arma::vec::fixed< 3 > &  point,
double &  potential_var,
arma::mat::fixed< 3, 3 > &  acc_cov,
bool  hold_mass_constant = false 
) const

Evaluates the Polyhedron Gravity Model potential variance and acceleration covariance at the specified point assuming a constant density

Parameters
pointcoordinates of queried point, expressed in the same frame as the polydata used to construct the PGM
[out]potential_varPGM potential variance evaluated at the queried point (m ^ 4 / s ^4)
[out]acc_covPGM acceleration covariance evaluated at the queried point (m^2 / s ^4)
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false

Definition at line 54 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetVarianceSlope()

double SBGATPolyhedronGravityModelUQ::GetVarianceSlope ( const unsigned int &  f,
bool  hold_mass_constant = false 
)

Return the variance of the slope evaluated at the center of the designated facet. This method is NOT thread safe

Parameters
[in]ffacet index
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
variance in slope (deg^2)

Definition at line 4337 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ GetVarianceSlopes()

void SBGATPolyhedronGravityModelUQ::GetVarianceSlopes ( std::vector< double > &  slope_variances,
const std::vector< unsigned int > &  facets,
bool  hold_mass_constant = false 
)

Return the variance of the slope evaluated at the center of the designated facets. This method is NOT thread safe (i.e should not be called from multiple threads). However, it internaly relies on OpenMP to speed up computations

Parameters
[out]slope_variances(deg^2)
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
[in]facetsindices of facets where to evaluate the slope variance

Definition at line 4350 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialAccePartialXe()

arma::mat::fixed< 3, 10 > SBGATPolyhedronGravityModelUQ::PartialAccePartialXe ( const arma::vec::fixed< 3 > &  pos,
const int &  e 
) const
protected

Return the partial derivative of an individual edge contribution to the acceleration (Acce) with respect to the Xe^E vector holding the e-th edge dyadic factors

Parameters
[in]posposition where to evaluate the partial
eedge index
Returns
PartialAccePartialXe (3x10)

Definition at line 2125 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialAccfPartialXf()

arma::mat::fixed< 3, 10 > SBGATPolyhedronGravityModelUQ::PartialAccfPartialXf ( const arma::vec::fixed< 3 > &  pos,
const int &  f 
) const
protected

Return the partial derivative of an individual facet contribution to the acceleration (Accf) with respect to the Xf^F vector holding the f-th facet dyadic factors

Parameters
[in]posposition where to evaluate the partial
[in]ffacet index
Returns
PartialAccfPartialXf (3x10)

Definition at line 2157 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialAtan2PartialZf()

arma::rowvec::fixed< 2 > SBGATPolyhedronGravityModelUQ::PartialAtan2PartialZf ( const arma::vec::fixed< 2 > &  Zf)
staticprotected

Return the partial derivative of arctan2(Z_f) w/r to Z_f with respect to the unit vectors from the field point to the facet vertices

Parameters
Zf
Returns
PartialAtan2PartialZf (1x2)

Definition at line 235 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialBePartialC()

arma::sp_mat SBGATPolyhedronGravityModelUQ::PartialBePartialC ( const int &  e) const
protected

Return the connectivity table associated with vector Be

Parameters
eedge index
Returns
connectivity table

Definition at line 1705 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialBodyFixedAccelerationfPartialC()

arma::mat SBGATPolyhedronGravityModelUQ::PartialBodyFixedAccelerationfPartialC ( const int &  f,
bool  hold_mass_constant = false 
) const
protected

Return the partial derivative of the body-fixed acceleration at the center of facet f relative to the shape coordinates

Parameters
[in]ffacet index
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
partial derivative

Definition at line 1185 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialBodyFixedAccelerationfPartialOmega()

arma::mat::fixed< 3, 3 > SBGATPolyhedronGravityModelUQ::PartialBodyFixedAccelerationfPartialOmega ( const int &  f) const
protected

Definition at line 1272 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialBodyFixedAccelerationfPartialOmegaC()

arma::mat SBGATPolyhedronGravityModelUQ::PartialBodyFixedAccelerationfPartialOmegaC ( const int &  f,
bool  hold_mass_constant = false 
) const
protected

Return the partial derivative of the body-fixed acceleration at the center of facet f with respect to the angular velocity and vertices coordinates

Parameters
[in]ffacet index
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
partial derivative

Definition at line 1171 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialEdgeLengthPartialAe()

arma::rowvec::fixed< 6 > SBGATPolyhedronGravityModelUQ::PartialEdgeLengthPartialAe ( const int &  e) const
protected

Return the partial derivative of the edge length le with respect to the coordinates of the edges points

Parameters
eedge index
Returns
PartialEdgeLengthPartialAe (10x24)

Definition at line 354 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialEPartialBe()

arma::mat::fixed< 6, 24 > SBGATPolyhedronGravityModelUQ::PartialEPartialBe ( const int &  e) const
protected

Return the partial derivative of the Ee dyad parametrization with respect to the coordinates of the edges points and adjacent facets points

Parameters
eedge index
Returns
PartialEPartialBe (6x24)

Definition at line 429 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialEqrPartialBe()

arma::rowvec::fixed< 24 > SBGATPolyhedronGravityModelUQ::PartialEqrPartialBe ( const int &  e,
const int &  q,
const int &  r 
) const
protected

Return the partial derivative of the (q,r) component of the Ee dyad with respect to the with respect to the coordinates of the edges points and adjacent facets points

Parameters
eedge index
qrow index
rcol index
Returns
PartialEqrPartialBe (1x24)

Definition at line 374 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialFfPartialnf()

arma::mat::fixed< 6, 3 > SBGATPolyhedronGravityModelUQ::PartialFfPartialnf ( const arma::vec::fixed< 3 > &  nf)
staticprotected

Return the partial derivative of the f-th facet dyad parametrization with respect to the normalized normal of the f-th facet

Parameters
nffacet normal
Returns
PartialFfPartialnf (6x3)

Definition at line 272 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialFfPartialTf()

arma::mat::fixed< 6, 9 > SBGATPolyhedronGravityModelUQ::PartialFfPartialTf ( const int &  f) const
protected

Return the partial derivative of the facet dyad parametrization (Ff) with respect to the vertices coordinates constitutive of the f-th triangle (Tf)

Parameters
[in]ffacet index
Returns
PartialFfPartialTf (6x9)

Definition at line 252 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialLePartialAe()

arma::rowvec::fixed< 6 > SBGATPolyhedronGravityModelUQ::PartialLePartialAe ( const arma::vec::fixed< 3 > &  pos,
const int &  e 
) const
protected

Return the partial derivative of the wire potential Le with respect to the coordinates of the two vertices forming the edge (stacked in Ae)

Parameters
[in]posposition where to evaluate the partial
eedge index
Returns
PartialLePartialAe (1x6)

Definition at line 294 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialNormalizedVPartialNonNormalizedV()

arma::mat::fixed< 3, 3 > SBGATPolyhedronGravityModelUQ::PartialNormalizedVPartialNonNormalizedV ( const arma::vec::fixed< 3 > &  non_normalized_V)
staticprotected

Return the partial derivative of a normalized vector n relative to the non-normalized vector N such that n = N / || N ||

Parameters
non_normalized_Vnon-normalized vector used to produce the normalized vector
Returns
PartialNormalizedVPartialNonNormalizedV (3x3)

Definition at line 264 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialOmegaCPartialwC()

arma::sp_mat SBGATPolyhedronGravityModelUQ::PartialOmegaCPartialwC ( ) const
protected

Return the partial derivative of the body-fixed angular velocity and the vertices coordinates relative to the angular velocity magnitude and shape vertices coordinates

Returns
partial

Definition at line 1234 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialOmegafPartialTf()

arma::rowvec::fixed< 9 > SBGATPolyhedronGravityModelUQ::PartialOmegafPartialTf ( const arma::vec::fixed< 3 > &  pos,
const int &  f 
) const
protected

Return the partial derivative of the performance factor omega_f with respect to the vertices coordiantes constitutive of the f-th triangle (Tf)

Parameters
[in]posposition where to evaluate the partial
[in]ffacet index
Returns
PartialOmegafPartialTf (1x9)

Definition at line 159 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialOmegafPartialXY()

static arma::rowvec::fixed<2> SBGATPolyhedronGravityModelUQ::PartialOmegafPartialXY ( const arma::vec::fixed< 2 > &  xy)
staticprotected

Return the partial derivative of arctan(y/x)

Parameters
xyinput
Returns
partial derivative

◆ PartialOmegaPartialwC()

arma::mat SBGATPolyhedronGravityModelUQ::PartialOmegaPartialwC ( ) const
protected

Get partial derivative of the angular velocity vector relative to 1) the angular velocity magnitude 2) the shape vertices coordinates

Returns
partial derivative of Omega relative to its magnitude shape vertices coordinates

Definition at line 1145 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialRadiusEePartialAe()

arma::mat::fixed< 3, 6 > SBGATPolyhedronGravityModelUQ::PartialRadiusEePartialAe ( ) const
protected

Return the partial derivative of field-point to edge-point vector with respect to the coordinates of the two vertices forming the edge (stacked in Ae)

Returns
PartialRadiusEePartialAe (3x6)

Definition at line 141 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialRadiusFfPartialTf()

arma::mat::fixed< 3, 9 > SBGATPolyhedronGravityModelUQ::PartialRadiusFfPartialTf ( ) const
protected

Return the partial derivative of field-point to facet-point vector with respect to the coordinates of the three vertices forming the facet (stacked in Tf)

Returns
PartialRadiusFfPartialTf (3x9)

Definition at line 148 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialSlopeArgumentPartialOmegaC()

arma::rowvec SBGATPolyhedronGravityModelUQ::PartialSlopeArgumentPartialOmegaC ( const int &  f,
const arma::vec::fixed< 3 > &  body_fixed_acc,
bool  hold_mass_constant = false 
) const
protected

Return the partial derivative of the f-th facet slope argument (u as in slope = arcos(-u)) with respect to the angular velocity and the shape coordinates

Parameters
[in]ffacet index
body_fixed_accbody-fixed acceleration at the center of facet f
[in]hold_mass_constantif true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false
Returns
partial derivative

Definition at line 1251 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialSlopePartialSlopeArgument()

double SBGATPolyhedronGravityModelUQ::PartialSlopePartialSlopeArgument ( const double &  u)
staticprotected

Return the partial derivative of the slope s == arcos(-u) relative to the slope argument u

Parameters
uinput parameter
partialderivative of slope with respect to u

Definition at line 1207 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialUePartialXe()

arma::rowvec::fixed< 10 > SBGATPolyhedronGravityModelUQ::PartialUePartialXe ( const arma::vec::fixed< 3 > &  pos,
const int &  e 
) const
protected

Return the partial derivative of an individual edge contribution to the potential (Ue) with respect to the Xe^E vector holding the e-th edge dyadic factors

Parameters
[in]posposition where to evaluate the partial
eedge index
Returns
PartialUePartialXe (1x10)

Definition at line 62 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialUfPartialXf()

arma::rowvec::fixed< 10 > SBGATPolyhedronGravityModelUQ::PartialUfPartialXf ( const arma::vec::fixed< 3 > &  pos,
const int &  f 
) const
protected

Return the partial derivative of an individual facet contribution to the potential (Uf) with respect to the Xf^F vector holding the f-th facet dyadic factors

Parameters
[in]posposition where to evaluate the partial
[in]ffacet index
Returns
PartialUfPartialXf (1x10)

Definition at line 88 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialXePartialBe()

arma::mat::fixed< 10, 24 > SBGATPolyhedronGravityModelUQ::PartialXePartialBe ( const arma::vec::fixed< 3 > &  pos,
const int &  e 
) const
protected

Return the partial derivative of the parametrization of the Xe dyadic vector with respect to the coordinates of the edges points and adjacent facets points

Parameters
[in]posposition where to evaluate the partial
eedge index
Returns
PartialXePartialBe (10x24)

Definition at line 336 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialXfPartialTf()

arma::mat::fixed< 10, 9 > SBGATPolyhedronGravityModelUQ::PartialXfPartialTf ( const arma::vec::fixed< 3 > &  pos,
const int &  f 
) const
protected

Return the partial derivative of Xf^F, the vector holding the f-th facet dyadic factors, with respect to the vertices coordiantes constitutive of the f-th triangle (Tf)

Parameters
[in]posposition where to evaluate the partial
[in]ffacet index
Returns
PartialXfPartialTf (10x9)

Definition at line 117 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ PartialZfPartialUnitRf()

arma::mat::fixed< 2, 9 > SBGATPolyhedronGravityModelUQ::PartialZfPartialUnitRf ( const arma::vec::fixed< 9 > &  UnitRf)
staticprotected

Return the partial derivative of Z_f = (alpha_f,gamma_f)^T (as in wf = 2 * arctan2(Z_f) ) with respect to the unit vectors from the field point to the facet vertices

Parameters
UnitRf3 unit vectors stacked up
Returns
PartialZfPartialUnitRf (2x9)

Definition at line 210 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ RunMCUQAccelerationInertial() [1/2]

void SBGATPolyhedronGravityModelUQ::RunMCUQAccelerationInertial ( std::string  path_to_shape,
const double &  density,
const bool &  shape_in_meters,
const bool &  hold_mass_constant,
const arma::mat &  C_CC,
const unsigned int &  N_samples,
const std::vector< arma::vec::fixed< 3 > > &  all_positions,
std::string  output_dir,
int  N_saved_shapes,
std::vector< arma::vec > &  deviations,
std::vector< double > &  densities,
std::vector< std::vector< arma::vec::fixed< 3 > >> &  all_accelerations 
)
static

Runs a Monte Carlo on the shape and samples accelerations at the provided positions

Parameters
[in]path_to_shapepath to reference shape
[in]densitysmall body density in kg/m^3
[in]shape_in_meterstrue if reference shape has its units expressed in meters, false otherwise
[in]hold_mass_constanttrue if shape mass must be held constant by making density vary (mass = rho * V), false otherwise
[in]C_CCsquare root of the covariance of the shape vertices coordinates. Must be of dimensions (3N_C * 3N_C) where N_C is the number of vertices in the reference shape
[in]N_samplesnumber of shape outcomes to draw
[in]all_positionsvector storing all the position where acceleration & potential must be sampled
[in]output_dirpath ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0
[in]N_saved_shapesnumber of shape outcomes to save. must be lesser or equal than N_samples
[out]deviationsholds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample
[out]densitiesholds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint
[out]all_accelerationsholds N_samples vectors, each storing the acceleration evaluated at the specified points

Definition at line 3607 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ RunMCUQAccelerationInertial() [2/2]

void SBGATPolyhedronGravityModelUQ::RunMCUQAccelerationInertial ( std::string  path_to_shape,
const double &  density,
const bool &  shape_in_meters,
const bool &  hold_mass_constant,
const arma::mat &  C_CC,
const unsigned int &  N_samples,
const arma::vec::fixed< 3 > &  position,
std::string  output_dir,
int  N_saved_shapes,
std::vector< arma::vec > &  deviations,
std::vector< double > &  densities,
std::vector< arma::vec::fixed< 3 > > &  accelerations 
)
static

Runs a Monte Carlo on the shape and samples inertial accelerations at the provided position

Parameters
[in]path_to_shapepath to reference shape
[in]densitysmall body density in kg/m^3
[in]shape_in_meterstrue if reference shape has its units expressed in meters, false otherwise
[in]hold_mass_constanttrue if shape mass must be held constant by making density vary (mass = rho * V), false otherwise
[in]C_CCsquare root of the covariance of the shape vertices coordinates. Must be of dimensions (3N_C * 3N_C) where N_C is the number of vertices in the reference shape
[in]N_samplesnumber of shape outcomes to draw
[in]positionthe position where acceleration & potential must be sampled
[in]output_dirpath ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0
[in]N_saved_shapesnumber of shape outcomes to save. must be lesser or equal than N_samples
[out]deviationsholds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample
[out]densitiesholds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint
[out]accelerationsholds N_samples accelerations evaluated at the specified point

Definition at line 3388 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ RunMCUQPotentialAccelerationInertial() [1/2]

void SBGATPolyhedronGravityModelUQ::RunMCUQPotentialAccelerationInertial ( std::string  path_to_shape,
const double &  density,
const bool &  shape_in_meters,
const bool &  hold_mass_constant,
const arma::mat &  C_CC,
const unsigned int &  N_samples,
const std::vector< arma::vec::fixed< 3 > > &  all_positions,
std::string  output_dir,
int  N_saved_shapes,
std::vector< arma::vec > &  deviations,
std::vector< double > &  densities,
std::vector< std::vector< arma::vec::fixed< 3 > >> &  all_accelerations,
std::vector< std::vector< double > > &  all_potentials 
)
static

Runs a Monte Carlo on the shape and samples accelerations & potentials at the provided positions

Parameters
[in]path_to_shapepath to reference shape
[in]densitysmall body density in kg/m^3
[in]shape_in_meterstrue if reference shape has its units expressed in meters, false otherwise
[in]hold_mass_constanttrue if shape mass must be held constant by making density vary (mass = rho * V), false otherwise
[in]C_CCsquare root of the covariance of the shape vertices coordinates. Must be of dimensions (3N_C * 3N_C) where N_C is the number of vertices in the reference shape
[in]N_samplesnumber of shape outcomes to draw
[in]all_positionsvector storing all the position where acceleration & potential must be sampled
[in]output_dirpath ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0
[in]N_saved_shapesnumber of shape outcomes to save. must be lesser or equal than N_samples
[out]deviationsholds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample
[out]densitiesholds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint
[out]all_accelerationsholds N_samples vectors, each storing the acceleration evaluated at the specified points
[out]all_potentialsholds N_samples vectors, each storing the potential evaluated at the specified points

Definition at line 3488 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ RunMCUQPotentialAccelerationInertial() [2/2]

void SBGATPolyhedronGravityModelUQ::RunMCUQPotentialAccelerationInertial ( std::string  path_to_shape,
const double &  density,
const bool &  shape_in_meters,
const bool &  hold_mass_constant,
const arma::mat &  C_CC,
const unsigned int &  N_samples,
const arma::vec::fixed< 3 > &  position,
std::string  output_dir,
int  N_saved_shapes,
std::vector< arma::vec > &  deviations,
std::vector< double > &  densities,
std::vector< arma::vec::fixed< 3 > > &  accelerations,
std::vector< double > &  potentials 
)
static

Runs a Monte Carlo on the shape and samples inertial accelerations & potentials at the provided position

Parameters
[in]path_to_shapepath to reference shape
[in]densitysmall body density in kg/m^3
[in]shape_in_meterstrue if reference shape has its units expressed in meters, false otherwise
[in]hold_mass_constanttrue if shape mass must be held constant by making density vary (mass = rho * V), false otherwise
[in]C_CCsquare root of the covariance of the shape vertices coordinates. Must be of dimensions (3N_C * 3N_C) where N_C is the number of vertices in the reference shape
[in]N_samplesnumber of shape outcomes to draw
[in]positionthe position where acceleration & potential must be sampled
[in]output_dirpath ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0
[in]N_saved_shapesnumber of shape outcomes to save. must be lesser or equal than N_samples
[out]deviationsholds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample
[out]densitiesholds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint
[out]accelerationsholds N_samples accelerations evaluated at the specified point
[out]potentialsholds N_samples potential evaluated at the specified point

Definition at line 3341 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ RunMCUQSlopes() [1/2]

void SBGATPolyhedronGravityModelUQ::RunMCUQSlopes ( std::string  path_to_shape,
const double &  density,
const arma::vec::fixed< 3 > &  Omega,
const bool &  shape_in_meters,
const bool &  hold_mass_constant,
const arma::mat &  C_CC,
const double &  period_standard_deviation,
const unsigned int &  N_samples,
const std::vector< unsigned int > &  all_facets,
std::string  output_dir,
int  N_saved_shapes,
std::vector< arma::vec > &  deviations,
std::vector< double > &  densities,
std::vector< double > &  period_errors,
std::vector< std::vector< double > > &  all_slopes 
)
static

Runs a Monte Carlo on the shape and samples the slopes at the provided facets

Parameters
[in]path_to_shapepath to reference shape
[in]densitysmall body density in kg/m^3
[in]Omegaangular velocity of small body in kg/m^3, expressed in the small body frame
[in]shape_in_meterstrue if reference shape has its units expressed in meters, false otherwise
[in]hold_mass_constanttrue if shape mass must be held constant by making density vary (mass = rho * V), false otherwise
[in]C_CCsquare root of the covariance of the shape vertices coordinates. Must be of dimensions (3N_C * 3N_C) where N_C is the number of vertices in the reference shape
[in]period_standard_deviationstandard deviation of the rotation period in seconds
[in]N_samplesnumber of shape outcomes to draw
[in]all_facetsvector storing all the facet indices where the gravitational slopes must be sampled
[in]output_dirpath ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0
[in]N_saved_shapesnumber of shape outcomes to save. must be lesser or equal than N_samples
[out]deviationsholds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample
[out]densitiesholds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint
[out]period_errorsholds N_samples of the error on the rotation period
[out]all_slopesholds N_samples vectors, each storing the slopes evaluated at the specified facets

Definition at line 3720 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ RunMCUQSlopes() [2/2]

void SBGATPolyhedronGravityModelUQ::RunMCUQSlopes ( std::string  path_to_shape,
const double &  density,
const arma::vec::fixed< 3 > &  Omega,
const bool &  shape_in_meters,
const bool &  hold_mass_constant,
const arma::mat &  C_CC,
const double &  period_standard_deviation,
const unsigned int &  N_samples,
const unsigned int &  facet,
std::string  output_dir,
int  N_saved_shapes,
std::vector< arma::vec > &  deviations,
std::vector< double > &  densities,
std::vector< double > &  period_errors,
std::vector< double > &  slopes 
)
static

Runs a Monte Carlo on the shape and samples the gravitational slopes at the provided facets

Parameters
[in]path_to_shapepath to reference shape
[in]densitysmall body density in kg/m^3
[in]Omegaangular velocity of small body in kg/m^3, expressed in the small body frame
[in]shape_in_meterstrue if reference shape has its units expressed in meters, false otherwise
[in]hold_mass_constanttrue if shape mass must be held constant by making density vary (mass = rho * V), false otherwise
[in]C_CCsquare root of the covariance of the shape vertices coordinates. Must be of dimensions (3N_C * 3N_C) where N_C is the number of vertices in the reference shape
[in]period_standard_deviationstandard deviation of the rotation period in seconds
[in]N_samplesnumber of shape outcomes to draw
[in]facetindex of the facet where the surface pgm must be sampled
[in]output_dirpath ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0
[in]N_saved_shapesnumber of shape outcomes to save. must be lesser or equal than N_samples
[out]deviationsholds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample
[out]densitiesholds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint
[out]period_errorsholds N_samples of the error on the rotation period
[out]slopesholds N_samples slopes evaluated at the specified facet

Definition at line 3429 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ SetPeriodErrorStandardDeviation()

void SBGATPolyhedronGravityModelUQ::SetPeriodErrorStandardDeviation ( double  rotation_period_sd)
inline

Sets the standard deviation of the rotation period

Parameters
standarddeviation of the rotation period (s)

Definition at line 263 of file SBGATPolyhedronGravityModelUQ.hpp.

◆ TestAddPartialSumAccePartialC()

void SBGATPolyhedronGravityModelUQ::TestAddPartialSumAccePartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2294 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestAddPartialSumAccfPartialC()

void SBGATPolyhedronGravityModelUQ::TestAddPartialSumAccfPartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2395 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestAddPartialSumUePartialC()

void SBGATPolyhedronGravityModelUQ::TestAddPartialSumUePartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2192 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestAddPartialSumUfPartialC()

void SBGATPolyhedronGravityModelUQ::TestAddPartialSumUfPartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2499 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestGetPartialAPartialC()

void SBGATPolyhedronGravityModelUQ::TestGetPartialAPartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2788 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestGetPartialAPartialCConstantMass()

void SBGATPolyhedronGravityModelUQ::TestGetPartialAPartialCConstantMass ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2853 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestGetPartialSlopePartialwPartialC()

void SBGATPolyhedronGravityModelUQ::TestGetPartialSlopePartialwPartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 3882 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestGetPartialUPartialC()

void SBGATPolyhedronGravityModelUQ::TestGetPartialUPartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2602 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestGetPartialUPartialCConstantMass()

void SBGATPolyhedronGravityModelUQ::TestGetPartialUPartialCConstantMass ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2692 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialAtan2PartialZf()

void SBGATPolyhedronGravityModelUQ::TestPartialAtan2PartialZf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1921 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialBePartialC()

void SBGATPolyhedronGravityModelUQ::TestPartialBePartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 3120 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialBodyFixedAccelerationfPartialC()

void SBGATPolyhedronGravityModelUQ::TestPartialBodyFixedAccelerationfPartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 3967 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialBodyFixedAccelerationfPartialwC()

void SBGATPolyhedronGravityModelUQ::TestPartialBodyFixedAccelerationfPartialwC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 4047 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialEdgeLengthPartialAe()

void SBGATPolyhedronGravityModelUQ::TestPartialEdgeLengthPartialAe ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1562 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialEePartialAe()

static void SBGATPolyhedronGravityModelUQ::TestPartialEePartialAe ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

◆ TestPartialEePartialTf()

static void SBGATPolyhedronGravityModelUQ::TestPartialEePartialTf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

◆ TestPartialEPartialBe()

void SBGATPolyhedronGravityModelUQ::TestPartialEPartialBe ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1629 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialFfPartialnf()

void SBGATPolyhedronGravityModelUQ::TestPartialFfPartialnf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1392 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialFfPartialNonNormalizedNf()

void SBGATPolyhedronGravityModelUQ::TestPartialFfPartialNonNormalizedNf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1441 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialFfPartialTf()

void SBGATPolyhedronGravityModelUQ::TestPartialFfPartialTf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1071 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialLePartialAe()

void SBGATPolyhedronGravityModelUQ::TestPartialLePartialAe ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1495 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialNfPartialTf()

void SBGATPolyhedronGravityModelUQ::TestPartialNfPartialTf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1323 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialNormalizedVPartialNonNormalizedV()

void SBGATPolyhedronGravityModelUQ::TestPartialNormalizedVPartialNonNormalizedV ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1285 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialOmegafPartialTf()

void SBGATPolyhedronGravityModelUQ::TestPartialOmegafPartialTf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 961 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialOmegaPartialwC()

void SBGATPolyhedronGravityModelUQ::TestPartialOmegaPartialwC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 4161 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartials()

void SBGATPolyhedronGravityModelUQ::TestPartials ( std::string  input,
double  tol,
bool  shape_in_meters 
)
static

Runs a finite-differencing based test of the implemented PGM partials

Parameters
inputpath to obj file used to test the partials
tolrelative tolerance

Definition at line 446 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialSlopeArgumentPartialOmegaC()

void SBGATPolyhedronGravityModelUQ::TestPartialSlopeArgumentPartialOmegaC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 4248 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialUePartialBe()

void SBGATPolyhedronGravityModelUQ::TestPartialUePartialBe ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 565 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialUePartialC()

void SBGATPolyhedronGravityModelUQ::TestPartialUePartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 3024 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialUePartialXe()

void SBGATPolyhedronGravityModelUQ::TestPartialUePartialXe ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 676 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialUfPartialC()

void SBGATPolyhedronGravityModelUQ::TestPartialUfPartialC ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 3244 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialUfPartialTf()

void SBGATPolyhedronGravityModelUQ::TestPartialUfPartialTf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 488 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialUfPartialXf()

void SBGATPolyhedronGravityModelUQ::TestPartialUfPartialXf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 769 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialXePartialBe()

void SBGATPolyhedronGravityModelUQ::TestPartialXePartialBe ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 2930 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialXfPartialTf()

void SBGATPolyhedronGravityModelUQ::TestPartialXfPartialTf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 854 of file SBGATPolyhedronGravityModelUQ.cpp.

◆ TestPartialZfPartialUnitRf()

void SBGATPolyhedronGravityModelUQ::TestPartialZfPartialUnitRf ( std::string  input,
double  tol,
bool  shape_in_meters 
)
staticprotected

Definition at line 1957 of file SBGATPolyhedronGravityModelUQ.cpp.

Member Data Documentation

◆ period_standard_deviation

double SBGATPolyhedronGravityModelUQ::period_standard_deviation
protected

Definition at line 762 of file SBGATPolyhedronGravityModelUQ.hpp.


The documentation for this class was generated from the following files: