[Dune] Problem when instantiating a CG solver object with a Gauss Seidel Preconditioner

Christian Engwer christi at uni-hd.de
Fri Apr 30 14:09:30 CEST 2010


On Fri, Apr 30, 2010 at 01:57:12PM +0200, Oswald Benedikt wrote:
> Dear Dune,
> 
> I have just recently tried to instantiate CG solver object with a serial Gauss Seidel preconditioner, as follows:
> 
> 	Dune::SeqGS<typename EmpClass::EmpGlobalMatrix,
> 				typename EmpClass::EmpGlobalVector,
> 				typename EmpClass::EmpGlobalVector,1> gaussSeidelPrec(aij,niter,relaxfactor);
> 
> 	Dune::CGSolver<typename EmpClass::EmpGlobalVector> solver(op,
> 																sp,

why did you change the scalar product? In your logs, a static
assertion failed at
/Users/benediktoswald/svnwork/dune-trunk/dune-istl/dune/istl/solvers.hh:506

This one checks that the scalar product and the preconditioner have
the same category.

Christian

> 																gaussSeidelPrec,
> 																solverReduction_,
> 																solverMaximumIteration_,
> 																verbose);
> 
> This create the rather large compiler error below. I should add that I have been successful
> with instantiating the same CG solver with a Jacobi Preconditioner, derived from
> Dune::Preconditioner<DomainVector,RangeVector>.
> 
> Did I miss something related to the SeqGS when being used in CG ?
> 
> I use the following revision of Dune ISTL: 
> 
> ath: ../dune-istl
> URL: https://svn.dune-project.org/svn/dune-istl/trunk
> Repository Root: https://svn.dune-project.org/svn/dune-istl
> Repository UUID: 8c7282f0-4411-0410-8e4f-cdd3e049afb8
> Revision: 1199
> Node Kind: directory
> Schedule: normal
> Last Changed Author: christi
> Last Changed Rev: 1199
> Last Changed Date: 2010-04-09 14:40:04 +0200 (Fri, 09 Apr 2010)
> 
> The OS is Mac OS X:
> 
> Darwin benedikt-oswalds-macbook-pro.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386
> 
> The compiler is:
> 
> benedikt-oswalds-macbook-pro:hades benediktoswald$ mpicxx -v
> Using built-in specs.
> Target: i686-apple-darwin9
> Configured with: /var/tmp/gcc_42/gcc_42-5566~1/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/usr/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-gxx-include-dir=/usr/include/c++/4.0.0 --host=i686-apple-darwin9 --target=i686-apple-darwin9
> Thread model: posix
> gcc version 4.2.1 (Apple Inc. build 5566)
> 
> 
> 
> Thanks for a hint!
> 
> Have a great day, Benedikt
> 
> 
> 
> 
> /Users/benediktoswald/svnwork/dune-trunk/dune-istl/dune/istl/solvers.hh: In constructor 'Dune::CGSolver<X>::CGSolver(L&, S&, P&, double, int, int) [with L = Hades3d::NonoverlappingOperator<Dune::GridV
> iew<Dune::DefaultLeafGridViewTraits<const Dune::ALUSimplexGrid<3, 3>, All_Partition> >, Hades3d::Htvfe<Dune::ALUSimplexGrid<3, 3>, 2u>, Hades3d::DoFMapper<Dune::GridView<Dune::DefaultLeafGridViewTrait
> s<const Dune::ALUSimplexGrid<3, 3>, All_Partition> >, Hades3d::Htvfe<Dune::ALUSimplexGrid<3, 3>, 2u> >, Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 1>, std::allocator<Dune::FieldMatrix<double, 1, 1>
>  > >, Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > >, Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > > >
> , S = Hades3d::NonoverlappingScalarProduct<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::ALUSimplexGrid<3, 3>, All_Partition> >, Hades3d::Htvfe<Dune::ALUSimplexGrid<3, 3>, 2u>, Hades3d::D
> oFMapper<Dune::GridView<Dune::DefaultLeafGridViewTraits<const Dune::ALUSimplexGrid<3, 3>, All_Partition> >, Hades3d::Htvfe<Dune::ALUSimplexGrid<3, 3>, 2u> >, Dune::BlockVector<Dune::FieldVector<double
> , 1>, std::allocator<Dune::FieldVector<double, 1> > > >, P = Dune::SeqGS<Dune::BCRSMatrix<Dune::FieldMatrix<double, 1, 1>, std::allocator<Dune::FieldMatrix<double, 1, 1> > >, Dune::BlockVector<Dune::F
> ieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > >, Dune::BlockVector<Dune::FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > >, 1>, X = Dune::BlockVector<Dune:
> :FieldVector<double, 1>, std::allocator<Dune::FieldVector<double, 1> > >]':
> ../emp/empNonDispersive.hh:756:   instantiated from 'int Hades3d::EmpNonDispersive<Grid, BasisFunction>::updateTimeStepSolve() [with Grid = Dune::ALUSimplexGrid<3, 3>, BasisFunction = Hades3d::Htvfe<D
> une::ALUSimplexGrid<3, 3>, 2u>]'
> ../emp/empNonDispersive.hh:445:   instantiated from 'int Hades3d::EmpNonDispersive<Grid, BasisFunction>::updateTimeStep() [with Grid = Dune::ALUSimplexGrid<3, 3>, BasisFunction = Hades3d::Htvfe<Dune::
> ALUSimplexGrid<3, 3>, 2u>]'
> hades3d.hh:130:   instantiated from 'int Hades3d::hades3dsolve(Hades3d::Emparam*, Emp&, const Grid&) [with Emp = Hades3d::EmpNonDispersive<Dune::ALUSimplexGrid<3, 3>, Hades3d::Htvfe<Dune::ALUSimplexGr
> id<3, 3>, 2u> >, Grid = Dune::ALUSimplexGrid<3, 3>, BasisFunction = Hades3d::Htvfe<Dune::ALUSimplexGrid<3, 3>, 2u>]'
> hades3d.cc:725:   instantiated from here
> /Users/benediktoswald/svnwork/dune-trunk/dune-istl/dune/istl/solvers.hh:506: error: invalid application of 'sizeof' to incomplete type 'static_assert_failure<false>' 
> 
> 
> 
> 
> 
> ------------------------------------------------------------------------------------------------------------------
> Benedikt Oswald, Dr. sc. techn., dipl. El. Ing. ETH, www.psi.ch, Computational Accelerator Scientist
> Paul Scherrer  Institute (PSI), CH-5232 Villigen, Suisse, benedikt.oswald at psi.ch, +41(0)56 310 32 12
> "Passion is required for any great work, and for the Revolution passion and audacity are required in big doses.", 
> Ernesto 'Che' Guevara, Letter to his parents.
> http://amas.web.psi.ch
> ------------------------------------------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
> 




More information about the Dune mailing list