time_solver.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2014 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 #include "libmesh/diff_solver.h"
19 #include "libmesh/diff_system.h"
20 #include "libmesh/linear_solver.h"
21 #include "libmesh/time_solver.h"
23 
24 namespace libMesh
25 {
26 
27 
28 
30  : quiet (true),
31  reduce_deltat_on_diffsolver_failure (0),
32  _diff_solver (NULL),
33  _linear_solver (NULL),
34  _system (s),
35  solution_history(new NoSolutionHistory()), // Default setting for solution_history
36  _is_adjoint (false)
37 {
38 }
39 
40 
41 
43 {
44 }
45 
46 
47 
49 {
51  libmesh_assert_equal_to (&(_diff_solver->system()), &(this->system()));
52  _diff_solver->reinit();
53 
55  _linear_solver->clear();
56  _linear_solver->init();
57 }
58 
59 
60 
62 {
63  // If the user hasn't given us a solver to use,
64  // just build a default solver
65  if (_diff_solver.get() == NULL)
67 
68  if (_linear_solver.get() == NULL)
70 
71  _diff_solver->init();
72  _linear_solver->init();
73 }
74 
75 
76 
78 {
79 }
80 
81 
82 
84 {
86  libmesh_assert_equal_to (&(_diff_solver->system()), &(this->system()));
87  _diff_solver->solve();
88 }
89 
90 
91 void TimeSolver::set_solution_history (const SolutionHistory & _solution_history)
92  {
93  solution_history = _solution_history.clone();
94  }
95 
97 {
98 }
99 
101 {
102 }
103 
105 {
106 }
107 
108 } // namespace libMesh

Site Created By: libMesh Developers
Last modified: February 07 2014 16:57:07 UTC

Hosted By:
SourceForge.net Logo