Re: [deal.II] Mesh operations such as collapse, swapping etc. using deal.II.

2023-05-17 Thread Pranshul Thakur
Hi Prof. Bangerth,

Thanks for the reply.

Best,
Pranshul.

On Wednesday, May 17, 2023 at 12:01:24 AM UTC-4 Wolfgang Bangerth wrote:

> On 5/16/23 12:52, Pranshul Thakur wrote:
> > 
> > I am currently implementing a test case of optimization-based meshing 
> where 
> > the mesh nodes are moved to obtain an optimal mesh. As the mesh can get 
> > distorted during the process, I am looking for a way to collapse 
> distorted 
> > elements during optimization.
> > 
> > Does anyone know if there is a way to perform local mesh operations such 
> as 
> > diagonal collapse or other equivalents of edge swapping/node 
> insertion/removal 
> > for quadrilateral meshes through deal.II?
>
> This is not easily possible in deal.II. deal.II is not a meshing tool -- 
> it 
> assumes that the logical connections of the mesh remain unchanged, even 
> though 
> it can move vertices around.
>
>
> > I am also looking for a way to 
> > interpolate the solution after these mesh operations.
>
> That, too, is difficult. FEFieldFunction can do some of this, but it's 
> expensive. There are likely more efficient tools for this step, outside of 
> deal.II, if you have large meshes and want to interpolate from one mesh to 
> another.
>
> 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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/856581be-8d4a-4a5a-8fff-c4583d7d2598n%40googlegroups.com.


[deal.II] FullMatrix::print_formatted() issue

2023-05-17 Thread Vinayak Vijay
Hello,

I am trying to print out a matrix to a file using the following commands:

std::ofstream file("mat.txt");
cell_matrix.print_formatted(file);

However, the matrix that is printed out to the file has some missing
entries, which are actually 0.

Can someone tell me how can i print the 0 entries as well?

Thanks
Vinayak

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/49b4be8d-1f9a-41ce-8b20-d0cb81a32dean%40googlegroups.com.


[deal.II] determine global dof index of a point

2023-05-17 Thread Mathieu
Hello everyone,

I apologize for my simple question:
Given a point, which is also a vertex (support point of FE_Q element), in 
real coordinates, is there a function that allows me to query the global 
dof index associated with that support point?

I know all the cells at which these support point lives.
One could then loop over the vertices of anyone of these cells, and call
cell->vertex_dof_index(vertex,...)
if vertex is the one that matches the support point. 

But I was wondering if there is a direct way to get the dof index of a 
vertex based on the coordinates in real space.

Thank you
Math

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/798c8e5f-57d5-4636-931f-12d66d462631n%40googlegroups.com.


Re: [deal.II] FullMatrix::print_formatted() issue

2023-05-17 Thread Praveen C
The manual page (assuming cell_matrix is a FullMatrix)

https://dealii.org/developer/doxygen/deal.II/classFullMatrix.html#abdd86a102fefa37a3916a612d8e329bd

says there is an option “zero_string”, may be set it to “0” and try it.

best
praveen

> On 17-May-2023, at 8:28 PM, Vinayak Vijay  wrote:
> 
> Hello,
> 
> I am trying to print out a matrix to a file using the following commands:
> 
> std::ofstream file("mat.txt");
> cell_matrix.print_formatted(file);
> 
> However, the matrix that is printed out to the file has some missing
> entries, which are actually 0.
> 
> Can someone tell me how can i print the 0 entries as well?
> 
> Thanks
> Vinayak
> 
> -- 
> 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.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/49b4be8d-1f9a-41ce-8b20-d0cb81a32dean%40googlegroups.com.

-- 
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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/B06064C4-57E6-4257-945D-78CC7E2E53E2%40gmx.net.