1%%%%%%%%%%%%%%%%%%%
2% XLiFE++ is an extended library of finite elements written in C++
3%     Copyright (C) 2014  Lunéville, Eric; Kielbasiewicz, Nicolas; Lafranche, Yvon; Nguyen, Manh-Ha; Chambeyron, Colin
4%
5%     This program is free software: you can redistribute it and/or modify
6%     it under the terms of the GNU 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%     This program is distributed in the hope that it will be useful,
10%     but WITHOUT ANY WARRANTY; without even the implied warranty of
11%     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12%     GNU General Public License for more details.
13%     You should have received a copy of the GNU General Public License
14%     along with this program.  If not, see <http://www.gnu.org/licenses/>.
15%%%%%%%%%%%%%%%%%%%
16
17\section{The {\classtitle OperatorOnKernel} class}
18
19Kernel objects describes function of two points, say $K(x,y)$. The {\class OperatorOnKernel} class is intended to store the
20differential operators acting on Kernel, one for $x$ derivatives and one for $y$ derivatives :
21\vspace{.1cm}
22\begin{lstlisting}[]{}
23class OperatorOnKernel
24{
25  protected :
26    const Kernel* ker_p;            //Kernel involved in operator
27    DifferentialOperator* xdifOp_p; //x differential operator involved in operator
28    DifferentialOperator* ydifOp_p; //v differential operator involved in operator
29    ValueType type_;                //type of returned value ( _real, _complex)
30    StrucType struct_;              //structure of returned value (_scalar, _vector, _matrix)
31	}
32\end{lstlisting}
33\vspace{.1cm}
34A null pointer \emph{ker\_p} means the kernel function $K(x,y)=1$ and by default \emph{xdifOp\_p} and \emph{ydifOp\_p} point to identity differential operator.\\
35\vspace{.2cm}
36{\class OperatorOnKernel} object are constructed either by constructor members or by external functions:
37\vspace{.1cm}
38\begin{lstlisting}[]{}
39OperatorOnKernel();
40OperatorOnKernel(const Kernel*, DiffOpType = _id, DiffOpType = _id, ValueType vt=_real, StrucType st=_scalar);
41OperatorOnKernel(const Kernel&, DiffOpType = _id, DiffOpType = _id);
42OperatorOnKernel(const OperatorOnKernel&);
43OperatorOnKernel& operator=(const OperatorOnKernel&);
44
45OperatorOnKernel& id(const Kernel&);                           //id(k)
46OperatorOnKernel& grad_x(const Kernel&);                       //grad_x(k)
47OperatorOnKernel& grad_y(const Kernel&);                       //grad_y(k)
48...
49OperatorOnKernel& id(OperatorOnKernel&);                       //id(opk)
50OperatorOnKernel& grad_x(OperatorOnKernel&);                   //grad_x(opk)
51OperatorOnKernel& grad_y(OperatorOnKernel&);                   //grad_y(opk)
52...
53OperatorOnKernel& operator*(UnitaryVector, const Kernel&);     //n*ker
54OperatorOnKernel& operator*(const Kernel&, UnitaryVector);     //ker*n
55OperatorOnKernel& operator|(UnitaryVector, const Kernel&);     //n|ker
56OperatorOnKernel& operator|(const Kernel&, UnitaryVector);     //ker|n
57OperatorOnKernel& operator^(UnitaryVector, const Kernel&);     //n^ker
58OperatorOnKernel& operator*(UnitaryVector, OperatorOnKernel&); //n*opker
59OperatorOnKernel& operator*(OperatorOnKernel&, UnitaryVector); //opker*n
60OperatorOnKernel& operator|(UnitaryVector, OperatorOnKernel&); //n|opker
61OperatorOnKernel& operator|(OperatorOnKernel&, UnitaryVector); //opker|n
62OperatorOnKernel& operator^(UnitaryVector, OperatorOnKernel&); //n^opker
63\end{lstlisting}
64\vspace{.1cm}
65Note that operators return reference to object dynamically allocated.\\
66\vspace{.1cm}
67The class provides some member accessors and property accessors
68\vspace{.1cm}
69\begin{lstlisting}[]{}
70const Kernel* kernel() const;
71DiffOpType xdifOpType() const;
72DiffOpType ydifOpType() const;
73DifferentialOperator*& xdifOp_();
74DifferentialOperator& xdifOp() const;
75DifferentialOperator*& ydifOp_();
76DifferentialOperator& ydifOp() const;
77ValueType& valueType();
78ValueType valueType()const;
79StrucType& strucType();
80StrucType strucType() const;
81Dimen xdiffOrder() const;
82Dimen ydiffOrder() const;
83bool voidKernel() const;
84\end{lstlisting}
85\vspace{.3cm}
86and print facilities
87\vspace{.1cm}
88\begin{lstlisting}[]{}
89void print(std::ostream&) const;
90friend std::ostream& operator<<(std::ostream& os, const OperatorOnKernel& opk);
91\end{lstlisting}
92\vspace{.3cm}
93Finally the class interfaces the computation of {\class OperatorOnKernel} at a couple of points or a list of couples of points using template functions:
94\vspace{.1cm}
95\begin{lstlisting}[]{}
96template <typename T>
97T& eval(const Point&,const Point&, T&) const;
98template <typename T>
99std::vector<T>& eval(const std::vector<Point>&,const std::vector<Point>&, std::vector<T>&) const;
100\end{lstlisting}
101\vspace{.3cm}
102
103\displayInfos{library=operator, header=OperatorOnKernel.hpp, implementation=OperatorOnKernbel.cpp,
104test=test\_operator.cpp, header dep={DifferentialOperator.hpp, Operand.hpp, config.h, utils.h}}
105
106