OOPS
oops::interface::State< MODEL > Class Template Reference

Encapsulates the model state. More...

#include <State.h>

Inheritance diagram for oops::interface::State< MODEL >:
Collaboration diagram for oops::interface::State< MODEL >:

Public Member Functions

 State (const Geometry_ &resol, const Variables &vars, const util::DateTime &time)
 Constructor for specified resol, with vars, valid at time. More...
 
 State (const Geometry_ &resol, const eckit::Configuration &conf)
 Constructor for specified resol and files read from conf. More...
 
 State (const Geometry_ &resol, const State &other)
 Copies other State, changing its resolution to geometry. More...
 
 State (const State &)
 Copy constructor. More...
 
 ~State ()
 Destructor (defined explicitly for timing and tracing) More...
 
State & operator= (const State &)
 Assignment operator. More...
 
State_ & state ()
 Accessor. More...
 
const State_ & state () const
 const accessor More...
 
const util::DateTime validTime () const
 Accessor to the time of this State. More...
 
void updateTime (const util::Duration &dt)
 Update this State's valid time by dt. More...
 
void read (const eckit::Configuration &)
 Read this State from file. More...
 
void write (const eckit::Configuration &) const
 Write this State out to file. More...
 
double norm () const
 Norm (used in tests) More...
 
Geometry_ geometry () const
 Accessor to geometry associated with this State. More...
 
const Variables & variables () const
 Accessor to variables associated with this State. More...
 
void zero ()
 Zero out this State. More...
 
void accumul (const double &w, const State &x)
 Accumulate (add w * x to the state) More...
 
size_t serialSize () const override
 Serialize and deserialize (used in 4DEnVar, weak-constraint 4DVar and Block-Lanczos minimizer) More...
 
void serialize (std::vector< double > &) const override
 
void deserialize (const std::vector< double > &, size_t &) override
 

Static Public Member Functions

static const std::string classname ()
 

Private Types

typedef MODEL::State State_
 
typedef oops::Geometry< MODEL > Geometry_
 

Private Member Functions

void print (std::ostream &) const override
 

Private Attributes

std::unique_ptr< State_ > state_
 

Detailed Description

template<typename MODEL>
class oops::interface::State< MODEL >

Encapsulates the model state.

Definition at line 39 of file oops/interface/State.h.

Member Typedef Documentation

◆ Geometry_

template<typename MODEL >
typedef oops::Geometry<MODEL> oops::interface::State< MODEL >::Geometry_
private

Definition at line 43 of file oops/interface/State.h.

◆ State_

template<typename MODEL >
typedef MODEL::State oops::interface::State< MODEL >::State_
private

Definition at line 42 of file oops/interface/State.h.

Constructor & Destructor Documentation

◆ State() [1/4]

template<typename MODEL >
oops::interface::State< MODEL >::State ( const Geometry_ &  resol,
const Variables &  vars,
const util::DateTime &  time 
)

Constructor for specified resol, with vars, valid at time.

Definition at line 101 of file oops/interface/State.h.

Here is the call graph for this function:

◆ State() [2/4]

template<typename MODEL >
oops::interface::State< MODEL >::State ( const Geometry_ &  resol,
const eckit::Configuration &  conf 
)

Constructor for specified resol and files read from conf.

Definition at line 114 of file oops/interface/State.h.

Here is the call graph for this function:

◆ State() [3/4]

template<typename MODEL >
oops::interface::State< MODEL >::State ( const Geometry_ &  resol,
const State< MODEL > &  other 
)

Copies other State, changing its resolution to geometry.

Definition at line 140 of file oops/interface/State.h.

Here is the call graph for this function:

◆ State() [4/4]

template<typename MODEL >
oops::interface::State< MODEL >::State ( const State< MODEL > &  other)

Copy constructor.

Definition at line 153 of file oops/interface/State.h.

Here is the call graph for this function:

◆ ~State()

template<typename MODEL >
oops::interface::State< MODEL >::~State

Destructor (defined explicitly for timing and tracing)

Definition at line 165 of file oops/interface/State.h.

Member Function Documentation

◆ accumul()

template<typename MODEL >
void oops::interface::State< MODEL >::accumul ( const double &  w,
const State< MODEL > &  x 
)

Accumulate (add w * x to the state)

Definition at line 286 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ classname()

template<typename MODEL >
static const std::string oops::interface::State< MODEL >::classname ( )
inlinestatic

Definition at line 46 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ deserialize()

template<typename MODEL >
void oops::interface::State< MODEL >::deserialize ( const std::vector< double > &  vect,
size_t &  current 
)
override

Definition at line 256 of file oops/interface/State.h.

◆ geometry()

template<typename MODEL >
oops::Geometry< MODEL > oops::interface::State< MODEL >::geometry

Accessor to geometry associated with this State.

Definition at line 217 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ norm()

template<typename MODEL >
double oops::interface::State< MODEL >::norm

Norm (used in tests)

Definition at line 206 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ operator=()

template<typename MODEL >
State< MODEL > & oops::interface::State< MODEL >::operator= ( const State< MODEL > &  rhs)

Assignment operator.

Definition at line 175 of file oops/interface/State.h.

◆ print()

template<typename MODEL >
void oops::interface::State< MODEL >::print ( std::ostream &  os) const
overrideprivate

Definition at line 266 of file oops/interface/State.h.

◆ read()

template<typename MODEL >
void oops::interface::State< MODEL >::read ( const eckit::Configuration &  conf)

Read this State from file.

Definition at line 186 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ serialize()

template<typename MODEL >
void oops::interface::State< MODEL >::serialize ( std::vector< double > &  vect) const
override

Definition at line 246 of file oops/interface/State.h.

◆ serialSize()

template<typename MODEL >
size_t oops::interface::State< MODEL >::serialSize
override

Serialize and deserialize (used in 4DEnVar, weak-constraint 4DVar and Block-Lanczos minimizer)

Definition at line 237 of file oops/interface/State.h.

◆ state() [1/2]

template<typename MODEL >
State_& oops::interface::State< MODEL >::state ( )
inline

Accessor.

Definition at line 62 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ state() [2/2]

template<typename MODEL >
const State_& oops::interface::State< MODEL >::state ( ) const
inline

const accessor

Definition at line 64 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ updateTime()

template<typename MODEL >
void oops::interface::State< MODEL >::updateTime ( const util::Duration &  dt)
inline

Update this State's valid time by dt.

Definition at line 69 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ validTime()

template<typename MODEL >
const util::DateTime oops::interface::State< MODEL >::validTime ( ) const
inline

Accessor to the time of this State.

Definition at line 67 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ variables()

template<typename MODEL >
const Variables & oops::interface::State< MODEL >::variables

Accessor to variables associated with this State.

Definition at line 228 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ write()

template<typename MODEL >
void oops::interface::State< MODEL >::write ( const eckit::Configuration &  conf) const

Write this State out to file.

Definition at line 196 of file oops/interface/State.h.

Here is the caller graph for this function:

◆ zero()

template<typename MODEL >
void oops::interface::State< MODEL >::zero

Zero out this State.

Definition at line 276 of file oops/interface/State.h.

Here is the caller graph for this function:

Member Data Documentation

◆ state_

template<typename MODEL >
std::unique_ptr<State_> oops::interface::State< MODEL >::state_
private

Definition at line 94 of file oops/interface/State.h.


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