Re: [deal.II] How to use ManifoldMapping

2016-05-16 Thread Praveen C
Dear Luca

These are not normal to sphere surface, but normal to edges on the sphere,
which should be tangent to sphere surface.

I get these normals from

FEFaceValues<2,3> and using update_normal_vectors

Best
praveen

On Tue, May 17, 2016 at 12:19 PM, luca.heltai  wrote:

> Can you verify which ones are correct? The normal on a sphere of radius
> one, centered at the origin, is the same as the quadrature point itself.
> From your numbers, MappingQ+Manifold seem completely off (y direction is
> always zero?).
>
> Can you produce a minimal test that checks normals VS quadrature points?
>
> L.
>
>
> > On 17 May 2016, at 8:43, Praveen C  wrote:
> >
> > Dear all
> >
> > There is also a large difference in face normal vectors which I need
> since I am using a DG scheme for pde on sphere.
> >
> > Here are normal vectors at some face quadrature points
> >
> > With MappingQ(9) + SphericalManifold
> > -0.707107 -1.28795e-09 0.707107
> >
> > -0.707107 -7.374e-10 0.707107
> >
> > -0.707107 -1.12489e-09 0.707107
> >
> > -0.707107 -1.08533e-09 0.707107
> >
> > -0.707107 -1.43344e-09 0.707107
> >
> > -0.707107 -1.52226e-09 0.707107
> >
> > -0.707107 -1.78585e-09 0.707107
> >
> > -0.707107 -1.81086e-09 0.707107
> >
> > -0.707107 -1.9384e-09 0.707107
> >
> > -0.707107 -1.80885e-09 0.707107
> >
> > With MappingManifold + SphericalManifold
> >
> > -0.649511 -0.103732 0.753243
> >
> > -0.652465 -0.101169 0.751036
> >
> > -0.659029 -0.0948727 0.74611
> >
> > -0.668238 -0.0844748 0.739136
> >
> > -0.678651 -0.0700161 0.731116
> >
> > -0.727853 0.06925 0.682227
> >
> > -0.730142 0.0918833 0.677089
> >
> > -0.730699 0.11164 0.67351
> >
> > -0.730325 0.125663 0.671442
> >
> >
> > -0.729954 0.131967 0.670636
> >
> >
> > The difference seems rather large.
> >
> > Best
> > praveen
> >
> > On Mon, May 16, 2016 at 9:08 PM, Praveen C  wrote:
> > Dear Luca
> >
> > I need a Manifold<2,3> object but I could not succeed in composing
> SphericalManifold with a rotation. There were many dimensions involved in
> the composition which I have not understood.
> >
> > But I think I understood what it is supposed to do, so I modified
> Spherical Manifold by adding in a 90 deg rotation. I use
> RotatedSphericalManifold for north/south faces and SphericalManifold for
> the other faces.
> >
> > When I run my code with this, I find large errors arising in the region
> where north/south faces meet the other faces.
> >
> > Is there some incompatibility in my mapping ? Will the face normal
> vectors (which lie in tangent plane) be correct at the junction of the two
> manifolds ?
> >
> > The RotatedSphericalManifold is attached.
> >
> > Thanks
> > praveen
> >
> > On Mon, May 16, 2016 at 4:20 PM, luca.heltai 
> wrote:
> >
> > > On 16 May 2016, at 12:37, Praveen C  wrote:
> > >
> > > Dear Luca
> > >
> > > Thanks for clarifying this issue. I need tangent vector in my code.
> > >
> > > So I first define a ChartManifold which rotates by 90 deg about
> x-axis, say RotateX. Then I compose it with SphericalManifold and use
> > >
> > > SphericalManifold * RotateX
> > >
> > > Is this what you meant ?
> > >
> > > We have the constructor
> > >
> > > CompositionManifold(F, G)
> > >
> > > Does this do F*G or G*F ? The description given in words is a bit
> ambiguous.
> >
> >
> > y = G(F(x))
> >
> > "ChartManifold going from the chart of the firstChartManifold to the
> embedding space of the second ChartManifold"
> >
> > In your case, F is your spherical manifold, while your G is the rotation
> manifold (to preserve periodicity of the spherical manifold).
> >
> > Best,
> >
> > Luca.
> >
> > >
> > > Thanks
> > > praveen
> > >
> > > On Mon, May 16, 2016 at 2:29 PM, luca.heltai 
> wrote:
> > > Dear Praveen,
> > >
> > > there is a bug in SphericalManifold for dimension 3, which makes it
> unusable so far with MappingManifold.
> > >
> > > The issue is with the computation of the tangent vector across the
> north and south poles.
> > >
> > > At the moment MappingManifold is the only class using this
> computation, so if you don’t use MappingManifold, you don’t see this issue.
> > >
> > > You can solve it by writing a rotated SphericalManifold descriptor
> (one where the poles are east and west respectively), and associating this
> Manifold to the north and south faces of the sphere. You could use, for
> example, CompositionManifold to compose a rotation of 90 degree along the x
> or y axis with SphericalManifold, and attach the resulting manifold to the
> north and south faces.
> > >
> > > This is related to some of the issues here:
> https://github.com/dealii/dealii/issues/2530
> > >
> > > What you are hitting is a problem with the geometry, not with
> MappingManifold in itself. It is not possible to describe the surface of a
> sphere with a single chart without introducing at least one singularity. We
> have implemented the standard polar coordinate mapping, which has two
> singularities (north and south poles respectively), and these are the ones
> introducing nans in you

Re: [deal.II] How to use ManifoldMapping

2016-05-16 Thread luca.heltai
Can you verify which ones are correct? The normal on a sphere of radius one, 
centered at the origin, is the same as the quadrature point itself. From your 
numbers, MappingQ+Manifold seem completely off (y direction is always zero?).

Can you produce a minimal test that checks normals VS quadrature points?

L.


> On 17 May 2016, at 8:43, Praveen C  wrote:
> 
> Dear all
> 
> There is also a large difference in face normal vectors which I need since I 
> am using a DG scheme for pde on sphere.
> 
> Here are normal vectors at some face quadrature points
> 
> With MappingQ(9) + SphericalManifold
> -0.707107 -1.28795e-09 0.707107
> 
> -0.707107 -7.374e-10 0.707107
> 
> -0.707107 -1.12489e-09 0.707107
> 
> -0.707107 -1.08533e-09 0.707107
> 
> -0.707107 -1.43344e-09 0.707107
> 
> -0.707107 -1.52226e-09 0.707107
> 
> -0.707107 -1.78585e-09 0.707107
> 
> -0.707107 -1.81086e-09 0.707107
> 
> -0.707107 -1.9384e-09 0.707107
> 
> -0.707107 -1.80885e-09 0.707107
> 
> With MappingManifold + SphericalManifold
> 
> -0.649511 -0.103732 0.753243
> 
> -0.652465 -0.101169 0.751036
> 
> -0.659029 -0.0948727 0.74611
> 
> -0.668238 -0.0844748 0.739136
> 
> -0.678651 -0.0700161 0.731116
> 
> -0.727853 0.06925 0.682227
> 
> -0.730142 0.0918833 0.677089
> 
> -0.730699 0.11164 0.67351
> 
> -0.730325 0.125663 0.671442
> 
> 
> -0.729954 0.131967 0.670636
> 
> 
> The difference seems rather large.
> 
> Best
> praveen
> 
> On Mon, May 16, 2016 at 9:08 PM, Praveen C  wrote:
> Dear Luca
> 
> I need a Manifold<2,3> object but I could not succeed in composing 
> SphericalManifold with a rotation. There were many dimensions involved in the 
> composition which I have not understood.
> 
> But I think I understood what it is supposed to do, so I modified Spherical 
> Manifold by adding in a 90 deg rotation. I use RotatedSphericalManifold for 
> north/south faces and SphericalManifold for the other faces.
> 
> When I run my code with this, I find large errors arising in the region where 
> north/south faces meet the other faces.
> 
> Is there some incompatibility in my mapping ? Will the face normal vectors 
> (which lie in tangent plane) be correct at the junction of the two manifolds ?
> 
> The RotatedSphericalManifold is attached.
> 
> Thanks
> praveen
> 
> On Mon, May 16, 2016 at 4:20 PM, luca.heltai  wrote:
> 
> > On 16 May 2016, at 12:37, Praveen C  wrote:
> >
> > Dear Luca
> >
> > Thanks for clarifying this issue. I need tangent vector in my code.
> >
> > So I first define a ChartManifold which rotates by 90 deg about x-axis, say 
> > RotateX. Then I compose it with SphericalManifold and use
> >
> > SphericalManifold * RotateX
> >
> > Is this what you meant ?
> >
> > We have the constructor
> >
> > CompositionManifold(F, G)
> >
> > Does this do F*G or G*F ? The description given in words is a bit ambiguous.
> 
> 
> y = G(F(x))
> 
> "ChartManifold going from the chart of the firstChartManifold to the 
> embedding space of the second ChartManifold"
> 
> In your case, F is your spherical manifold, while your G is the rotation 
> manifold (to preserve periodicity of the spherical manifold).
> 
> Best,
> 
> Luca.
> 
> >
> > Thanks
> > praveen
> >
> > On Mon, May 16, 2016 at 2:29 PM, luca.heltai  wrote:
> > Dear Praveen,
> >
> > there is a bug in SphericalManifold for dimension 3, which makes it 
> > unusable so far with MappingManifold.
> >
> > The issue is with the computation of the tangent vector across the north 
> > and south poles.
> >
> > At the moment MappingManifold is the only class using this computation, so 
> > if you don’t use MappingManifold, you don’t see this issue.
> >
> > You can solve it by writing a rotated SphericalManifold descriptor (one 
> > where the poles are east and west respectively), and associating this 
> > Manifold to the north and south faces of the sphere. You could use, for 
> > example, CompositionManifold to compose a rotation of 90 degree along the x 
> > or y axis with SphericalManifold, and attach the resulting manifold to the 
> > north and south faces.
> >
> > This is related to some of the issues here: 
> > https://github.com/dealii/dealii/issues/2530
> >
> > What you are hitting is a problem with the geometry, not with 
> > MappingManifold in itself. It is not possible to describe the surface of a 
> > sphere with a single chart without introducing at least one singularity. We 
> > have implemented the standard polar coordinate mapping, which has two 
> > singularities (north and south poles respectively), and these are the ones 
> > introducing nans in your computation.
> >
> > Everything works fine when computing intermediate points, but not when 
> > computing tangents. I’m still thinking of a way to fix this. The easiest 
> > fix is to implement the SphericalManifold without charts, but I haven’t had 
> > much time to sit down and do some fun stuff lately…
> >
> > Though, I can help you with implementing fixes, if you are willing to help… 
> > :)
> >
> > L.
> >
> > > On 16 May 2016, at 10:35,

Re: [deal.II] How to use ManifoldMapping

2016-05-16 Thread Praveen C
Dear all

There is also a large difference in face normal vectors which I need since
I am using a DG scheme for pde on sphere.

Here are normal vectors at some face quadrature points

With MappingQ(9) + SphericalManifold

-0.707107 -1.28795e-09 0.707107

-0.707107 -7.374e-10 0.707107

-0.707107 -1.12489e-09 0.707107

-0.707107 -1.08533e-09 0.707107

-0.707107 -1.43344e-09 0.707107

-0.707107 -1.52226e-09 0.707107

-0.707107 -1.78585e-09 0.707107

-0.707107 -1.81086e-09 0.707107

-0.707107 -1.9384e-09 0.707107

-0.707107 -1.80885e-09 0.707107

With MappingManifold + SphericalManifold

-0.649511 -0.103732 0.753243

-0.652465 -0.101169 0.751036

-0.659029 -0.0948727 0.74611

-0.668238 -0.0844748 0.739136

-0.678651 -0.0700161 0.731116

-0.727853 0.06925 0.682227

-0.730142 0.0918833 0.677089

-0.730699 0.11164 0.67351

-0.730325 0.125663 0.671442

-0.729954 0.131967 0.670636

The difference seems rather large.

Best
praveen

On Mon, May 16, 2016 at 9:08 PM, Praveen C  wrote:

> Dear Luca
>
> I need a Manifold<2,3> object but I could not succeed in composing
> SphericalManifold with a rotation. There were many dimensions involved in
> the composition which I have not understood.
>
> But I think I understood what it is supposed to do, so I modified
> Spherical Manifold by adding in a 90 deg rotation. I use
> RotatedSphericalManifold for north/south faces and SphericalManifold for
> the other faces.
>
> When I run my code with this, I find large errors arising in the region
> where north/south faces meet the other faces.
>
> Is there some incompatibility in my mapping ? Will the face normal vectors
> (which lie in tangent plane) be correct at the junction of the two
> manifolds ?
>
> The RotatedSphericalManifold is attached.
>
> Thanks
> praveen
>
> On Mon, May 16, 2016 at 4:20 PM, luca.heltai 
> wrote:
>
>>
>> > On 16 May 2016, at 12:37, Praveen C  wrote:
>> >
>> > Dear Luca
>> >
>> > Thanks for clarifying this issue. I need tangent vector in my code.
>> >
>> > So I first define a ChartManifold which rotates by 90 deg about x-axis,
>> say RotateX. Then I compose it with SphericalManifold and use
>> >
>> > SphericalManifold * RotateX
>> >
>> > Is this what you meant ?
>> >
>> > We have the constructor
>> >
>> > CompositionManifold(F, G)
>> >
>> > Does this do F*G or G*F ? The description given in words is a bit
>> ambiguous.
>>
>>
>> y = G(F(x))
>>
>> "ChartManifold going from the chart of the firstChartManifold to the
>> embedding space of the second ChartManifold"
>>
>> In your case, F is your spherical manifold, while your G is the rotation
>> manifold (to preserve periodicity of the spherical manifold).
>>
>> Best,
>>
>> Luca.
>>
>> >
>> > Thanks
>> > praveen
>> >
>> > On Mon, May 16, 2016 at 2:29 PM, luca.heltai 
>> wrote:
>> > Dear Praveen,
>> >
>> > there is a bug in SphericalManifold for dimension 3, which makes it
>> unusable so far with MappingManifold.
>> >
>> > The issue is with the computation of the tangent vector across the
>> north and south poles.
>> >
>> > At the moment MappingManifold is the only class using this computation,
>> so if you don’t use MappingManifold, you don’t see this issue.
>> >
>> > You can solve it by writing a rotated SphericalManifold descriptor (one
>> where the poles are east and west respectively), and associating this
>> Manifold to the north and south faces of the sphere. You could use, for
>> example, CompositionManifold to compose a rotation of 90 degree along the x
>> or y axis with SphericalManifold, and attach the resulting manifold to the
>> north and south faces.
>> >
>> > This is related to some of the issues here:
>> https://github.com/dealii/dealii/issues/2530
>> >
>> > What you are hitting is a problem with the geometry, not with
>> MappingManifold in itself. It is not possible to describe the surface of a
>> sphere with a single chart without introducing at least one singularity. We
>> have implemented the standard polar coordinate mapping, which has two
>> singularities (north and south poles respectively), and these are the ones
>> introducing nans in your computation.
>> >
>> > Everything works fine when computing intermediate points, but not when
>> computing tangents. I’m still thinking of a way to fix this. The easiest
>> fix is to implement the SphericalManifold without charts, but I haven’t had
>> much time to sit down and do some fun stuff lately…
>> >
>> > Though, I can help you with implementing fixes, if you are willing to
>> help… :)
>> >
>> > L.
>> >
>> > > On 16 May 2016, at 10:35, Praveen C  wrote:
>> > >
>> > > Dear all
>> > > I am solving pde on sphere and want to use MappingManifold
>> > >
>> > > My mesh is generated like this.
>> > >
>> > >   Point center(0.0, 0.0, 0.0);
>> > >   GridGenerator::hyper_sphere(triangulation, center, Radius);
>> > >   static SphericalManifold surface_description;
>> > >   triangulation.set_all_manifold_ids(0);
>> > >   triangulation.set_manifold (0, surface_description);
>> > >   tri

Re: [deal.II] Re: precomputation of mass matrix and stiffness matrix

2016-05-16 Thread Martin Kronbichler

Dear Marek,

Let's first look at the two distribute_local_to_global calls:


constraint_matrix_phase_constant.distribute_local_to_global(local_matrix,
dof_indices, system_matrix_phase_constant);



constraint_matrix_phase.distribute_local_to_global(local_matrix,
local_vector, dof_indices, jacobian_phase, 
residuum_phase);


I think that the problem is in the way you put together the entries for 
the constant part. When you assemble a single matrix, you most likely 
take the approach you use for 'jacobian_phase' with 
constraint_matrix_phase. Thus, in order to arrive at the same final 
system matrix, you need to use the same constraint matrix in both cases. 
The math behind this: In case of homogeneous constraints, the 
distribute_local_to_global method is a linear operation, so if the final 
local matrix is a sum of the two local matrices, you can equally well 
sum the two matrices.


So my assumption would be that the constraint_matrix_phase_constant 
object has different constraints than the other. This cannot work.


I assume you have different entries because you have some 
inhomogeneities on the latter which cannot be handled in the first call. 
I recommend to re-formulate the equations such that you only have 
homogeneous constraints, which then allows you to use the same 
constraint matrix on both parts of the matrix. This typically results in 
some additional right hand side terms including the left hand side terms.


Best,
Martin

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Fwd: Us congress hearing of maan alsaan Money laundry قضية الكونغجرس لغسيل الأموال للمليادير معن الصانع

2016-05-16 Thread mona f
YouTube videos of



 U.S. Congress money laundering hearing


of

Saudi Billionaire  " Maan  Al sanea"

 with *bank of America*


and  The  owner of Saad Hospital and  Schools

 in the Eastern Province in *Saudi Arabia*



and the Chairman of the Board of Directors of Awal Bank  in *Bahrain*


With Arabic Subtitles


http://www.youtube.com/watch?v=mIBNnQvhU8s





*موقع اليوتيوب الذي عرض جلسة استماع الكونجرس الأمريكي *

* لمتابعة نشاطات غسل الأموال ونشاطات*



*السعودي معن عبدالواحد الصانع*



*مالك مستشفى  وشركة سعد  ومدارس سعد بالمنطقة الشرقية بالسعودية   ورئيس مجلس
ادارة بنك اوال البحريني*



*مترجم باللغة العربية*



http://www.youtube.com/watch?v=mIBNnQvhU8s

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Help with interpretation of PETSc and SLEPc error message.

2016-05-16 Thread Daniel Arndt
Dear David,

for debugging your code you should start with simplifying your code as much 
as possible to see what is going wrong.
In particular, you should try with not refining your mesh and confirm that 
the assembled matrices look as they should.
Can you modify the parameters in such a way that you would expect to 
reproduce the results of step-36?

Best,
Daniel


Am Montag, 16. Mai 2016 11:28:39 UTC+2 schrieb David:
>
> Hi, Tobi:
>
> Thank you so much for your suggestions. I have followed your direction and 
> checked my code again and again for all day long, but still
> could not resolve this problem. If you (or someone else) wouldn't mind, 
> could you please take a look at my code attached below?
>
> It is a really short code, of which most parts are exactly the same with 
> step-36, except some details I changed for learning purposes (I changed 
> this problem to a simple dynamical elasticity problem on a rectangular 
> domain). I know this might cause some unconveniences, but I really 
> need somesone's help. Since nobody around me uses dealii, this is the only 
> place I can turn to.
>
> Thanks in advance for any help!
>
> Best regards,
> David.
>
>
>
> On Monday, May 16, 2016 at 1:03:30 AM UTC+8, Tobi Young wrote:
>>
>> > Could anyone please take a look, it says: 
>> > 
>> > [0]PETSC ERROR: Object is in wrong state 
>> > [0]PETSC ERROR: Matrix is missing diagonal entry 8 
>> > 
>>
>> >The above tells us that the matrix is singular (missing a diagonal 
>> entry).  
>>
> > 
>
> >I can recommend you check first, if your matrix should be singular - 
>> >ie. if you are assembling him correctly; and second, check that the 
>> >SLEPc solver you are using is capable of solving a singular matrix 
>> >(not all are). You can get some information from the solver pages of 
>> >the SLEPc manual. 
>> >Hope that helps a little. 
>>
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] How to use ManifoldMapping

2016-05-16 Thread Praveen C
Dear Luca

I need a Manifold<2,3> object but I could not succeed in composing
SphericalManifold with a rotation. There were many dimensions involved in
the composition which I have not understood.

But I think I understood what it is supposed to do, so I modified Spherical
Manifold by adding in a 90 deg rotation. I use RotatedSphericalManifold for
north/south faces and SphericalManifold for the other faces.

When I run my code with this, I find large errors arising in the region
where north/south faces meet the other faces.

Is there some incompatibility in my mapping ? Will the face normal vectors
(which lie in tangent plane) be correct at the junction of the two
manifolds ?

The RotatedSphericalManifold is attached.

Thanks
praveen

On Mon, May 16, 2016 at 4:20 PM, luca.heltai  wrote:

>
> > On 16 May 2016, at 12:37, Praveen C  wrote:
> >
> > Dear Luca
> >
> > Thanks for clarifying this issue. I need tangent vector in my code.
> >
> > So I first define a ChartManifold which rotates by 90 deg about x-axis,
> say RotateX. Then I compose it with SphericalManifold and use
> >
> > SphericalManifold * RotateX
> >
> > Is this what you meant ?
> >
> > We have the constructor
> >
> > CompositionManifold(F, G)
> >
> > Does this do F*G or G*F ? The description given in words is a bit
> ambiguous.
>
>
> y = G(F(x))
>
> "ChartManifold going from the chart of the firstChartManifold to the
> embedding space of the second ChartManifold"
>
> In your case, F is your spherical manifold, while your G is the rotation
> manifold (to preserve periodicity of the spherical manifold).
>
> Best,
>
> Luca.
>
> >
> > Thanks
> > praveen
> >
> > On Mon, May 16, 2016 at 2:29 PM, luca.heltai 
> wrote:
> > Dear Praveen,
> >
> > there is a bug in SphericalManifold for dimension 3, which makes it
> unusable so far with MappingManifold.
> >
> > The issue is with the computation of the tangent vector across the north
> and south poles.
> >
> > At the moment MappingManifold is the only class using this computation,
> so if you don’t use MappingManifold, you don’t see this issue.
> >
> > You can solve it by writing a rotated SphericalManifold descriptor (one
> where the poles are east and west respectively), and associating this
> Manifold to the north and south faces of the sphere. You could use, for
> example, CompositionManifold to compose a rotation of 90 degree along the x
> or y axis with SphericalManifold, and attach the resulting manifold to the
> north and south faces.
> >
> > This is related to some of the issues here:
> https://github.com/dealii/dealii/issues/2530
> >
> > What you are hitting is a problem with the geometry, not with
> MappingManifold in itself. It is not possible to describe the surface of a
> sphere with a single chart without introducing at least one singularity. We
> have implemented the standard polar coordinate mapping, which has two
> singularities (north and south poles respectively), and these are the ones
> introducing nans in your computation.
> >
> > Everything works fine when computing intermediate points, but not when
> computing tangents. I’m still thinking of a way to fix this. The easiest
> fix is to implement the SphericalManifold without charts, but I haven’t had
> much time to sit down and do some fun stuff lately…
> >
> > Though, I can help you with implementing fixes, if you are willing to
> help… :)
> >
> > L.
> >
> > > On 16 May 2016, at 10:35, Praveen C  wrote:
> > >
> > > Dear all
> > > I am solving pde on sphere and want to use MappingManifold
> > >
> > > My mesh is generated like this.
> > >
> > >   Point center(0.0, 0.0, 0.0);
> > >   GridGenerator::hyper_sphere(triangulation, center, Radius);
> > >   static SphericalManifold surface_description;
> > >   triangulation.set_all_manifold_ids(0);
> > >   triangulation.set_manifold (0, surface_description);
> > >   triangulation.refine_global(n_refine);
> > >
> > > Changing from MappingQ to MappingManifold leads to blow up, with nan.
> > >
> > > Before I debug, is there an example I can see of MappingManifold usage
> ?
> > >
> > > Thanks
> > > praveen
> > >
> > > --
> > > The deal.II project is located at http://www.dealii.org/
> > > For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> > > ---
> > > You received this message because you are subscribed to the Google
> Groups "deal.II User Group" group.
> > > To unsubscribe from this group and stop receiving emails from it, send
> an email to dealii+unsubscr...@googlegroups.com.
> > > For more options, visit https://groups.google.com/d/optout.
> >
> > --
> > The deal.II project is located at http://www.dealii.org/
> > For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> > ---
> > You received this message because you are subscribed to the Google
> Groups "deal.II User Group" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to dealii+unsubscr...@googlegroups.com.

Re: [deal.II] How to use ManifoldMapping

2016-05-16 Thread luca.heltai

> On 16 May 2016, at 12:37, Praveen C  wrote:
> 
> Dear Luca
> 
> Thanks for clarifying this issue. I need tangent vector in my code.
> 
> So I first define a ChartManifold which rotates by 90 deg about x-axis, say 
> RotateX. Then I compose it with SphericalManifold and use
> 
> SphericalManifold * RotateX
> 
> Is this what you meant ?
> 
> We have the constructor
> 
> CompositionManifold(F, G)
> 
> Does this do F*G or G*F ? The description given in words is a bit ambiguous.


y = G(F(x))

"ChartManifold going from the chart of the firstChartManifold to the embedding 
space of the second ChartManifold" 

In your case, F is your spherical manifold, while your G is the rotation 
manifold (to preserve periodicity of the spherical manifold).

Best,

Luca.

> 
> Thanks
> praveen
> 
> On Mon, May 16, 2016 at 2:29 PM, luca.heltai  wrote:
> Dear Praveen,
> 
> there is a bug in SphericalManifold for dimension 3, which makes it unusable 
> so far with MappingManifold.
> 
> The issue is with the computation of the tangent vector across the north and 
> south poles.
> 
> At the moment MappingManifold is the only class using this computation, so if 
> you don’t use MappingManifold, you don’t see this issue.
> 
> You can solve it by writing a rotated SphericalManifold descriptor (one where 
> the poles are east and west respectively), and associating this Manifold to 
> the north and south faces of the sphere. You could use, for example, 
> CompositionManifold to compose a rotation of 90 degree along the x or y axis 
> with SphericalManifold, and attach the resulting manifold to the north and 
> south faces.
> 
> This is related to some of the issues here: 
> https://github.com/dealii/dealii/issues/2530
> 
> What you are hitting is a problem with the geometry, not with MappingManifold 
> in itself. It is not possible to describe the surface of a sphere with a 
> single chart without introducing at least one singularity. We have 
> implemented the standard polar coordinate mapping, which has two 
> singularities (north and south poles respectively), and these are the ones 
> introducing nans in your computation.
> 
> Everything works fine when computing intermediate points, but not when 
> computing tangents. I’m still thinking of a way to fix this. The easiest fix 
> is to implement the SphericalManifold without charts, but I haven’t had much 
> time to sit down and do some fun stuff lately…
> 
> Though, I can help you with implementing fixes, if you are willing to help… :)
> 
> L.
> 
> > On 16 May 2016, at 10:35, Praveen C  wrote:
> >
> > Dear all
> > I am solving pde on sphere and want to use MappingManifold
> >
> > My mesh is generated like this.
> >
> >   Point center(0.0, 0.0, 0.0);
> >   GridGenerator::hyper_sphere(triangulation, center, Radius);
> >   static SphericalManifold surface_description;
> >   triangulation.set_all_manifold_ids(0);
> >   triangulation.set_manifold (0, surface_description);
> >   triangulation.refine_global(n_refine);
> >
> > Changing from MappingQ to MappingManifold leads to blow up, with nan.
> >
> > Before I debug, is there an example I can see of MappingManifold usage ?
> >
> > Thanks
> > praveen
> >
> > --
> > The deal.II project is located at http://www.dealii.org/
> > For mailing list/forum options, see 
> > https://groups.google.com/d/forum/dealii?hl=en
> > ---
> > You received this message because you are subscribed to the Google Groups 
> > "deal.II User Group" group.
> > To unsubscribe from this group and stop receiving emails from it, send an 
> > email to dealii+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
> 
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https:/

Re: [deal.II] How to use ManifoldMapping

2016-05-16 Thread Praveen C
Dear Luca

Thanks for clarifying this issue. I need tangent vector in my code.

So I first define a ChartManifold which rotates by 90 deg about x-axis, say
RotateX. Then I compose it with SphericalManifold and use

SphericalManifold * RotateX

Is this what you meant ?

We have the constructor

CompositionManifold(F, G)

Does this do F*G or G*F ? The description given in words is a bit ambiguous.

Thanks
praveen

On Mon, May 16, 2016 at 2:29 PM, luca.heltai  wrote:

> Dear Praveen,
>
> there is a bug in SphericalManifold for dimension 3, which makes it
> unusable so far with MappingManifold.
>
> The issue is with the computation of the tangent vector across the north
> and south poles.
>
> At the moment MappingManifold is the only class using this computation, so
> if you don’t use MappingManifold, you don’t see this issue.
>
> You can solve it by writing a rotated SphericalManifold descriptor (one
> where the poles are east and west respectively), and associating this
> Manifold to the north and south faces of the sphere. You could use, for
> example, CompositionManifold to compose a rotation of 90 degree along the x
> or y axis with SphericalManifold, and attach the resulting manifold to the
> north and south faces.
>
> This is related to some of the issues here:
> https://github.com/dealii/dealii/issues/2530
>
> What you are hitting is a problem with the geometry, not with
> MappingManifold in itself. It is not possible to describe the surface of a
> sphere with a single chart without introducing at least one singularity. We
> have implemented the standard polar coordinate mapping, which has two
> singularities (north and south poles respectively), and these are the ones
> introducing nans in your computation.
>
> Everything works fine when computing intermediate points, but not when
> computing tangents. I’m still thinking of a way to fix this. The easiest
> fix is to implement the SphericalManifold without charts, but I haven’t had
> much time to sit down and do some fun stuff lately…
>
> Though, I can help you with implementing fixes, if you are willing to
> help… :)
>
> L.
>
> > On 16 May 2016, at 10:35, Praveen C  wrote:
> >
> > Dear all
> > I am solving pde on sphere and want to use MappingManifold
> >
> > My mesh is generated like this.
> >
> >   Point center(0.0, 0.0, 0.0);
> >   GridGenerator::hyper_sphere(triangulation, center, Radius);
> >   static SphericalManifold surface_description;
> >   triangulation.set_all_manifold_ids(0);
> >   triangulation.set_manifold (0, surface_description);
> >   triangulation.refine_global(n_refine);
> >
> > Changing from MappingQ to MappingManifold leads to blow up, with nan.
> >
> > Before I debug, is there an example I can see of MappingManifold usage ?
> >
> > Thanks
> > praveen
> >
> > --
> > The deal.II project is located at http://www.dealii.org/
> > For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> > ---
> > You received this message because you are subscribed to the Google
> Groups "deal.II User Group" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to dealii+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/d/optout.
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to dealii+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [deal.II] Help with interpretation of PETSc and SLEPc error message.

2016-05-16 Thread David
Hi, Tobi:

Thank you so much for your suggestions. I have followed your direction and 
checked my code again and again for all day long, but still
could not resolve this problem. If you (or someone else) wouldn't mind, 
could you please take a look at my code attached below?

It is a really short code, of which most parts are exactly the same with 
step-36, except some details I changed for learning purposes (I changed 
this problem to a simple dynamical elasticity problem on a rectangular 
domain). I know this might cause some unconveniences, but I really 
need somesone's help. Since nobody around me uses dealii, this is the only 
place I can turn to.

Thanks in advance for any help!

Best regards,
David.



On Monday, May 16, 2016 at 1:03:30 AM UTC+8, Tobi Young wrote:
>
> > Could anyone please take a look, it says: 
> > 
> > [0]PETSC ERROR: Object is in wrong state 
> > [0]PETSC ERROR: Matrix is missing diagonal entry 8 
> > 
>
> >The above tells us that the matrix is singular (missing a diagonal 
> entry).  
>
> 

>I can recommend you check first, if your matrix should be singular - 
> >ie. if you are assembling him correctly; and second, check that the 
> >SLEPc solver you are using is capable of solving a singular matrix 
> >(not all are). You can get some information from the solver pages of 
> >the SLEPc manual. 
> >Hope that helps a little. 
>

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
/* -
 *
 * Copyright (C) 2000 - 2015 by the deal.II authors
 *
 * This file is part of the deal.II library.
 *
 * The deal.II library is free software; you can use it, redistribute
 * it, and/or modify it under the terms of the GNU Lesser General
 * Public License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * The full text of the license can be found in the file LICENSE at
 * the top level of the deal.II distribution.
 *
 * -
 */


#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

#include 
#include 

#include 
#include 
#include 

#include 
#include 

#include 
#include 

namespace eigenproblem
{
  using namespace dealii;


  //Define material constants.
  double Es = 22407.96E6;   //Young's modulus
  double rho = 2483.;   //Mass density
  double nu = 0.2;  //Poisson's ratio
  double xi = 0.05; //Damping ratio

  template 
  class ModesComputation
  {
  public:
	  ModesComputation (const FiniteElement &finite_element);
	  void run ();

  private:
	  void make_triangulation ();
	  void setup_system ();
	  void assemble_system ();
	  void solve ();
	  void output_results () const;

	  Triangulation   triangulation;
	  FESystemfe;
	  DoFHandler  dof_handler;

	  ConstraintMatrix constraints;

	  PETScWrappers::SparseMatrix  stiffness_matrix, mass_matrix;
	  std::vector   eigenfunctions;
	  std::vector  eigenvalues;

	  unsigned int eigen_numbers;
	  double Elasticity_Tensor(unsigned int i,unsigned int j,
   unsigned int k,unsigned int l);
  };

  template 
  ModesComputation::ModesComputation(const FiniteElement &finite_element)
  :
  fe (finite_element, dim),
  dof_handler (triangulation),
  eigen_numbers(8)
  {}

  template 
  double ModesComputation::Elasticity_Tensor(unsigned int i,unsigned int j,
		  unsigned int k,unsigned int l)
  {
double lambda=(Es*nu)/((1.+nu)*(1.-2.*nu)),
   mu=Es/(2.*(1.+nu));

return lambda*(i==j)*(k==l) + mu*((i==k)*(j==l) + (i==l)*(j==k));

  }

  template 
  void ModesComputation::make_triangulation()
  {
Point<2> point1 =Point<2> (0., 0.);
Point<2> point2 =Point<2> (2., 20.);
GridGenerator::hyper_rectangle (triangulation,
			point1,
point2,
true);

triangulation.refine_global(4);		 

std::string filename = "rectangle.vtk";
std::ofstream out (filename.c_str());
GridOut grid_out;
grid_out.write_vtk (triangulation, out);
std::cout << " written to " << filename
	  << std::endl
	  << std::endl;
  }

  template 
  void ModesComputation::setup_system()
  {
	  dof_handler.distribute_dofs(fe);
	  std::cout << "   Number of degrees of fre

Re: [deal.II] How to use ManifoldMapping

2016-05-16 Thread luca.heltai
Dear Praveen,

there is a bug in SphericalManifold for dimension 3, which makes it unusable so 
far with MappingManifold. 

The issue is with the computation of the tangent vector across the north and 
south poles. 

At the moment MappingManifold is the only class using this computation, so if 
you don’t use MappingManifold, you don’t see this issue. 

You can solve it by writing a rotated SphericalManifold descriptor (one where 
the poles are east and west respectively), and associating this Manifold to the 
north and south faces of the sphere. You could use, for example, 
CompositionManifold to compose a rotation of 90 degree along the x or y axis 
with SphericalManifold, and attach the resulting manifold to the north and 
south faces.

This is related to some of the issues here: 
https://github.com/dealii/dealii/issues/2530

What you are hitting is a problem with the geometry, not with MappingManifold 
in itself. It is not possible to describe the surface of a sphere with a single 
chart without introducing at least one singularity. We have implemented the 
standard polar coordinate mapping, which has two singularities (north and south 
poles respectively), and these are the ones introducing nans in your 
computation.

Everything works fine when computing intermediate points, but not when 
computing tangents. I’m still thinking of a way to fix this. The easiest fix is 
to implement the SphericalManifold without charts, but I haven’t had much time 
to sit down and do some fun stuff lately…

Though, I can help you with implementing fixes, if you are willing to help… :) 

L.

> On 16 May 2016, at 10:35, Praveen C  wrote:
> 
> Dear all
> I am solving pde on sphere and want to use MappingManifold
> 
> My mesh is generated like this.
> 
>   Point center(0.0, 0.0, 0.0);
>   GridGenerator::hyper_sphere(triangulation, center, Radius);
>   static SphericalManifold surface_description;
>   triangulation.set_all_manifold_ids(0);
>   triangulation.set_manifold (0, surface_description);
>   triangulation.refine_global(n_refine);
> 
> Changing from MappingQ to MappingManifold leads to blow up, with nan.
> 
> Before I debug, is there an example I can see of MappingManifold usage ?
> 
> Thanks
> praveen
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to dealii+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] How to use ManifoldMapping

2016-05-16 Thread Praveen C
 Dear all
I am solving pde on sphere and want to use MappingManifold

My mesh is generated like this.

  Point center(0.0, 0.0, 0.0);
  GridGenerator::hyper_sphere(triangulation, center, Radius);
  static SphericalManifold surface_description;
  triangulation.set_all_manifold_ids(0);
  triangulation.set_manifold (0, surface_description);
  triangulation.refine_global(n_refine);

Changing from MappingQ to MappingManifold leads to blow up, with nan.

Before I debug, is there an example I can see of MappingManifold usage ?

Thanks
praveen

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.