Rythmos - Transient Integration for Differential Equations
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Rythmos_RampingIntegrationControlStrategy_decl.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
30
#ifndef RYTHMOS_RAMPING_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
31
#define RYTHMOS_RAMPING_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
32
33
34
#include "Rythmos_IntegrationControlStrategyBase.hpp"
35
#include "Rythmos_StepperBase.hpp"
36
#include "Rythmos_StepControlInfo.hpp"
37
#include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
38
39
40
namespace
Rythmos {
41
42
47
template
<
class
Scalar>
48
class
RampingIntegrationControlStrategy
49
:
virtual
public
IntegrationControlStrategyBase
<Scalar>,
50
virtual
public
Teuchos::ParameterListAcceptorDefaultBase
51
{
52
public
:
53
56
58
RampingIntegrationControlStrategy
();
59
61
64
66
void
setParameterList
(RCP<ParameterList>
const
& paramList);
67
69
RCP<const ParameterList>
getValidParameters
()
const
;
70
72
75
77
bool
handlesFailedTimeSteps
()
const
;
78
80
RCP<IntegrationControlStrategyBase<Scalar> >
81
cloneIntegrationControlStrategy
()
const
;
82
84
void
resetIntegrationControlStrategy
(
85
const
TimeRange<Scalar>
&integrationTimeDomain
86
);
87
89
StepControlInfo<Scalar>
90
getNextStepControlInfo
(
91
const
StepperBase<Scalar>
&stepper,
92
const
StepControlInfo<Scalar>
&stepCtrlInfoLast,
93
const
int
timeStepIter
94
);
95
97
bool
resetForFailedTimeStep
(
98
const
StepperBase<Scalar>
&stepper,
99
const
StepControlInfo<Scalar>
&stepCtrlInfoLast,
100
const
int
timeStepIter,
101
const
StepControlInfo<Scalar>
&stepCtrlInfo
102
);
103
105
106
private
:
107
108
bool
take_variable_steps_;
109
int
num_constant_steps_;
110
int
num_ramping_steps_;
111
Scalar initial_dt_;
112
Scalar min_dt_;
113
Scalar max_dt_;
114
Scalar ramping_factor_;
115
int
num_step_failures_;
116
int
max_step_failures_;
117
118
Scalar current_dt_;
119
120
TimeRange<Scalar>
integrationTimeDomain_;
121
122
static
const
std::string take_variable_steps_name_;
123
static
const
bool
take_variable_steps_default_;
124
125
static
const
std::string num_constant_steps_name_;
126
static
const
int
num_constant_steps_default_;
127
128
static
const
std::string num_ramping_steps_name_;
129
static
const
int
num_ramping_steps_default_;
130
131
static
const
std::string initial_dt_name_;
132
static
const
double
initial_dt_default_;
133
134
static
const
std::string min_dt_name_;
135
static
const
double
min_dt_default_;
136
137
static
const
std::string max_dt_name_;
138
static
const
double
max_dt_default_;
139
140
static
const
std::string ramping_factor_name_;
141
static
const
double
ramping_factor_default_;
142
143
static
const
std::string max_step_failures_name_;
144
static
const
int
max_step_failures_default_;
145
146
};
147
148
153
template
<
class
Scalar>
154
RCP<RampingIntegrationControlStrategy<Scalar> >
155
rampingIntegrationControlStrategy();
156
157
162
template
<
class
Scalar>
163
RCP<RampingIntegrationControlStrategy<Scalar> >
164
rampingIntegrationControlStrategy(
const
RCP<ParameterList> ¶mList );
165
166
167
168
}
// namespace Rythmos
169
170
171
#endif
// RYTHMOS_RAMPING_INTEGRATION_CONTROL_STRATEGY_DECL_HPP
Rythmos::IntegrationControlStrategyBase
Base class for strategy objects that control integration by selecting step sizes for a stepper.
Definition
Rythmos_IntegrationControlStrategyBase.hpp:29
Rythmos::RampingIntegrationControlStrategy::getNextStepControlInfo
StepControlInfo< Scalar > getNextStepControlInfo(const StepperBase< Scalar > &stepper, const StepControlInfo< Scalar > &stepCtrlInfoLast, const int timeStepIter)
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:306
Rythmos::RampingIntegrationControlStrategy::resetIntegrationControlStrategy
void resetIntegrationControlStrategy(const TimeRange< Scalar > &integrationTimeDomain)
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:287
Rythmos::RampingIntegrationControlStrategy::getValidParameters
RCP< const ParameterList > getValidParameters() const
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:214
Rythmos::RampingIntegrationControlStrategy::setParameterList
void setParameterList(RCP< ParameterList > const ¶mList)
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:182
Rythmos::RampingIntegrationControlStrategy::cloneIntegrationControlStrategy
RCP< IntegrationControlStrategyBase< Scalar > > cloneIntegrationControlStrategy() const
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:264
Rythmos::RampingIntegrationControlStrategy::resetForFailedTimeStep
bool resetForFailedTimeStep(const StepperBase< Scalar > &stepper, const StepControlInfo< Scalar > &stepCtrlInfoLast, const int timeStepIter, const StepControlInfo< Scalar > &stepCtrlInfo)
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:345
Rythmos::RampingIntegrationControlStrategy::RampingIntegrationControlStrategy
RampingIntegrationControlStrategy()
Constructors/Initializers.
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:164
Rythmos::RampingIntegrationControlStrategy::handlesFailedTimeSteps
bool handlesFailedTimeSteps() const
Overridden from IntegrationControlStrategyBase.
Definition
Rythmos_RampingIntegrationControlStrategy_def.hpp:256
Rythmos::StepControlInfo
Simple struct to aggregate integration/stepper control information.
Definition
Rythmos_StepControlInfo.hpp:18
Rythmos::StepperBase
Base class for defining stepper functionality.
Definition
Rythmos_StepperBase_decl.hpp:79
Rythmos::TimeRange
Represent a time range.
Definition
Rythmos_TimeRange_decl.hpp:73
Generated by
1.17.0