[deal.II] Re: Trilinos SparseMatrix mmult bug

2016-09-22 Thread Ben Shields
I've just updated to 8.4.2 and repeated the change to 
trilinos_sparse_matrix.cc, and the matrices appear the same as my previous 
post. So I've at least ruled out that it's not an issue specific to my 
version number.

-- 
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] Re: Trilinos SparseMatrix mmult bug

2016-09-22 Thread Ben Shields
Hey there, thanks for the response. I made the recommended change to 
trilinos_sparse_matrix.cc, and the corresponding test code returns the 
appropriate output. However, I'm still getting an issue in my particular 
case. It's improved in that the resulting matrix is now square and the 
dimensions agree with the serial case, but the contents still do not match.

I introduced the new code into deal.ii version 8.3.0, I'm hoping to avoid 
updating to 8.4 for as long as I can. Could there be some other bug in the 
multiplication step in trilinos_sparse_matrix.cc? If not, I will try 
updating to the newest version and repeat the change there.

-- 
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] Re: periodic boundary conditions

2016-09-22 Thread Daniel Arndt
Juan,

[...]
> 1) My first question is about how the "direction" works, is it 1 
> correspond to "x" and 2 corresponds to "y"?
>
No, direction 0/1/2 means that the support_points of the dofs to be 
identified just differ in the x-/y-/z-component.
What you are doing should be perfectly fine.
 

> 2) When I do this I obtain fairly reasonable solutions, however I am 
> getting a weird Dirichlet-type of boundary conditions on boundaries 1 and 3 
> (see the attached figures), that distort the fields.
> I seem unable to find what is wrong, so I wonder if anyone has experienced 
> this kind of behavior.
>
No, I haven't observed this problem. Can you check in your ConstraintMatrix 
that you don't use any other constraints? For doing so use 
ConstraintMatrix.print(std::cout)
and check if there is a DoF that is not constrained to another one.
 
Best,
Daniel

-- 
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] Could not find LAPACK library

2016-09-22 Thread Andrew Lambe
Here it is:

andrew@andrew-apple-laptop:~/dealii-8.3.0/build$ ls -l /usr/lib/liblapack*
lrwxrwxrwx 1 root root 29 Sep 21 11:54 /usr/lib/liblapack.a -> 
/etc/alternatives/liblapack.a
lrwxrwxrwx 1 root root 28 Nov 23  2015 /usr/lib/liblapack_atlas.a -> 
atlas-base/liblapack_atlas.a
lrwxrwxrwx 1 root root 29 Nov 23  2015 /usr/lib/liblapack_atlas.so -> 
atlas-base/liblapack_atlas.so
lrwxrwxrwx 1 root root 31 Nov 23  2015 /usr/lib/liblapack_atlas.so.3 -> 
atlas-base/liblapack_atlas.so.3
lrwxrwxrwx 1 root root 30 Sep 21 11:54 /usr/lib/liblapack.so -> 
/etc/alternatives/liblapack.so
lrwxrwxrwx 1 root root 32 Sep 15 12:19 /usr/lib/liblapack.so.3 -> 
/etc/alternatives/liblapack.so.3
lrwxrwxrwx 1 root root 34 Sep 15 15:51 /usr/lib/liblapack.so.3gf -> 
/etc/alternatives/liblapack.so.3gf



On Thursday, September 22, 2016 at 1:16:27 PM UTC-4, Wolfgang Bangerth 
wrote:
>
> On 09/22/2016 11:13 AM, Andrew Lambe wrote: 
> > I'm trying to include the bundled UMFPACK package in my deal.II 
> > installation, but when I switch the options DEAL_II_WITH_LAPACK and 
> > DEAL_II_WITH_UMFPACK on, I get a weird error from CMake that the LAPACK 
> > library is not detected. I say weird because I have installed BLAS and 
> > LAPACK in the default location /usr/lib (via Ubuntu packages). If I 
> > switch these options off, the configuration and compile run without 
> > issue. Specifying the directory via the LAPACK_DIR option doesn't help. 
> > 
> > Unfortunately, I need UMFPACK to run some of my existing examples so I 
> > want those options to be on. I recently upgraded my Ubuntu version via a 
> > fresh install, so this could be the source of the issue, (missing 
> > package, broken link, etc.) but I'm having trouble chasing it down. 
> > 
> > I have included the terminal output with the above options off 
> > (terminal_out_ok.txt) and on (terminal_out_bad.txt) as well as the error 
> > logs for the second case. Any help would be appreciated. 
>
> Andrew, 
> can you post the output of 
>ls -l /usr/lib/liblapack* 
> or of 
>ls -l /usr/lib64/liblapack* 
> depending on whether you have a 32 or 64 bit system? 
>
> Best 
>   W. 
>
> -- 
>  
> Wolfgang Bangerth  email: bang...@colostate.edu 
>  
> www: http://www.math.colostate.edu/~bangerth/ 
>

-- 
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] Re: Input Q2 element generated by Gmsh using Gridin

2016-09-22 Thread Konstantin Ladutenko
Chenchen,

If you just need to simulate a multlayer sphere (or a part of it) and the 
bounding box should not have to be a box (e.g. a free space problem) you 
can also take a look at my attempt for this 
here https://groups.google.com/d/msg/dealii/pvqNQUM3eyM/ftqQK1ypBQAJ Just 
set all raddii of the sphere layers + the last one for an open space around 
the sphere (put your boundary condition on it) and this should generate a 
coarse mesh with cell boundary sitting exactly on the layer boundary.  It 
has already curved manifolds applied, so the refinement should be 
accurate...




среда, 21 сентября 2016 г., 18:15:05 UTC+3 пользователь Chenchen Liu 
написал:
>
> Hi all,
>
>
> I have to use quadratic shape function (Q2 elements) to do my project 
> (2D). Previously the code works well with Q1 linear elements, when I want 
> to input the gird with Q2 elements generated by Gmsh, it gives the 
> following error:
>
> An error occurred in line <1418> of file <../source/grid/grid_in.cc> in 
> function
>
> void dealii::GridIn<2, 2>::read_msh(std::istream &) [dim = 2, spacedim 
> = 2]
>
> The violated condition was: 
>
> false
>
> The name and call sequence of the exception was:
>
> ExcGmshUnsupportedGeometry(cell_type)
>
> Additional Information: 
>
> The Element Identifier <8> is not supported in the deal.II library when 
> reading meshes in 2 dimensions.
>
>
> And, it says the supported quad element should have 4 nodes and 4 edges. 
> Just want to check whether deal.ii support Q2 elements by Gmsh.
>
> My mesh looks like the following
>
>
> 
>
>
>
> If deal.ii does not support higher order element by Gmsh, what other 
> format is recommended? Thanks!
>
>
> Best,
>
> Chenchen
>
>
>
>

-- 
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] Re: Input Q2 element generated by Gmsh using Gridin

2016-09-22 Thread Bruno Turcksin
Chenchen,

2016-09-22 10:54 GMT-04:00 Chenchen Liu :
> Thank you for your sharing. To my mind, after we generate Q2 mesh in Gmsh,
> we have all the information about vertices and cells. We can read these
> information to deal.ii as point list and cell list, and then generate mesh
> like step-14 and 49. But still, I am not sure whether deal.ii supports
> higher order elements.
Yes, deal.II supports high-order elements BUT it cannot get the
information from a mesh that it reads. That's why you need to first,
read the low order mesh and then, use manifolds to let deal.II know
the order of the elements and the actual shape.

Best,

Bruno

-- 
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] Re: Input Q2 element generated by Gmsh using Gridin

2016-09-22 Thread Chenchen Liu
I see your point. Thank you! But it seems that hanging nodes is really 
annoying :) I will have a try.

在 2016年9月22日星期四 UTC-4上午7:38:35,Konstantin Ladutenko写道:
>
> BTW, the element in bottom left corner is too triangle for good FEM. To 
> solve this providing an additional element inside the curved boundary looks 
> to be a common approach, you can find more details here 
> http://dealii.org/developer/doxygen/deal.II/step_6.html#Abettermesh 
>
> среда, 21 сентября 2016 г., 18:15:05 UTC+3 пользователь Chenchen Liu 
> написал:
>>
>> Hi all,
>>
>>
>> I have to use quadratic shape function (Q2 elements) to do my project 
>> (2D). Previously the code works well with Q1 linear elements, when I want 
>> to input the gird with Q2 elements generated by Gmsh, it gives the 
>> following error:
>>
>> An error occurred in line <1418> of file <../source/grid/grid_in.cc> in 
>> function
>>
>> void dealii::GridIn<2, 2>::read_msh(std::istream &) [dim = 2, 
>> spacedim = 2]
>>
>> The violated condition was: 
>>
>> false
>>
>> The name and call sequence of the exception was:
>>
>> ExcGmshUnsupportedGeometry(cell_type)
>>
>> Additional Information: 
>>
>> The Element Identifier <8> is not supported in the deal.II library when 
>> reading meshes in 2 dimensions.
>>
>>
>> And, it says the supported quad element should have 4 nodes and 4 edges. 
>> Just want to check whether deal.ii support Q2 elements by Gmsh.
>>
>> My mesh looks like the following
>>
>>
>> 
>>
>>
>>
>> If deal.ii does not support higher order element by Gmsh, what other 
>> format is recommended? Thanks!
>>
>>
>> Best,
>>
>> Chenchen
>>
>>
>>
>>

-- 
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] Re: Input Q2 element generated by Gmsh using Gridin

2016-09-22 Thread Chenchen Liu
Thank you! I almost done with this.

在 2016年9月21日星期三 UTC-4下午12:04:19,Bruno Turcksin写道:
>
> Chenchen,
>
> On Wednesday, September 21, 2016 at 11:56:31 AM UTC-4, Daniel Arndt wrote:
>>
>> We only support to read in meshes that are not refined. Translated to 
>> your situation this means that you are only able to use Q1 meshes as 
>> initial grid.
>> Of course, you can then use triangulation.set_manifold to define the 
>> correct behavior when you refine your mesh within dealii along with a 
>> Mapping of appropriate order.
>>
> You should take a look at step-49, step-53, and step-54 to learn how to do 
> that.
>
> Best,
>
> Bruno
>

-- 
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] Re: Proper use of CompositionManifold

2016-09-22 Thread Praveen C
Thanks Luca. I have been looking at tests also.

For CompositionManifold, if

H = CompositionManifold(F, G)

then

H_pullback = F_pullback * G_pullback

H_pushforward = G_pushforward * F_pushforward

I think adding this to documentation will improve the description.

Also this line

dim1 The dimension of the first ChartManifold
,
which coincides also with the chart dimension of the second ChartManifold


does not seem to be correct in my case

   static const PolarManifold<2,3> sphere;
   static const FunctionManifold<3,3,3> rotate("x;-z;y","x;z;-y");
   static const CompositionManifold<2,3,3,3,2,3> rotated_sphere(sphere,
rotate);

dimension of first manifold (sphere) = 2

but this is not equal to

chart dimension of second manifold (rotate) = 3 ???

Best
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.


Re: [deal.II] Re: Proper use of CompositionManifold

2016-09-22 Thread luca.heltai
For future reference, if you are in doubt on how to use a single 
class/function, you can skim through the directory tests, i.e., 

tests/manifold/composition_manifold_*

would have shown to you an example which is identical to what you are trying to 
achieve, and in general it contains very simple pieces of codes that run very 
simple tests and show how to use almost every single class/function of the 
deal.II library.

This should be your second step, though, after reading carefully the 
documentation. ;)

If you think there are things that should be changed in the documentation to 
make the CompositionManifold class clearer (a very young class indeed), please 
feel free to make a pull request. We’d be happy to include your comments in the 
library!

Luca.


> On 22 Sep 2016, at 7:00, Praveen C  wrote:
> 
> I was making a mistake. Reading the code of CompositionManifold clarified it. 
> This is correct
> 
>   static const PolarManifold<2,3> sphere;
>   static const FunctionManifold<3,3,3> rotate("x;-z;y","x;z;-y");
>   static const CompositionManifold<2,3,3,3,2,3> rotated_sphere(sphere, 
> rotate);
> 
> Thanks
> praveen
> 
> On Thu, Sep 22, 2016 at 10:03 AM, Praveen C  wrote:
> Hello
> 
> I think I understand this better after reading the code. Here is my attempt
> 
>   static const PolarManifold<2,3> sphere;
>   static const FunctionManifold<3,3,3> rotate("x,-z,y","x,z,-y");
>   static CompositionManifold<2,3,2,3,3,3> surface(sphere, rotate);
> 
> I use
> 
> dim=2 The dimension of the resulting ChartManifold
> spacedim=3The space dimension of the resulting ChartManifold
> chartdim=2The chart dimension of the resulting ChartManifold
> intermediate_dim=3The space dimension of the first ChartManifold
> dim1=3The dimension of the first ChartManifold, which coincides also 
> with the chart dimension of the second ChartManifold
> dim2=3The dimension of the second ChartManifold
> 
> This gives following error
> 
> /Users/praveen/Applications/dgswm/src/swm.cc:279:47: error: no matching
>   constructor for initialization of 'CompositionManifold<2, 3, 2, 3, 3, 
> 3>'
>   static CompositionManifold<2,3,2,3,3,3> surface(sphere, rotate);
>   ^   ~~
> /Users/praveen/Applications/deal.II/git/install/include/deal.II/grid/composition_manifold.h:75:3:
>  note: 
>   candidate constructor not viable: no known conversion from 'const
>   PolarManifold<2, 3>' to 'const ChartManifold<3, 3, 2>' for 1st argument
>   CompositionManifold(const ChartManifold 
> ,
>   ^
> /Users/praveen/Applications/deal.II/git/install/include/deal.II/grid/composition_manifold.h:68:7:
>  note: 
>   candidate constructor (the implicit copy constructor) not viable: 
> requires
>   1 argument, but 2 were provided
> class CompositionManifold : public ChartManifold
>   ^
> /Users/praveen/Applications/deal.II/git/install/include/deal.II/grid/composition_manifold.h:68:7:
>  note: 
>   candidate constructor (the implicit move constructor) not viable: 
> requires
>   1 argument, but 2 were provided
> 
> 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.