#include <crbmodeltrilinear.hpp>
Certified Reduced Basis Model trilinear class.
This class implements the requirements over a model to be usable by the certified reduced basis method.
ModelType | the type of the finite element method model |
The FEM model type should derive from this class and fill the vector of matrices M_Aq and vector of vectors M_Fq
Public Member Functions | |
bool | isSteady () |
bool | isSteady (mpl::bool_< true >) |
bool | isSteady (mpl::bool_< false >) |
model_type::funs_type | scalarContinuousEim () |
model_type::funsd_type | scalarDiscontinuousEim () |
Constructors, destructor | |
CRBModelTrilinear () | |
CRBModelTrilinear (po::variables_map const &vm, CRBModelMode mode=CRBModelMode::PFEM) | |
CRBModelTrilinear (model_ptrtype &model) | |
CRBModelTrilinear (CRBModelTrilinear const &o) | |
virtual | ~CRBModelTrilinear () |
destructor | |
FEELPP_DONT_INLINE void | init () |
initialize the model (mesh, function space, operators, matrices, ...) | |
Operator overloads | |
CRBModelTrilinear & | operator= (CRBModelTrilinear const &o) |
copy operator | |
Accessors | |
po::variables_map | vm () const |
virtual sparse_matrix_ptrtype | newMatrix () const |
virtual vector_ptrtype | newVector () const |
functionspace_ptrtype | functionSpace () const |
Returns the function space. | |
size_type | Qa () const |
return the number of ![]() | |
size_type | QaTri () const |
return the number of ![]() | |
sparse_matrix_ptrtype | computeTrilinearForm (element_type const &xi) |
sparse_matrix_ptrtype | jacobian (element_type const &xi) |
vector_ptrtype | residual (element_type const &xi) |
vectorN_type | computeStatistics (Eigen::VectorXd vector, std::string name) |
size_type | Nl () const |
return the number of outputs | |
size_type | Ql (int l) const |
return the number of ![]() | |
parameterspace_ptrtype | parameterSpace () const |
return the parameter space | |
parameter_type | refParameter () |
Mutators | |
void | setMeshSize (double s) |
Static Public Attributes | |
Constants | |
static const uint16_type | ParameterSpaceDimension = ModelType::ParameterSpaceDimension |
static const bool | is_time_dependent = ModelType::is_time_dependent |
Protected Attributes | |
std::vector< std::vector < sparse_matrix_ptrtype > > | M_Aqm |
affine decomposition terms for the left hand side ( bilinear ) | |
std::vector< std::vector < std::vector< vector_ptrtype > > > | M_Fqm |
affine decomposition terms for the right hand side | |
Typedefs | |
typedef ModelType | model_type |
model type | |
typedef boost::shared_ptr < ModelType > | model_ptrtype |
typedef model_type::value_type | value_type |
value_type | |
typedef ModelType::mesh_type | mesh_type |
mesh type | |
typedef ModelType::mesh_ptrtype | mesh_ptrtype |
mesh shared_ptr | |
typedef ModelType::space_type | space_type |
space_type | |
typedef model_type::functionspace_type | functionspace_type |
function space type | |
typedef model_type::functionspace_ptrtype | functionspace_ptrtype |
typedef model_type::element_type | element_type |
element of the functionspace type | |
typedef model_type::element_ptrtype | element_ptrtype |
typedef model_type::backend_type | backend_type |
typedef boost::shared_ptr < backend_type > | backend_ptrtype |
typedef model_type::sparse_matrix_ptrtype | sparse_matrix_ptrtype |
typedef model_type::vector_ptrtype | vector_ptrtype |
typedef model_type::vector_type | vector_type |
typedef model_type::eigen_matrix_type | eigen_matrix_type |
typedef model_type::parameterspace_type | parameterspace_type |
typedef model_type::parameterspace_ptrtype | parameterspace_ptrtype |
typedef model_type::parameter_type | parameter_type |
typedef model_type::parameter_ptrtype | parameter_ptrtype |
typedef model_type::sampling_type | sampling_type |
typedef model_type::sampling_ptrtype | sampling_ptrtype |
typedef Eigen::VectorXd | vectorN_type |
typedef std::vector < std::vector< double > > | beta_vector_type |
typedef boost::tuple < sparse_matrix_ptrtype, sparse_matrix_ptrtype, std::vector< vector_ptrtype > > | offline_merge_type |
typedef boost::tuple < std::vector< std::vector < sparse_matrix_ptrtype > >, std::vector< std::vector < sparse_matrix_ptrtype > >, std::vector< std::vector < std::vector< vector_ptrtype > > > > | affine_decomposition_type |
typedef boost::tuple < beta_vector_type, beta_vector_type, std::vector < beta_vector_type > > | betaqm_type |
typedef mpl::if_ < boost::is_same< mpl::int_ < nb_spaces >, mpl::int_ < 2 > >, fusion::vector < mpl::int_< 0 >, mpl::int_ < 1 > >, typename mpl::if_ < boost::is_same< mpl::int_ < nb_spaces >, mpl::int_ < 3 > >, fusion::vector < mpl::int_< 0 >, mpl::int_ < 1 >, mpl::int_ < 2 > >, typename mpl::if_ < boost::is_same< mpl::int_ < nb_spaces >, mpl::int_ < 4 > >, fusion::vector < mpl::int_< 0 >, mpl::int_ < 1 >, mpl::int_ < 2 >, mpl::int_ < 3 > >, fusion::vector < mpl::int_< 0 >, mpl::int_ < 1 >, mpl::int_ < 2 >, mpl::int_ < 3 >, mpl::int_ < 4 > > >::type >::type > ::type | index_vector_type |
static const int | nb_spaces = functionspace_type::nSpaces |
Methods | |
offline_merge_type | result_offline_merge_type |
betaqm_type | computeBetaQm (parameter_type const &mu, double time=0) |
compute the betaqm given mu | |
betaqm_type | computeBetaQm (parameter_type const &mu, mpl::bool_< true >, double time=0) |
betaqm_type | computeBetaQm (parameter_type const &mu, mpl::bool_< false >, double time=0) |
affine_decomposition_type | computeAffineDecomposition () |
Compute the affine decomposition of the various forms. More... | |
sparse_matrix_ptrtype | Aqm (uint16_type q, uint16_type m, bool transpose=false) const |
Returns the matrix Aq [q][m] of the affine decomposition of the bilinear form. More... | |
value_type | Aqm (uint16_type q, uint16_type m, element_type const &xi_i, element_type const &xi_j, bool transpose=false) |
the inner product ![]() | |
vector_ptrtype | Fqm (uint16_type l, uint16_type q, int m) const |
the vector Fq [q][m] of the affine decomposition of the right hand side More... | |
value_type | Fqm (uint16_type l, uint16_type q, uint16_type m, element_type const &xi) |
the inner product ![]() | |
value_type | Fqm (uint16_type l, uint16_type q, uint16_type m, element_ptrtype const &xi) |
the inner product ![]() | |
double | scalarProduct (vector_type const &X, vector_type const &Y) |
double | scalarProduct (vector_ptrtype const &X, vector_ptrtype const &Y) |
double | scalarProductForMassMatrix (vector_type const &X, vector_type const &Y) |
double | scalarProductForMassMatrix (vector_ptrtype const &X, vector_ptrtype const &Y) |
double | scalarProductForPod (vector_ptrtype const &X, vector_ptrtype const &Y) |
double | scalarProductForPod (vector_ptrtype const &X, vector_ptrtype const &Y, mpl::bool_< true >) |
double | scalarProductForPod (vector_ptrtype const &X, vector_ptrtype const &Y, mpl::bool_< false >) |
element_type | solve (parameter_type const &mu) |
void | l2solve (vector_ptrtype &u, vector_ptrtype const &f) |
void | run (const double *X, unsigned long N, double *Y, unsigned long P) |
value_type | output (int output_index, parameter_type const &mu, element_type &u, bool need_to_solve=false) |
double | timeStep () |
double | timeStep (mpl::bool_< true >) |
double | timeStep (mpl::bool_< false >) |
double | timeInitial () |
double | timeInitial (mpl::bool_< true >) |
double | timeInitial (mpl::bool_< false >) |
double | timeFinal () |
double | timeFinal (mpl::bool_< true >) |
double | timeFinal (mpl::bool_< false >) |
element_type | solveFemUsingAffineDecompositionFixedPoint (parameter_type const &mu) |
element_type | solveFemDualUsingAffineDecompositionFixedPoint (parameter_type const &mu) |
element_type | solveFemUsingOfflineEim (parameter_type const &mu) |
offline_merge_type | update (parameter_type const &mu, double time=0) |
sparse_matrix_ptrtype const & | innerProduct () const |
sparse_matrix_ptrtype const & | innerProductForMassMatrix () const |
sparse_matrix_ptrtype | Mqm (uint16_type q, uint16_type m, bool transpose=false) const |
value_type | Mqm (uint16_type q, uint16_type m, element_type const &xi_i, element_type const &xi_j, bool transpose=false) const |
size_type | Qm () const |
int | mMaxA (int q) |
int | mMaxM (int q) |
int | mMaxMF (int q) |
int | mMaxF (int output_index, int q) |
|
inline |
model | the model to be used |
References Feel::CRBModelTrilinear< ModelType >::init().
|
inline |
copy constructor
References Feel::CRBModelTrilinear< ModelType >::init().
|
inline |
Returns the matrix Aq
[q][m] of the affine decomposition of the bilinear form.
q | and m are index of the component in the affine decomposition |
transpose | transpose A_q |
Aq
[q][m] of the affine decomposition of the bilinear form References Feel::CRBModelTrilinear< ModelType >::M_Aqm.
|
inline |
the inner product
q | and m index of the component in the affine decomposition |
xi_i | an element of the function space |
xi_j | an element of the function space |
transpose | transpose A_{qm} |
References Feel::CRBModelTrilinear< ModelType >::M_Aqm.
|
inline |
Compute the affine decomposition of the various forms.
This function defined in the M_model
assembles the parameter independant part of the affine decomposition of the bilinear and linear forms.
References Feel::CRBModelTrilinear< ModelType >::M_Aqm, and Feel::CRBModelTrilinear< ModelType >::M_Fqm.
|
inline |
the vector Fq
[q][m] of the affine decomposition of the right hand side
References Feel::CRBModelTrilinear< ModelType >::M_Fqm.
|
inline |
the inner product
Denote the algebraic representation of the linear form associated with the right hand side.
q | and m index of the component in the affine decomposition |
xi | an element of the function space |
References Feel::inner_product(), and Feel::CRBModelTrilinear< ModelType >::M_Fqm.
|
inline |
the inner product
Denote the algebraic representation of the linear form associated with the right hand side.
q | and m index of the component in the affine decomposition |
xi | an element of the function space |
References Feel::inner_product(), and Feel::CRBModelTrilinear< ModelType >::M_Fqm.
|
inline |
solve where
is the matrix associated to the
norm
|
inlinevirtual |
create a new matrix
|
inlinevirtual |
create a new vector
|
inline |
Given the output index output_index
and the parameter mu
, return the value of the corresponding FEM output
void Feel::CRBModelTrilinear< TruthModelType >::run | ( | const double * | X, |
unsigned long | N, | ||
double * | Y, | ||
unsigned long | P | ||
) |
run the model
|
inline |
returns list of eim objects ( scalar continuous)
|
inline |
returns list of eim objects ( scalar discontinuous)
|
inline |
returns the scalar product of the vector x and vector y
|
inline |
returns the scalar product of the vector x and vector y
|
inline |
returns the scalar product used for the mass matrix of the vector x and vector y
|
inline |
returns the scalar product used for the mass matrix of the vector x and vector y
|
inline |
returns the scalar product used to assemble POD matrix of the vector x and vector y
|
inline |
set the mesh characteristic length to s
|
inline |
solve the model for a given parameter mu
|
inline |
variables_map