Loading...
Searching...
No Matches
stencil.tpp
34const typename DiscreteStencil<weight_t, value_t>::weight_manager_type DiscreteStencil<weight_t, value_t>::m_weightManager = typename DiscreteStencil<weight_t>::weight_manager_type();
42const typename DiscreteStencil<weight_t, value_t>::weight_manager_type & DiscreteStencil<weight_t, value_t>::getWeightManager()
55OBinaryStream& operator<<(OBinaryStream &buffer, const DiscreteStencil<weight_t, value_t> &stencil)
84 buffer >> stencil.m_zero;
86 std::size_t nItems;
87 buffer >> nItems;
100}
110{
111}
124{
125}
135DiscreteStencil<weight_t, value_t>::DiscreteStencil(std::size_t size, const long *pattern, const weight_t &zero)
138 m_constant(m_zero)
140}
151DiscreteStencil<weight_t, value_t>::DiscreteStencil(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero)
190void DiscreteStencil<weight_t, value_t>::initialize(std::size_t size, const long *pattern, const weight_t &zero)
191{
198 m_weightManager.copy(m_zero, m_weights.data() + n);
219void DiscreteStencil<weight_t, value_t>::initialize(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero)
428void DiscreteStencil<weight_t, value_t>::sumWeight(std::size_t pos, const weight_t &weight, double factor)
452void DiscreteStencil<weight_t, value_t>::setItem(std::size_t pos, long id, const weight_t &weight)
623void DiscreteStencil<weight_t, value_t>::sum(const DiscreteStencil<weight_t, value_t> &other, double factor)
845 return const_cast<weight_t &>(static_cast<const DiscreteStencil<weight_t, value_t> &>(*this).at(id));
989MPDiscreteStencil<weight_t, value_t>::MPDiscreteStencil(std::size_t size, const long *pattern, const weight_t &zero)
1004MPDiscreteStencil<weight_t, value_t>::MPDiscreteStencil(std::size_t size, const long *pattern, const weight_t *weights, const weight_t &zero)
1017void MPDiscreteStencil<weight_t, value_t>::setWeightPool(MPDiscreteStencil<weight_t, value_t>::weight_pool_type *pool)
1068bitpit::DiscreteStencil<weight_t, value_t> operator*(const bitpit::DiscreteStencil<weight_t, value_t> &stencil, double factor)
1081bitpit::DiscreteStencil<weight_t, value_t> operator*(double factor, const bitpit::DiscreteStencil<weight_t, value_t> &stencil)
1097bitpit::DiscreteStencil<weight_t, value_t> operator/(const bitpit::DiscreteStencil<weight_t, value_t> &stencil, double factor)
1113bitpit::DiscreteStencil<weight_t, value_t> operator+(const bitpit::DiscreteStencil<weight_t, value_t> &stencil_A, const bitpit::DiscreteStencil<weight_t, value_t> &stencil_B)
1129bitpit::DiscreteStencil<weight_t, value_t> operator-(const bitpit::DiscreteStencil<weight_t, value_t> &stencil_A, const bitpit::DiscreteStencil<weight_t, value_t> &stencil_B)
1145typename bitpit::DiscreteStencil<std::array<V, 3>> operator*(const typename bitpit::DiscreteStencil<V> &stencil, const std::array<V, 3> &vector)
1158typename bitpit::DiscreteStencil<std::array<V, 3>> operator*(const std::array<V, 3> &vector, const typename bitpit::DiscreteStencil<V> &stencil)
1180typename bitpit::DiscreteStencil<V> dotProduct(const typename bitpit::DiscreteStencil<std::array<V, 3>> &stencil, const typename bitpit::DiscreteStencil<std::array<V, 3>>::weight_type &vector)
1196void 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)
1204 typename bitpit::DiscreteStencil<V>::weight_type *weightData_dotProduct = stencil_dotProduct->weightData();
1221typename bitpit::DiscreteStencil<std::array<V, 3>> project(const typename bitpit::DiscreteStencil<std::array<V, 3>> &stencil, const std::array<V, 3> &direction)
1237void 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)
1242 typename bitpit::DiscreteStencil<std::array<V, 3>>::weight_type *weightData_projection = stencil_projection->weightData();
1244 typename bitpit::DiscreteStencil<std::array<V, 3>>::weight_type &weight = weightData_projection[n];
1248 stencil_projection->setConstant(::dotProduct(stencil_projection->getConstant(), direction) * direction);
Metafunction for generating a discretization stencil.
Definition stencil.hpp:59
void zeroConstant()
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 addComplementToZero(long id)
Definition stencil.tpp:684
void setWeight(std::size_t pos, const weight_t &weight)
Definition stencil.tpp:403
virtual void clearWeights(bool release)
Definition stencil.tpp:787
DiscreteStencil< weight_t, value_t > & operator-=(const DiscreteStencil< weight_t, value_t > &other)
Definition stencil.tpp:949
DiscreteStencil(const double &zero=double())
void setItem(std::size_t pos, long id, const weight_t &weight)
Definition stencil.tpp:452
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 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 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
void appendWeight(const weight_t &weight) override
Definition stencil.tpp:1028
void clearWeights(bool release) override
Definition stencil.tpp:1049
void setWeightPool(weight_pool_type *pool)
Definition stencil.tpp:1017
MPDiscreteStencil(const weight_t &zero=weight_t())
Definition stencil.tpp:962
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
