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 
15 namespace ROL {
16 
17 template<typename Real>
18 VectorWorkspace<Real>&
20 
21 template<typename Real>
24  return static_cast<PartitionedVector<Real>&>(x);
25 }
26 
27 template<typename Real>
30  return static_cast<const PartitionedVector<Real>&>(x);
31 }
32 
33 template<typename Real>
36  return *(partition(x).get(1));
37 }
38 
39 template<typename Real>
40 const Vector<Real>&
42  return *(partition(x).get(1));
43 }
44 
45 template<typename Real>
48  return *(partition(x).get(0));
49 }
50 
51 template<typename Real>
52 const Vector<Real>&
54  return *(partition(x).get(0));
55 }
56 
57 } // namespace ROL
58 
59 
60 #endif // ROL_DYNAMICFUNCTIONDEF_HPP
61 
PartitionedVector< Real > & partition(Vector< Real > &x)
VectorWorkspace< Real > & getVectorWorkspace() const
VectorWorkspace< Real > workspace_
Defines the linear algebra of vector space on a generic partitioned vector.
Defines the linear algebra or vector space interface.
Definition: ROL_Vector.hpp:46