void EpetraVector<T>::add_vector (const T * v, const std::vector<numeric_index_type> & dof_indices) { libmesh_assert_equal_to (sizeof(numeric_index_type), sizeof(int)); SumIntoGlobalValues (dof_indices.size(), (int *) &dof_indices[0], const_cast<T *>(v)); }
void EpetraVector<T>::add_vector (const DenseVector<T>& V_in, const std::vector<unsigned int>& dof_indices) { libmesh_assert_equal_to (V_in.size(), dof_indices.size()); SumIntoGlobalValues(dof_indices.size(), (int *)&dof_indices[0], &const_cast<DenseVector<T> *>(&V_in)->get_values()[0]); }
void EpetraVector<T>::add_vector (const std::vector<T>& v, const std::vector<unsigned int>& dof_indices) { libmesh_assert_equal_to (v.size(), dof_indices.size()); SumIntoGlobalValues (v.size(), (int*) &dof_indices[0], const_cast<T*>(&v[0])); }
void EpetraVector<T>::add (const numeric_index_type i_in, const T value_in) { int i = static_cast<int> (i_in); T value = value_in; libmesh_assert_less (i_in, this->size()); SumIntoGlobalValues(1, &i, &value); this->_is_closed = false; }
int Epetra_FECrsMatrix::SumIntoGlobalValues(const Epetra_LongLongSerialDenseVector& indices, const Epetra_SerialDenseMatrix& values, int format) { if (indices.Length() != values.M() || indices.Length() != values.N()) { return(-1); } return( SumIntoGlobalValues(indices.Length(), indices.Values(), values.A(), format) ); }
int Epetra_FECrsMatrix::SumIntoGlobalValues(const Epetra_IntSerialDenseVector& rows, const Epetra_IntSerialDenseVector& cols, const Epetra_SerialDenseMatrix& values, int format) { if (rows.Length() != values.M() || cols.Length() != values.N()) { return(-1); } return( SumIntoGlobalValues(rows.Length(), rows.Values(), cols.Length(), cols.Values(), values.A(), format) ); }