GRINS-0.8.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
solver
include
grins
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
"
31
#include "
grins/adaptive_time_stepping_options.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
60
void
init_second_order_in_time_solvers
(
SolverContext
& context );
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
70
AdaptiveTimeSteppingOptions
_adapt_time_step_options
;
71
73
74
bool
_is_second_order_in_time
;
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
GRINS::UnsteadySolver::_time_solver_name
std::string _time_solver_name
Definition:
unsteady_solver.h:62
GRINS::UnsteadySolver::_theta
double _theta
Definition:
unsteady_solver.h:66
GRINS::UnsteadySolver::_deltat
double _deltat
Definition:
unsteady_solver.h:67
GRINS::Solver
Definition:
solver.h:51
adaptive_time_stepping_options.h
GRINS::UnsteadySolver::_n_timesteps
unsigned int _n_timesteps
Definition:
unsteady_solver.h:64
GRINS::UnsteadySolver::set_theta
void set_theta(libMesh::UnsteadySolver *time_solver)
Definition:
unsteady_solver.h:80
GRINS::UnsteadySolver
Definition:
unsteady_solver.h:39
GRINS::AdaptiveTimeSteppingOptions
Container for adaptive time-stepping options.
Definition:
adaptive_time_stepping_options.h:40
GRINS::UnsteadySolver::UnsteadySolver
UnsteadySolver(const GetPot &input)
Definition:
unsteady_solver.C:54
GRINS
GRINS namespace.
Definition:
arrhenius_catalycity.h:31
GRINS::UnsteadySolver::init_time_solver
virtual void init_time_solver(GRINS::MultiphysicsSystem *system)
Definition:
unsteady_solver.C:65
GRINS::UnsteadySolver::_adapt_time_step_options
AdaptiveTimeSteppingOptions _adapt_time_step_options
Definition:
unsteady_solver.h:70
GRINS::UnsteadySolver::_is_second_order_in_time
bool _is_second_order_in_time
Track whether is this a second order (in time) solver or not.
Definition:
unsteady_solver.h:74
GRINS::UnsteadySolver::_backtrack_deltat
unsigned int _backtrack_deltat
Definition:
unsteady_solver.h:65
solver.h
GRINS::MultiphysicsSystem
Interface with libMesh for solving Multiphysics problems.
Definition:
multiphysics_sys.h:77
GRINS::UnsteadySolver::solve
virtual void solve(SolverContext &context)
Definition:
unsteady_solver.C:112
GRINS::SolverContext
Simple class to hold objects passed to Solver::solve.
Definition:
solver_context.h:51
GRINS::UnsteadySolver::update_dirichlet_bcs
void update_dirichlet_bcs(SolverContext &context)
Updates Dirichlet boundary conditions.
Definition:
unsteady_solver.C:186
GRINS::UnsteadySolver::init_second_order_in_time_solvers
void init_second_order_in_time_solvers(SolverContext &context)
Definition:
unsteady_solver.C:227
GRINS::UnsteadySolver::~UnsteadySolver
virtual ~UnsteadySolver()
Definition:
unsteady_solver.h:44
Generated on Tue Dec 19 2017 12:47:28 for GRINS-0.8.0 by
doxygen
1.8.9.1