Loading...
Searching...
No Matches
stencil.hpp
46OBinaryStream & operator<<(OBinaryStream &buffer, const DiscreteStencil<weight_t, value_t> &stencil);
58template<typename weight_t, typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
62friend OBinaryStream & (operator<<) (OBinaryStream &buffer, const DiscreteStencil<W, V> &stencil);
87 DiscreteStencil(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero = weight_t());
93 void initialize(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero = weight_t());
151 DiscreteStencil<weight_t, value_t> & operator+=(const DiscreteStencil<weight_t, value_t> &other);
181template<typename weight_t, typename value_t = typename DiscreteStencilWeightValueInfo<weight_t>::type>
191 MPDiscreteStencil(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero = weight_t());
217bitpit::DiscreteStencil<weight_t, value_t> operator*(const bitpit::DiscreteStencil<weight_t, value_t> &stencil, double factor);
220bitpit::DiscreteStencil<weight_t, value_t> operator*(double factor, const bitpit::DiscreteStencil<weight_t, value_t> &stencil);
223bitpit::DiscreteStencil<weight_t, value_t> operator/(const bitpit::DiscreteStencil<weight_t, value_t> &stencil, double factor);
226bitpit::DiscreteStencil<weight_t, value_t> operator+(const bitpit::DiscreteStencil<weight_t, value_t> &stencil_A, const bitpit::DiscreteStencil<weight_t, value_t> &stencil_B);
229bitpit::DiscreteStencil<weight_t, value_t> operator-(const bitpit::DiscreteStencil<weight_t, value_t> &stencil_A, const bitpit::DiscreteStencil<weight_t, value_t> &stencil_B);
233typename bitpit::DiscreteStencil<std::array<V, 3>> operator*(const typename bitpit::DiscreteStencil<V> &stencil, const std::array<V, 3> &vector);
235typename bitpit::DiscreteStencil<std::array<V, 3>> operator*(const std::array<V, 3> &vector, const typename bitpit::DiscreteStencil<V> &stencil);
239typename bitpit::DiscreteStencil<V> dotProduct(const typename bitpit::DiscreteStencil<std::array<V, 3>> &stencil, const typename bitpit::DiscreteStencil<std::array<V, 3>>::weight_type &vector);
241void dotProduct(const typename bitpit::DiscreteStencil<std::array<V, 3>> &stencil, const typename bitpit::DiscreteStencil<std::array<V, 3>>::weight_type &vector, typename bitpit::DiscreteStencil<V> *stencil_dotProduct);
244typename bitpit::DiscreteStencil<std::array<V, 3>> project(const typename bitpit::DiscreteStencil<std::array<V, 3>> &stencil, const std::array<V, 3> &direction);
246void project(const typename bitpit::DiscreteStencil<std::array<V, 3>> &stencil, const std::array<V, 3> &direction, typename bitpit::DiscreteStencil<std::array<V, 3>> *stencil_projection);
Metafunction for generating a discretization stencil.
Definition stencil.hpp:59
void sumWeight(std::size_t pos, const weight_t &weight, double factor=1.)
Definition stencil.tpp:428
void sumConstant(const weight_t &constant, double factor=1.)
Definition stencil.tpp:579
void setWeight(std::size_t pos, weight_t &&weight)
Definition stencil.tpp:415
const weight_t & getWeight(std::size_t pos) const
Definition stencil.tpp:369
void addComplementToZero(long id)
Definition stencil.tpp:684
void initialize(std::size_t size, const long *pattern, const weight_t &zero=weight_t())
Definition stencil.tpp:190
void setWeight(std::size_t pos, const weight_t &weight)
Definition stencil.tpp:403
virtual void clearWeights(bool release)
Definition stencil.tpp:787
void initialize(const DiscreteStencil< weight_t, value_t > &other)
Definition stencil.tpp:248
void appendItem(long id, weight_t &&weight)
Definition stencil.tpp:522
DiscreteStencil< weight_t, value_t > & operator-=(const DiscreteStencil< weight_t, value_t > &other)
Definition stencil.tpp:949
DiscreteStencil(std::size_t nItems, const weight_t &zero=weight_t())
Definition stencil.tpp:120
DiscreteStencil(std::size_t size, const long *pattern, const weight_t &zero=weight_t())
Definition stencil.tpp:135
DiscreteStencil(const weight_t &zero=weight_t())
Definition stencil.tpp:108
void setItem(std::size_t pos, long id, const weight_t &weight)
Definition stencil.tpp:452
const long & getPattern(std::size_t pos) const
Definition stencil.tpp:310
virtual void appendWeight(const weight_t &weight)
Definition stencil.tpp:771
std::size_t size() const
DiscreteStencil(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero=weight_t())
Definition stencil.tpp:151
void zero()
DiscreteStencil< weight_t, value_t > & operator+=(const DiscreteStencil< weight_t, value_t > &other)
Definition stencil.tpp:935
void renumber(const std::unordered_map< long, long > &map)
Definition stencil.tpp:658
void initialize(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero=weight_t())
Definition stencil.tpp:219
void display(std::ostream &out, double factor=1.) const
Definition stencil.tpp:802
void appendItem(long id, const weight_t &weight)
Definition stencil.tpp:506
DiscreteStencil< weight_t, value_t > & operator/=(double factor)
Definition stencil.tpp:918
virtual void appendWeight(weight_t &&weight)
Definition stencil.tpp:760
void setConstant(const weight_t &constant)
Definition stencil.tpp:556
DiscreteStencil< weight_t, value_t > & operator*=(double factor)
Definition stencil.tpp:901
void setItem(std::size_t pos, long id, weight_t &&weight)
Definition stencil.tpp:466
void sum(const DiscreteStencil< weight_t, value_t > &other, double factor)
Definition stencil.tpp:623
void setPattern(std::size_t pos, long id)
Definition stencil.tpp:345
static const weight_manager_type & getWeightManager()
Definition stencil.tpp:42
void sumItem(long id, const weight_t &weight, double factor=1.)
Definition stencil.tpp:483
void initialize(std::size_t nItems, const weight_t &zero=weight_t())
Definition stencil.tpp:165
Metafunction for generating a discretization stencil with a memory pool (MP).
Definition stencil.hpp:183
void appendWeight(const weight_t &weight) override
Definition stencil.tpp:1028
MPDiscreteStencil(std::size_t size, const long *pattern, const weight_t &zero=weight_t())
Definition stencil.tpp:989
void clearWeights(bool release) override
Definition stencil.tpp:1049
void setWeightPool(weight_pool_type *pool)
Definition stencil.tpp:1017
MPDiscreteStencil(std::size_t nItems, const weight_t &zero=weight_t())
Definition stencil.tpp:975
MPDiscreteStencil(const weight_t &zero=weight_t())
Definition stencil.tpp:962
MPDiscreteStencil(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero=weight_t())
Definition stencil.tpp:1004
T dotProduct(const std::array< T, d > &x, const std::array< T, d > &y)
Definition MathOperators_array.tpp:851
std::vector< T > operator+(const std::vector< T > &, const std::vector< T > &)
Definition Operators_vector.tpp:69
std::ostream & operator<<(std::ostream &, const std::vector< T > &)
Definition Operators_vector.tpp:1353
