16 #ifndef dealii_vector_element_access_h 17 #define dealii_vector_element_access_h 20 #include <deal.II/lac/trilinos_epetra_vector.h> 22 DEAL_II_NAMESPACE_OPEN
26 template <
typename VectorType>
30 static void add(
const typename VectorType::value_type value,
34 static void set(
typename VectorType::value_type value,
38 static typename VectorType::value_type
get(
const VectorType &V,
44 template <
typename VectorType>
46 void ElementAccess<VectorType>::add(
const typename VectorType::value_type value,
55 template <
typename VectorType>
57 void ElementAccess<VectorType>::set(
const typename VectorType::value_type value,
66 template <
typename VectorType>
68 typename VectorType::value_type
69 ElementAccess<VectorType>::get(
const VectorType &V,
77 #if defined(DEAL_II_WITH_TRILINOS) && defined(DEAL_II_WITH_MPI) 80 void ElementAccess<LinearAlgebra::EpetraWrappers::Vector>::
81 add(
const double value,
87 TrilinosWrappers::types::int_type trilinos_i =
88 vector.Map().LID(static_cast<TrilinosWrappers::types::int_type>(i));
90 vector[0][trilinos_i] += value;
97 void ElementAccess<LinearAlgebra::EpetraWrappers::Vector>::
98 set(
const double value,
104 TrilinosWrappers::types::int_type trilinos_i =
105 vector.Map().LID(static_cast<TrilinosWrappers::types::int_type>(i));
107 vector[0][trilinos_i] = value;
114 ElementAccess<LinearAlgebra::EpetraWrappers::Vector>::
120 TrilinosWrappers::types::int_type trilinos_i =
121 vector.Map().LID(static_cast<TrilinosWrappers::types::int_type>(i));
123 return vector[0][trilinos_i];
128 DEAL_II_NAMESPACE_CLOSE
unsigned int global_dof_index
const Epetra_FEVector & trilinos_vector() const