[dune-pdelab] Uknown exception in convection-diffusion/transsporttest

Steffen Müthing steffen.muething at iwr.uni-heidelberg.de
Fri Nov 29 11:39:45 CET 2013


Am 28.11.2013 um 23:53 schrieb Christian Engwer:

> Your problem is that the vtk directory is missing, where VTKWrite
> wants to write to. You have to create it by hand.

Well, that's just inconvenient. I added the directory with a hidden file (as git
won't create empty directories) in 9a7d550256cbc53c.

Steffen

> 
> Christian
> 
> On Thu, Nov 28, 2013 at 11:50:14PM +0100, Christian Engwer wrote:
>> On Thu, Nov 28, 2013 at 02:13:38PM +0100, Christoph Grüninger wrote:
>>> Hi PDELabers,
>>> convection-diffusion/transsporttest throws an unknown exception. GDB was
>>> not helpful and Valgrind complained about dtmin and first_stage not
>>> being initialized in transportccfv.hh:313 and :322. I added a dummy
>>> initialization and the warnings vanished, but not the unknown exception.
>>> Would you mind having a look? The output is attached below.
>>> 
>>> Additionally, find attached two patches:
>>> - one fixes some occurrences of the deprecated YaspGrid constructor.
>>> - the other fixes a CMake file that used a wrong syntax.
>> 
>> I assume you get an stl exception. You can add the catch with the
>> attached patch. Let us know what the error message will be...
>> 
>> The easiest appraoch to debug this is to use the gdb and use "catch
>> throw". I don't see a reason why it should be different in this case...
>> 
>> Without looking for the reason I get the following output:
>> 
>> christi at sansibar:~/Uni/Dune/pdelab-howto/build.g++-4.7/src/convection-diffusion$ ./transporttest 1 0.1 10 1
>> parallel run on 1 process(es)
>> constrained dofs=0 of 100
>>  Initial defect:   2.2361e-01
>> Matrix row: min=3 max=5 average=4.6
>> Using superlu
>> Building hierarchy of 1 levels (inclusive coarse solver) took 0 seconds.
>> === BiCGSTABSolver
>>  0.5      8.95421e-17
>> === rate=1.60356e-31, T=0, TIT=0, IT=0.5
>>  Newton iteration  1.  New defect:   1.2440e-10.  Reduction (this):   5.5635e-10.  Reduction (total):   5.5635e-10
>> constrained dofs=0 of 100
>> STL error: basic_ios::clear
>> 
>> 
>> Ciao
>> Christian
>> 
>>> Thanks in advance
>>> Christoph
>>> 
>>> 
>>> dune-pdelab-howto/src/convection-diffusion> ./transporttest 1 0.1 10 1
>>> This is a sequential program.
>>> constrained dofs=0 of 100
>>>  Initial defect:   2.2361e-01
>>> Using DIRECTSOLVER
>>> Building hierarchy of 1 levels (inclusive coarse solver) took 0.001 seconds.
>>> === BiCGSTABSolver
>>>  0.5      8.95421e-17
>>> === rate=1.60356e-31, T=0, TIT=0, IT=0.5
>>>  Newton iteration  1.  New defect:   1.2440e-10.  Reduction (this):
>>> 5.5635e-10.  Reduction (total):   5.5635e-10
>>> constrained dofs=0 of 100
>>> Unknown exception thrown!
>>> 
>>> 
>>> -- 
>>> Une science n'était vraiment développée que quand elle
>>> pouvait utiliser les mathématiques.    (Paul Lafargue)
>>> *********************************************
>>> CMWR 2014: 10th - 13th June 2014 in Stuttgart
>>>         Please visit www.cmwr14.de
>>> *********************************************
>> 
>>> From 7c4beabc29848adef703908fb9caa4a3163c2e10 Mon Sep 17 00:00:00 2001
>>> From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich at dune-project.org>
>>> Date: Thu, 28 Nov 2013 12:09:50 +0100
>>> Subject: Use new constructor for YaspGrid with array and bitset.
>>> 
>>> ---
>>> src/convection-diffusion/dgdiffusion.cc   | 8 ++++----
>>> src/convection-diffusion/transporttest.cc | 4 ++--
>>> src/utility/gridexamples.hh               | 7 ++++---
>>> 3 files changed, 10 insertions(+), 9 deletions(-)
>>> 
>>> diff --git a/src/convection-diffusion/dgdiffusion.cc b/src/convection-diffusion/dgdiffusion.cc
>>> index 5758c79..b6d176a 100644
>>> --- a/src/convection-diffusion/dgdiffusion.cc
>>> +++ b/src/convection-diffusion/dgdiffusion.cc
>>> @@ -254,8 +254,8 @@ int main(int argc, char** argv)
>>>         {
>>>           const int dim = 2;
>>>           Dune::FieldVector<double,dim> L(1.0);
>>> -          Dune::FieldVector<int,dim> N(1);
>>> -          Dune::FieldVector<bool,dim> P(false);
>>> +          Dune::array<int,2> N = { {1,1} };
>>> +          std::bitset<dim> P(false);
>>>           typedef Dune::YaspGrid<dim> Grid;
>>>           Grid grid(L,N,P,0);
>>>           typedef Grid::LeafGridView GV;
>>> @@ -328,8 +328,8 @@ int main(int argc, char** argv)
>>>         {
>>>           const int dim = 3;
>>>           Dune::FieldVector<double,dim> L(1.0);
>>> -          Dune::FieldVector<int,dim> N(1);
>>> -          Dune::FieldVector<bool,dim> P(false);
>>> +          Dune::array<int,3> N = { {1,1,1} };
>>> +          std::bitset<dim> P(false);
>>>           typedef Dune::YaspGrid<dim> Grid;
>>>           Grid grid(L,N,P,0);
>>>           typedef Grid::LeafGridView GV;
>>> diff --git a/src/convection-diffusion/transporttest.cc b/src/convection-diffusion/transporttest.cc
>>> index b3ec281..ad8103c 100644
>>> --- a/src/convection-diffusion/transporttest.cc
>>> +++ b/src/convection-diffusion/transporttest.cc
>>> @@ -478,8 +478,8 @@ int main(int argc, char** argv)
>>>     if (true)
>>>       {
>>>         Dune::FieldVector<double,2> L(1.0);
>>> -        Dune::FieldVector<int,2> N(n);
>>> -        Dune::FieldVector<bool,2> periodic(false);
>>> +        Dune::array<int,2> N = { {n,n} };
>>> +        std::bitset<2> periodic(false);
>>>         int overlap=o;
>>>         Dune::YaspGrid<2> grid(helper.getCommunicator(),L,N,periodic,overlap);
>>>         typedef Dune::YaspGrid<2>::LeafGridView GV;
>>> diff --git a/src/utility/gridexamples.hh b/src/utility/gridexamples.hh
>>> index 2ed7ae6..f99334d 100644
>>> --- a/src/utility/gridexamples.hh
>>> +++ b/src/utility/gridexamples.hh
>>> @@ -89,9 +89,10 @@ void createGrid(GridType &grid, int n)
>>> class YaspUnitSquare : public Dune::YaspGrid<2>
>>> {
>>> public:
>>> -  YaspUnitSquare () : Dune::YaspGrid<2>(Dune::FieldVector<double,2>(1.0),
>>> -					  Dune::FieldVector<int,2>(1),
>>> -					  Dune::FieldVector<bool,2>(false),0)
>>> +  YaspUnitSquare()
>>> +  : Dune::YaspGrid<2>(Dune::FieldVector<double,2>(1.0),
>>> +                      Dune::array<int,2>{ {1,1} },
>>> +                      std::bitset<2>(false), 0)
>>>   {}
>>> };
>>> 
>>> -- 
>>> 1.8.1.4
>>> 
>> 
>>> From bcda102832b4c2a5da51679d229eb433a1b3bd3c Mon Sep 17 00:00:00 2001
>>> From: =?UTF-8?q?Christoph=20Gr=C3=BCninger?= <gruenich at dune-project.org>
>>> Date: Thu, 28 Nov 2013 14:10:16 +0100
>>> Subject: [CMake] Fix wrong syntax in foreach loop.
>>> 
>>> ---
>>> src/boilerplatetutorial/CMakeLists.txt | 4 ++--
>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>> 
>>> diff --git a/src/boilerplatetutorial/CMakeLists.txt b/src/boilerplatetutorial/CMakeLists.txt
>>> index 1e6870d..cf22583 100644
>>> --- a/src/boilerplatetutorial/CMakeLists.txt
>>> +++ b/src/boilerplatetutorial/CMakeLists.txt
>>> @@ -5,10 +5,10 @@ if(ALUGRID_FOUND)
>>>     advection_stationary
>>>     advection_instationary
>>>     heat_instationary)
>>> -  foreach(prog in ${ALUGRIDPROGRAMS})
>>> +  foreach(prog ${ALUGRIDPROGRAMS})
>>>     add_executable(${prog} ${prog}.cc)
>>>     add_dune_superlu_flags(${prog})
>>>     add_dune_alugrid_flags(${prog})
>>>     target_link_libraries(${prog} ${DUNE_LIBS})
>>> -  endforeach(prog in ${ALUGRIDPROGRAMS})
>>> +  endforeach(prog ${ALUGRIDPROGRAMS})
>>> endif(ALUGRID_FOUND)
>>> \ No newline at end of file
>>> -- 
>>> 1.8.1.4
>>> 
>> 
>>> _______________________________________________
>>> dune-pdelab mailing list
>>> dune-pdelab at dune-project.org
>>> http://lists.dune-project.org/mailman/listinfo/dune-pdelab
>> 
>> 
>> -- 
>> Prof. Dr. Christian Engwer 
>> Institut für Numerische und Angewandte Mathematik
>> Fachbereich Mathematik und Informatik der Universität Münster
>> Einsteinstrasse 62
>> 48149 Münster
>> 
>> E-Mail	christian.engwer at uni-muenster.de
>> Telefon	+49 251 83-35067
>> FAX		+49 251 83-32729
>> 
>> _______________________________________________
>> dune-pdelab mailing list
>> dune-pdelab at dune-project.org
>> http://lists.dune-project.org/mailman/listinfo/dune-pdelab
>> 
> 
> -- 
> Prof. Dr. Christian Engwer 
> Institut für Numerische und Angewandte Mathematik
> Fachbereich Mathematik und Informatik der Universität Münster
> Einsteinstrasse 62
> 48149 Münster
> 
> E-Mail	christian.engwer at uni-muenster.de
> Telefon	+49 251 83-35067
> FAX		+49 251 83-32729
> 
> _______________________________________________
> dune-pdelab mailing list
> dune-pdelab at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune-pdelab

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.dune-project.org/pipermail/dune-pdelab/attachments/20131129/9acb62d5/attachment.sig>


More information about the dune-pdelab mailing list