32 #include "libmesh/numeric_vector.h" 33 #include "libmesh/system.h" 34 #include "libmesh/dof_map.h" 60 init(
const libMesh::NumericVector<Real>& steady_sol,
61 const libMesh::NumericVector<Real>* small_dist_sol) {
67 _sol.reset(libMesh::NumericVector<Real>::build(sys.comm()).release());
68 _sol->init(steady_sol.size(),
true, libMesh::SERIAL);
71 steady_sol.localize(*
_sol);
75 _sol_function.reset(
new libMesh::MeshFunction(sys.get_equation_systems(),
85 _dsol.reset(libMesh::NumericVector<Real>::build(sys.comm()).release());
86 _dsol->init(steady_sol.size(),
true, libMesh::SERIAL);
88 small_dist_sol->localize(*
_dsol);
90 _dsol_function.reset(
new libMesh::MeshFunction(sys.get_equation_systems(),
129 (*_sol_function)(p, 0., v);
136 p_sol.
init(dynamic_cast<MAST::ConservativeFluidSystemInitialization&>(
_system).dim(),
156 Real &dpress)
const {
175 (*_dsol_function)(p, 0., v);
180 (*_sol_function)(p, 0., v);
188 p_sol.
init(dynamic_cast<MAST::ConservativeFluidSystemInitialization&>(
_system).dim(),
193 delta_p_sol.
init(p_sol,
200 dpress = delta_p_sol.
dp;
std::unique_ptr< libMesh::MeshFunction > _sol_function
mesh function that interpolates the solution
PressureFunction(MAST::SystemInitialization &sys, MAST::FlightCondition &flt)
const std::vector< unsigned int > vars() const
MAST::NonlinearSystem & system()
Class defines basic operations and calculation of the small disturbance primitive variables...
void init(const libMesh::NumericVector< Real > &steady_sol, const libMesh::NumericVector< Real > *small_dist_sol=nullptr)
initiate the mesh function for this solution
This class implements a system for solution of nonlinear systems.
Real _ref_pressure
the function will return pressure differential with respect to reference pressue defined in the fligh...
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)
MAST::FlightCondition & _flt_cond
flight condition
virtual void operator()(const libMesh::Point &p, const Real t, Real &press) const
provides the value of the pressure at the specified point and time
Real c_pressure(const Real p0, const Real q0) const
std::unique_ptr< libMesh::NumericVector< Real > > _sol
steady part of solution
libMesh::DenseVector< Real > DenseRealVector
virtual void perturbation(const libMesh::Point &p, const Real t, Real &dpress) const
provides the pressure perturbation.
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.
void copy(DenseRealMatrix &m1, const RealMatrixX &m2)
Matrix< Real, Dynamic, 1 > RealVectorX
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::NumericVector< Real > > _dsol
small-disturbance solution
GasProperty gas_property
Ambient air properties.
std::unique_ptr< libMesh::MeshFunction > _dsol_function
virtual ~PressureFunction()
MAST::SystemInitialization & _system
system associated with the mesh and solution vector
bool _if_cp
the function will return cp instead of pressure if this option is true.