Paras, Le mer. 26 févr. 2020 à 12:27, Paras Kumar <[email protected]> a écrit : > For the vectors (solution & rhs), the idea was to copy the values from the > dealii::Vector to dealii::LinearAlgebra::EpetraWrappers::Vector. As an > intermediate step I first copy the dealii::Vector to > dealii::LinearAlgebra::Vector<doule> using the constructor : > https://www.dealii.org/current/doxygen/deal.II/classLinearAlgebra_1_1Vector.html#af441b2c23134f8e6e08c833f918888a2. > This works fine. However, when I try to call > dealii::LinearAlgebra::EpetraWrappers::Vector::reinit(dealii::LinearAlgebra::Vector<doule>) > the following error occurs: > > An error occurred in line <85> of file > </opt/spack/var/spack/stage/dealii-9.0.1-ssxm6qr7mlmymdmjssazlr4s32qar5cv/dealii-9.0.1/source/lac/trilinos_epetra_vector.cc> > in function > virtual void dealii::LinearAlgebra::EpetraWrappers::Vector::reinit(const > dealii::LinearAlgebra::VectorSpaceVector<double>&, bool) > The violated condition was: > dynamic_cast<const Vector *>(&V)!=nullptr > Additional information: > (none) You are not allow to use reinit with a vector of a different type. I am afraid you will have to copy the elements yourself. I would advise you to choose this vector https://www.dealii.org/current/doxygen/deal.II/classTrilinosWrappers_1_1MPI_1_1Vector.html It is easier to fill in.
Best, Bruno -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CAGVt9eOSbng0MS%3D2ziAASOVtX7PhH-wyZs_2XG9h8Y%3DEMLyVbw%40mail.gmail.com.
