PlasCom2  1.0
XPACC Multi-physics simluation application
StateOperators.H
Go to the documentation of this file.
1 #ifndef __STATE_OPERATORS_H__
2 #define __STATE_OPERATORS_H__
3 
4 namespace operators {
5 
6  template<typename StateType>
7  inline StateType operator*(double inScalar,StateType &inState)
8  {
9  StateType returnValue;
10  returnValue.Copy(inState);
11  returnValue *= inScalar;
12  return(returnValue);
13  };
14 
15  template<typename StateType>
16  inline void AXPY(double a,StateType &X,StateType &Y)
17  {
18  Y += a*X;
19  };
20 
21  template<typename StateType>
22  inline void Zero(StateType &X)
23  {
24  X.Zero();
25  };
26 
27  template<typename StateType>
28  inline void Assign(StateType &X,StateType &Y)
29  {
30  Y = X;
31  };
32 
33  template<typename StateType>
34  StateType Sum(StateType &X,StateType &Y)
35  {
36  return(X+Y);
37  };
38 
39  template<typename StateType>
40  StateType Difference(StateType &X,StateType &Y)
41  {
42  return(Y+(-1.0*X));
43  };
44 }
45 
46 #endif
void size_t int size_t int size_t int int int int double int int double double *void size_t int size_t int int int int int double int size_t size_t size_t double double *void size_t int size_t int size_t size_t int double int double double *void size_t size_t size_t double double * X
void AXPY(double a, StateType &X, StateType &Y)
void Assign(StateType &X, StateType &Y)
StateType Difference(StateType &X, StateType &Y)
StateType Sum(StateType &X, StateType &Y)
void Zero(StateType &X)
void size_t int size_t int size_t int int int int double int int double double *void size_t int size_t int int int int int double int size_t size_t size_t double double *void size_t int size_t int size_t size_t int double int double double *void size_t size_t size_t double * a
void size_t int size_t int size_t int int int int double int int double double *void size_t int size_t int int int int int double int size_t size_t size_t double double *void size_t int size_t int size_t size_t int double int double double *void size_t size_t size_t double double double * Y
StateType operator*(double inScalar, StateType &inState)
Definition: StateOperators.H:7