ROL
ROL_DynamicFunctionDef.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Rapid Optimization Library (ROL) Package
4//
5// Copyright 2014 NTESS and the ROL contributors.
6// SPDX-License-Identifier: BSD-3-Clause
7// *****************************************************************************
8// @HEADER
9
10#pragma once
11#ifndef ROL_DYNAMICFUNCTIONDEF_HPP
12#define ROL_DYNAMICFUNCTIONDEF_HPP
13
14
15namespace ROL {
16
17template<typename Real>
20
21template<typename Real>
24 return static_cast<PartitionedVector<Real>&>(x);
25}
26
27template<typename Real>
30 return static_cast<const PartitionedVector<Real>&>(x);
31}
32
33template<typename Real>
36 return *(partition(x).get(1));
37}
38
39template<typename Real>
40const Vector<Real>&
42 return *(partition(x).get(1));
43}
44
45template<typename Real>
48 return *(partition(x).get(0));
49}
50
51template<typename Real>
52const Vector<Real>&
54 return *(partition(x).get(0));
55}
56
57} // namespace ROL
58
59
60#endif // ROL_DYNAMICFUNCTIONDEF_HPP
61
VectorWorkspace< Real > workspace_
VectorWorkspace< Real > & getVectorWorkspace() const
Defines the linear algebra of vector space on a generic partitioned vector.
Provides a "smart" cloning manager to be used a member variable in a class and called in the member f...
Defines the linear algebra or vector space interface.
PartitionedVector< Real > & partition(Vector< Real > &x)