20 #ifndef LIBMESH_DENSE_SUBMATRIX_H 21 #define LIBMESH_DENSE_SUBMATRIX_H 55 const unsigned int ioff=0,
56 const unsigned int joff=0,
57 const unsigned int m=0,
58 const unsigned int n=0);
75 virtual void zero()
override;
81 const unsigned int j)
const;
87 const unsigned int j);
89 virtual T
el(
const unsigned int i,
90 const unsigned int j)
const override 91 {
return (*
this)(i,j); }
93 virtual T &
el(
const unsigned int i,
94 const unsigned int j)
override 95 {
return (*
this)(i,j); }
105 const unsigned int joff,
106 const unsigned int new_m,
107 const unsigned int new_n);
126 const unsigned int j,
159 const unsigned int ioff,
160 const unsigned int joff,
161 const unsigned int new_m,
162 const unsigned int new_n) :
164 _parent_matrix(new_parent)
173 const unsigned int joff,
174 const unsigned int new_m,
175 const unsigned int new_n)
183 libmesh_assert_less_equal ((this->i_off() + this->m()), _parent_matrix.m());
184 libmesh_assert_less_equal ((this->j_off() + this->n()), _parent_matrix.n());
193 for (
unsigned int i=0; i<this->m(); i++)
194 for (
unsigned int j=0; j<this->n(); j++)
195 _parent_matrix(i + this->i_off(),
196 j + this->j_off()) = 0.;
204 const unsigned int j)
const 206 libmesh_assert_less (i, this->m());
207 libmesh_assert_less (j, this->n());
208 libmesh_assert_less (i + this->i_off(), _parent_matrix.m());
209 libmesh_assert_less (j + this->j_off(), _parent_matrix.n());
211 return _parent_matrix (i + this->i_off(),
219 const unsigned int j)
221 libmesh_assert_less (i, this->m());
222 libmesh_assert_less (j, this->n());
223 libmesh_assert_less (i + this->i_off(), _parent_matrix.m());
224 libmesh_assert_less (j + this->j_off(), _parent_matrix.n());
226 return _parent_matrix (i + this->i_off(),
234 #endif // LIBMESH_DENSE_SUBMATRIX_H virtual T & el(const unsigned int i, const unsigned int j) override
virtual void zero() override
unsigned int j_off() const
virtual void left_multiply(const DenseMatrixBase< T > &M2) override
DenseVector< T > & parent()
T operator()(const unsigned int i, const unsigned int j) const
DenseMatrix< T > & parent()
void condense(const unsigned int i, const unsigned int j, const T val, DenseSubVector< T > &rhs)
DenseSubMatrix & operator=(const DenseSubMatrix &)=default
DenseSubMatrix(DenseMatrix< T > &new_parent, const unsigned int ioff=0, const unsigned int joff=0, const unsigned int m=0, const unsigned int n=0)
virtual T el(const unsigned int i, const unsigned int j) const override
void reposition(const unsigned int ioff, const unsigned int joff, const unsigned int new_m, const unsigned int new_n)
A matrix object used for finite element assembly and numerics.
virtual ~DenseSubMatrix()=default
virtual void right_multiply(const DenseMatrixBase< T > &M3) override
DenseMatrix< T > & _parent_matrix
unsigned int i_off() const