OOPS
ModelTrajectory.cc
Go to the documentation of this file.
1
/*
2
* (C) Copyright 2009-2016 ECMWF.
3
*
4
* This software is licensed under the terms of the Apache Licence Version 2.0
5
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6
* In applying this licence, ECMWF does not waive the privileges and immunities
7
* granted to it by virtue of its status as an intergovernmental organisation nor
8
* does it submit to any jurisdiction.
9
*/
10
11
#include "
lorenz95/ModelTrajectory.h
"
12
13
#include "eckit/exception/Exceptions.h"
14
#include "
lorenz95/FieldL95.h
"
15
16
// -----------------------------------------------------------------------------
17
namespace
lorenz95
{
18
// -----------------------------------------------------------------------------
19
ModelTrajectory::ModelTrajectory
(
const
bool
ltraj) : ltraj_(ltraj), traj_() {}
20
// -----------------------------------------------------------------------------
21
ModelTrajectory::~ModelTrajectory
() {}
22
// -----------------------------------------------------------------------------
23
void
ModelTrajectory::set
(
const
FieldL95
& xx) {
24
if
(
ltraj_
)
traj_
.push_back(
new
FieldL95
(xx));
25
}
26
// -----------------------------------------------------------------------------
27
const
FieldL95
&
ModelTrajectory::get
(
const
int
ii)
const
{
28
ASSERT(
ltraj_
);
29
ASSERT(
traj_
.size() == 4);
30
ASSERT(1 <= ii && ii <= 4);
31
return
traj_
[ii-1];
32
}
33
// -----------------------------------------------------------------------------
34
35
}
// namespace lorenz95
36
lorenz95::ModelTrajectory::ltraj_
const bool ltraj_
Definition:
ModelTrajectory.h:41
FieldL95.h
lorenz95::ModelTrajectory::ModelTrajectory
ModelTrajectory(const bool ltraj=true)
Constructor, destructor.
Definition:
ModelTrajectory.cc:19
lorenz95::ModelTrajectory::~ModelTrajectory
~ModelTrajectory()
Definition:
ModelTrajectory.cc:21
lorenz95::ModelTrajectory::get
const FieldL95 & get(const int) const
Get trajectory.
Definition:
ModelTrajectory.cc:27
lorenz95::ModelTrajectory::traj_
boost::ptr_vector< FieldL95 > traj_
Definition:
ModelTrajectory.h:42
lorenz95::ModelTrajectory::set
void set(const FieldL95 &)
Save trajectory.
Definition:
ModelTrajectory.cc:23
ModelTrajectory.h
lorenz95::FieldL95
Class to represent fields for the L95 model.
Definition:
FieldL95.h:34
lorenz95
The namespace for the L95 model.
Definition:
l95/src/lorenz95/AnalyticInit.cc:17
fv3-bundle
oops
l95
src
lorenz95
ModelTrajectory.cc
Generated on Sun Oct 25 2020 12:42:58 for OOPS by
1.8.18