27 _norms(1,
DISCRETE_L2), _weights(1, 1.0), _weights_sq(1, 1.0)
33 _norms(1, t), _weights(1, 1.0), _weights_sq(1, 1.0)
39 _norms(norms), _weights(1, 1.0), _weights_sq(1, 1.0)
47 std::vector<Real> & weights) :
48 _norms(norms), _weights(weights), _weights_sq(_weights.size(), 0.0)
59 for (std::size_t i=0; i !=
_weights.size(); ++i)
64 std::vector<std::vector<Real>> & weights):
66 _weights(weights.size()),
67 _weights_sq(weights.size()),
68 _off_diagonal_weights(weights)
92 for (std::size_t i=0; i !=
_weights.size(); ++i)
99 libmesh_assert (!
_norms.empty());
112 libmesh_assert (!
_norms.empty());
114 std::size_t i = (var <
_norms.size()) ? var :
_norms.size() - 1;
123 libmesh_assert (!
_norms.empty());
184 const std::vector<Real> & v2)
188 std::size_t vsize = v1.size();
189 libmesh_assert_equal_to (vsize, v2.size());
193 std::size_t diagsize = this->
_weights.size();
194 libmesh_assert_greater_equal (vsize, diagsize);
201 for (std::size_t i = 0; i != diagsize; i++)
203 val += this->
_weights[i] * v1[i] * v2[i];
207 for (std::size_t i = diagsize; i < vsize; i++)
209 val += v1[i] * v2[i];
214 libmesh_assert_less_equal (vsize, nrows);
216 for (std::size_t i = 0; i != nrows; i++)
219 for (std::size_t j=0; j != ncols; j++)
240 for (std::size_t i = 0; i != nrows; i++)
243 for (std::size_t j = 0; j != ncols; j++)
254 for (std::size_t i = 0; i != nrows; i++)
std::vector< FEMNormType > _norms
std::vector< Real > _weights_sq
void set_off_diagonal_weight(unsigned int i, unsigned int j, Real w)
void set_weight(unsigned int var, Real w)
FEMNormType type(unsigned int var) const
Real weight_sq(unsigned int var) const
Real weight(unsigned int var) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Real calculate_norm(const std::vector< Real > &v)
std::vector< std::vector< Real > > _off_diagonal_weights
std::vector< Real > _weights
void set_type(unsigned int var, const FEMNormType &t)