[deal.II] Tensor with variable components

2016-09-02 Thread benhour . amirian66
Dear All,
I have a question. I want to define a tensor with components like the below 
expression, where eta is a scalar function in cylindrical coordinate 
system. I defined this component in dealii like this:
FE_Qfe
  const QGauss quadrature_formula(3)
  FEValues fe_values (fe, quadrature_formula,
update_gradients| 
update_quadrature_points);
  const unsigned int n_q_points = 
quadrature_formula.size();
  std::vector< Tensor<1, dim> > 
eta_gradients(n_q_points);
  std::vector< Tensor<2, dim> > 
eta_hessians(n_q_points);
  fe_values.get_function_gradients(eta_gradients);
  fe_values.get_function_hessians(eta_hessians);
  for(unsigned int q_point = 0; q_point < 
n_q_points; ++q_point)
 
  const double comp11 = std::pow(eta, 2)*
   std::pow((1-eta), 2)+(eta_hessians[q_point][0] +
   eta_hessians[q_point][1]) - eta_gradients[q_point][0] *
   eta_gradients[q_point][0];
I do really appreciate it if you let me know whether this part of code for 
the following component is true or not.

.  


-- 
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: [dealii-developers] Upcoming p4est release

2016-09-02 Thread Matthias Maier

On Fri, Sep  2, 2016, at 09:08 CDT, Matthias Maier  wrote:

> On Fri, Sep  2, 2016, at 08:09 CDT, carsten.burste...@gmail.com wrote:
>
>> This is a fairly old p4est/master.  Could you try p4est/develop?
>> 9379d0b5d243b1e72f5dded5d6946633e5e15656
>
> Will do.

Looking good. Same results [1,2].

[1] dealii-8.4.2-rc1: 
https://cdash.kyomu.43-1.org/viewTest.php?onlyfailed=1128
[2] master: https://cdash.kyomu.43-1.org/viewTest.php?onlyfailed=1122

-- 
You received this message because you are subscribed to the Google Groups 
"deal.II developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [dealii-developers] Upcoming p4est release

2016-09-02 Thread Matthias Maier

On Fri, Sep  2, 2016, at 08:09 CDT, carsten.burste...@gmail.com wrote:

> This is a fairly old p4est/master.  Could you try p4est/develop?
> 9379d0b5d243b1e72f5dded5d6946633e5e15656

Will do.

-- 
You received this message because you are subscribed to the Google Groups 
"deal.II developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [dealii-developers] Upcoming p4est release

2016-09-02 Thread carsten . burstedde
> >> I'm about to bump the p4est master branch significantly.  Could some
> >> of you please check whether the current develop branch on github
> >> works with deal.ii?
> 
> Results are looking very good so far:
> 
>  - Current development versions for libsc/p4est cleanly compile and
>install on Gentoo
> 
>  - I have run (the designated point release v8.4.2-rc1-4-g01b5209)
>against current development versions
> 
>  cburstedde/libsc 26c385e8dbe5e230c2dbf9d26c91e06e5eea31cd
>  cburstedde/p4est 30c1d08ac57fe86f6d89d5943958cbf232029ee1

This is a fairly old p4est/master.  Could you try p4est/develop?
9379d0b5d243b1e72f5dded5d6946633e5e15656

> The results are here [1]. We have 21 failing tests in the
> distributed_grids and codim_one categories due to a minor change in
> p4est's (non-binary) vtk output:

Maybe the VTK change is for the better.  Unless people find their VTK viewers 
complaining now.

/Carsten

> --- outputThu Sep  1 23:50:33 2016
> ***
> *** 8,15 
>   
> 
>   
> - 
> - 
>   
> 
>   
> 
> If this remains the new output I will simply upload output variants for
> the deal.II testsuite once a new p4est version is released.
> 
> 
> Currently, I am running the development version against above
> libsc/p4est checkouts.
> 
> Again, thanks a lot for the heads-up!
> Matthias
> 
> [1] https://cdash.kyomu.43-1.org/viewTest.php?onlyfailed=1110

-- 
You received this message because you are subscribed to the Google Groups 
"deal.II developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[deal.II] Re: modify solution vector

2016-09-02 Thread Jean-Paul Pelteret
Hi Ilya,

You should have a look at some of the previous discussions on the use of 
the cell->vertex_dof_index 

 function; 
this provides an easy link between vertices and degrees of freedom.

In summary, and assuming that you have just a displacement field, then for 
each cell you would probably need to do something like this:

for (int v=0; vvertex_index(v)) == false)
  {
const Point vertex_displacement = 
function.get_value(cell->vertex(v));
for (unsigned int d=0; dvertex_dof_index(v,d)) += vertex_displacement[d];
vertex_touched(cell->vertex_index(v));
  }

Here, vertex_touched refers to some global vector that records if you've 
updated the solution vector for a specific vertex (see step-18 
).

Regards,
J-P


On Friday, September 2, 2016 at 2:07:23 PM UTC+2, Bryukhanov Ilya wrote:
>
> Hi,
>
> I want to change the solution vector (for example displacement vector from 
> step-8 and step-18) by the vector
> that depends on the point. I want to iterate over all vertexes and add to 
> each solution component some value
> that is a function of the vertex coordinate.
> How can I do it in dealii?
>
> Best,
> Ilya
>
>

-- 
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] modify solution vector

2016-09-02 Thread Wolfgang Bangerth

On 09/02/2016 06:07 AM, Bryukhanov Ilya wrote:


I want to change the solution vector (for example displacement vector from
step-8 and step-18) by the vector
that depends on the point. I want to iterate over all vertexes and add to each
solution component some value
that is a function of the vertex coordinate.
How can I do it in dealii?


It sounds like you have a solution u_h(x) and you want to add to it a function 
v_h(x) that you know at each vertex location, i.e., it *interpolates* a 
continuous function v(x) that you know.


If put this way, I would suggest you call
  VectorTools::interpolate
on v(x) to get the nodal values V of v_h(x), and then add V to your solution 
vector U.


I think that ought to be easier than what you suggest (though internally it 
does exactly that).


Best
 W.

--

Wolfgang Bangerth  email: bange...@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] modify solution vector

2016-09-02 Thread Bryukhanov Ilya
Hi,

I want to change the solution vector (for example displacement vector from 
step-8 and step-18) by the vector
that depends on the point. I want to iterate over all vertexes and add to 
each solution component some value
that is a function of the vertex coordinate.
How can I do it in dealii?

Best,
Ilya

-- 
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: [dealii-developers] Upcoming p4est release

2016-09-02 Thread Matthias Maier
Dear Carsten,

On Thu, Sep  1, 2016, at 10:13 CDT, Matthias Maier  wrote:

> On Thu, Sep  1, 2016, at 10:03 CDT, carsten.burste...@gmail.com wrote:
>
>> Hi everybody,
>>
>> I'm about to bump the p4est master branch significantly.  Could some
>> of you please check whether the current develop branch on github
>> works with deal.ii?

Results are looking very good so far:

 - Current development versions for libsc/p4est cleanly compile and
   install on Gentoo

 - I have run (the designated point release v8.4.2-rc1-4-g01b5209)
   against current development versions

 cburstedde/libsc 26c385e8dbe5e230c2dbf9d26c91e06e5eea31cd
 cburstedde/p4est 30c1d08ac57fe86f6d89d5943958cbf232029ee1

The results are here [1]. We have 21 failing tests in the
distributed_grids and codim_one categories due to a minor change in
p4est's (non-binary) vtk output:

--- output  Thu Sep  1 23:50:33 2016
***
*** 8,15 
  

  
- 
- 
  

  

If this remains the new output I will simply upload output variants for
the deal.II testsuite once a new p4est version is released.


Currently, I am running the development version against above
libsc/p4est checkouts.

Again, thanks a lot for the heads-up!
Matthias

[1] https://cdash.kyomu.43-1.org/viewTest.php?onlyfailed=1110

-- 
You received this message because you are subscribed to the Google Groups 
"deal.II developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to dealii-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.