iterative-solver 0.0
 
Loading...
Searching...
No Matches
molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT > Class Template Referenceabstract

Full subspace. More...

#include <IXSpace.h>

Detailed Description

template<class RT, class QT, class PT>
class molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >

Full subspace.

Public Types

using R = RT
 
using Q = QT
 
using P = PT
 
using value_type = typename array::ArrayHandler< R, R >::value_type
 
using value_type_abs = typename array::ArrayHandler< R, R >::value_type_abs
 

Public Member Functions

 IXSpace ()=default
 
virtual ~IXSpace ()=default
 
size_t size () const
 Number of vectors forming the subspace.
 
virtual void erase (size_t i)=0
 Removes parameter i from the full subspace.
 
virtual void eraseq (size_t i)=0
 Removes parameter i from Q subspace.
 
virtual void erasep (size_t i)=0
 Removes parameter i from P subspace.
 
virtual void erased (size_t i)=0
 Removes parameter i from D subspace.
 
virtual void update_pspace (const CVecRef< P > &params, const array::Span< value_type > &pp_action_matrix, const array::Span< value_type > &pp_metric_matrix={})=0
 Adds parameters to the P space.
 
virtual void set_metric (MetricKind kind, MetricStorage storage=MetricStorage::Stored)=0
 Declares the metric of the subspace. Anything other than MetricKind::Identity creates the metric matrix EqnData::M. Only possible while the subspace is empty, unless it does not change anything.
 
virtual MetricKind metric_kind () const =0
 The kind of metric declared with set_metric()
 
virtual MetricStorage metric_storage () const =0
 How the actions of the metric declared with set_metric() are obtained.
 
bool stores_metric_actions () const
 Whether the actions of the metric on the Q and D vectors are kept.
 
virtual void update_qspace (const CVecRef< R > &params, const CVecRef< R > &actions, const CVecRef< R > &metric_actions={})=0
 Adds parameters to the Q space.
 
virtual void update_dspace (VecRef< Q > &params, VecRef< Q > &actions, const VecRef< Q > &metric_actions={}, const std::vector< size_t > &q_delete={}, const Matrix< value_type > &coefficients={})=0
 Replaces the old D space and the Q vectors q_delete by new D vectors, which are linear combinations of them.
 
virtual VecRef< P > paramsp ()=0
 
virtual VecRef< Q > paramsq ()=0
 
virtual VecRef< Q > actionsq ()=0
 
virtual VecRef< Q > paramsd ()=0
 
virtual VecRef< Q > actionsd ()=0
 
virtual CVecRef< P > paramsp () const =0
 
virtual CVecRef< Q > paramsq () const =0
 
virtual CVecRef< Q > actionsq () const =0
 
virtual CVecRef< Q > paramsd () const =0
 
virtual CVecRef< Q > actionsd () const =0
 
virtual CVecRef< P > cparamsp () const =0
 
virtual CVecRef< Q > cparamsq () const =0
 
virtual CVecRef< Q > cactionsq () const =0
 
virtual CVecRef< Q > cparamsd () const =0
 
virtual CVecRef< Q > cactionsd () const =0
 
virtual CVecRef< Q > cmetric_actionsq () const =0
 Actions of the metric on the Q space parameters, empty unless there is a metric.
 
virtual CVecRef< Q > cmetric_actionsd () const =0
 Actions of the metric on the D space parameters, empty unless there is a metric.
 
virtual const Dimensions & dimensions () const =0
 
virtual void set_logger (std::shared_ptr< Logger > logger)=0
 

Public Attributes

SubspaceData< value_type > data
 Equation data in the subspace.
 

Member Typedef Documentation

◆ P

◆ Q

◆ R

◆ value_type

◆ value_type_abs

template<class RT , class QT , class PT >
using molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::value_type_abs = typename array::ArrayHandler<R, R>::value_type_abs

Constructor & Destructor Documentation

◆ IXSpace()

template<class RT , class QT , class PT >
molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::IXSpace ( )
default

◆ ~IXSpace()

Member Function Documentation

◆ actionsd() [1/2]

◆ actionsd() [2/2]

◆ actionsq() [1/2]

◆ actionsq() [2/2]

◆ cactionsd()

◆ cactionsq()

◆ cmetric_actionsd()

template<class RT , class QT , class PT >
virtual CVecRef< Q > molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::cmetric_actionsd ( ) const
pure virtual

Actions of the metric on the D space parameters, empty unless there is a metric.

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ cmetric_actionsq()

template<class RT , class QT , class PT >
virtual CVecRef< Q > molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::cmetric_actionsq ( ) const
pure virtual

Actions of the metric on the Q space parameters, empty unless there is a metric.

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ cparamsd()

◆ cparamsp()

◆ cparamsq()

◆ dimensions()

◆ erase()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::erase ( size_t  i)
pure virtual

Removes parameter i from the full subspace.

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ erased()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::erased ( size_t  i)
pure virtual

Removes parameter i from D subspace.

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ erasep()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::erasep ( size_t  i)
pure virtual

Removes parameter i from P subspace.

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ eraseq()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::eraseq ( size_t  i)
pure virtual

Removes parameter i from Q subspace.

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ metric_kind()

template<class RT , class QT , class PT >
virtual MetricKind molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::metric_kind ( ) const
pure virtual

The kind of metric declared with set_metric()

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ metric_storage()

template<class RT , class QT , class PT >
virtual MetricStorage molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::metric_storage ( ) const
pure virtual

How the actions of the metric declared with set_metric() are obtained.

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ paramsd() [1/2]

◆ paramsd() [2/2]

◆ paramsp() [1/2]

◆ paramsp() [2/2]

◆ paramsq() [1/2]

◆ paramsq() [2/2]

◆ set_logger()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::set_logger ( std::shared_ptr< Logger >  logger)
pure virtual

◆ set_metric()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::set_metric ( MetricKind  kind,
MetricStorage  storage = MetricStorage::Stored 
)
pure virtual

Declares the metric of the subspace. Anything other than MetricKind::Identity creates the metric matrix EqnData::M. Only possible while the subspace is empty, unless it does not change anything.

Parameters
kindthe kind of metric
storagewhether the actions of the metric on the Q and D vectors are kept

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ size()

template<class RT , class QT , class PT >
size_t molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::size ( ) const
inline

Number of vectors forming the subspace.

◆ stores_metric_actions()

template<class RT , class QT , class PT >
bool molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::stores_metric_actions ( ) const
inline

Whether the actions of the metric on the Q and D vectors are kept.

◆ update_dspace()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::update_dspace ( VecRef< Q > &  params,
VecRef< Q > &  actions,
const VecRef< Q > &  metric_actions = {},
const std::vector< size_t > &  q_delete = {},
const Matrix< value_type > &  coefficients = {} 
)
pure virtual

Replaces the old D space and the Q vectors q_delete by new D vectors, which are linear combinations of them.

Parameters
paramsthe new D vectors
actionstheir actions
metric_actionstheir actions of the metric, given exactly if they are stored
q_deleteindices of the Q vectors to delete
coefficientsif there is a metric and there are new D vectors, the coefficients of the new D vectors (rows) in the deleted Q vectors (in the order of q_delete) followed by the old D vectors, from which their metric matrix elements are obtained without operations on vectors

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ update_pspace()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::update_pspace ( const CVecRef< P > &  params,
const array::Span< value_type > &  pp_action_matrix,
const array::Span< value_type > &  pp_metric_matrix = {} 
)
pure virtual

Adds parameters to the P space.

Parameters
paramsthe P space vectors
pp_action_matrixthe kernel matrix in the P space
pp_metric_matrixthe metric matrix in the P space, given exactly if there is a metric

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

◆ update_qspace()

template<class RT , class QT , class PT >
virtual void molpro::linalg::itsolv::subspace::IXSpace< RT, QT, PT >::update_qspace ( const CVecRef< R > &  params,
const CVecRef< R > &  actions,
const CVecRef< R > &  metric_actions = {} 
)
pure virtual

Adds parameters to the Q space.

Parameters
paramsnew parameters
actionstheir actions
metric_actionstheir actions of the metric, given exactly if there is a metric

Implemented in molpro::linalg::itsolv::subspace::XSpace< R, Q, P >.

Member Data Documentation

◆ data

Equation data in the subspace.