1
// Copyright (C) 2008-2011 Anders Logg and Garth N. Wells
3
// This file is part of DOLFIN.
5
// DOLFIN is free software: you can redistribute it and/or modify
6
// it under the terms of the GNU Lesser General Public License as published by
7
// the Free Software Foundation, either version 3 of the License, or
8
// (at your option) any later version.
10
// DOLFIN is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
// GNU Lesser General Public License for more details.
15
// You should have received a copy of the GNU Lesser General Public License
16
// along with DOLFIN. If not, see <http://www.gnu.org/licenses/>.
18
// Modified by Marie E. Rognes 2011
20
// First added: 2008-12-26
21
// Last changed: 2011-03-11
23
#ifndef __VARIATIONAL_PROBLEM_H
24
#define __VARIATIONAL_PROBLEM_H
27
#include <boost/shared_ptr.hpp>
32
class BoundaryCondition;
38
template<typename T> class MeshFunction;
40
/// This class is deprecated and is only here to give an informative error
41
/// message to users about the new interface.
43
class VariationalProblem
48
VariationalProblem(const Form& form_0,
52
VariationalProblem(const Form& form_0,
54
const BoundaryCondition& bc);
57
VariationalProblem(const Form& form_0,
59
const std::vector<const BoundaryCondition*> bcs);
62
VariationalProblem(boost::shared_ptr<const Form> form_0,
63
boost::shared_ptr<const Form> form_1,
64
std::vector<boost::shared_ptr<const BoundaryCondition> > bcs);
67
~VariationalProblem();
70
void solve(Function& u) const;
73
void solve(Function& u0, Function& u1) const;
76
void solve(Function& u0, Function& u1, Function& u2) const;
79
void solve(Function& u, const double tol, GoalFunctional& M) const;
82
void solve(Function& u, const double tol, Form& M, ErrorControl& ec) const;
86
// Common error message
87
void error_message() const;