libMesh
Loading...
Searching...
No Matches
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
28namespace libMesh
29{
30
41{
42public:
43
48
56 virtual ~RBTemporalDiscretization () = default;
57
61 Real get_delta_t() const;
62 void set_delta_t(const Real delta_t_in);
63
68 Real get_euler_theta() const;
69 void set_euler_theta(const Real euler_theta_in);
70
74 unsigned int get_time_step() const;
75 void set_time_step(const unsigned int k);
76
80 unsigned int get_n_time_steps() const;
81 void set_n_time_steps(const unsigned int K);
82
86 Real get_control(const unsigned int k) const;
87 void set_control(const std::vector<Real> & control);
88
92 void process_temporal_parameters_file (const std::string & parameters_filename);
93
98
99private:
100
105
114
118 unsigned int _current_time_step;
119
123 unsigned int _n_time_steps;
124
130 std::vector<Real> _control;
131};
132
133}
134
135#endif // LIBMESH_RB_TEMPORAL_DISCRETIZATION_H
Define a class that encapsulates the details of a "generalized Euler" temporal discretization to be u...
void set_control(const std::vector< Real > &control)
unsigned int _n_time_steps
The number of time-steps.
Real get_control(const unsigned int k) const
Get/set the RHS control.
virtual ~RBTemporalDiscretization()=default
void set_euler_theta(const Real euler_theta_in)
void pull_temporal_discretization_data(RBTemporalDiscretization &other)
Pull the temporal discretization data from other.
std::vector< Real > _control
The RHS control (scalar function of time).
RBTemporalDiscretization(const RBTemporalDiscretization &)=default
Real get_delta_t() const
Get/set delta_t, the time-step size.
Real get_euler_theta() const
Get/set euler_theta, parameter that determines the temporal discretization.
void process_temporal_parameters_file(const std::string &parameters_filename)
Read in and initialize parameters from parameters_filename.
unsigned int _current_time_step
The current time-step.
RBTemporalDiscretization(RBTemporalDiscretization &&)=default
Special functions can all be defaulted for this simple class.
unsigned int get_n_time_steps() const
Get/set the total number of time-steps.
unsigned int get_time_step() const
Get/set the current time-step.
RBTemporalDiscretization & operator=(const RBTemporalDiscretization &)=default
Real _euler_theta
The parameter that determines the generalized Euler scheme discretization that we employ.
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real