DOLFIN
DOLFIN C++ interface
GoalFunctional.h
1 // Copyright (C) 2010--2012 Marie E. Rognes
2 //
3 // This file is part of DOLFIN.
4 //
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.
9 //
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.
14 //
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/>.
17 //
18 // First added: 2010-09-16
19 // Last changed: 2012-11-14
20 
21 #ifndef __GOAL_FUNCTIONAL_H
22 #define __GOAL_FUNCTIONAL_H
23 
24 #include <memory>
25 #include <dolfin/fem/Form.h>
26 #include "ErrorControl.h"
27 
28 namespace dolfin
29 {
30 
33 
34  class GoalFunctional : public Form
35  {
36 
37  public:
38 
39  // FIXME: The rank argument is unnecessary, a GoalFunction should
40  // always have rank 0. The argument should be removed for that
41  // reason.
42 
50  GoalFunctional(std::size_t rank, std::size_t num_coefficients);
51 
59  virtual void update_ec(const Form& a, const Form& L) = 0;
60 
61  // Pointer to _ErrorControl_ instance
62  std::shared_ptr<ErrorControl> _ec;
63 
64  };
65 
66 }
67 #endif
std::size_t num_coefficients() const
Definition: Form.cpp:74
Base class for UFC code generated by FFC for DOLFIN with option -l.
Definition: Form.h:85
virtual void update_ec(const Form &a, const Form &L)=0
Definition: adapt.h:29
std::size_t rank() const
Definition: Form.cpp:63
GoalFunctional(std::size_t rank, std::size_t num_coefficients)
Definition: GoalFunctional.cpp:28
Definition: GoalFunctional.h:34