[deal.II] Re: Adding periodicity to a thin sample with one element in thickness direction

2017-05-17 Thread Jean-Paul Pelteret
Hi Hamed,

You're welcome. I'm glad that we helped you resolve the issue!

Best,
Jean-Paul

On Wednesday, May 17, 2017 at 4:07:08 PM UTC+2, Hamed Babaei wrote:
>
> Hello all,
>
> You are right. I was running in debug mode, slowing down the code.
> Thank you very much for your incredible help. I appreciate your kindness 
> and generosity to support the community. 
>
> Best 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-17 Thread Hamed Babaei
Hello all,

You are right. I was running in debug mode, slowing down the code.
Thank you very much for your incredible help. I appreciate your kindness 
and generosity to support the community. 

Best 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: assembling question

2017-05-17 Thread Jean-Paul Pelteret
You're welcome! 

On Wednesday, May 17, 2017 at 1:08:24 PM UTC+2, Ashkan Dorostkar wrote:
>
> Thank you,
> This helped a lot. I didn't remember that rule at the moment.
>
> Ali
>
> On Wednesday, May 17, 2017 at 12:38:48 PM UTC+2, Jean-Paul Pelteret wrote:
>>
>> Dear Ali,
>>
>> If you apply the product rule 
>>  to this term, does it then 
>> look a little more managable?
>>
>> Regards,
>> Jean-Paul
>>
>> On Wednesday, May 17, 2017 at 12:20:18 PM UTC+2, Ashkan Dorostkar wrote:
>>>
>>> Dear all,
>>> I want to solve a system of equation for elasticity and I have an extra 
>>> term in the my equations which is of the form 
>>>
>>> -grad(b.u) 
>>>
>>> here "b" is a vector of size DIM and "u" is the displacements with DIM 
>>> components.
>>>
>>> I am a bit lost on how to express this with fe_values. Any help is 
>>> appreciated and any teaching effort is appreciated more.
>>>
>>> Best,
>>> Ali
>>>
>>

-- 
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: assembling question

2017-05-17 Thread Ashkan Dorostkar
Thank you,
This helped a lot. I didn't remember that rule at the moment.

Ali

On Wednesday, May 17, 2017 at 12:38:48 PM UTC+2, Jean-Paul Pelteret wrote:
>
> Dear Ali,
>
> If you apply the product rule  
> to this term, does it then look a little more managable?
>
> Regards,
> Jean-Paul
>
> On Wednesday, May 17, 2017 at 12:20:18 PM UTC+2, Ashkan Dorostkar wrote:
>>
>> Dear all,
>> I want to solve a system of equation for elasticity and I have an extra 
>> term in the my equations which is of the form 
>>
>> -grad(b.u) 
>>
>> here "b" is a vector of size DIM and "u" is the displacements with DIM 
>> components.
>>
>> I am a bit lost on how to express this with fe_values. Any help is 
>> appreciated and any teaching effort is appreciated more.
>>
>> Best,
>> Ali
>>
>

-- 
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: assembling question

2017-05-17 Thread Jean-Paul Pelteret
Dear Ali,

If you apply the product rule  
to this term, does it then look a little more managable?

Regards,
Jean-Paul

On Wednesday, May 17, 2017 at 12:20:18 PM UTC+2, Ashkan Dorostkar wrote:
>
> Dear all,
> I want to solve a system of equation for elasticity and I have an extra 
> term in the my equations which is of the form 
>
> -grad(b.u) 
>
> here "b" is a vector of size DIM and "u" is the displacements with DIM 
> components.
>
> I am a bit lost on how to express this with fe_values. Any help is 
> appreciated and any teaching effort is appreciated more.
>
> Best,
> Ali
>

-- 
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] assembling question

2017-05-17 Thread Ashkan Dorostkar
Dear all,
I want to solve a system of equation for elasticity and I have an extra 
term in the my equations which is of the form 

-grad(b.u) 

here "b" is a vector of size DIM and "u" is the displacements with DIM 
components.

I am a bit lost on how to express this with fe_values. Any help is 
appreciated and any teaching effort is appreciated more.

Best,
Ali

-- 
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-17 Thread Jean-Paul Pelteret
Thats great! I'm glad that you've managed to work it out :-)

Best,
Jean-Paul

On Wednesday, May 17, 2017 at 10:06:18 AM UTC+2, hanks0...@gmail.com wrote:
>
>  Thank you very much!!
>
> It seems that I can solve my problem.
>
> 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.


Re: [deal.II] Error in the second derivative of solution...?

2017-05-17 Thread hanks0227
 Thank you very much!!

It seems that I can solve my problem.

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.


Re: [deal.II] Re: Step 13 & 14 -- Different BCs on different boundary indicators

2017-05-17 Thread Daniel Arndt
Dear Elena,

I want to do something like below code, but I don't know how to write it 
> correctly:
>
> template 
> void
> Solver::*assemble_linear_system *(LinearSystem _system)
> {
> 
> VectorTools::interpolate_boundary_values (dof_handler,
>   0,
>  
> **boundary_values(0),*
>  
> boundary_value_map);
>
> VectorTools::interpolate_boundary_values (dof_handler,
>   1,
>   
> **boundary_values(1),*
>   
> boundary_value_map);
> ...  
> }  
>
>
> template
> void* My_Case_2*::*BoundaryValues::vector_value*(const 
> Point ,
> 
> 
> Vector ) const
> {
> ...
> if (boundary_indicator == 0) {
>BC = p(0) + p(1);
> } else if (boundary_indicator == 1) {
>BC = p(0)*p(0) + p(1);
> } 
> ...
> }
>
You can do something like this if you define a member variable 
current_boundary_indicator and set it correctly before calling 
interpolate_boundary_values(), i.e. you would do

> boundary_values.current_boundary_indicator=0;

VectorTools::interpolate_boundary_values (dof_handler,0,boundary_values, 
> boundary_value_map);
>
boundary_values.current_boundary_indicator=1; 

VectorTools::interpolate_boundary_values (dof_handler,1,boundary_values, 
> boundary_value_map);
>
 
If you have a look at the documentation of 
VectorTools::interpolate_boundary_value [1], you see that there are 
multiple functions with this name.
In particular, the one with the signature

> void VectorTools::interpolate_boundary_values

  (const DoFHandlerType< dim, spacedim > & 
>   dof,

   const std::map< types::boundary_id, const Function< spacedim, number > * 
> > & function_map,

   std::map< types::global_dof_index, number > &   
>   boundary_values,

   const ComponentMask &
>  component_mask = ComponentMask() ) 

might be a good alternative for you as also Bruno (with a ConstraintMatrix 
instead of std::map< types::global_dof_index, number > &) already pointed 
out.
Then, you would define one Function for each boundary_indicator and call 
VectorTools::interpolate_boundary_values only once.

Best,
Daniel

[1] 
https://www.dealii.org/8.5.0/doxygen/deal.II/namespaceVectorTools.html#a9f3e3ae1396811f998cc35f94cbaa926

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