20 #ifndef LIBMESH_DENSE_MATRIX_BASE_H 21 #define LIBMESH_DENSE_MATRIX_BASE_H 53 const unsigned int new_n=0) :
_m(new_m),
_n(new_n) {}
71 virtual void zero() = 0;
78 virtual T
el(
const unsigned int i,
79 const unsigned int j)
const = 0;
86 virtual T &
el(
const unsigned int i,
87 const unsigned int j) = 0;
102 unsigned int m()
const {
return _m; }
107 unsigned int n()
const {
return _n; }
119 friend std::ostream & operator << (std::ostream & os, const DenseMatrixBase<T> &
m)
136 template <
typename T2,
typename T3>
139 add (
const T2 factor,
162 const unsigned int j,
184 template<
typename T2,
typename T3>
191 libmesh_assert_equal_to (this->m(), mat.
m());
192 libmesh_assert_equal_to (this->n(), mat.
n());
194 for (
unsigned int j=0; j<this->n(); j++)
195 for (
unsigned int i=0; i<this->m(); i++)
196 this->el(i,j) += factor*mat.
el(i,j);
202 #endif // LIBMESH_DENSE_MATRIX_BASE_H
void print(std::ostream &os=libMesh::out) const
virtual T el(const unsigned int i, const unsigned int j) const =0
virtual void left_multiply(const DenseMatrixBase< T > &M2)=0
DenseMatrixBase(const unsigned int new_m=0, const unsigned int new_n=0)
DenseMatrixBase & operator=(const DenseMatrixBase &)=default
virtual void right_multiply(const DenseMatrixBase< T > &M3)=0
void print_scientific(std::ostream &os, unsigned precision=8) const
boostcopy::enable_if_c< ScalarTraits< T2 >::value, void >::type add(const T2 factor, const DenseMatrixBase< T3 > &mat)
static void multiply(DenseMatrixBase< T > &M1, const DenseMatrixBase< T > &M2, const DenseMatrixBase< T > &M3)
OStreamProxy out(std::cout)
virtual ~DenseMatrixBase()=default
void condense(const unsigned int i, const unsigned int j, const T val, DenseVectorBase< T > &rhs)