Rheolef  7.1
an efficient C++ finite element environment
field_valarray.h
Go to the documentation of this file.
1 # ifndef _RHEOLEF_FIELD_VALARRAY_H
2 # define _RHEOLEF_FIELD_VALARRAY_H
3 //
24 // valarray<field> : utilities (for generic newton.h and damped_newton.h)
25 //
26 // note: obsolete : has been super-setted by field_eigen.h
27 // maintained for backward compat.
28 //
29 #include "rheolef/field.h"
30 #include <valarray>
31 
32 namespace rheolef {
33 template<class T>
34 std::valarray<field_basic<T> >
35 operator* (const T& a, const std::valarray<field_basic<T> >& xh)
36 {
37  std::valarray<field_basic<T> > yh (xh.size());
38  for (size_t i = 0, n = xh.size(); i < n; ++i)
39  yh[i] = a*xh[i];
40  return yh;
41 }
42 } // namespace rheolef
43 # endif // _RHEOLEF_FIELD_VALARRAY_H
rheolef::operator*
csr< T, sequential > operator*(const T &lambda, const csr< T, sequential > &a)
Definition: csr.h:437
a
Definition: diffusion_isotropic.h:25
rheolef::field_basic
Definition: field_expr_utilities.h:38
rheolef
This file is part of Rheolef.
Definition: compiler_eigen.h:37
mkgeo_ball.n
n
Definition: mkgeo_ball.sh:150
T
Expr1::float_type T
Definition: field_expr.h:218