field_valarray.h
Go to the documentation of this file.
# ifndef _RHEOLEF_FIELD_VALARRAY_H
# define _RHEOLEF_FIELD_VALARRAY_H
//
// valarray<field> : utilities (for generic newton.h and damped_newton.h)
//
// note: obsolete : has been super-setted by field_eigen.h
// maintained for backward compat.
//
#include "rheolef/field.h"
#include <valarray>
namespace rheolef {
template<class T>
std::valarray<field_basic<T> >
operator* (const T& a, const std::valarray<field_basic<T> >& xh)
{
std::valarray<field_basic<T> > yh (xh.size());
for (size_t i = 0, n = xh.size(); i < n; ++i)
yh[i] = a*xh[i];
return yh;
}
} // namespace rheolef
# 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