DOLFIN
DOLFIN C++ interface
CoefficientAssigner.h
1 // Copyright (C) 2008-2009 Anders Logg
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 #ifndef __COEFFICIENT_ASSIGNER_H
19 #define __COEFFICIENT_ASSIGNER_H
20 
21 #include <cstddef>
22 #include <memory>
23 
24 namespace dolfin
25 {
26 
27  class Form;
28  class GenericFunction;
29 
38 
40  {
41  public:
42 
44  CoefficientAssigner(Form& form, std::size_t number);
45 
48 
50  void operator= (std::shared_ptr<const GenericFunction> coefficient);
51 
52  private:
53 
54  // The form
55  Form& _form;
56 
57  // The number of the coefficient
58  std::size_t _number;
59 
60  };
61 
62 }
63 
64 #endif
CoefficientAssigner(Form &form, std::size_t number)
Create coefficient assigner for coefficient with given number.
Definition: CoefficientAssigner.cpp:29
Base class for UFC code generated by FFC for DOLFIN with option -l.
Definition: Form.h:85
Definition: adapt.h:29
~CoefficientAssigner()
Destructor.
Definition: CoefficientAssigner.cpp:35
void operator=(std::shared_ptr< const GenericFunction > coefficient)
Assign coefficient.
Definition: CoefficientAssigner.cpp:40
Definition: CoefficientAssigner.h:39