Loading...
Searching...
No Matches
RKSolver.h
// Copyright (C) 2013 Johan Hake
//
// This file is part of DOLFIN.
//
// DOLFIN is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// DOLFIN is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
//
// First added: 2013-02-15
// Last changed: 2014-03-05
#ifndef __RKSOLVER_H
#define __RKSOLVER_H
#include <vector>
#include <memory>
#include <dolfin/fem/Assembler.h>
#include <dolfin/la/GenericVector.h>
namespace dolfin
{
// Forward declarations
class MultiStageScheme;
class RKSolver
{
public:
explicit RKSolver(std::shared_ptr<MultiStageScheme> scheme);
void step(double dt);
void step_interval(double t0, double t1, double dt);
std::shared_ptr<MultiStageScheme> scheme() const
{return _scheme;}
private:
// The MultiStageScheme
std::shared_ptr<MultiStageScheme> _scheme;
// Temp vector for final stage
// FIXME: Add this as a Function called previous step or something
std::shared_ptr<GenericVector> _tmp;
// Assembler for explicit stages
Assembler _assembler;
};
}
#endif
dolfin::Assembler
Definition Assembler.h:54
dolfin::MultiStageScheme
Place-holder for forms and solutions for a multi-stage Butcher tableau based method.
Definition MultiStageScheme.h:42
dolfin::RKSolver::scheme
std::shared_ptr< MultiStageScheme > scheme() const
Return the MultiStageScheme.
Definition RKSolver.h:50
dolfin::RKSolver::step
void step(double dt)
Step solver with time step dt.
Definition RKSolver.cpp:43
dolfin::RKSolver::step_interval
void step_interval(double t0, double t1, double dt)
Step solver an interval using dt as time step.
Definition RKSolver.cpp:108
dolfin::RKSolver::RKSolver
RKSolver(std::shared_ptr< MultiStageScheme > scheme)
Definition RKSolver.cpp:37
dolfin
Definition adapt.h:30