16 #include <deal.II/sundials/copy.h> 18 #ifdef DEAL_II_WITH_SUNDIALS 20 DEAL_II_NAMESPACE_OPEN
34 N_Vector_length(
const N_Vector &vec)
36 const N_Vector_ID
id = N_VGetVectorID(vec);
40 case SUNDIALS_NVEC_SERIAL:
42 length = NV_LENGTH_S(vec);
45 #ifdef DEAL_II_WITH_MPI 46 case SUNDIALS_NVEC_PARALLEL:
48 length = NV_LOCLENGTH_P(vec);
57 return static_cast<std::size_t
>(length);
60 #ifdef DEAL_II_WITH_MPI 62 #ifdef DEAL_II_WITH_TRILINOS 70 for (
size_t i=0; i<N; ++i)
82 for (
size_t i=0; i<N; ++i)
93 for (
size_t i=0; i<N; ++i)
105 for (
size_t i=0; i<N; ++i)
111 #endif //DEAL_II_WITH_TRILINOS 113 #ifdef DEAL_II_WITH_PETSC 114 #ifndef PETSC_USE_COMPLEX 121 for (
size_t i=0; i<N; ++i)
133 for (
size_t i=0; i<N; ++i)
144 for (
size_t i=0; i<N; ++i)
156 for (
size_t i=0; i<N; ++i)
162 #endif //PETSC_USE_COMPLEX 163 #endif //DEAL_II_WITH_PETSC 169 const size_t N = dst.
size();
171 for (
size_t i=0; i<N; ++i)
173 dst[i] = NV_Ith_S(src, i);
179 const size_t N = src.
size();
181 for (
size_t i=0; i<N; ++i)
183 NV_Ith_S(dst, i) = src[i];
189 const size_t N = dst.
size();
191 for (
size_t i=0; i<N; ++i)
193 dst[i] = NV_Ith_S(src, i);
199 const size_t N = src.
size();
201 for (
size_t i=0; i<N; ++i)
203 NV_Ith_S(dst, i) = src[i];
208 DEAL_II_NAMESPACE_CLOSE
#define AssertDimension(dim1, dim2)
void compress(::VectorOperation::values operation)
size_type nth_index_in_set(const unsigned int local_index) const
IndexSet locally_owned_elements() const
void compress(const VectorOperation::values operation)
#define Assert(cond, exc)
void compress(::VectorOperation::values operation)
IndexSet locally_owned_elements() const
IndexSet locally_owned_elements() const
static ::ExceptionBase & ExcNotImplemented()
size_type n_elements() const
static ::ExceptionBase & ExcInternalError()