Memosa-FVM  0.2
ElecOffDiagonalTensor.h File Reference
#include "NumType.h"
#include "Vector.h"
#include <sstream>
#include "ElecDiagonalTensor.h"
Include dependency graph for ElecOffDiagonalTensor.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  ElecOffDiagonalTensor< T, N >
 

Functions

template<class T , int N>
ostream & operator<< (ostream &os, const ElecOffDiagonalTensor< T, N > &v)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator+ (const ElecOffDiagonalTensor< T, N > &a, const ElecOffDiagonalTensor< T, N > &b)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator- (const ElecOffDiagonalTensor< T, N > &a, const ElecOffDiagonalTensor< T, N > &b)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator- (const ElecOffDiagonalTensor< T, N > &a)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator* (const ElecOffDiagonalTensor< T, N > &a, const ElecOffDiagonalTensor< T, N > &b)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator* (const T s, const ElecOffDiagonalTensor< T, N > &a)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator* (const ElecOffDiagonalTensor< T, N > &a, const T s)
 
template<class T , int N>
Vector< T, N+1 > operator* (const ElecOffDiagonalTensor< T, N > &a, const Vector< T, N+1 > &b)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator/ (const ElecOffDiagonalTensor< T, N > &a, const T s)
 
template<class T , int N>
Vector< T, N+1 > operator/ (const Vector< T, N+1 > &a, const ElecOffDiagonalTensor< T, N > &b)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator/ (const ElecOffDiagonalTensor< T, N > &a, const ElecOffDiagonalTensor< T, N > &b)
 
template<class T , int N>
ElecOffDiagonalTensor< T, N > operator/ (const T s, const ElecOffDiagonalTensor< T, N > &a)
 
template<class T , int N>
DiagToOffDiag (const ElecOffDiagonalTensor< T, N > &x)
 

Function Documentation

template<class T , int N>
T DiagToOffDiag ( const ElecOffDiagonalTensor< T, N > &  x)

Definition at line 340 of file ElecOffDiagonalTensor.h.

341 {
342  throw CException("diag to offdiag not defined");
343 }
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator* ( const ElecOffDiagonalTensor< T, N > &  a,
const ElecOffDiagonalTensor< T, N > &  b 
)

Definition at line 275 of file ElecOffDiagonalTensor.h.

276 {
277  throw CException("no operator defined for diag * diag");
278 }
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator* ( const T  s,
const ElecOffDiagonalTensor< T, N > &  a 
)

Definition at line 282 of file ElecOffDiagonalTensor.h.

283 {
284  return ElecOffDiagonalTensor<T,N>(a) *= s;
285 }
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator* ( const ElecOffDiagonalTensor< T, N > &  a,
const T  s 
)

Definition at line 289 of file ElecOffDiagonalTensor.h.

290 {
291  return ElecOffDiagonalTensor<T,N>(a) *= s;
292 }
template<class T , int N>
Vector<T,N+1> operator* ( const ElecOffDiagonalTensor< T, N > &  a,
const Vector< T, N+1 > &  b 
)

Definition at line 296 of file ElecOffDiagonalTensor.h.

297 {
298  Vector<T,N+1> r;
299  r = 0;
300  r[N] += a[N] * b[N];
301 
302  return r;
303 }
Definition: Vector.h:19
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator+ ( const ElecOffDiagonalTensor< T, N > &  a,
const ElecOffDiagonalTensor< T, N > &  b 
)

Definition at line 254 of file ElecOffDiagonalTensor.h.

255 {
256  return ElecOffDiagonalTensor<T,N>(a) += b;
257 }
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator- ( const ElecOffDiagonalTensor< T, N > &  a,
const ElecOffDiagonalTensor< T, N > &  b 
)

Definition at line 261 of file ElecOffDiagonalTensor.h.

262 {
263  return ElecOffDiagonalTensor<T,N>(a) -= b;
264 }
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator- ( const ElecOffDiagonalTensor< T, N > &  a)

Definition at line 268 of file ElecOffDiagonalTensor.h.

template<class T , int N>
ElecOffDiagonalTensor<T,N> operator/ ( const ElecOffDiagonalTensor< T, N > &  a,
const T  s 
)

Definition at line 307 of file ElecOffDiagonalTensor.h.

308 {
309  return ElecOffDiagonalTensor<T,N>(a) /= s;
310 }
template<class T , int N>
Vector<T,N+1> operator/ ( const Vector< T, N+1 > &  a,
const ElecOffDiagonalTensor< T, N > &  b 
)

Definition at line 314 of file ElecOffDiagonalTensor.h.

315 {
316  Vector<T,N+1> x;
317  x = 0;
318  x[N] = a[N] / b[N];
319  return x;
320 }
Definition: Vector.h:19
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator/ ( const ElecOffDiagonalTensor< T, N > &  a,
const ElecOffDiagonalTensor< T, N > &  b 
)

Definition at line 325 of file ElecOffDiagonalTensor.h.

326 {
327  throw CException("operator not defined for offdiag/offdiag");
328 }
template<class T , int N>
ElecOffDiagonalTensor<T,N> operator/ ( const T  s,
const ElecOffDiagonalTensor< T, N > &  a 
)

Definition at line 334 of file ElecOffDiagonalTensor.h.

335 {
336  throw CException("operator not defined for s/diag");
337 }
template<class T , int N>
ostream& operator<< ( ostream &  os,
const ElecOffDiagonalTensor< T, N > &  v 
)
inline

Definition at line 244 of file ElecOffDiagonalTensor.h.

References ElecOffDiagonalTensor< T, N >::printFromC().

246 {
247  v.printFromC(os);
248  return os;
249 }
void printFromC(ostream &os) const