libMesh
rb_temporal_discretization.h
Go to the documentation of this file.
1 // rbOOmit: An implementation of the Certified Reduced Basis method.
2 // Copyright (C) 2009, 2010 David J. Knezevic
3 
4 // This file is part of rbOOmit.
5 
6 // rbOOmit is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 
11 // rbOOmit is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
15 
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 
20 #ifndef LIBMESH_RB_TEMPORAL_DISCRETIZATION_H
21 #define LIBMESH_RB_TEMPORAL_DISCRETIZATION_H
22 
23 // libMesh includes
24 #include "libmesh/libmesh_common.h"
25 
26 #include <vector>
27 
28 namespace libMesh
29 {
30 
41 {
42 public:
43 
48 
52  Real get_delta_t() const;
53  void set_delta_t(const Real delta_t_in);
54 
59  Real get_euler_theta() const;
60  void set_euler_theta(const Real euler_theta_in);
61 
65  unsigned int get_time_step() const;
66  void set_time_step(const unsigned int k);
67 
71  unsigned int get_n_time_steps() const;
72  void set_n_time_steps(const unsigned int K);
73 
77  Real get_control(const unsigned int k) const;
78  void set_control(const std::vector<Real> & control);
79 
83  void process_temporal_parameters_file (const std::string & parameters_filename);
84 
89 
90 private:
91 
96 
105 
109  unsigned int _current_time_step;
110 
114  unsigned int _n_time_steps;
115 
121  std::vector<Real> _control;
122 
123 };
124 
125 }
126 
127 #endif // LIBMESH_RB_TEMPORAL_DISCRETIZATION_H
std::vector< Real > _control
The RHS control (scalar function of time).
void process_temporal_parameters_file(const std::string &parameters_filename)
Read in and initialize parameters from parameters_filename.
The libMesh namespace provides an interface to certain functionality in the library.
unsigned int _current_time_step
The current time-step.
Real get_euler_theta() const
Get/set euler_theta, parameter that determines the temporal discretization.
void pull_temporal_discretization_data(RBTemporalDiscretization &other)
Pull the temporal discretization data from other.
Real get_control(const unsigned int k) const
Get/set the RHS control.
Real get_delta_t() const
Get/set delta_t, the time-step size.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
unsigned int get_time_step() const
Get/set the current time-step.
void set_euler_theta(const Real euler_theta_in)
unsigned int get_n_time_steps() const
Get/set the total number of time-steps.
Define a class that encapsulates the details of a "generalized Euler" temporal discretization to be u...
void set_n_time_steps(const unsigned int K)
unsigned int _n_time_steps
The number of time-steps.
void set_control(const std::vector< Real > &control)
Real _euler_theta
The parameter that determines the generalized Euler scheme discretization that we employ...