Hello ,
I changed the code into :
BlockSparseMatrix<double> output_vector;
SparseDirectUMFPACK A_direct;
A_direct.initialize(solid_3d.tangent_matrix.block(solid_3d.u_dof,solid_3d.u_dof));
A_direct.vmult(output_vector.block(solid_3d.u_dof),
solid_3d.system_rhs.block(solid_3d.u_dof));
But I got error information:
| ^~~~~~~~~~~~~~~~~~~~~~~
/usr/share/doc/libdeal.ii-doc/examples/cook_membrane3/cook_membrane.cc: In
function ‘int main(int, char**)’:
/usr/share/doc/libdeal.ii-doc/examples/cook_membrane3/cook_membrane.cc:2510:44:
error: no matching function for call to
‘dealii::BlockSparseMatrix<double>::block(Cook_Membrane::Solid<3,
double>::<unnamed enum>)’
2510 | A_direct.vmult(output_vector.block(solid_3d.u_dof),
solid_3d.system_rhs.block(solid_3d.u_dof));
| ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/deal.II/lac/block_sparse_matrix.h:22,
from /usr/include/deal.II/lac/sparse_direct.h:25,
from
/usr/share/doc/libdeal.ii-doc/examples/cook_membrane3/cook_membrane.cc:38:
/usr/include/deal.II/lac/block_matrix_base.h:1567:1: note: candidate:
‘dealii::BlockMatrixBase<MatrixType>::BlockType&
dealii::BlockMatrixBase<MatrixType>::block(unsigned int, unsigned int)
[with MatrixType = dealii::SparseMatrix<double>;
dealii::BlockMatrixBase<MatrixType>::BlockType =
dealii::SparseMatrix<double>
I don't understand why the error comes out,the similar code comes out in
line of 2180 in cook_membrane.cc.
BlockVector<double> &newton_update
SparseDirectUMFPACK A_direct;
A_direct.initialize(tangent_matrix.block(u_dof, u_dof));
A_direct.vmult(newton_update.block(u_dof),
system_rhs.block(u_dof));
solid3d.u_dof=0 which I got by writing in main function.
Could anyone provide any hint or suggestions?
Thanks in advance!
Best regards
Lance
On Thursday, June 22, 2023 at 6:01:44 PM UTC+2 Lance Zhang wrote:
> the code is related to cook_membrane.cc.
>
> On Thursday, June 22, 2023 at 6:00:55 PM UTC+2 Lance Zhang wrote:
>
>> Hello ,
>>
>> When I use vmult to multiply matrix with vector,I found error information:
>> Error information:
>> BOOST_HEADER_DEPRECATED("<boost/core/no_exceptions_support.hpp>")
>> | ^~~~~~~~~~~~~~~~~~~~~~~
>> /usr/share/doc/libdeal.ii-doc/examples/cook_membrane3/cook_membrane.cc:
>> In function ‘int main(int, char**)’:
>> /usr/share/doc/libdeal.ii-doc/examples/cook_membrane3/cook_membrane.cc:2510:24:
>>
>> error: no matching function for call to
>> ‘dealii::SparseDirectUMFPACK::vmult(dealii::BlockSparseMatrix<double>&,
>> dealii::BlockVector<double>&)’
>> 2510 | A_direct.vmult(output_vector,solid_3d.system_rhs);
>> | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>
>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
>> code:
>>
>> BlockSparseMatrix<double> output_vector;
>> SparseDirectUMFPACK A_direct;
>> A_direct.initialize(solid_3d.tangent_matrix);
>> A_direct.vmult(output_vector,solid_3d.system_rhs);
>>
>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
>>
>> BlockSparseMatrix<double> is the data type of solid_3d.tangent_matrix
>> The data type of system_rhs is BlockSparseMatrix<double> .
>>
>> Could anyone provide any hint or sugesstion?
>>
>> Thanks in advance!
>> Best regards
>> Lance
>>
>>
--
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/4403f4c0-9110-4c5f-a19b-505d0e3e0494n%40googlegroups.com.