Rythmos - Transient Integration for Differential Equations  Version of the Day
 All Classes Functions Variables Typedefs Pages
Rythmos_StepperBase_def.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_STEPPER_BASE_DEF_H
30 #define Rythmos_STEPPER_BASE_DEF_H
31 
32 #include "Rythmos_StepperBase_decl.hpp"
33 
34 namespace Rythmos {
35 
40 template<class Scalar>
41 bool isInitialized( const StepperBase<Scalar>& stepper )
42 {
43  return stepper.getTimeRange().isValid();
44 }
45 
46 
47 // ///////////////////////////////
48 // Implementations
49 
50 
51 template<class Scalar>
53 {
54  return false;
55 }
56 
57 
58 template<class Scalar>
60 {
61  return true;
62 }
63 
64 
65 template<class Scalar>
67 {
68  return false;
69 }
70 
71 
72 template<class Scalar>
73 RCP<StepperBase<Scalar> >
75 {
76  return Teuchos::null;
77 }
78 
79 
80 template<class Scalar>
82 {
83  // 2009/08/31: rabartl ToDo: Should this really be left empty?
84 }
85 
86 
87 //
88 // Explicit Instantiation macro
89 //
90 // Must be expanded from within the Rythmos namespace!
91 //
92 
93 #define RYTHMOS_STEPPER_BASE_INSTANT(SCALAR) \
94  \
95  template class StepperBase< SCALAR >; \
96  \
97  template bool isInitialized( const StepperBase< SCALAR >& stepper );
98 
99 
100 } // namespace Rythmos
101 
102 #endif //Rythmos_STEPPER_BASE_DEF_H
bool isInitialized(const StepperBase< Scalar > &stepper)
Base class for defining stepper functionality.
virtual bool acceptsModel() const
Return if this stepper accepts a model.
virtual void setStepControlData(const StepperBase &stepper)
Set step control data from another stepper.
virtual TimeRange< Scalar > getTimeRange() const =0
Return the range of time values where interpolation calls can be performed.
virtual bool isImplicit() const
Return if this stepper is an implicit stepper.
virtual bool supportsCloning() const
Return if this stepper supports cloning or not.
virtual RCP< StepperBase< Scalar > > cloneStepperAlgorithm() const
Clone the stepper object if supported.