[Fwd: Re: [Getdp] GetDP bug?]
Michael J. Rivard
rivard at sbcglobal.net
Thu Jan 23 19:04:55 CET 2003
Mauro,
Patrick and Christophe run your input files in a debugger to find the
bug and fix it.
-----Forwarded Message-----
From: Michael J. Rivard <rivard at sbcglobal.net>
To: Mauro Sgroi <maurosgroi at yahoo.it>
Cc: Patrick Dular <patrick.dular at ulg.ac.be>, Christophe Geuzaine <geuzaine at acm.caltech.edu>, GetDP Mailing-List <getdp at geuz.org>
Subject: Re: [Getdp] GetDP bug?
Date: Thu, 23 Jan 2003 09:57:31 -0800
"Segmentation violation" in any computer program means there's a bug in
the code. Patrick and/or Christophe may know a workaround.
On Thu, 2003-01-23 at 01:08, Mauro Sgroi wrote:
> I'm trying to solve the Poisson's equation with
> Neumann BC. In order to obtain a stable solution I
> need to fix the solution at a point (the other
> strategy would be to fix the mean value of the
> solution but I don't know how to do it in GetDP...).
> Anyway I obtain a "Segmentation Violation", as
> reported in the log file.
> Is it a bug or an error in my *.pro and *.geo files?
> Thanks in advance and best regards,
> Mauro Sgroi.
>
> ______________________________________________________________________
> Yahoo! Cellulari: loghi, suonerie, picture message per il tuo telefonino
> http://it.yahoo.com/mail_it/foot/?http://it.mobile.yahoo.com/index2002.html
> ----
>
> Group {
> Line1 = Region[1] ;
> Line2 = Region[2] ;
> Line3 = Region[3] ;
> Line4 = Region[4] ;
> Point= Region[100] ;
> Domain = Region[200];
> }
> // Parameters
> // Iterative loop parameters
> NL_Eps=1.e-12;
> NL_Relax=1.;
> NL_NbrMax=1000;
> //////////////////////////////////////////
> Function{
>
> }
> Constraint {
> {Name Dirichlet_phi; Type Assign;
> Case {
> { Region Point; Value 1.;}
> }
> }
> }
> /////////////////////////////////////////////////////////////////////////
> FunctionSpace {
> { Name phi_t ; Type Form0 ;
> BasisFunction {
> { Name wn ; NameOfCoef phin ; Function BF_Node ;
> Support Domain; Entity NodesOf[ All ] ; }
> /* { Name wn2 ; NameOfCoef phin2 ; Function BF_Node_2E ;
> Support Domain; Entity EdgesOf[ All ] ; }*/
> }
> Constraint {
> { NameOfCoef phin ; EntityType NodesOf ; NameOfConstraint Dirichlet_phi; }
> }
> }
> }
> /////////////////////////////////////////////////////////////////////////
> Integration{
> { Name Int_def;
> Case { {Type Gauss;
> Case {
> { GeoElement Line; NumberOfPoints 4;}
> { GeoElement Triangle; NumberOfPoints 4;}
> { GeoElement Quadrangle; NumberOfPoints 4;}
> }
> }
> }
> }
> }
> /////////////////////////////////////////////////////////////////////////
> Jacobian {
> { Name Vol ;
> Case { { Region All ; Jacobian Vol ; } }
> }
> { Name Sur ;
> Case { { Region All ; Jacobian Sur ; } }
> }
> }
> /////////////////////////////////////////////////////////////////////////
> Formulation {
> {Name Coupled; Type FemEquation;
> Quantity{
> {Name phi; Type Local; NameOfSpace phi_t;}
> }
> Equation{
> Galerkin{[Dof{Grad phi},{Grad phi}];
> In Domain; Integration Int_def; Jacobian Vol; }
> }
> }
> }
> /////////////////////////////////////////////////////////////////////////
> Resolution {
> {Name Solution;
> System {
> {Name Sys; NameOfFormulation Coupled; }
> }
> Operation {
> InitSolution[Sys];
> IterativeLoop[NL_NbrMax,NL_Eps,NL_Relax] {
> GenerateJac[Sys]; SolveJac[Sys];
> }
> SaveSolution[Sys]; }
> }
> }
> /////////////////////////////////////////////////////////////////////////
> PostProcessing {
> {Name Visual; NameOfFormulation Coupled;
> Quantity {
> {Name phi; Value { Local { [{phi}]; In Domain; Jacobian Vol; } } }
> {Name e; Value { Local { [-{Grad phi}]; In Domain; Jacobian Vol; } } }
> }
> }
> }
> /////////////////////////////////////////////////////////////////////////
> PostOperation {
> {Name Map; NameOfPostProcessing Visual;
> Operation {
> Print [phi, OnElementsOf Domain, File "phi.pos"];
> Print [e, OnElementsOf Domain, File "e.pos"];
> }
> }
> }
> ----
>
> Point(1) = {0, 0, 0, 0.05};
> Point(2) = {1, 0, 0, 0.05};
> Point(3) = {1, 1, 0, 0.05};
> Point(4) = {0, 1, 0, 0.05};
> Line (1) = {1, 2};
> Line (2) = {2, 3};
> Line (3) = {3, 4};
> Line (4) = {4, 1};
> Line Loop (10) = {1, 2, 3, 4};
> Physical Point (100)= {1};
> Plane Surface (7) = {10};
> Physical Surface (200)= {7};
> ----
>
> getdp poisson.pro -cal -msh poisson.msh
>
>
>
> Loading : Problem definition 'poisson.pro'
> Info : Selected Resolution 'Solution'
> Loading : Geometric data 'poisson.msh'
> Info : System 'Sys' : Real
> P r e - P r o c e s s i n g . . .
> Loading : Pre-Processing data 'poisson.pre'
> Resources : cpu 0.15000 s / mem 0 kb
> E n d P r e - P r o c e s s i n g
> P r o c e s s i n g . . .
> Operation : InitSolution[Sys]
> Operation : IterativeLoop ...
> Info : Non Linear Iteration 1 (Relaxation = 1)
> Operation : GenerateJac[Sys]
> Solver : Loading parameter file 'solver.par'
> (0 %) Warning : Generated system is of dimension zero
> Resources : cpu 0.15000 s / mem 0 kb
> Operation : SolveJac[Sys]
> Error : Segmentation violation (invalid memory reference)
> ------------------------------------------------------
> You have discovered a bug in GetDP! You may report it
> by e-mail (together with any helpful data permitting to
> reproduce it) to <getdp at geuz.org>