[deal.II] Re: It seems that parallel::distributed::SolutionTransfer does not support hp::DoFHandler, how can I transfer solution after mesh changed

2017-05-15 Thread Jack
Hi Jean-Paul,

Thanks for your help. My program failed to compile, so I didn't run it and 
get such an assertion.  I see that the un-supporting of hp::DoFHandler for 
parallel distributed calculation in hp namespace. 

Thanks!

Regards,

Jack

在 2017年5月15日星期一 UTC+8下午10:27:22,Jean-Paul Pelteret写道:
>
> Hi Jack,
>
> The hp::DoFHandler does not work at all for distributed meshes (although I 
> see that this is not explicitly stated in the class documentation 
>  
> or that of parallel::distributed::Triangulation 
> ).
>  
> So you should never be able to attach a 
> parallel::distributed::Triangulation to an hp::DoFHandler (see this line 
> of code 
> :
>  
> have you run your program in debug mode?). You'll want to use the standard 
> SolutionTransfer 
>  
> class with hp::DoFHandler.
>
> I hope that this helps.
>
> Regards,
> Jean-Paul
>
> On Monday, May 15, 2017 at 4:03:47 PM UTC+2, Jack wrote:
>>
>> Dear all,
>>
>>  
>>
>> I’m trying to using hp::DoFHandler to solve my problems. It seems that 
>> this type of dof handler does not work for solution transfer during 
>> parallel distributed computing. So is there any way to transfer solution 
>> after refining and coarsening of mesh when using hp::DoFHandler?
>>
>>  
>>
>> Many thanks!
>>
>>  
>>
>> Best,
>>
>>  
>>
>> Jack
>>
>

-- 
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: Step-42

2017-05-15 Thread Bruno Turcksin
Ben,

2017-05-15 17:24 GMT-04:00  :
> Thanks very much for your help. I really appreciate your kindness if you let
> me know why this step cannot be run as other tutorials?
make run basically does make followed by ./step-xx This doesn't work
for step-42 because it requires an input. That's why you need to split
the command into make and then, ./step-42 p2_adaptive.prm

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: Step-42

2017-05-15 Thread benhour . amirian66
Dear All,
Thanks very much for your help. I really appreciate your kindness if you 
let me know why this step cannot be run as other tutorials?

Bests,
Ben

On Monday, May 15, 2017 at 4:12:17 PM UTC-5, Bruno Turcksin wrote:
>
> Benhour,
>
> do the following three steps:
> cmake .
> make
> ./step-42 p1_adaptive.prm
>
> Best,
>
> Bruno
>
>
> On Monday, May 15, 2017 at 5:04:33 PM UTC-4, benhour@gmail.com 
>  wrote:
>>
>> Dear Jean-Paul,
>> If I did correct, first I call "cmake ." and then "make run ./step-42 
>> p1_adaptive.prm" and did not use "make". With these changes, it did not 
>> work again.
>>
>> Thanks,
>> Ben
>>
>> On Monday, May 15, 2017 at 3:27:29 PM UTC-5, Jean-Paul Pelteret wrote:
>>>
>>> Dear Benhour,
>>>
>>> I think that you must have misinterpreted what Daniel suggested. If I run
>>>
>>> ./step-42 p1_adaptive.prm

>>>
>>>  then this tutorial works fine for me. If I run "make run" then the 
>>> (unusual) error message appears for me as well. 
>>>
>>> Regards,
>>> Jean-Paul
>>>
>>> On Monday, May 15, 2017 at 7:30:25 PM UTC+2, benhour@gmail.com 
>>> wrote:

 Dear Daniel,
 According to your noteworthy comments, I tried exactly what you said, 
 however, I got exactly the same as before, as what you got.

 Thanks,
 Benhour

 On Monday, May 15, 2017 at 12:23:44 PM UTC-5, Daniel Arndt wrote:
>
> Benhour,
>
> `make run` gives me:
>
> Scanning dependencies of target step-42
> [ 33%] Building CXX object CMakeFiles/step-42.dir/step-42.cc.o
> [ 66%] Linking CXX executable step-42
> [ 66%] Built target step-42
> Scanning dependencies of target run
> [100%] Run step-42 with Debug configuration
> *** Call this program as <./step-42 input.prm>
> CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' 
> failed
> make[3]: *** [CMakeFiles/run] Error 1
> CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/run.dir/all' 
> failed
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> CMakeFiles/Makefile2:266: recipe for target 'CMakeFiles/run.dir/rule' 
> failed
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> Makefile:196: recipe for target 'run' failed
> make: *** [run] Error 2
>
> which is at least similar to what you are observing. The relevant line 
> here is:
> *** Call this program as <./step-42 input.prm>
>
> Is it possible that you just tried to call `make run` instead of 
> `make` and `./step-42 p1_adaptive.prm`?
> Note that there are multiple parameter files:
> p1_adaptive.prm  
> p1_chinese.prm  
> p1_global.prm  
> p2_adaptive.prm  
> p2_global.prm
>
> 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.


[deal.II] Re: Step-42

2017-05-15 Thread Bruno Turcksin
Benhour,

do the following three steps:
cmake .
make
./step-42 p1_adaptive.prm

Best,

Bruno


On Monday, May 15, 2017 at 5:04:33 PM UTC-4, benhour.amiria...@gmail.com 
wrote:
>
> Dear Jean-Paul,
> If I did correct, first I call "cmake ." and then "make run ./step-42 
> p1_adaptive.prm" and did not use "make". With these changes, it did not 
> work again.
>
> Thanks,
> Ben
>
> On Monday, May 15, 2017 at 3:27:29 PM UTC-5, Jean-Paul Pelteret wrote:
>>
>> Dear Benhour,
>>
>> I think that you must have misinterpreted what Daniel suggested. If I run
>>
>> ./step-42 p1_adaptive.prm
>>>
>>
>>  then this tutorial works fine for me. If I run "make run" then the 
>> (unusual) error message appears for me as well. 
>>
>> Regards,
>> Jean-Paul
>>
>> On Monday, May 15, 2017 at 7:30:25 PM UTC+2, benhour@gmail.com wrote:
>>>
>>> Dear Daniel,
>>> According to your noteworthy comments, I tried exactly what you said, 
>>> however, I got exactly the same as before, as what you got.
>>>
>>> Thanks,
>>> Benhour
>>>
>>> On Monday, May 15, 2017 at 12:23:44 PM UTC-5, Daniel Arndt wrote:

 Benhour,

 `make run` gives me:

 Scanning dependencies of target step-42
 [ 33%] Building CXX object CMakeFiles/step-42.dir/step-42.cc.o
 [ 66%] Linking CXX executable step-42
 [ 66%] Built target step-42
 Scanning dependencies of target run
 [100%] Run step-42 with Debug configuration
 *** Call this program as <./step-42 input.prm>
 CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' 
 failed
 make[3]: *** [CMakeFiles/run] Error 1
 CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/run.dir/all' 
 failed
 make[2]: *** [CMakeFiles/run.dir/all] Error 2
 CMakeFiles/Makefile2:266: recipe for target 'CMakeFiles/run.dir/rule' 
 failed
 make[1]: *** [CMakeFiles/run.dir/rule] Error 2
 Makefile:196: recipe for target 'run' failed
 make: *** [run] Error 2

 which is at least similar to what you are observing. The relevant line 
 here is:
 *** Call this program as <./step-42 input.prm>

 Is it possible that you just tried to call `make run` instead of `make` 
 and `./step-42 p1_adaptive.prm`?
 Note that there are multiple parameter files:
 p1_adaptive.prm  
 p1_chinese.prm  
 p1_global.prm  
 p2_adaptive.prm  
 p2_global.prm

 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.


[deal.II] Re: Step-42

2017-05-15 Thread benhour . amirian66
Dear Jean-Paul,
If I did correct, first I call "cmake ." and then "make run ./step-42 
p1_adaptive.prm" and did not use "make". With these changes, it did not 
work again.

Thanks,
Ben

On Monday, May 15, 2017 at 3:27:29 PM UTC-5, Jean-Paul Pelteret wrote:
>
> Dear Benhour,
>
> I think that you must have misinterpreted what Daniel suggested. If I run
>
> ./step-42 p1_adaptive.prm
>>
>
>  then this tutorial works fine for me. If I run "make run" then the 
> (unusual) error message appears for me as well. 
>
> Regards,
> Jean-Paul
>
> On Monday, May 15, 2017 at 7:30:25 PM UTC+2, benhour@gmail.com 
>  wrote:
>>
>> Dear Daniel,
>> According to your noteworthy comments, I tried exactly what you said, 
>> however, I got exactly the same as before, as what you got.
>>
>> Thanks,
>> Benhour
>>
>> On Monday, May 15, 2017 at 12:23:44 PM UTC-5, Daniel Arndt wrote:
>>>
>>> Benhour,
>>>
>>> `make run` gives me:
>>>
>>> Scanning dependencies of target step-42
>>> [ 33%] Building CXX object CMakeFiles/step-42.dir/step-42.cc.o
>>> [ 66%] Linking CXX executable step-42
>>> [ 66%] Built target step-42
>>> Scanning dependencies of target run
>>> [100%] Run step-42 with Debug configuration
>>> *** Call this program as <./step-42 input.prm>
>>> CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' 
>>> failed
>>> make[3]: *** [CMakeFiles/run] Error 1
>>> CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/run.dir/all' 
>>> failed
>>> make[2]: *** [CMakeFiles/run.dir/all] Error 2
>>> CMakeFiles/Makefile2:266: recipe for target 'CMakeFiles/run.dir/rule' 
>>> failed
>>> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
>>> Makefile:196: recipe for target 'run' failed
>>> make: *** [run] Error 2
>>>
>>> which is at least similar to what you are observing. The relevant line 
>>> here is:
>>> *** Call this program as <./step-42 input.prm>
>>>
>>> Is it possible that you just tried to call `make run` instead of `make` 
>>> and `./step-42 p1_adaptive.prm`?
>>> Note that there are multiple parameter files:
>>> p1_adaptive.prm  
>>> p1_chinese.prm  
>>> p1_global.prm  
>>> p2_adaptive.prm  
>>> p2_global.prm
>>>
>>> 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] Error in the second derivative of solution...?

2017-05-15 Thread Jean-Paul Pelteret
Dear Kyusik,
 

> I'm sorry to tell you that actually I don't know how to project 
> grad_solution into the vector-valued FE space
>
> Do you happen to know some example tutorial code that includes it?
>

Off the top of my head, no I don't know of an example tutorial that 
demonstrates it. But you're effectively solving a least-squares problem for 
the solution gradient so its relatively straight-forward to do:
1. Create a vector-valued finite element system (maybe an 
FESystem(FE_Q(1),dim) ) and use it to distribute DoFs onto a new 
DoFHandler.
2. Create a mass matrix "M" with the new DoFHandler.
3. Create a RHS vector "f" of the form f_i = \int_\Omega f(x) \phi_i(x) dx 
. Here f(x) = \grad \psi (x) is the gradient of the solution evaluated at 
point x and \phi_i is a vector-valued shape function. So you need to 
obviously compute the gradient of the solution at all quadrature points 
when doing integration - you would do this with the function I mentioned 
previously.
4. Solve the linear system M.d = f, where "d" represents the (continuous) 
gradient of the solution to the scalar problem.

There's some useful information in the introduction to the VectorTools 
namespace 
 
(namely 
on projection and the form of the RHS vector), so you can look there as 
well for more information. 

As I said before, you could avoid these complexities by expanding your 
original equation into the two separate terms. However, the benefit to the 
projection approach is that you can evaluate this term for one order lower 
polynomial since you don't need to directly compute second derivatives. 
With the projection one might incur some loss of accuracy of the gradient 
field, but I'm not quite sure to what extent this would affect your 
calculation. 

Regards,
Jean-Paul

-- 
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: Step-42

2017-05-15 Thread Jean-Paul Pelteret
Dear Benhour,

I think that you must have misinterpreted what Daniel suggested. If I run

./step-42 p1_adaptive.prm
>

 then this tutorial works fine for me. If I run "make run" then the 
(unusual) error message appears for me as well. 

Regards,
Jean-Paul

On Monday, May 15, 2017 at 7:30:25 PM UTC+2, benhour.amiria...@gmail.com 
wrote:
>
> Dear Daniel,
> According to your noteworthy comments, I tried exactly what you said, 
> however, I got exactly the same as before, as what you got.
>
> Thanks,
> Benhour
>
> On Monday, May 15, 2017 at 12:23:44 PM UTC-5, Daniel Arndt wrote:
>>
>> Benhour,
>>
>> `make run` gives me:
>>
>> Scanning dependencies of target step-42
>> [ 33%] Building CXX object CMakeFiles/step-42.dir/step-42.cc.o
>> [ 66%] Linking CXX executable step-42
>> [ 66%] Built target step-42
>> Scanning dependencies of target run
>> [100%] Run step-42 with Debug configuration
>> *** Call this program as <./step-42 input.prm>
>> CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' 
>> failed
>> make[3]: *** [CMakeFiles/run] Error 1
>> CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/run.dir/all' 
>> failed
>> make[2]: *** [CMakeFiles/run.dir/all] Error 2
>> CMakeFiles/Makefile2:266: recipe for target 'CMakeFiles/run.dir/rule' 
>> failed
>> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
>> Makefile:196: recipe for target 'run' failed
>> make: *** [run] Error 2
>>
>> which is at least similar to what you are observing. The relevant line 
>> here is:
>> *** Call this program as <./step-42 input.prm>
>>
>> Is it possible that you just tried to call `make run` instead of `make` 
>> and `./step-42 p1_adaptive.prm`?
>> Note that there are multiple parameter files:
>> p1_adaptive.prm  
>> p1_chinese.prm  
>> p1_global.prm  
>> p2_adaptive.prm  
>> p2_global.prm
>>
>> 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.


[deal.II] Re: Step-42

2017-05-15 Thread benhour . amirian66
Dear Daniel,
According to your noteworthy comments, I tried exactly what you said, 
however, I got exactly the same as before, as what you got.

Thanks,
Benhour

On Monday, May 15, 2017 at 12:23:44 PM UTC-5, Daniel Arndt wrote:
>
> Benhour,
>
> `make run` gives me:
>
> Scanning dependencies of target step-42
> [ 33%] Building CXX object CMakeFiles/step-42.dir/step-42.cc.o
> [ 66%] Linking CXX executable step-42
> [ 66%] Built target step-42
> Scanning dependencies of target run
> [100%] Run step-42 with Debug configuration
> *** Call this program as <./step-42 input.prm>
> CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' failed
> make[3]: *** [CMakeFiles/run] Error 1
> CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/run.dir/all' failed
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> CMakeFiles/Makefile2:266: recipe for target 'CMakeFiles/run.dir/rule' 
> failed
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> Makefile:196: recipe for target 'run' failed
> make: *** [run] Error 2
>
> which is at least similar to what you are observing. The relevant line 
> here is:
> *** Call this program as <./step-42 input.prm>
>
> Is it possible that you just tried to call `make run` instead of `make` 
> and `./step-42 p1_adaptive.prm`?
> Note that there are multiple parameter files:
> p1_adaptive.prm  
> p1_chinese.prm  
> p1_global.prm  
> p2_adaptive.prm  
> p2_global.prm
>
> 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.


[deal.II] Re: Step-42

2017-05-15 Thread Daniel Arndt
Benhour,

`make run` gives me:

Scanning dependencies of target step-42
[ 33%] Building CXX object CMakeFiles/step-42.dir/step-42.cc.o
[ 66%] Linking CXX executable step-42
[ 66%] Built target step-42
Scanning dependencies of target run
[100%] Run step-42 with Debug configuration
*** Call this program as <./step-42 input.prm>
CMakeFiles/run.dir/build.make:57: recipe for target 'CMakeFiles/run' failed
make[3]: *** [CMakeFiles/run] Error 1
CMakeFiles/Makefile2:259: recipe for target 'CMakeFiles/run.dir/all' failed
make[2]: *** [CMakeFiles/run.dir/all] Error 2
CMakeFiles/Makefile2:266: recipe for target 'CMakeFiles/run.dir/rule' failed
make[1]: *** [CMakeFiles/run.dir/rule] Error 2
Makefile:196: recipe for target 'run' failed
make: *** [run] Error 2

which is at least similar to what you are observing. The relevant line here 
is:
*** Call this program as <./step-42 input.prm>

Is it possible that you just tried to call `make run` instead of `make` and 
`./step-42 p1_adaptive.prm`?
Note that there are multiple parameter files:
p1_adaptive.prm  
p1_chinese.prm  
p1_global.prm  
p2_adaptive.prm  
p2_global.prm

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.


[deal.II] Re: Step-42

2017-05-15 Thread benhour . amirian66
Dear All,
Unfortunately I could not run this step. In fact, none of my friends also 
could run this step. I was wondering if you let me know it works in your 
system.

Thanks,
Benhour 

On Monday, May 15, 2017 at 6:25:51 AM UTC-5, Jean-Paul Pelteret wrote:
>
> Dear Benhour,
>
> I would suggest removing the CMakeCache.txt file and CMakeFiles directory 
> (both located in the tutorial/build directory). Then rerun CMake before 
> trying to build the tutorial. It might be that there are some stale 
> configuration settings that need to be updated.
>
> Regards,
> Jean-Paul
>
> On Monday, May 15, 2017 at 1:14:26 PM UTC+2, Daniel Arndt wrote:
>>
>> Ben,
>>
>> I tried with version 8.4.1 and also the new version, 8.5, however it does 
>>> not run at all. The errors that I got are given as below:
>>> make[3]: *** [CMakeFiles/run] Error 1
>>> make[2]: *** [CMakeFiles/run.dir/all] Error 2
>>> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
>>> make: *** [run] Error 2
>>>
>> is this really all the output you get when calling "make"? This output 
>> alone does not really tell anything...
>>
>> 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] Error in the second derivative of solution...?

2017-05-15 Thread hanks0227
Dear Jean-Paul Pelteret,

Thank you very much for your help. It is very helpful.


> However, you'll note that this function only makes sense (and its 
> therefore only defined) for a vector field. Your solution field is scalar 
> though, which presents a bit of an issue. On the face of it you'd have to 
> first project the gradient of the solution (scaled by the function "f") 
> onto an axillary vector-valued FE space and then compute the divergence of 
> that projected field. 
>

I'm sorry to tell you that actually I don't know how to project 
grad_solution into the vector-valued FE space

Do you happen to know some example tutorial code that includes it?

Thank you.

Kyusik.   

-- 
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: It seems that parallel::distributed::SolutionTransfer does not support hp::DoFHandler, how can I transfer solution after mesh changed

2017-05-15 Thread Jean-Paul Pelteret
Hi Jack,

The hp::DoFHandler does not work at all for distributed meshes (although I 
see that this is not explicitly stated in the class documentation 
 
or that of parallel::distributed::Triangulation 
).
 
So you should never be able to attach a 
parallel::distributed::Triangulation to an hp::DoFHandler (see this line of 
code 
: 
have you run your program in debug mode?). You'll want to use the standard 
SolutionTransfer 
 
class with hp::DoFHandler.

I hope that this helps.

Regards,
Jean-Paul

On Monday, May 15, 2017 at 4:03:47 PM UTC+2, Jack wrote:
>
> Dear all,
>
>  
>
> I’m trying to using hp::DoFHandler to solve my problems. It seems that 
> this type of dof handler does not work for solution transfer during 
> parallel distributed computing. So is there any way to transfer solution 
> after refining and coarsening of mesh when using hp::DoFHandler?
>
>  
>
> Many thanks!
>
>  
>
> Best,
>
>  
>
> Jack
>

-- 
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] Representing/Visualizing tangent vectors of codimension one manifolds

2017-05-15 Thread justin . a . grewe
Hi all,

I am interested in solving vector valued pdes on 2d surfaces embedded in 3d 
space.
More specifically the vectors lie in the tangent space, such that they only 
have 2 components rather than 3.
Here I have a few questions:

1. Say I want to visualize the solution, i would expect that i have to 
somehow use the mapping from the reference cell to the real cell to obtain 
the solution vector (that is tangent to the surface) as a <1,3> Tensor. 
What is the canonical way of doing so? 
Attached I have a mimimum example of how I tried to do this using the 
DataOut class, which fails if i set the 
FESystem to have only 2 components. It fails at the call DataOut>::build_patches(mapping) with the following error:

An error occurred in line <1240> of file 
 in 
function
std::vector, std::allocator > > > 
dealii::DataOut_DoFData::get_vector_data_ranges() const [with DoFHandlerType = 
dealii::DoFHandler<2, 3>; int patch_dim = 2; int patch_space_dim = 3]
The violated condition was: 
i+patch_space_dim <= (*d)->n_output_variables
Additional information: 
When declaring that a number of components in a data set to be output 
logically form a vector instead of simply a set of scalar fields, you need 
to specify this for all relevant components. Furthermore, vectors must 
always consist of exactly  components. However, the vector component 
at position 0 with name  does not satisfy these conditions.

2. Is it actually a good idea to represent a solution vector that should be 
tangent to the surface with a 2-dimensional finite element or should one 
rather use a 3-dim finite element and enforce the constraint that the 
vector lies in the tangent plane on every element using the facilities of 
the constraint matrix for every element?

I have read "Tools for the Solution of PDEs Defined on Curved Manifolds 
with the deal.II Library" by Antonio DeSimone, Luca Heltai and Cataldo 
Manigrasso and the step-34 tutorial but in both publications only scalar 
problems are considered. It would probably also be very helpful to me if 
somebody could point me towards some publication discussing a vector valued 
problem on a codimension one manifold - if at all possible, I have not 
found anything helpful sofar.

Thanks and regards, 
Justin

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

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


#include 
#include 
#include  
#include 


using namespace dealii;

const unsigned int spacedim=3;
const unsigned int dim=spacedim-1;

int main(){


//generate triangulation
Triangulation triangulation;
const Point center (0,0,0);
const double outer_radius = 1.0;
GridGenerator::hyper_sphere (triangulation,
  center, outer_radius);
const SphericalManifold manifold_description(center);
triangulation.set_manifold (0, manifold_description);
triangulation.set_all_manifold_ids(0);


//define finite element, finite element system and mapping
const FE_Q fe(1);
FESystem sys(fe,dim);
MappingQ  mapping(3);


//define dofhandler
DoFHandler dof_handler(triangulation);
dof_handler.distribute_dofs(sys);

//define test vector that should be visualized later
Vector testvec(dof_handler.n_dofs());
for(int i=0; i> dataout;

//the data that is being output is a vector with dim components in the tangent space
std::vector names( dim, "test");
std::vector
data_component_interpretation(dim, DataComponentInterpretation::component_is_part_of_vector);

dataout.attach_dof_handler(dof_handler);
dataout.add_data_vector(testvec, names, DataOut>::type_dof_data,
	  			data_component_interpretation);

//this is where the program fails - i would have expected the mapping<2,3> to make a <1,3> tensor
//from the 2 components.
dataout.build_patches(mapping, 0, DataOut>::curved_inner_cells);
dataout.write_vtk(out);

return 0;}

[deal.II] It seems that parallel::distributed::SolutionTransfer does not support hp::DoFHandler, how can I transfer solution after mesh changed

2017-05-15 Thread Jack


Dear all,

 

I’m trying to using hp::DoFHandler to solve my problems. It seems that this 
type of dof handler does not work for solution transfer during parallel 
distributed computing. So is there any way to transfer solution after 
refining and coarsening of mesh when using hp::DoFHandler?

 

Many thanks!

 

Best,

 

Jack

-- 
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: Adding periodicity to a thin sample with one element in thickness direction

2017-05-15 Thread Jean-Paul Pelteret
Dear Hamad,

Would you mind please posting a minimal example that demonstrates the 
issue? Since both Daniel and I are surprised that this is the behaviour 
that you're experiencing, I would say that this is an unexpected outcome.

Regards,
Jean-Paul

On Monday, May 15, 2017 at 3:40:20 PM UTC+2, Hamed Babaei wrote:
>
> Dear Daniel,
>
> As far as I see, GridGenerator::subdivided_hyper_rectangle only calls 
>> "Triangulation::create_triangulation" and hence creates a coarse 
>> triangulation.
>> Can you confirm either?
>>
> If  GridGenerator::subdivided_hyper_rectangle creates a coarse 
> triangulation, a question arises that when it uses repetition argument 
> which specifies number of elements in every direction. 
> Besides, when I use GridGenerator::subdivided_hyper_rectangle with 
> repetition argument, the code gets stuck at add_periodicity and never ends. 
>
> Thanks and regards,
> Hamed  
>

-- 
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: Adding periodicity to a thin sample with one element in thickness direction

2017-05-15 Thread Hamed Babaei
Dear Daniel,

As far as I see, GridGenerator::subdivided_hyper_rectangle only calls 
> "Triangulation::create_triangulation" and hence creates a coarse 
> triangulation.
> Can you confirm either?
>
If  GridGenerator::subdivided_hyper_rectangle creates a coarse 
triangulation, a question arises that when it uses repetition argument 
which specifies number of elements in every direction. 
Besides, when I use GridGenerator::subdivided_hyper_rectangle with 
repetition argument, the code gets stuck at add_periodicity and never ends. 

Thanks and regards,
Hamed  

-- 
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: Create_point_source_vector Magnitude

2017-05-15 Thread Kartik Jujare
Thank you Bruno. My mistake.

Regards,
Kartik Jujare

On Friday, May 12, 2017 at 3:42:54 PM UTC+2, Bruno Turcksin wrote:
>
> 2017-05-12 9:32 GMT-04:00 Kartik Jujare >: 
>
> > The graph shows the steady state solution given a point source at 
> (0.6,0.6). 
> Why would you expect the _solution_ to be one? You set the _source_ to 
> one at (0.6, 0.6) What you are essentially saying is that the 
> divergence at this point should be one at this point not the solution. 
>
> 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: Step-42

2017-05-15 Thread Jean-Paul Pelteret
Dear Benhour,

I would suggest removing the CMakeCache.txt file and CMakeFiles directory 
(both located in the tutorial/build directory). Then rerun CMake before 
trying to build the tutorial. It might be that there are some stale 
configuration settings that need to be updated.

Regards,
Jean-Paul

On Monday, May 15, 2017 at 1:14:26 PM UTC+2, Daniel Arndt wrote:
>
> Ben,
>
> I tried with version 8.4.1 and also the new version, 8.5, however it does 
>> not run at all. The errors that I got are given as below:
>> make[3]: *** [CMakeFiles/run] Error 1
>> make[2]: *** [CMakeFiles/run.dir/all] Error 2
>> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
>> make: *** [run] Error 2
>>
> is this really all the output you get when calling "make"? This output 
> alone does not really tell anything...
>
> 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.


[deal.II] Re: Getting error during cmake configuration step and later during make run

2017-05-15 Thread Daniel Arndt
Vikram,

> I am new to dealii. I installed deal.II 8.5.0 using the dmg package from 
> dealii website on mac OS Sierra. When I tried to configure I got this error:
>
> CMake Error at 
> /Applications/deal.II-8.5-brew.app/Contents/Resources/brew/Cellar/cmake/3.7.2/share/cmake/Modules/CMakeTestCXXCompiler.cmake:44
>  
> (message):
>   The C++ compiler
>   "/Applications/deal.II-8.5-brew.app/Contents/Resources/brew/bin/mpicxx" 
> is
>   not able to compile a simple test program.
>
>   It fails with the following output:
>
>Change Dir: 
> /Users/vikramb/Documents/dealII/svn_co/deal.II/examples/step-1/CMakeFiles/CMakeTmp
>
>   
>
>   Run Build Command:"/usr/bin/make" "cmTC_5fce3/fast"
>
>   /Applications/Xcode.app/Contents/Developer/usr/bin/make -f
>   CMakeFiles/cmTC_5fce3.dir/build.make CMakeFiles/cmTC_5fce3.dir/build
>
>   Building CXX object CMakeFiles/cmTC_5fce3.dir/testCXXCompiler.cxx.o
>
>   /Applications/deal.II-8.5-brew.app/Contents/Resources/brew/bin/mpicxx -o
>   CMakeFiles/cmTC_5fce3.dir/testCXXCompiler.cxx.o -c
>   
> /Users/vikramb/Documents/dealII/svn_co/deal.II/examples/step-1/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
>
>
>   make[1]: *** [CMakeFiles/cmTC_5fce3.dir/testCXXCompiler.cxx.o] Illegal
>   instruction: 4
>
>   make: *** [cmTC_5fce3/fast] Error 2
>
> To workaround this I changed the CXX compiler option though ccmake. I was 
> able to successfully configure and build. However when I ran I got this 
> error:
>
> make[3]: *** [CMakeFiles/run] Illegal instruction: 4
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> make: *** [run] Error 2
>
> Can anyone tell what I am not doing right?
>
If CMake failed, there should exist
CMakeFiles/CMakeError.log
CMakeOutput.log
detailed.log
in the build directory. Can you send these files?

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.


[deal.II] Re: Step-42

2017-05-15 Thread Daniel Arndt
Ben,

I tried with version 8.4.1 and also the new version, 8.5, however it does 
> not run at all. The errors that I got are given as below:
> make[3]: *** [CMakeFiles/run] Error 1
> make[2]: *** [CMakeFiles/run.dir/all] Error 2
> make[1]: *** [CMakeFiles/run.dir/rule] Error 2
> make: *** [run] Error 2
>
is this really all the output you get when calling "make"? This output 
alone does not really tell anything...

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] Error in the second derivative of solution...?

2017-05-15 Thread Jean-Paul Pelteret
Dear Kyusik,

So my new question is , in deal.II, could I get local divergence of certain 
> function to get surface integral?
>
>>
Yes it is. You can extract the divergence of a function using, for example, 
the FEValuesView function get_function_divergences 

. 

However, you'll note that this function only makes sense (and its therefore 
only defined) for a vector field. Your solution field is scalar though, 
which presents a bit of an issue. On the face of it you'd have to first 
project the gradient of the solution (scaled by the function "f") onto an 
axillary vector-valued FE space and then compute the divergence of that 
projected field. 

I think that what you could alternatively do is to expand your integrand 
into a gradient term and a Laplacian term. You can quite easily point-wise 
compute these individual quantities using the scalar FEValueViews functions 
get_function_gradients 

 
and get_function_laplacians 
,
 
or those equivalently 

 
defined 

 
for FEValuesBase.

Does this help?

Regards,
Jean-Paul

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