Rythmos - Transient Integration for Differential Equations Version of the Day
Loading...
Searching...
No Matches
Rythmos_ResponseAndFwdSensPoint.hpp
1//@HEADER
2// ***********************************************************************
3//
4// Rythmos Package
5// Copyright (2006) Sandia Corporation
6//
7// Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8// license for use of this work by or on behalf of the U.S. Government.
9//
10// This library is free software; you can redistribute it and/or modify
11// it under the terms of the GNU Lesser General Public License as
12// published by the Free Software Foundation; either version 2.1 of the
13// License, or (at your option) any later version.
14//
15// This library is distributed in the hope that it will be useful, but
16// WITHOUT ANY WARRANTY; without even the implied warranty of
17// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18// Lesser General Public License for more details.
19//
20// You should have received a copy of the GNU Lesser General Public
21// License along with this library; if not, write to the Free Software
22// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
23// USA
24// Questions? Contact Todd S. Coffey (tscoffe@sandia.gov)
25//
26// ***********************************************************************
27//@HEADER
28
29#ifndef RYTHMOS_RESPONSE_AND_FWD_SEND_POINT_HPP
30#define RYTHMOS_RESPONSE_AND_FWD_SEND_POINT_HPP
31
32
33#include "Rythmos_Types.hpp"
34#include "Thyra_OperatorVectorTypes.hpp"
35#include "Thyra_AssertOp.hpp"
36
37
38namespace Rythmos {
39
40
47template<class Scalar>
49public:
50
53 : t_(ScalarTraits<Scalar>::zero())
54 {}
55
56 // 2007/11/19: rabartl: ToDo: Add constructors that take only t and g or t
57 // and DgDp if needed!
58
61 const Scalar &t,
62 const RCP<const Thyra::VectorBase<Scalar> > &g,
63 const RCP<const Thyra::MultiVectorBase<Scalar> > &DgDp
64 )
65 :t_(t), g_(g), DgDp_(DgDp)
66 {
67#ifdef HAVE_RYTHMOS_DEBUG
68 TEUCHOS_TEST_FOR_EXCEPT(is_null(g));
69 TEUCHOS_TEST_FOR_EXCEPT(is_null(DgDp));
70 THYRA_ASSERT_VEC_SPACES("Rythmos::ResponseAndFwdSensPoint()",
71 *g->space(), * DgDp->range() );
72#endif
73 }
74
76 Scalar t() const
77 { return t_; }
78
80 const RCP<const Thyra::VectorBase<Scalar> > g() const
81 { return g_; }
82
84 const RCP<const Thyra::MultiVectorBase<Scalar> > DgDp() const
85 { return DgDp_; }
86
87private:
88
89 Scalar t_;
90 RCP<const Thyra::VectorBase<Scalar> > g_;
91 RCP<const Thyra::MultiVectorBase<Scalar> > DgDp_;
92
93};
94
95
96} // namespace Rythmos
97
98
99#endif //RYTHMOS_RESPONSE_AND_FWD_SEND_POINT_HPP
Simple class to combine a response and it's forward sensitivity at a time point.
const RCP< const Thyra::MultiVectorBase< Scalar > > DgDp() const
const RCP< const Thyra::VectorBase< Scalar > > g() const
ResponseAndFwdSensPoint(const Scalar &t, const RCP< const Thyra::VectorBase< Scalar > > &g, const RCP< const Thyra::MultiVectorBase< Scalar > > &DgDp)