Rheolef  7.2
an efficient C++ finite element environment
 
Loading...
Searching...
No Matches
field_valarray.h
Go to the documentation of this file.
1# ifndef _RHEOLEF_FIELD_VALARRAY_H
2# define _RHEOLEF_FIELD_VALARRAY_H
23//
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
32namespace rheolef {
33template<class T>
34std::valarray<field_basic<T> >
35operator* (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
Expr1::float_type T
Definition field_expr.h:230
This file is part of Rheolef.
csr< T, sequential > operator*(const T &lambda, const csr< T, sequential > &a)
Definition csr.h:437