Re: [deal.II] Re: how to get 3D structured mesh from rotated 2D mesh in dealii

2016-10-02 Thread Vinetou Incucuna
Hello Daniel,
thank you for the answer.
I have read in the documention only

This function is called by some GridIn::read_* functions.
>

fully forgetting the following

Only the vertices with indices in considered_vertices are tested for
> equality. This speeds up the algorithm, which is quadratic and thus quite
> slow to begin with. However, if you wish to consider all vertices, simply
> pass an empty vector.
>


i.e. I have assumed it is called by default for all vertices.

Best

Marek

2016-10-02 12:27 GMT+02:00 Daniel Arndt :

> Marek,
>
> [...]
>>
> I want to ask a question, which could be interesting for other users of
>> dealii-
>> do we have some bulletproof procedure, how to produce (not so simple)
>> geometries,
>> meshes in gmsh and then merge them "safely" in the dealii? Safely
>> meaning- without
>> the creation of the doubled vertices at the boundary between merged
>> geoetries, meshes?
>> Is there some procedure in dealii to cope with this problem?
>> The function merge_triangulation requieres "matching" triangulation,
>> could it be possible
>> to define a function, which would somehow merge vertices at the boundary
>> of two not-so-nice
>> matching trianguations (possibly within some toleration, i.e. if two
>> vertices are less then \eps
>> away from each other, than merge them)
>> Does my idea make sense?
>>
> This is already done in GridTools::delete_duplicated_vertices [1]. The
> problem you experienced results from the fact that a coarse mesh cannot
> contain any hanging nodes in deal.II. Therefore, the faces at the interface
> have to match, i.e. there is 1-1 correspondence. This is something you have
> ensure when creating the meshes you want to merge
> and I don't see an easy way to work around this automatically.
>
> Best,
> Daniel
>
> [1] https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceGridTools.html#
> a79820d66b08b06e94541817ba78d6213
>
> --
> 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] Derivatives (gradients) of Symmetric Tensors

2016-10-02 Thread Daniel Arndt
Metin,

[...]
> For the vectors, the implementation (for the else case) is as following;
>
>   *for* (*unsigned* *int* shape_function=0;
>
>shape_function
> {
>
> *for* (*unsigned* *int* d=0; d<*spacedim*; ++d)
>
>   *if* 
> (shape_function_data[shape_function].is_nonzero_shape_function_component[d])
>
> {
>
>   *const* dealii::Tensor<1,*spacedim*> 
> *shape_gradient_ptr =
>
> &shape_gradients[shape_function_data[shape_function].
>
>  row_index[d]][0];
>
>   *for* (*unsigned* *int* q_point=0; 
> q_point
> divergences[q_point] += value * 
> (*shape_gradient_ptr++)[d];
>
> }
>
>   }
>
> To me, it's not clear how the "value and shape_gradient_ptr" is used or in 
> general how the (e.g.) u_x+v_y+w_z is done..
>
Let me just comment on this: 
The divergence at a quadrature point is decomposed into a sum over all 
shape functions and all of their components.
Since the value at a certain quadrature point q_p of a FE function u can be 
written as u(q_p)=\sum_i u_i \phi_i(q_p),
it holds \nabla \cdot u(q_p) = \sum_i u_i \nabla \cdot \phi_i(q_p) = \sum_i 
u_i \sum_c \partial_c \phi_i^c(q_p) where \phi_i^c is the cth component of 
the ith shape function. 
This is exactly what is done in the last line.
shape_gradient_ptr is initialized with the gradient of the dth component of 
the considered shape_function at the first quadrature point.
By "*shape_gradient_ptr++", the gradient at this quadrature point is 
returned and the pointer incremented such that it points to the
gradient at the next quadrature point.

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] Re: how to get 3D structured mesh from rotated 2D mesh in dealii

2016-10-02 Thread Daniel Arndt
Marek,

[...] 
>
I want to ask a question, which could be interesting for other users of 
> dealii-
> do we have some bulletproof procedure, how to produce (not so simple) 
> geometries,
> meshes in gmsh and then merge them "safely" in the dealii? Safely meaning- 
> without
> the creation of the doubled vertices at the boundary between merged 
> geoetries, meshes?
> Is there some procedure in dealii to cope with this problem?
> The function merge_triangulation requieres "matching" triangulation, could 
> it be possible
> to define a function, which would somehow merge vertices at the boundary 
> of two not-so-nice
> matching trianguations (possibly within some toleration, i.e. if two 
> vertices are less then \eps
> away from each other, than merge them)
> Does my idea make sense?
>
This is already done in GridTools::delete_duplicated_vertices [1]. The 
problem you experienced results from the fact that a coarse mesh cannot 
contain any hanging nodes in deal.II. Therefore, the faces at the interface 
have to match, i.e. there is 1-1 correspondence. This is something you have 
ensure when creating the meshes you want to merge
and I don't see an easy way to work around this automatically.

Best,
Daniel

[1] 
https://www.dealii.org/8.4.1/doxygen/deal.II/namespaceGridTools.html#a79820d66b08b06e94541817ba78d6213
 

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