GRINS-0.8.0
unsteady_solver.h
Go to the documentation of this file.
1 //-----------------------------------------------------------------------bl-
2 //--------------------------------------------------------------------------
3 //
4 // GRINS - General Reacting Incompressible Navier-Stokes
5 //
6 // Copyright (C) 2014-2017 Paul T. Bauman, Roy H. Stogner
7 // Copyright (C) 2010-2013 The PECOS Development Team
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the Version 2.1 GNU Lesser General
11 // Public License as published by the Free Software Foundation.
12 //
13 // This library is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // Lesser General Public License for more details.
17 //
18 // You should have received a copy of the GNU Lesser General Public
19 // License along with this library; if not, write to the Free Software
20 // Foundation, Inc. 51 Franklin Street, Fifth Floor,
21 // Boston, MA 02110-1301 USA
22 //
23 //-----------------------------------------------------------------------el-
24 
25 
26 #ifndef GRINS_UNSTEADY_SOLVER_H
27 #define GRINS_UNSTEADY_SOLVER_H
28 
29 //GRINS
30 #include "grins/solver.h"
32 
33 //libMesh
34 #include "libmesh/system_norm.h"
35 #include "libmesh/unsteady_solver.h"
36 
37 namespace GRINS
38 {
39  class UnsteadySolver : public Solver
40  {
41  public:
42 
43  UnsteadySolver( const GetPot& input );
44  virtual ~UnsteadySolver(){};
45 
46  virtual void solve( SolverContext& context );
47 
48  protected:
49 
50  virtual void init_time_solver(GRINS::MultiphysicsSystem* system);
51 
52  template <typename T>
53  void set_theta( libMesh::UnsteadySolver* time_solver );
54 
56 
58  void update_dirichlet_bcs( SolverContext& context );
59 
61 
62  std::string _time_solver_name;
63 
64  unsigned int _n_timesteps;
65  unsigned int _backtrack_deltat;
66  double _theta;
67  double _deltat;
68 
69  // Options for adaptive time solvers
71 
73 
75 
76  };
77 
78  template <typename T>
79  inline
80  void UnsteadySolver::set_theta( libMesh::UnsteadySolver* time_solver )
81  {
82  T* deriv_solver = libMesh::cast_ptr<T*>(time_solver);
83  deriv_solver->theta = this->_theta;
84  }
85 
86 } // end namespace GRINS
87 #endif // GRINS_UNSTEADY_SOLVER_H
std::string _time_solver_name
unsigned int _n_timesteps
void set_theta(libMesh::UnsteadySolver *time_solver)
Container for adaptive time-stepping options.
UnsteadySolver(const GetPot &input)
GRINS namespace.
virtual void init_time_solver(GRINS::MultiphysicsSystem *system)
AdaptiveTimeSteppingOptions _adapt_time_step_options
bool _is_second_order_in_time
Track whether is this a second order (in time) solver or not.
unsigned int _backtrack_deltat
Interface with libMesh for solving Multiphysics problems.
virtual void solve(SolverContext &context)
Simple class to hold objects passed to Solver::solve.
void update_dirichlet_bcs(SolverContext &context)
Updates Dirichlet boundary conditions.
void init_second_order_in_time_solvers(SolverContext &context)

Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by  doxygen 1.8.9.1