32 #include "libmesh/numeric_vector.h" 33 #include "libmesh/system.h" 34 #include "libmesh/dof_map.h" 59 init(
const libMesh::NumericVector<Real>& steady_sol,
60 const libMesh::NumericVector<Real>& small_dist_sol_real,
61 const libMesh::NumericVector<Real>& small_dist_sol_imag) {
67 _sol.reset(libMesh::NumericVector<Real>::build(sys.comm()).release());
68 _sol->init(steady_sol.size(),
true, libMesh::SERIAL);
71 _dsol_real.reset(libMesh::NumericVector<Real>::build(sys.comm()).release());
72 _dsol_real->init(steady_sol.size(),
true, libMesh::SERIAL);
75 _dsol_imag.reset(libMesh::NumericVector<Real>::build(sys.comm()).release());
76 _dsol_imag->init(steady_sol.size(),
true, libMesh::SERIAL);
80 steady_sol.localize(*
_sol);
86 _sol_function.reset(
new libMesh::MeshFunction(sys.get_equation_systems(),
135 (*_dsol_re_function)(p, 0., v);
141 (*_dsol_im_function)(p, 0., v);
147 (*_sol_function)(p, 0., v);
155 p_sol.
init(dynamic_cast<MAST::ConservativeFluidSystemInitialization&>(
_system).dim(),
160 delta_p_sol.
init(p_sol,
167 dpress = delta_p_sol.
dp;
virtual void operator()(const libMesh::Point &p, const Real t, Complex &dp) const
provides the complex pressure perturbation
MAST::SystemInitialization & _system
system associated with the mesh and solution vector
const std::vector< unsigned int > vars() const
MAST::NonlinearSystem & system()
Class defines basic operations and calculation of the small disturbance primitive variables...
This class implements a system for solution of nonlinear systems.
std::unique_ptr< libMesh::MeshFunction > _dsol_im_function
virtual ~FrequencyDomainPressureFunction()
Class defines the conversion and some basic operations on primitive fluid variables used in calculati...
void init(const MAST::PrimitiveSolution &sol, const typename VectorType< ValType >::return_type &delta_sol, bool if_viscous)
Matrix< Complex, Dynamic, 1 > ComplexVectorX
std::unique_ptr< libMesh::NumericVector< Real > > _sol
steady part of solution
std::unique_ptr< libMesh::MeshFunction > _sol_function
mesh function that interpolates the solution
libMesh::DenseVector< Real > DenseRealVector
FrequencyDomainPressureFunction(MAST::SystemInitialization &sys, MAST::FlightCondition &flt)
Real q0() const
returns the flight dynamic pressure
This creates the base class for functions that have a saptial and temporal dependence, and provide sensitivity operations with respect to the functions and parameters.
std::unique_ptr< libMesh::NumericVector< Real > > _dsol_imag
imag part of small-disturbance solution
void copy(DenseRealMatrix &m1, const RealMatrixX &m2)
Matrix< Real, Dynamic, 1 > RealVectorX
void init(const libMesh::NumericVector< Real > &steady_sol, const libMesh::NumericVector< Real > &small_dist_sol_real, const libMesh::NumericVector< Real > &small_dist_sol_imag)
initiate the mesh function for this solution
void init(const unsigned int dim, const RealVectorX &conservative_sol, const Real cp_val, const Real cv_val, bool if_viscous)
ValType c_pressure(const Real q0) const
std::unique_ptr< libMesh::MeshFunction > _dsol_re_function
GasProperty gas_property
Ambient air properties.
bool _if_cp
the function will return cp instead of pressure if this option is true.
std::unique_ptr< libMesh::NumericVector< Real > > _dsol_real
real part of small-disturbance solution
MAST::FlightCondition & _flt_cond
flight condition