1#ifndef _RHEOLEF_KELLER_DETAILS_H
2#define _RHEOLEF_KELLER_DETAILS_H
23#include "rheolef/pair_with_linear_algebra.h"
25namespace rheolef {
namespace details {
34void reset (std::valarray<T>& x) {
35 for (
size_t i = 0; i < x.size(); ++i)
reset(x[i]);
37template<
class T1,
class T2>
56 for (
size_t i = 0; i < x.size(); ++i) {
57 value = std::max(value, x[i].
max_abs());
75 for (
size_t i = 0; i < x.size(); ++i) {
96 for (
size_t i = 0, start = 0; i < x.size(); ++i) {
97 std::copy (x[i].
u().begin(), x[i].
u().end(), y.begin()+start);
98 start += x[i].u().size();
105 if (x.size() == 0)
return vec<T>();
106 size_t n = 0, dis_n = 0;
107 for (
size_t i = 0; i < x.size(); ++i) {
108 n += x[i].u().size();
109 dis_n += x[i].u().dis_size();
111 communicator comm = x[0].u().ownership().comm();
124 size_t size = x.
u().size();
125 std::copy (value.begin(), value.begin() + size, x.
set_u().begin());
131 for (
size_t i = 0; i < x.size(); ++i) {
132 size_t last = start + x[i].u().size();
133 std::copy (value.begin() + start, value.begin() + last, x[i].set_u().begin());
see the distributor page for the full documentation
const vec< T, M > & u() const
typename float_traits< T >::type float_type
see the vec page for the full documentation
size_t unknown_size(const field_basic< T > &x)
size_t get_unknown(const T &x)
void set_unknown(T &x, const T &value)
This file is part of Rheolef.