]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add time dependant functionality to the Function class.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 18 May 1998 16:46:21 +0000 (16:46 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 18 May 1998 16:46:21 +0000 (16:46 +0000)
git-svn-id: https://svn.dealii.org/trunk@310 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/function.cc

index 26350a3ca3a2f5cc6169ac8e490bce211c28ffea..4218a50a18de8a1642a66b4445b40a747e04587e 100644 (file)
@@ -5,10 +5,17 @@
 #include <vector>
 
 
+template <int dim>
+Function<dim>::Function (const double initial_time) :
+               time(initial_time) {};
+
+
+
 template <int dim>
 Function<dim>::~Function () {};
 
 
+
 template <int dim>
 double Function<dim>::operator () (const Point<dim> &) const {
   Assert (false, ExcPureFunctionCalled());
@@ -50,6 +57,25 @@ void Function<dim>::gradient_list (const vector<Point<dim> > &points,
 
 
 
+template <int dim>
+double Function<dim>::get_time () const {
+  return time;
+};
+
+
+
+template <int dim>
+void Function<dim>::set_time (const double new_time) {
+  time = new_time;
+};
+
+
+
+template <int dim>
+void Function<dim>::advance_time (const double delta_t) {
+  set_time (time+delta_t);
+};
+
 
 
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.