OOPS
oops::CostJo< MODEL, OBS > Class Template Reference

Jo Cost Function. More...

#include <CostJo.h>

Inheritance diagram for oops::CostJo< MODEL, OBS >:
Collaboration diagram for oops::CostJo< MODEL, OBS >:

Public Member Functions

 CostJo (const eckit::Configuration &, const eckit::mpi::Comm &, const util::DateTime &, const util::DateTime &, const eckit::mpi::Comm &ctime=oops::mpi::myself())
 Construct \( J_o\) from \( R\) and \( y_{obs}\). More...
 
virtual ~CostJo ()
 Destructor. More...
 
void setPostProc (const CtrlVar_ &, const eckit::Configuration &, PostProc_ &) override
 Initialize \( J_o\) before starting the integration of the model. More...
 
double computeCost () override
 Finalize \( J_o\) after the integration of the model. More...
 
void setPostProcTraj (const CtrlVar_ &, const eckit::Configuration &, const Geometry_ &, PostProcTLAD_ &) override
 Initialize \( J_o\) for the trajectory run. More...
 
void computeCostTraj () override
 Finish cost computation and trajectory handling after nonlinear model integration. More...
 
void setPostProcTL (const CtrlInc_ &, PostProcTLAD_ &) const override
 Initialize \( J_o\) before starting the TL run. More...
 
void computeCostTL (const CtrlInc_ &, GeneralizedDepartures &) const override
 Finish cost computation after TL model integration. More...
 
void computeCostAD (std::shared_ptr< const GeneralizedDepartures >, CtrlInc_ &, PostProcTLAD_ &) const override
 Initialize \( J_o\) before starting the AD run. More...
 
void setPostProcAD () const override
 Adjoint ot setPostProcTL (clean-up) More...
 
std::unique_ptr< GeneralizedDeparturesmultiplyCovar (const GeneralizedDepartures &) const override
 Multiply by \( R\) and \( R^{-1}\). More...
 
std::unique_ptr< GeneralizedDeparturesmultiplyCoInv (const GeneralizedDepartures &) const override
 
std::unique_ptr< GeneralizedDeparturesnewDualVector () const override
 Provide new departure. More...
 
std::unique_ptr< GeneralizedDeparturesnewGradientFG () const override
 Return gradient at first guess ie \( R^{-1} {\cal H}(x^t ) - y\). More...
 
void resetLinearization () override
 Reset obs operator trajectory. More...
 
const ObsSpaces_obspaces () const
 Accessor... More...
 
- Public Member Functions inherited from oops::CostTermBase< MODEL, OBS >
virtual ~CostTermBase ()
 Destructor. More...
 

Private Types

typedef ControlVariable< MODEL, OBS > CtrlVar_
 
typedef ControlIncrement< MODEL, OBS > CtrlInc_
 
typedef Departures< OBS > Departures_
 
typedef Observations< OBS > Observations_
 
typedef Geometry< MODEL > Geometry_
 
typedef GetValuePosts< MODEL, OBS > GetValuePosts_
 
typedef State< MODEL > State_
 
typedef ObsErrors< OBS > ObsErrors_
 
typedef ObsSpaces< OBS > ObsSpaces_
 
typedef Observers< MODEL, OBS > Observers_
 
typedef ObserversTLAD< MODEL, OBS > ObserversTLAD_
 
typedef PostProcessor< State_PostProc_
 
typedef PostProcessorTLAD< MODEL > PostProcTLAD_
 

Private Attributes

const eckit::LocalConfiguration obsconf_
 
ObsSpaces_ obspaces_
 
std::unique_ptr< Observations_yobs_
 
ObsErrors_ Rmat_
 
Observers_ observers_
 
std::unique_ptr< Departures_gradFG_
 Jo Gradient at first guess : \( R^{-1} (H(x_{fg})-y_{obs}) \). More...
 
std::shared_ptr< ObserversTLAD_obstlad_
 Linearized observation operators. More...
 
std::unique_ptr< eckit::LocalConfiguration > currentConf_
 Configuration for current initialize/finalize pair. More...
 

Detailed Description

template<typename MODEL, typename OBS>
class oops::CostJo< MODEL, OBS >

Jo Cost Function.

The CostJo class encapsulates the Jo term of the cost function. The Observers to be called during the model integration is managed inside the CostJo class.

Definition at line 51 of file CostJo.h.

Member Typedef Documentation

◆ CtrlInc_

template<typename MODEL , typename OBS >
typedef ControlIncrement<MODEL, OBS> oops::CostJo< MODEL, OBS >::CtrlInc_
private

Definition at line 54 of file CostJo.h.

◆ CtrlVar_

template<typename MODEL , typename OBS >
typedef ControlVariable<MODEL, OBS> oops::CostJo< MODEL, OBS >::CtrlVar_
private

Definition at line 53 of file CostJo.h.

◆ Departures_

template<typename MODEL , typename OBS >
typedef Departures<OBS> oops::CostJo< MODEL, OBS >::Departures_
private

Definition at line 55 of file CostJo.h.

◆ Geometry_

template<typename MODEL , typename OBS >
typedef Geometry<MODEL> oops::CostJo< MODEL, OBS >::Geometry_
private

Definition at line 57 of file CostJo.h.

◆ GetValuePosts_

template<typename MODEL , typename OBS >
typedef GetValuePosts<MODEL, OBS> oops::CostJo< MODEL, OBS >::GetValuePosts_
private

Definition at line 58 of file CostJo.h.

◆ ObsErrors_

template<typename MODEL , typename OBS >
typedef ObsErrors<OBS> oops::CostJo< MODEL, OBS >::ObsErrors_
private

Definition at line 60 of file CostJo.h.

◆ Observations_

template<typename MODEL , typename OBS >
typedef Observations<OBS> oops::CostJo< MODEL, OBS >::Observations_
private

Definition at line 56 of file CostJo.h.

◆ Observers_

template<typename MODEL , typename OBS >
typedef Observers<MODEL, OBS> oops::CostJo< MODEL, OBS >::Observers_
private

Definition at line 62 of file CostJo.h.

◆ ObserversTLAD_

template<typename MODEL , typename OBS >
typedef ObserversTLAD<MODEL, OBS> oops::CostJo< MODEL, OBS >::ObserversTLAD_
private

Definition at line 63 of file CostJo.h.

◆ ObsSpaces_

template<typename MODEL , typename OBS >
typedef ObsSpaces<OBS> oops::CostJo< MODEL, OBS >::ObsSpaces_
private

Definition at line 61 of file CostJo.h.

◆ PostProc_

template<typename MODEL , typename OBS >
typedef PostProcessor<State_> oops::CostJo< MODEL, OBS >::PostProc_
private

Definition at line 64 of file CostJo.h.

◆ PostProcTLAD_

template<typename MODEL , typename OBS >
typedef PostProcessorTLAD<MODEL> oops::CostJo< MODEL, OBS >::PostProcTLAD_
private

Definition at line 65 of file CostJo.h.

◆ State_

template<typename MODEL , typename OBS >
typedef State<MODEL> oops::CostJo< MODEL, OBS >::State_
private

Definition at line 59 of file CostJo.h.

Constructor & Destructor Documentation

◆ CostJo()

template<typename MODEL , typename OBS >
oops::CostJo< MODEL, OBS >::CostJo ( const eckit::Configuration &  joConf,
const eckit::mpi::Comm &  comm,
const util::DateTime &  winbgn,
const util::DateTime &  winend,
const eckit::mpi::Comm &  ctime = oops::mpi::myself() 
)

Construct \( J_o\) from \( R\) and \( y_{obs}\).

Definition at line 133 of file CostJo.h.

◆ ~CostJo()

template<typename MODEL , typename OBS >
oops::CostJo< MODEL, OBS >::~CostJo
virtual

Destructor.

Definition at line 146 of file CostJo.h.

Member Function Documentation

◆ computeCost()

template<typename MODEL , typename OBS >
double oops::CostJo< MODEL, OBS >::computeCost
overridevirtual

Finalize \( J_o\) after the integration of the model.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 169 of file CostJo.h.

Here is the call graph for this function:

◆ computeCostAD()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::computeCostAD ( std::shared_ptr< const GeneralizedDepartures pv,
CtrlInc_ dx,
PostProcTLAD_ ppad 
) const
overridevirtual

Initialize \( J_o\) before starting the AD run.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 280 of file CostJo.h.

Here is the call graph for this function:

◆ computeCostTL()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::computeCostTL ( const CtrlInc_ ,
GeneralizedDepartures  
) const
overridevirtual

Finish cost computation after TL model integration.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 269 of file CostJo.h.

Here is the call graph for this function:

◆ computeCostTraj()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::computeCostTraj ( )
overridevirtual

Finish cost computation and trajectory handling after nonlinear model integration.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 251 of file CostJo.h.

◆ multiplyCoInv()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::multiplyCoInv ( const GeneralizedDepartures v1) const
overridevirtual

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 314 of file CostJo.h.

◆ multiplyCovar()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::multiplyCovar ( const GeneralizedDepartures v1) const
overridevirtual

Multiply by \( R\) and \( R^{-1}\).

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 303 of file CostJo.h.

◆ newDualVector()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::newDualVector
overridevirtual

Provide new departure.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 324 of file CostJo.h.

◆ newGradientFG()

template<typename MODEL , typename OBS >
std::unique_ptr< GeneralizedDepartures > oops::CostJo< MODEL, OBS >::newGradientFG
overridevirtual

Return gradient at first guess ie \( R^{-1} {\cal H}(x^t ) - y\).

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 335 of file CostJo.h.

◆ obspaces()

template<typename MODEL , typename OBS >
const ObsSpaces_& oops::CostJo< MODEL, OBS >::obspaces ( ) const
inline

Accessor...

Definition at line 111 of file CostJo.h.

Here is the caller graph for this function:

◆ resetLinearization()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::resetLinearization
overridevirtual

Reset obs operator trajectory.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 342 of file CostJo.h.

◆ setPostProc()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::setPostProc ( const CtrlVar_ xx,
const eckit::Configuration &  conf,
PostProc_ pp 
)
overridevirtual

Initialize \( J_o\) before starting the integration of the model.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 154 of file CostJo.h.

Here is the call graph for this function:

◆ setPostProcAD()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::setPostProcAD ( ) const
overridevirtual

Adjoint ot setPostProcTL (clean-up)

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 292 of file CostJo.h.

◆ setPostProcTL()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::setPostProcTL ( const CtrlInc_ dx,
PostProcTLAD_ pptl 
) const
overridevirtual

Initialize \( J_o\) before starting the TL run.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 259 of file CostJo.h.

◆ setPostProcTraj()

template<typename MODEL , typename OBS >
void oops::CostJo< MODEL, OBS >::setPostProcTraj ( const CtrlVar_ xx,
const eckit::Configuration &  conf,
const Geometry_ lowres,
PostProcTLAD_ pptraj 
)
overridevirtual

Initialize \( J_o\) for the trajectory run.

Implements oops::CostTermBase< MODEL, OBS >.

Definition at line 240 of file CostJo.h.

Here is the call graph for this function:

Member Data Documentation

◆ currentConf_

template<typename MODEL , typename OBS >
std::unique_ptr<eckit::LocalConfiguration> oops::CostJo< MODEL, OBS >::currentConf_
private

Configuration for current initialize/finalize pair.

Definition at line 127 of file CostJo.h.

◆ gradFG_

template<typename MODEL , typename OBS >
std::unique_ptr<Departures_> oops::CostJo< MODEL, OBS >::gradFG_
private

Jo Gradient at first guess : \( R^{-1} (H(x_{fg})-y_{obs}) \).

Definition at line 121 of file CostJo.h.

◆ obsconf_

template<typename MODEL , typename OBS >
const eckit::LocalConfiguration oops::CostJo< MODEL, OBS >::obsconf_
private

Definition at line 114 of file CostJo.h.

◆ observers_

template<typename MODEL , typename OBS >
Observers_ oops::CostJo< MODEL, OBS >::observers_
private

Definition at line 118 of file CostJo.h.

◆ obspaces_

template<typename MODEL , typename OBS >
ObsSpaces_ oops::CostJo< MODEL, OBS >::obspaces_
private

Definition at line 115 of file CostJo.h.

◆ obstlad_

template<typename MODEL , typename OBS >
std::shared_ptr<ObserversTLAD_> oops::CostJo< MODEL, OBS >::obstlad_
private

Linearized observation operators.

Definition at line 124 of file CostJo.h.

◆ Rmat_

template<typename MODEL , typename OBS >
ObsErrors_ oops::CostJo< MODEL, OBS >::Rmat_
private

Definition at line 117 of file CostJo.h.

◆ yobs_

template<typename MODEL , typename OBS >
std::unique_ptr<Observations_> oops::CostJo< MODEL, OBS >::yobs_
private

Definition at line 116 of file CostJo.h.


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