Arvind,

> There weren't too many occurrences of the above, though. The patch to
> implement
> my changes is attached (meant to be applied on 6.2.1)

Excellent. I've applied it to trunk -- I don't think the 6.2.x branch will see 
any further releases, so there didn't seem to be much of a point. If you are 
willing to work with us some more, it would probably best if you worked with 
the main branch from svn instead.


> I do not know much about the inner workings of Petsc or deal.ii. I am stuck
> at the following
> set of error messages
>---------------------------------
> /home/arvind/sim/workspace/deal.II.6.2.1/trunk/lac/include/lac/constraint_m
>atrix.templates.h:152: error: no match for ‘operator*’ in
> ‘((dealii::PETScWrappers::Vector*)vec)->dealii::PETScWrappers::Vector::<ano
>nymous>.dealii::PETScWrappers::VectorBase::operator()(constraint_line.__gnu_
>cxx::__normal_iterator<_Iterator, _Container>::operator-> [with _Iterator =
> const
> dealii::ConstraintMatrix::ConstraintLine*, _Container =
> std::vector<dealii::ConstraintMatrix::ConstraintLine,
> std::allocator<dealii::ConstraintMatrix::ConstraintLine>
> ]()->dealii::ConstraintMatrix::ConstraintLine::line) *
> constraint_line.__gnu_cxx::__normal_iterator<_Iterator,
> _Container>::operator-> [with _Iterator = const
> dealii::ConstraintMatrix::ConstraintLine*, _Container =
> std::vector<dealii::ConstraintMatrix::ConstraintLine,
> std::allocator<dealii::ConstraintMatrix::ConstraintLine>
> ]()->dealii::ConstraintMatrix::ConstraintLine::entries.std::vector<_Tp,
> _Alloc>::operator[] [with _Tp = std::pair<unsigned int, double>, _Alloc =
> std::allocator<std::pair<unsigned int, double> >](((long unsigned
> int)q))->std::pair<unsigned int, double>::second’

Ugh, what a monster. I believe what it complains about in line 152 of this 
file is that we multiply a PetscScalar and a double. Can you try this 
modification of the line:

        vec(constraint_line->entries[q].first)
          += (vec(constraint_line->line) *
              static_cast<typename VectorType::value_type>
                  (constraint_line->entries[q].second));

and see what happens?


> /home/arvind/sim/workspace/deal.II.6.2.1/trunk/lac/include/lac/constraint_m
>atrix.templates.h:1517: error: no matching function for call to
> ‘dealii::PETScWrappers::SparseMatrix::add(const unsigned int&, const
> unsigned int&, unsigned int*, double*, bool, bool)’

This comes from the fact that the function has an array of doubles that it 
wants to write into the matrix, but the matrix wants an array of PetscScalars 
as the third to last element. Can you try, in the function in 
constraint_matrix.templates.h in which this errors happens, to declare 
the 'vals' array in line 1332 as 
  std::vector<typename MatrixType::value_type> vals (...);
It will require a few changes from 'double*' to 
  typename MatrixType::value_type *
later on as well, I suppose.

Best
 W.
  

-------------------------------------------------------------------------
Wolfgang Bangerth                email:            [email protected]
                                 www: http://www.math.tamu.edu/~bangerth/

_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to