OOPS
oops::State< MODEL > Class Template Reference

State class used in oops; subclass of interface class interface::State. More...

#include <State.h>

Inheritance diagram for oops::State< MODEL >:
Collaboration diagram for oops::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...
 
double norm () const
 Norm (used in tests) More...
 
- Public Member Functions inherited from oops::interface::State< MODEL >
 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
 

Private Types

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

Private Member Functions

void print (std::ostream &) const override
 pointer to the MPI communicator in time More...
 

Private Attributes

const eckit::mpi::Comm * commTime_
 

Additional Inherited Members

- Static Public Member Functions inherited from oops::interface::State< MODEL >
static const std::string classname ()
 

Detailed Description

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

State class used in oops; subclass of interface class interface::State.

Handles additional MPI communicator parameter commTime_ in the constructors (for MPI distribution in time, used in oops for 4DEnVar and weak-constraint 4DVar). Adds communication through time to the following Increment methods:

  • norm
  • print

Definition at line 32 of file oops/base/State.h.

Member Typedef Documentation

◆ Geometry_

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

Definition at line 34 of file oops/base/State.h.

◆ State_

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

Definition at line 33 of file oops/base/State.h.

Constructor & Destructor Documentation

◆ State() [1/3]

template<typename MODEL >
oops::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 55 of file oops/base/State.h.

◆ State() [2/3]

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

Constructor for specified resol and files read from conf.

Definition at line 63 of file oops/base/State.h.

◆ State() [3/3]

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

Copies other State, changing its resolution to geometry.

Definition at line 70 of file oops/base/State.h.

Member Function Documentation

◆ norm()

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

Norm (used in tests)

Definition at line 77 of file oops/base/State.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ print()

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

pointer to the MPI communicator in time

Definition at line 88 of file oops/base/State.h.

Member Data Documentation

◆ commTime_

template<typename MODEL >
const eckit::mpi::Comm* oops::State< MODEL >::commTime_
private

Definition at line 48 of file oops/base/State.h.


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