problems to declare ITL preconditioners in a .h file

Márcio Ricardo Pivello <[email protected]> Mon, 4 Apr 2005 17:48:13 +0000
Newsgroups gmane.comp.lib.mtl.devel
Message-ID <[email protected]>
Hi, I'm having some problems when I declare my preconditioners in a separate 
.h file. If I create the objects in the .cpp file, it works fine.
Here's what I do:

file CFEModel.h
/*******/
typedef matrix< double, rectangle<>, array< compressed<> >, row_major 
>::type MTLmatrix;

 //mtl matrices
 MTLmatrix mtlU, mtlP;
 SSOR<MTLmatrix> mtlSSOR_u;
 SSOR<MTLmatrix> mtlSSOR_p;
/**************/

this is how I allocate the objects in the source file:

 mtlU = MTLmatrix(n_vel_dof,n_vel_dof);
 mtlP = MTLmatrix(n_pressure_dof,n_pressure_dof);
 mtlSSOR_u = SSOR<MTLmatrix>(mtlU);
 mtlSSOR_p = SSOR<MTLmatrix>(mtlP);

when I compile the project (ITL 4.0.0-1, MTL 2.1.2-21, kdevelop 3.1 on kde 
3.3, SuSE 9.2, gcc version 3.3.4 (pre 3.3.5 20040809), Pentium IV), the 
following error messages come:

cd '/usr/local/pivello/sources/femcfd2/optimized' && WANT_AUTOCONF_2_5="1" 
WANT_AUTOMAKE_1_6="1" gmake -k -j1 
compiling FEModel.cpp (g++)
/usr/local/pivello/sources/femcfd2/src/FEModel.cpp:5: error: no matching 
function for call to ` 
itl::SSOR<mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> 
>, mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> > >::SSOR()'
/usr/local/include/itl/preconditioner/ssor.h:66: error: candidates are: 
itl::SSOR<mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> 
>, mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> > >::SSOR(const 
itl::SSOR<mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> 
>, mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> > >&)
/usr/local/include/itl/preconditioner/ssor.h:107: error: 
itl::SSOR<Matrix>::SSOR(const Matrix&) [with Matrix = 
mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> >, 
mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> >]
/usr/local/pivello/sources/femcfd2/src/FEModel.cpp:5: error: no matching 
function for call to ` 
itl::SSOR<mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> 
>, mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> > >::SSOR()'
/usr/local/include/itl/preconditioner/ssor.h:66: error: candidates are: 
itl::SSOR<mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> 
>, mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> > >::SSOR(const 
itl::SSOR<mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> 
>, mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> > >&)
/usr/local/include/itl/preconditioner/ssor.h:107: error: 
itl::SSOR<Matrix>::SSOR(const Matrix&) [with Matrix = 
mtl::row_matrix<mtl::gen_array2D<mtl::compressed1D<double, int, 0> >, 
mtl::gen_rect_indexer<mtl::row_orien, 0, 0, size_t> >]

If I comment the lines where I allocate the preconditioners, the same 
message comes.
If, instead of it, I create the object in the .cpp file, as follows, 

 SSOR<MTLmatrix> mtlSSOR_u(mtlU), mtlSSOR_p(mtlP);
 ILU<MTLmatrix> mtlILU_p(mtlP),mtlILU_u(mtlU);

nothing wrong happens and the code works fine.

What am I doing wrong?

Thanks in advance
-- 
Márcio Ricardo Pivello
Mechanical Engineer, MSc.
LTCM and CFD Lab
Mechanical Engineering School
Federal University of Uberlândia 
Uberlândia - MG - Brazil

_______________________________________________
This list is archived at http://www.osl.iu.edu/MailArchives/mtl-devel/