Logo  0.95.0-final
Finite Element Embedded Library and Language in C++
Feel++ Feel++ on Github Feel++ community
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ConvectionCrb Class Reference

#include <convection_crb.hpp>

Detailed Description

The class derives from the Application class the template arguments are :

Template Parameters
Order_svelocity polynomial order
Order_ttemperature polynomial order
Order_ppressure polynomial order

Inherits Feel::ModelCrbBase< ParameterDefinition, FunctionSpaceDefinition, EimDefinition >.

Public Types

typedef boost::tuple
< std::vector< std::vector
< sparse_matrix_ptrtype >
>, std::vector< std::vector
< std::vector< vector_ptrtype > > > > 
affine_decomposition_type
 
typedef boost::shared_ptr
< backend_type
backend_ptrtype
 
typedef Backend< double > backend_type
 
typedef Lagrange< Order_p,
Scalar, Continuous,
PointSetFekete
basis_p_type
 
typedef Lagrange< Order_t,
Scalar, Continuous,
PointSetFekete
basis_t_type
 
typedef bases< basis_u_type,
basis_p_type, basis_t_type > 
basis_type
 
typedef Lagrange< Order_s,
Vectorial, Continuous,
PointSetFekete
basis_u_type
 
typedef std::vector
< std::vector< double > > 
beta_vector_type
 
typedef boost::shared_ptr
< eigen_matrix_type > 
eigen_matrix_ptrtype
 
typedef Eigen::Matrix< double,
Eigen::Dynamic, Eigen::Dynamic > 
eigen_matrix_type
 
typedef
element_type::sub_element
< 0 >::type 
element_0_type
 
typedef
element_type::sub_element
< 1 >::type 
element_1_type
 
typedef
element_type::sub_element
< 2 >::type 
element_2_type
 
typedef boost::shared_ptr
< element_type > 
element_ptrtype
 
typedef space_type::element_type element_type
 
typedef eigen_matrix_type ematrix_type
 
typedef Simplex< CONVECTION_DIM > entity_type
 
typedef Exporter< mesh_typeexport_type
 
typedef space_ptrtype functionspace_ptrtype
 
typedef space_type functionspace_type
 
typedef boost::shared_ptr
< funlin_type > 
funlin_ptrtype
 
typedef FsFunctionalLinear
< space_type
funlin_type
 
typedef super_type::funs_type funs_type
 
typedef super_type::funsd_type funsd_type
 
typedef Eigen::MatrixXd matrixN_type
 
typedef boost::shared_ptr
< mesh_type
mesh_ptrtype
 
typedef Mesh< entity_typemesh_type
 
typedef boost::shared_ptr
< oplin_type
oplin_ptrtype
 
typedef OperatorLinear
< space_type, space_type
oplin_type
 
typedef
parameterspace_type::element_ptrtype 
parameter_ptrtype
 
typedef
parameterspace_type::element_type 
parameter_type
 
typedef boost::shared_ptr
< parameterspace_type
parameterspace_ptrtype
 
typedef ParameterSpace
< ParameterSpaceDimension > 
parameterspace_type
 
typedef
parameterspace_type::sampling_ptrtype 
sampling_ptrtype
 
typedef
parameterspace_type::sampling_type 
sampling_type
 
typedef ConvectionCrb self_type
 
typedef boost::shared_ptr
< space_type
space_ptrtype
 
typedef FunctionSpace
< mesh_type, basis_type > 
space_type
 
typedef
backend_type::sparse_matrix_ptrtype 
sparse_matrix_ptrtype
 
typedef
backend_type::sparse_matrix_type 
sparse_matrix_type
 
typedef ModelCrbBase
< ParameterDefinition,
FunctionSpaceDefinition > 
super_type
 
typedef boost::shared_ptr
< T_space_type
T_space_ptrtype
 
typedef FunctionSpace
< mesh_type, basis_t_type > 
T_space_type
 
typedef boost::shared_ptr
< U_space_type
U_space_ptrtype
 
typedef FunctionSpace
< mesh_type, basis_u_type > 
U_space_type
 
typedef double value_type
 numerical type is double
 
typedef
backend_type::vector_ptrtype 
vector_ptrtype
 
typedef backend_type::vector_type vector_type
 
- Public Types inherited from Feel::ModelCrbBase< ParameterDefinition, FunctionSpaceDefinition, EimDefinition >
typedef std::vector
< std::vector< double > > 
beta_vector_type
 
typedef boost::shared_ptr
< fun_type > 
fun_ptrtype
 
typedef EimDefinition::fun_type fun_type
 
typedef boost::shared_ptr
< functional_type > 
functional_ptrtype
 
typedef FsFunctionalLinear
< space_type
functional_type
 
typedef boost::shared_ptr
< functionalcomposite_type > 
functionalcomposite_ptrtype
 
typedef
FsFunctionalLinearComposite
< space_type
functionalcomposite_type
 
typedef boost::shared_ptr
< fund_type > 
fund_ptrtype
 
typedef EimDefinition::fund_type fund_type
 
typedef std::vector< fun_ptrtype > funs_type
 
typedef std::vector< fund_ptrtype > funsd_type
 
typedef boost::shared_ptr
< operator_type
operator_ptrtype
 
typedef OperatorLinear
< space_type, space_type
operator_type
 
typedef boost::shared_ptr
< operatorcomposite_type > 
operatorcomposite_ptrtype
 
typedef
OperatorLinearComposite
< space_type, space_type
operatorcomposite_type
 
typedef
parameterspace_type::element_type 
parameter_type
 
typedef
ParameterDefinition::parameterspace_type 
parameterspace_type
 
typedef
FunctionSpaceDefinition::space_type 
space_type
 
typedef
backend_type::sparse_matrix_ptrtype 
sparse_matrix_ptrtype
 
typedef
backend_type::sparse_matrix_type 
sparse_matrix_type
 
typedef
backend_type::vector_ptrtype 
vector_ptrtype
 
typedef backend_type::vector_type vector_type
 
typedef Eigen::VectorXd vectorN_type
 

Public Member Functions

affine_decomposition_type computeAffineDecomposition ()
 
boost::tuple< beta_vector_type,
std::vector< beta_vector_type > > 
computeBetaQm (parameter_type const &mu, double time=0)
 compute the beta coefficient for both bilinear and linear form More...
 
boost::tuple< beta_vector_type,
std::vector< beta_vector_type > > 
computeBetaQm (element_type const &T, parameter_type const &mu, double time=0)
 
sparse_matrix_ptrtype computeTrilinearForm (const element_type &X)
 
 ConvectionCrb (po::variables_map const &vm)
 
Feel::gmsh_ptrtype createMesh ()
 
void exportResults (element_type &u)
 
void exportResults (element_ptrtype &U, int t)
 
void exportResults (element_type &U, double t)
 
space_ptrtype functionSpace ()
 
void initModel ()
 
sparse_matrix_ptrtype innerProduct ()
 
sparse_matrix_ptrtype jacobian (const element_type &X)
 
void l2solve (vector_ptrtype &u, vector_ptrtype const &f)
 
int mMaxA (int q)
 
int mMaxF (int output_index, int q)
 
std::string modelName ()
 
sparse_matrix_ptrtype newMatrix () const
 
vector_ptrtype newVector () const
 
int Nl () const
 
po::options_description const & optionsDescription () const
 
value_type output (int output_index, parameter_type const &mu, element_type &unknown, bool need_to_solve=false)
 
parameterspace_ptrtype parameterSpace () const
 return the parameter space
 
int Qa () const
 
int QaTri () const
 
int Ql (int l) const
 
parameter_type refParameter ()
 
vector_ptrtype residual (const element_type &X)
 
void run (const double *X, unsigned long N, double *Y, unsigned long P)
 
double scalarProduct (vector_ptrtype const &X, vector_ptrtype const &Y)
 
double scalarProduct (vector_type const &x, vector_type const &y)
 
void setMeshSize (double s)
 
void solve (sparse_matrix_ptrtype &D, element_type &u, vector_ptrtype &F)
 
void solve (parameter_type const &mu, element_ptrtype &T)
 solve the model for parameter mu More...
 
element_type solve (parameter_type const &mu)
 
void update (parameter_type const &mu)
 
void updateJacobian (const vector_ptrtype &X, sparse_matrix_ptrtype &J)
 
void updateJacobianWithoutAffineDecomposition (const vector_ptrtype &X, sparse_matrix_ptrtype &J)
 
void updateResidual (const vector_ptrtype &X, vector_ptrtype &R)
 
po::variables_map const & vm () const
 
- Public Member Functions inherited from Feel::ModelCrbBase< ParameterDefinition, FunctionSpaceDefinition, EimDefinition >
virtual beta_vector_type computeBetaInitialGuess (parameter_type const &mu)
 
vectorN_type computeStatistics (Eigen::VectorXd vector, std::string name)
 
virtual bool constructOperatorCompositeM ()
 
virtual std::vector
< functionalcomposite_ptrtype > 
functionalCompositeF ()
 
virtual void initModel ()=0
 
virtual sparse_matrix_ptrtype
const & 
innerProductForMassMatrix () const
 
virtual sparse_matrix_ptrtype innerProductForMassMatrix ()
 
bool isInitialized ()
 
virtual int mMaxInitialGuess (int q) const
 
virtual operatorcomposite_ptrtype operatorCompositeA ()
 
virtual operatorcomposite_ptrtype operatorCompositeM ()
 
virtual int QInitialGuess () const
 
virtual funs_type scalarContinuousEim () const
 
virtual funsd_type scalarDiscontinuousEim () const
 
virtual double scalarProductForMassMatrix (vector_ptrtype const &X, vector_ptrtype const &Y)
 
virtual double scalarProductForMassMatrix (vector_type const &x, vector_type const &y)
 
void setInitialized (const bool &b)
 

Static Public Attributes

static const bool is_time_dependent = false
 
static const uint16_type Order = 1
 
static const int Order_p = CONVECTION_ORDER_P
 
static const int Order_s = CONVECTION_ORDER_U
 
static const int Order_t = CONVECTION_ORDER_T
 
static const uint16_type ParameterSpaceDimension = 2
 

Additional Inherited Members

- Protected Attributes inherited from Feel::ModelCrbBase< ParameterDefinition, FunctionSpaceDefinition, EimDefinition >
sparse_matrix_ptrtype M
 
operatorcomposite_ptrtype M_compositeA
 
std::vector
< functionalcomposite_ptrtype > 
M_compositeF
 
operatorcomposite_ptrtype M_compositeM
 
funs_type M_funs
 
funsd_type M_funs_d
 
bool M_is_initialized
 

Member Function Documentation

boost::tuple< beta_vector_type, std::vector< beta_vector_type > > ConvectionCrb::computeBetaQm ( parameter_type const &  mu,
double  time = 0 
)

compute the beta coefficient for both bilinear and linear form

Parameters
muparameter to evaluate the coefficients

References Feel::elements(), Feel::integrate(), Nl(), and Ql().

void ConvectionCrb::exportResults ( element_type &  u)

export results to ensight format (enabled by –export cmd line options)

void ConvectionCrb::l2solve ( vector_ptrtype &  u,
vector_ptrtype const &  f 
)

solve $ M u = f $

int ConvectionCrb::Nl ( ) const

there is at least one output which is the right hand side of the primal problem

Returns
number of outputs associated to the model
double ConvectionCrb::output ( int  output_index,
parameter_type const &  mu,
element_type &  unknown,
bool  need_to_solve = false 
)

Given the output index output_index and the parameter mu, return the value of the corresponding FEM output

References Feel::elements(), Feel::integrate(), and Feel::markedfaces().

int ConvectionCrb::Ql ( int  l) const
Parameters
lthe index of output
Returns
number of terms in affine decomposition of the q th output term
void ConvectionCrb::run ( const double *  X,
unsigned long  N,
double *  Y,
unsigned long  P 
)

specific interface for OpenTURNS

Parameters
Xinput vector of size N
Nsize of input vector X
Yinput vector of size P
Psize of input vector Y
double ConvectionCrb::scalarProduct ( vector_ptrtype const &  X,
vector_ptrtype const &  Y 
)

returns the scalar product of the boost::shared_ptr vector x and boost::shared_ptr vector y

double ConvectionCrb::scalarProduct ( vector_type const &  x,
vector_type const &  y 
)

returns the scalar product of the vector x and vector y

void ConvectionCrb::solve ( parameter_type const &  mu,
element_ptrtype &  T 
)

solve the model for parameter mu

Parameters
muthe model parameter
Tthe temperature field

References computeBetaQm(), exportResults(), and vm().

ConvectionCrb::element_type ConvectionCrb::solve ( parameter_type const &  mu)

solve for a given parameter mu

po::variables_map const& ConvectionCrb::vm ( ) const
inline

get the variable map

Returns
the variable map

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

Generated on Fri Oct 25 2013 14:24:27 for Feel++ by doxygen 1.8.4