Hi,

I have installed deal.II on MacOS X.

Tested deal.II versions: SVN 17071, SVN 17340 (both 6.2.pre)
Tested compilers: g++-4.2.4, g++-4.3.2
All combinations tried. The problem persists.

I have rewritten a program to use dealii::BlockVector<double>
instead of dealii::Vector<double> for its linear algebra. The program
gets compiled without warnings. When run, it aborts upon grid
refinement / solution transfer with the following error message:

--------------------------------------------------------
An error occurred in line <291> of file <source/numerics/solution_transfer.cc> 
in function
    void dealii::SolutionTransfer<dim, VectorType, DH>::interpolate(const 
std::vector<VectorType, std::allocator<_T2> >&, std::vector<VectorType, 
std::allocator<_T2> >&) const [with int dim = 2, VectorType = 
dealii::BlockVector<double>, DH = dealii::DoFHandler<2>]
The violated condition was: 
    all_in[i].size() == n_dofs_old
The name and call sequence of the exception was:
    ExcWrongVectorSize(all_in[i].size(), n_dofs_old)
Additional Information: 
The size of the vector is 0 although it should be 98.
--------------------------------------------------------

Actually, I call the version of SolutionTransfer's interpolate function that 
takes two single BlockVector arguments. That function (found at 
source/numerics/solution_transfer.cc:397) copies each BlockVector into a 
one-element std::vector<BlockVector> and then calls the interpolate function 
for vectors of BlockVectors (at source/numerics/solution_transfer.cc:281).

BOTH versions check the sizes of the BlockVectors given.
But it is the INNER version working on std::vector<BlockVector> that aborts.

IMHO, this indicates that the single-BlockVector version does not copy its
arguments correctly.

Copying is done by BlockVector's operator=. I have grepped the entire
deal.II SVN checkout for 'operator=.*BlockVector' but found only
declarations, no definition.

Could someone look into this?
Thanks in advance.
-- 
Christian Cornelssen

Attachment: signature.asc
Description: PGP signature

_______________________________________________

Reply via email to