21 #define BOOST_TEST_DYN_LINK 22 #define BOOST_TEST_MODULE MAST_TESTS 23 #include <boost/test/unit_test.hpp> 34 #include "libmesh/libmesh.h" 48 new libMesh::LibMeshInit(boost::unit_test::framework::master_test_suite().argc,
49 boost::unit_test::framework::master_test_suite().argv);
60 #if BOOST_VERSION > 106100 87 eig_vals_from_vec = RealVectorX::Zero(this->_dim+2),
88 eig_vals = RealVectorX::Zero(this->_dim+2);
91 tmp = RealMatrixX::Zero(this->_dim+2, this->_dim+2),
92 jac = RealMatrixX::Zero(this->_dim+2, this->_dim+2),
93 l_eig_mat = RealMatrixX::Zero(this->_dim+2, this->_dim+2),
94 l_eig_mat_inv_tr = RealMatrixX::Zero(this->_dim+2, this->_dim+2);
96 std::vector<RealMatrixX>
99 this->init_primitive_sol(p_sol);
101 for (
unsigned int i=0; i<this->_dim; i++) {
103 jacx[i] = RealMatrixX::Zero(this->_dim+2, this->_dim+2);
104 this->_fluid_elem->calculate_advection_flux_jacobian(i, p_sol, jacx[i]);
107 for (
unsigned int i=0; i<this->_dim; i++) {
114 l_eig_mat_inv_tr.setZero();
118 for (
unsigned int j=0 ; j<this->_dim; j++) {
119 jac += nvec(j) * jacx[j];
122 this->_fluid_elem->calculate_advection_left_eigenvector_and_inverse_for_normal
123 (p_sol, nvec, eig_vals, l_eig_mat, l_eig_mat_inv_tr);
126 tmp = l_eig_mat.transpose() * jac * l_eig_mat_inv_tr;
130 for (
unsigned int j=0; j<l_eig_mat_inv_tr.cols(); j++)
131 l_eig_mat_inv_tr.col(j) *= eig_vals(j);
132 tmp = l_eig_mat_inv_tr * l_eig_mat.transpose();
137 BOOST_AUTO_TEST_SUITE_END()
Class defines the conversion and some basic operations on primitive fluid variables used in calculati...
bool compare_vector(const RealVectorX &v0, const RealVectorX &v, const Real tol)
BOOST_FIXTURE_TEST_SUITE(PanelSmallDisturbanceFrequencyDomain2D, MAST::PanelInviscidSmallDisturbanceFrequencyDomain2DAnalysis) BOOST_AUTO_TEST_CASE(FreqDomainSensitivityWrtOmega)
bool compare_matrix(const RealMatrixX &m0, const RealMatrixX &m, const Real tol)
BOOST_GLOBAL_FIXTURE(GlobalTestFixture)
Matrix< Real, Dynamic, Dynamic > RealMatrixX
libMesh::LibMeshInit * _libmesh_init
Matrix< Real, Dynamic, 1 > RealVectorX
BOOST_AUTO_TEST_CASE(Eigenvectors)