KADATH
ope_user_bin.cpp
1 /*
2  Copyright 2017 Philippe Grandclement
3 
4  This file is part of Kadath.
5 
6  Kadath is free software: you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Kadath is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU General Public License for more details.
15 
16  You should have received a copy of the GNU General Public License
17  along with Kadath. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "ope_eq.hpp"
21 #include "scalar.hpp"
22 #include "tensor_impl.hpp"
23 #include "param.hpp"
24 namespace Kadath {
25 Ope_user_bin::Ope_user_bin (const System_of_eqs* zesys, Term_eq (*zeope) (const Term_eq&, const Term_eq&, Param*), Param* parso, Ope_eq* p1, Ope_eq* p2) : Ope_eq(zesys, p1->get_dom(), 2), pope(zeope) {
26  par = parso ;
27  parts[0] = p1 ;
28  parts[1] = p2 ;
29 }
30 
32 }
33 
35 
36  Term_eq p1 (parts[0]->action()) ;
37  Term_eq p2 (parts[1]->action()) ;
38  return pope(p1, p2, par) ;
39 }}
Abstract class that describes the various operators that can appear in the equations.
Definition: ope_eq.hpp:32
MMPtr_array< Ope_eq > parts
Pointers of the various parts of the current operator.
Definition: ope_eq.hpp:38
Param * par
Parameters required by the function.
Definition: ope_eq.hpp:1266
Term_eq action() const override
Computes the action of the current Ope_eq using its various parts.
Term_eq(* pope)(const Term_eq &, const Term_eq &, Param *)
The function that implements the action of the operator.
Definition: ope_eq.hpp:1267
Ope_user_bin(const System_of_eqs *syst, Term_eq(*zeope)(const Term_eq &, const Term_eq &, Param *), Param *par, Ope_eq *aa, Ope_eq *bb)
Constructor.
~Ope_user_bin() override
Destructor.
Parameter storage.
Definition: param.hpp:30
Class used to describe and solve a system of equations.
This class is intended to describe the manage objects appearing in the equations.
Definition: term_eq.hpp:62