[Getdp] Pyramids not working ?

Kubicek Bernhard Bernhard.Kubicek at arsenal.ac.at
Fri Jul 28 14:54:17 CEST 2006


What remains is the question/fear if there is a reason for that define statement not being enabled by default.
It would be nice if some "native" programmer of getDP could enlighten us.

If we are already talking about fuddling around with the source code, there is another change that I did for my local version.
It concerns the stopping condtions of the iterative matrix solvers.
When the same (or very similar) non-transient matrix-equation is solved multiple times, one should be able to gain some speed by initialising the solution with the previous calculated one.
This is different to the Boundary conditions InitFromResolution I guess, since then the values are fixed and not to be calculated any more(?).
With the undocumented(!?) function ReadSolution one can acomplished this task, however:
I found that the stopping condition "Stopping_Test" is always relative to the first caculated residuals (i.E. the first entry in the first column is always one, and the stopping condition applies only to this column). 
So, in a second run, the stopping condition might fail, because one had already reached maximum precision then. This causes the solver to iterate "Nb_Iter_Max" times instead of maybe once or twice.

To resolve this, in the file Sparskit/Solver.c around line 418, one could replace
>fpar[1] = p->Stopping_Test;
>fpar[2] = 0.0;
by
<fpar[1] = p->Stopping_Test;
<fpar[2] = p->Stopping_Test;

Maybe it would even be better to add a new entry to "p", e.g. p->Stopping_Test2.

Nice greetings,
Bernhard Kubicek
----------------
freelancer for 
arsenal research
Giefinggasse 2
A-1210 Wien
Austria
http://www.arsenal.ac.at/

PhD student @ Vienna University of Technology




-----Ursprüngliche Nachricht-----
Von: getdp-bounces at geuz.org [mailto:getdp-bounces at geuz.org] Im Auftrag von Thomas Jung
Gesendet: Freitag, 28. Juli 2006 14:01
An: getdp at geuz.org
Betreff: Re: [Getdp] Pyramids not working ?


On Friday 28 July 2006 11:46, Kubicek Bernhard wrote:
> Sorry, I just found out that I only replied to single persons, instead 
> of the whole mailling-list:
>
> ---mail1---
> for scalar, node attached Dofs pyramid cells seem to work, with my 
> #define line .. I prepared some nice "proof" images:
>
> http://wiki.kariert.org/index.php/GetDP
>
> nice greetings,
> Bernhard
>
> ---mail2---
> I am using Pyramidal cells, however i had to enable them in the source
> code: file include/GetDP.h add a line containing #define NEW_PYRAMIDS
>
> However I did not verify 100% wether the calculations then are really 
> correct. Still, i found the same line as you: { GeoElement Pyramid  ; 
> NumberOfPoints  8 ; } But I am still wondering how a pyramid can have 
> 8 points...
>
> nice greetings, hope it works.
> Bernhard Kubicek
>
> -----Ursprüngliche Nachricht-----
> Von: getdp-bounces at geuz.org [mailto:getdp-bounces at geuz.org] Im Auftrag 
> von Ruth V. Sabariego Gesendet: Freitag, 28. Juli 2006 10:15
> An: Thomas Jung
> Cc: getdp at geuz.org
> Betreff: Re: [Getdp] Pyramids not working ?
>
>
> Indeed, it is not yet implemented. You are using BF_Edge for {a}, what 
> makes BF_CurlEdge for {d a}. For the time being, your mesh should 
> contained either only hexahedrons or only tetrahedrons.
>
> Ruth
>
> Thomas Jung wrote:
> >Hi,
> >
> >I am using a 3D a-v-formulation, up to now I used only tetrahedrons, 
> >and everything was fine.
> >I have a different grid now, containing also hexahedrons and pyramids, and
> > get the message:
> >
> >===========================================================
> >P r e - P r o c e s s i n g . . .
> >Operation : Treatment Formulation 'MagnetoDynamics_a_3D'
> >Info      :   Generate ExtendedGroup '_CO_Entity_14' (EdgesOf)
> >Info      :   Generate ExtendedGroup '_CO_Entity_15' (EdgesOfTreeIn)
> >Info      :   Generate ExtendedGroup '_CO_Entity_11' (NodesOf)
> >Info      :   Generate ExtendedGroup '_CO_Entity_12' (NodesOf)
> >Resources : cpu 2.02813 s
> >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 : Generate[A2]
> >Solver    : Loading parameter file 'solver.par'
> >Info      : Setting System {A,b} to zero
> >Error     : Unkown type of Element in BF_CurlEdge
> >
> >============================================================
> >
> >Here are the Integration, Functionspace, and formulation:
> >
> >Integration {
> >    { Name CurlCurl ;
> >    Case { {Type Gauss ;
> >    Case { { GeoElement Triangle    ; NumberOfPoints  4 ; }
> >    { GeoElement Quadrangle  ; NumberOfPoints  4 ; }
> >    { GeoElement Tetrahedron ; NumberOfPoints  4 ; }
> >    { GeoElement Hexahedron  ; NumberOfPoints  6 ; }
> >    { GeoElement Prism       ; NumberOfPoints  9 ; }
> >    { GeoElement Pyramid     ; NumberOfPoints  8 ; } }
> >    }
> >    }
> >}
> >}
> >
> >FunctionSpace {
> >  { Name v_Ele; Type Form0;
> >    BasisFunction {
> >      { Name sn; NameOfCoef vn; Function BF_Node;
> >        Support DomainC_Mag; Entity NodesOf[ All ]; }
> >    }
> >    Constraint {
> >      { NameOfCoef vn; EntityType NodesOf;
> >        NameOfConstraint ElectricScalarPotential; }
> >    }
> >  }
> >
> >  // Magnetic vector potential a (b = curl a)
> >  { Name Hcurl_a_Mag_3D; Type Form1;
> >    BasisFunction {
> >	{ Name se; NameOfCoef ae; Function BF_Edge;
> >        Support Domain_Mag; Entity EdgesOf[ All ]; }
> >    }
> >    Constraint {
> >	{ NameOfCoef ae; EntityType EdgesOf;NameOfConstraint a; }
> >	{ NameOfCoef ae; EntityType EdgesOfTreeIn; EntitySubType StartingOn; 
> >NameOfConstraint Gauge; }
> >    }
> >  }
> >
> >}
> >
> >Formulation {
> >
> >  { Name MagnetoDynamics_a_3D; Type FemEquation;
> >    Quantity {
> >      { Name a ; Type Local; NameOfSpace Hcurl_a_Mag_3D; }
> >      { Name v; Type Local; NameOfSpace v_Ele; }
> >    }
> >    Equation {
> >	Galerkin { [ nu[] * Dof{d a} , {d a} ]; In Domain_Mag; Jacobian Vol; 
> >Integration CurlCurl; }
> >
> >	Galerkin { DtDof [ sigma[] * Dof{a} , {a} ]; In DomainC_Mag; 
> >Jacobian
> >Vol;
> >Integration CurlCurl; }
> >
> >	Galerkin { [ sigma[] * Dof{d v} , {a} ]; In DomainC_Mag; Jacobian 
> >Vol; Integration CurlCurl; }
> >
> >	Galerkin { DtDof [ sigma[] * Dof{a} , {d v} ]; In DomainC_Mag;	Jacobian
> > Vol; Integration CurlCurl; }
> >
> >	Galerkin { [ sigma[] * Dof{d v} , {d v} ]; In DomainC_Mag; Jacobian
> >Vol;
> >Integration CurlCurl; }
> >
> >
> >    }
> >  }
> >
> >}
> >
> >
> >
> >Thank you very much for any hint !
> >
> >
> >
> > Thomas Jung
> >_______________________________________________
> >getdp mailing list
> >getdp at geuz.org
> >http://www.geuz.org/mailman/listinfo/getdp


Thank you, Bernhard !

adding this #define NEW_PYRAMIDS works also for vector potential, apparently. Have not yet verified completely, but get very reasonably looking results

_______________________________________________
getdp mailing list
getdp at geuz.org
http://www.geuz.org/mailman/listinfo/getdp