Small Body Geophysical Analysis Tool (SBGAT)
|
Evaluation of the formal uncertainty in the potential (variance), acceleration (covariance) caused by a constant-density polyhedron. More...
#include <SBGATPolyhedronGravityModelUQ.hpp>
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 |
![]() | |
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 |
![]() | |
vtkSmartPointer< SBGATFilter > | GetModel () |
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 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 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) |
![]() | |
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 |
![]() | |
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 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 |
![]() | |
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 |
![]() | |
vtkSmartPointer< SBGATFilter > | model |
arma::mat | P_CC |
arma::sp_mat | P_CC_sparse |
Evaluation of the formal uncertainty in the potential (variance), acceleration (covariance) caused by a constant-density polyhedron.
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.
|
protected |
Adds to the properly initialized vector the partial derivative of the sum of all Acce
[in] | pos | position where to evaluate the partials |
[out] | partial | partial derivative being evaluated |
Definition at line 2059 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Add to the properly initialized vector the partial derivative of the sum of all Accf
[in] | pos | position where to evaluate the partials |
[out] | partial | partial derivative being evaluated |
Definition at line 2073 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Adds to the properly initialized vector the partial derivative of the sum of all Ue
[in] | pos | position where to evaluate the partials |
[out] | partial | partial derivative being evaluated |
Definition at line 2032 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Add to the properly initialized vector the partial derivative of the sum of all Uf
[in] | pos | position where to evaluate the partials |
[out] | partial | partial derivative being evaluated |
Definition at line 2046 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Applies deviation to the coordinates of the vertices on the prescribed edge and updates the pgm
delta_Ae | deviation |
e | edge index |
Definition at line 1769 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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)
delta | deviation in all of the shape's N control points (3 x N_vertices) |
Definition at line 1880 of file SBGATPolyhedronGravityModelUQ.cpp.
|
virtual |
Applies prescribed deviation to all the N_vertices control points and updates model
delta_C | deviation (3 * N_vertices x 1) |
Reimplemented from SBGATMassPropertiesUQ.
Definition at line 1740 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protectedvirtual |
Applies deviation to the coordinates of the vertices in the prescribed facet and updates the pgm
delta_Tf | deviation | |
[in] | f | facet index |
Reimplemented from SBGATMassPropertiesUQ.
Definition at line 1808 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Definition at line 1849 of file SBGATPolyhedronGravityModelUQ.cpp.
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
[in] | point | coordinates where to evaluate the covariance |
[in] | hold_mass_constant | if 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 40 of file SBGATPolyhedronGravityModelUQ.cpp.
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
[in] | point | coordinates where to evaluate the covariance |
[in] | hold_mass_constant | if 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 49 of file SBGATPolyhedronGravityModelUQ.cpp.
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
[in] | pos | position where to evaluate the partial derivative |
[in] | hold_mass_constant | if 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 2100 of file SBGATPolyhedronGravityModelUQ.cpp.
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
[in] | f | facet index |
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
[in] | f | facet index |
[in] | hold_mass_constant | if true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant |
Definition at line 1213 of file SBGATPolyhedronGravityModelUQ.cpp.
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
[in] | pos | position where to evaluate the partial derivative |
[in] | hold_mass_constant | if 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 2009 of file SBGATPolyhedronGravityModelUQ.cpp.
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
point | pointer to coordinates of queried point, expressed in the same frame as the polydata | |
[in] | hold_mass_constant | if 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 24 of file SBGATPolyhedronGravityModelUQ.cpp.
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
point | coordinates of queried point, expressed in the same frame as the polydata | |
[in] | hold_mass_constant | if 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 33 of file SBGATPolyhedronGravityModelUQ.cpp.
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
point | coordinates of queried point, expressed in the same frame as the polydata used to construct the PGM | |
[out] | potential_var | PGM potential variance evaluated at the queried point (m ^ 4 / s ^4) |
[out] | acc_cov | PGM acceleration covariance evaluated at the queried point (m^2 / s ^4) |
[in] | hold_mass_constant | if true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false |
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
point | coordinates of queried point, expressed in the same frame as the polydata used to construct the PGM | |
[out] | potential_var | PGM potential variance evaluated at the queried point (m ^ 4 / s ^4) |
[out] | acc_cov | PGM acceleration covariance evaluated at the queried point (m^2 / s ^4) |
[in] | hold_mass_constant | if 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.
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
[in] | f | facet index |
[in] | hold_mass_constant | if 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 4337 of file SBGATPolyhedronGravityModelUQ.cpp.
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
[out] | slope_variances | (deg^2) |
[in] | hold_mass_constant | if true, will make density vary as in drho = - rho V / dV so as to hold mass (mass = rho * V) constant. Default is false |
[in] | facets | indices of facets where to evaluate the slope variance |
Definition at line 4350 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
[in] | pos | position where to evaluate the partial |
e | edge index |
Definition at line 2125 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
[in] | pos | position where to evaluate the partial |
[in] | f | facet index |
Definition at line 2157 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
Zf |
Definition at line 235 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Return the connectivity table associated with vector Be
e | edge index |
Definition at line 1705 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Return the partial derivative of the body-fixed acceleration at the center of facet f relative to the shape coordinates
[in] | f | facet index |
[in] | hold_mass_constant | if 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 1185 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Definition at line 1272 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
[in] | f | facet index |
[in] | hold_mass_constant | if 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 1171 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Return the partial derivative of the edge length le with respect to the coordinates of the edges points
e | edge index |
Definition at line 354 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Return the partial derivative of the Ee dyad parametrization with respect to the coordinates of the edges points and adjacent facets points
e | edge index |
Definition at line 429 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
e | edge index |
q | row index |
r | col index |
Definition at line 374 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Return the partial derivative of the f-th facet dyad parametrization with respect to the normalized normal of the f-th facet
nf | facet normal |
Definition at line 272 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Return the partial derivative of the facet dyad parametrization (Ff) with respect to the vertices coordinates constitutive of the f-th triangle (Tf)
[in] | f | facet index |
Definition at line 252 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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)
[in] | pos | position where to evaluate the partial |
e | edge index |
Definition at line 294 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Return the partial derivative of a normalized vector n relative to the non-normalized vector N such that n = N / || N ||
non_normalized_V | non-normalized vector used to produce the normalized vector |
Definition at line 264 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
Definition at line 1234 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Return the partial derivative of the performance factor omega_f with respect to the vertices coordiantes constitutive of the f-th triangle (Tf)
[in] | pos | position where to evaluate the partial |
[in] | f | facet index |
Definition at line 159 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Return the partial derivative of arctan(y/x)
xy | input |
|
protected |
Get partial derivative of the angular velocity vector relative to 1) the angular velocity magnitude 2) the shape vertices coordinates
Definition at line 1145 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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)
Definition at line 141 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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)
Definition at line 148 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
[in] | f | facet index |
body_fixed_acc | body-fixed acceleration at the center of facet f | |
[in] | hold_mass_constant | if 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 1251 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Return the partial derivative of the slope s == arcos(-u) relative to the slope argument u
u | input parameter |
partial | derivative of slope with respect to u |
Definition at line 1207 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
[in] | pos | position where to evaluate the partial |
e | edge index |
Definition at line 62 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
[in] | pos | position where to evaluate the partial |
[in] | f | facet index |
Definition at line 88 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
[in] | pos | position where to evaluate the partial |
e | edge index |
Definition at line 336 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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)
[in] | pos | position where to evaluate the partial |
[in] | f | facet index |
Definition at line 117 of file SBGATPolyhedronGravityModelUQ.cpp.
|
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
UnitRf | 3 unit vectors stacked up |
Definition at line 210 of file SBGATPolyhedronGravityModelUQ.cpp.
|
static |
Runs a Monte Carlo on the shape and samples accelerations at the provided positions
[in] | path_to_shape | path to reference shape |
[in] | density | small body density in kg/m^3 |
[in] | shape_in_meters | true if reference shape has its units expressed in meters, false otherwise |
[in] | hold_mass_constant | true if shape mass must be held constant by making density vary (mass = rho * V), false otherwise |
[in] | C_CC | square 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_samples | number of shape outcomes to draw |
[in] | all_positions | vector storing all the position where acceleration & potential must be sampled |
[in] | output_dir | path ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0 |
[in] | N_saved_shapes | number of shape outcomes to save. must be lesser or equal than N_samples |
[out] | deviations | holds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample |
[out] | densities | holds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint |
[out] | all_accelerations | holds N_samples vectors, each storing the acceleration evaluated at the specified points |
Definition at line 3607 of file SBGATPolyhedronGravityModelUQ.cpp.
|
static |
Runs a Monte Carlo on the shape and samples inertial accelerations at the provided position
[in] | path_to_shape | path to reference shape |
[in] | density | small body density in kg/m^3 |
[in] | shape_in_meters | true if reference shape has its units expressed in meters, false otherwise |
[in] | hold_mass_constant | true if shape mass must be held constant by making density vary (mass = rho * V), false otherwise |
[in] | C_CC | square 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_samples | number of shape outcomes to draw |
[in] | position | the position where acceleration & potential must be sampled |
[in] | output_dir | path ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0 |
[in] | N_saved_shapes | number of shape outcomes to save. must be lesser or equal than N_samples |
[out] | deviations | holds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample |
[out] | densities | holds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint |
[out] | accelerations | holds N_samples accelerations evaluated at the specified point |
Definition at line 3388 of file SBGATPolyhedronGravityModelUQ.cpp.
|
static |
Runs a Monte Carlo on the shape and samples accelerations & potentials at the provided positions
[in] | path_to_shape | path to reference shape |
[in] | density | small body density in kg/m^3 |
[in] | shape_in_meters | true if reference shape has its units expressed in meters, false otherwise |
[in] | hold_mass_constant | true if shape mass must be held constant by making density vary (mass = rho * V), false otherwise |
[in] | C_CC | square 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_samples | number of shape outcomes to draw |
[in] | all_positions | vector storing all the position where acceleration & potential must be sampled |
[in] | output_dir | path ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0 |
[in] | N_saved_shapes | number of shape outcomes to save. must be lesser or equal than N_samples |
[out] | deviations | holds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample |
[out] | densities | holds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint |
[out] | all_accelerations | holds N_samples vectors, each storing the acceleration evaluated at the specified points |
[out] | all_potentials | holds N_samples vectors, each storing the potential evaluated at the specified points |
Definition at line 3488 of file SBGATPolyhedronGravityModelUQ.cpp.
|
static |
Runs a Monte Carlo on the shape and samples inertial accelerations & potentials at the provided position
[in] | path_to_shape | path to reference shape |
[in] | density | small body density in kg/m^3 |
[in] | shape_in_meters | true if reference shape has its units expressed in meters, false otherwise |
[in] | hold_mass_constant | true if shape mass must be held constant by making density vary (mass = rho * V), false otherwise |
[in] | C_CC | square 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_samples | number of shape outcomes to draw |
[in] | position | the position where acceleration & potential must be sampled |
[in] | output_dir | path ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0 |
[in] | N_saved_shapes | number of shape outcomes to save. must be lesser or equal than N_samples |
[out] | deviations | holds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample |
[out] | densities | holds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint |
[out] | accelerations | holds N_samples accelerations evaluated at the specified point |
[out] | potentials | holds N_samples potential evaluated at the specified point |
Definition at line 3341 of file SBGATPolyhedronGravityModelUQ.cpp.
|
static |
Runs a Monte Carlo on the shape and samples the slopes at the provided facets
[in] | path_to_shape | path to reference shape |
[in] | density | small body density in kg/m^3 |
[in] | Omega | angular velocity of small body in kg/m^3, expressed in the small body frame |
[in] | shape_in_meters | true if reference shape has its units expressed in meters, false otherwise |
[in] | hold_mass_constant | true if shape mass must be held constant by making density vary (mass = rho * V), false otherwise |
[in] | C_CC | square 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_deviation | standard deviation of the rotation period in seconds |
[in] | N_samples | number of shape outcomes to draw |
[in] | all_facets | vector storing all the facet indices where the gravitational slopes must be sampled |
[in] | output_dir | path ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0 |
[in] | N_saved_shapes | number of shape outcomes to save. must be lesser or equal than N_samples |
[out] | deviations | holds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample |
[out] | densities | holds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint |
[out] | period_errors | holds N_samples of the error on the rotation period |
[out] | all_slopes | holds N_samples vectors, each storing the slopes evaluated at the specified facets |
Definition at line 3720 of file SBGATPolyhedronGravityModelUQ.cpp.
|
static |
Runs a Monte Carlo on the shape and samples the gravitational slopes at the provided facets
[in] | path_to_shape | path to reference shape |
[in] | density | small body density in kg/m^3 |
[in] | Omega | angular velocity of small body in kg/m^3, expressed in the small body frame |
[in] | shape_in_meters | true if reference shape has its units expressed in meters, false otherwise |
[in] | hold_mass_constant | true if shape mass must be held constant by making density vary (mass = rho * V), false otherwise |
[in] | C_CC | square 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_deviation | standard deviation of the rotation period in seconds |
[in] | N_samples | number of shape outcomes to draw |
[in] | facet | index of the facet where the surface pgm must be sampled |
[in] | output_dir | path ending in "/" where to save shape-related monte-carlo data. Only used if last argument is larger than 0 |
[in] | N_saved_shapes | number of shape outcomes to save. must be lesser or equal than N_samples |
[out] | deviations | holds N_samples 3*N_C column vectors storing the deviation applied to the coordinates of the reference shape at every sample |
[out] | densities | holds N_samples density samples. If hold_mass_constant is true, then the density samples will vary accordingly to the constant mass constraint |
[out] | period_errors | holds N_samples of the error on the rotation period |
[out] | slopes | holds N_samples slopes evaluated at the specified facet |
Definition at line 3429 of file SBGATPolyhedronGravityModelUQ.cpp.
|
inline |
Sets the standard deviation of the rotation period
standard | deviation of the rotation period (s) |
Definition at line 263 of file SBGATPolyhedronGravityModelUQ.hpp.
|
staticprotected |
Definition at line 2294 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2395 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2192 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2499 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2788 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2853 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 3882 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2602 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2692 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1921 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 3120 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 3967 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 4047 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1562 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
|
staticprotected |
|
staticprotected |
Definition at line 1629 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1392 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1441 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1071 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1495 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1323 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1285 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 961 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 4161 of file SBGATPolyhedronGravityModelUQ.cpp.
|
static |
Runs a finite-differencing based test of the implemented PGM partials
input | path to obj file used to test the partials |
tol | relative tolerance |
Definition at line 446 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 4248 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 565 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 3024 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 676 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 3244 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 488 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 769 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 2930 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 854 of file SBGATPolyhedronGravityModelUQ.cpp.
|
staticprotected |
Definition at line 1957 of file SBGATPolyhedronGravityModelUQ.cpp.
|
protected |
Definition at line 762 of file SBGATPolyhedronGravityModelUQ.hpp.