Re: [deal.II] Output cell variables as cell arrays in vtu files

2020-07-27 Thread Jimmy Ho
Hi Dr. Bangerth,

Thanks a lot for your fast response!

That's good to know! The Cell_Data_to_Point_Data filter in ParaView 
averages the adjacent cell values and assign them to the nodes, which 
produces a smooth and continuous nodal solution field. I was planning on 
implementing the averaging scheme myself but I was just looking to see if 
ParaView already has this functionality.

In general, is there a built-in function from deal.ii that can performing 
nodal averaging? This can be very useful when someone tries to generate 
smooth and continuous visualization for integration point variables.

Thanks again for the help!

Best,
Jimmy

On Monday, July 27, 2020 at 3:55:41 PM UTC-5, Wolfgang Bangerth wrote:
>
> On 7/27/20 2:47 PM, Jimmy Ho wrote: 
> > 
> > data_out.add_data_vector( cellData , "Name" , data_out.type_cell_data ); 
> > 
> > to force deal.ii to recognize that "cellData" should be interpreted as a 
> > cell-based data. When I read the vtu files generated by this program via 
> > ParaView, I found that although cellData looks like it is cell-based in 
> the 
> > visualization (i.e., it is discontinuous over the cells), the data array 
> > itself is stored as a point array, so I couldn't use the 
> > Cell_Data_to_Point_Data filter to get a smoothed and continuous 
> visualization. 
> > So, is there a way to write a cell-based data into cell arrays in vtu 
> files? 
>
> No, all data produced by DataOut is point data. For cell-wise constants, 
> it is 
> just written in a way that makes point data look piecewise constant. 
>
> You will have to find a different way to achieve what that filter does. 
> What 
> does it do? Maybe we can suggest a way to achieve the same from within 
> deal.II. 
>
> 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/72d82f91-4861-465f-aab6-d67ae0b40cc1o%40googlegroups.com.


Re: [deal.II] Output cell variables as cell arrays in vtu files

2020-07-27 Thread Wolfgang Bangerth

On 7/27/20 2:47 PM, Jimmy Ho wrote:


data_out.add_data_vector( cellData , "Name" , data_out.type_cell_data );

to force deal.ii to recognize that "cellData" should be interpreted as a 
cell-based data. When I read the vtu files generated by this program via 
ParaView, I found that although cellData looks like it is cell-based in the 
visualization (i.e., it is discontinuous over the cells), the data array 
itself is stored as a point array, so I couldn't use the 
Cell_Data_to_Point_Data filter to get a smoothed and continuous visualization. 
So, is there a way to write a cell-based data into cell arrays in vtu files?


No, all data produced by DataOut is point data. For cell-wise constants, it is 
just written in a way that makes point data look piecewise constant.


You will have to find a different way to achieve what that filter does. What 
does it do? Maybe we can suggest a way to achieve the same from within deal.II.


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.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/76ca040e-1369-93b2-6247-958fdb83b931%40colostate.edu.


[deal.II] Output cell variables as cell arrays in vtu files

2020-07-27 Thread Jimmy Ho
Hi All,

I am trying to compute the average of integration point variables and store 
them as cell variables, and subsequently write them as cell arrays in the 
visualization. I used:

data_out.add_data_vector( cellData , "Name" , data_out.type_cell_data );

to force deal.ii to recognize that "cellData" should be interpreted as a 
cell-based data. When I read the vtu files generated by this program via 
ParaView, I found that although cellData looks like it is cell-based in the 
visualization (i.e., it is discontinuous over the cells), the data array 
itself is stored as a point array, so I couldn't use the 
Cell_Data_to_Point_Data filter to get a smoothed and continuous 
visualization. So, is there a way to write a cell-based data into cell 
arrays in vtu files?

Thanks a lot for any suggestions! Any help from the group is highly 
appreciated!

Best,
Jimmy

-- 
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/3f442541-9fff-4da9-91f9-400e7751bb68o%40googlegroups.com.


Re: [deal.II] METIS partition error

2020-07-27 Thread yuesu jin
Dear David,
 Thank you! It solved the problem.
Best wishes,
Yuesu

On Mon, Jul 27, 2020 at 8:48 AM David Wells  wrote:

> Hi Yuesu,
>
> Essentially, yes. If you look at the code for partition_triangulation you
> will find
>
> // check for an easy return
> if (n_partitions == 1)
>   {
> for (const auto  : triangulation.active_cell_iterators())
>   cell->set_subdomain_id(0);
> return;
>   }
>
> Hence step-17 only tries to use metis (and, if metis is not available,
> aborts) if there are multiple partitions for the mesh.
>
> Best,
> David
>
>
> On Mon, Jul 27, 2020 at 12:37 AM yuesu jin  wrote:
>
>> Dear all,
>>   I am running step-17 by mpirun, it returns the error message below:
>> **
>> 
>> Exception on processing:
>>
>> 
>> An error occurred in line <69> of file
>>  in function
>> void dealii::SparsityTools::{anonymous}::partition_metis(const
>> dealii::SparsityPattern&, const std::vector&, unsigned int,
>> std::vector&)
>> The violated condition was:
>> false
>> Additional information:
>> The function you called requires METIS, but you did not configure
>> deal.II with METIS.
>> 
>> This message does't appear when I use a single node to run it.  Does the
>> sparsity tools  automatically overload to partition_metis under parallel
>> case?
>> Thank you!
>> Best regards
>> --
>> Yuesu Jin,
>> Ph.D student,
>> University of Houston,
>> College of Natural Sciences and Mathematics,
>> Department of Earth and Atmospheric Sciences,
>> Houston, Texas 77204-5008
>> 346-404-2062
>>
>> --
>> 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/CA%2B25a%3DJ2Rzk9yL0Zt%2Boq_U-MV4hWcwNJGvj-4tjjjRAqABs81Q%40mail.gmail.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/CABrTbYRvtqh6T%3DbixPYJBA9i7d9QQeKAXaeq4ENEeqKD1k2ESw%40mail.gmail.com
> 
> .
>


-- 
Yuesu Jin,
Ph.D student,
University of Houston,
College of Natural Sciences and Mathematics,
Department of Earth and Atmospheric Sciences,
Houston, Texas 77204-5008
346-404-2062

-- 
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/CA%2B25a%3DLB8LLCVnPgDnYNDnm-Cp%3DT%3DV2Tr-DSgJNw__%2BQ7Ugfig%40mail.gmail.com.


[deal.II] deal.II Newsletter #127

2020-07-27 Thread Rene Gassmoeller
Hello everyone!

This is deal.II newsletter #127.
It automatically reports recently merged features and discussions about the 
deal.II finite element library.


## Below you find a list of recently proposed or merged features:

#10755: Fix compiling with CUDA 11 (proposed by masterleinad) 
https://github.com/dealii/dealii/pull/10755

#10754: Add assert to connectivity.h (proposed by peterrum) 
https://github.com/dealii/dealii/pull/10754

#10753: Fix memory reservation of hp::DoFHandler (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10753

#10752: Improve memory behavior of the BiCGStab solver. (proposed by bangerth) 
https://github.com/dealii/dealii/pull/10752

#10751: Fix compilation when CUDA is enable (proposed by Rombur; merged) 
https://github.com/dealii/dealii/pull/10751

#10750: CMake: Fix static executable build for cmake 3.9 and newer (proposed by 
tamiko) https://github.com/dealii/dealii/pull/10750

#10748: GridIn::read_vtk() for simplex meshes (proposed by peterrum) 
https://github.com/dealii/dealii/pull/10748

#10747: Add parallel test for find_active_cell_around_point (proposed by 
dangars) https://github.com/dealii/dealii/pull/10747

#10746: Add test for parallel hdf5 and AssertThrow (proposed by dangars) 
https://github.com/dealii/dealii/pull/10746

#10745: enable -Wmissing-braces if supported (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/10745

#10744: Fix reference (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10744

#10743: Add -Wmissing-braces to linux test (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10743

#10742: Add missing brackets (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10742

#10741: Generalize process_dof_indices() (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10741

#10738: Add constant to remove the need for macro usage (proposed by 
rezarastak) https://github.com/dealii/dealii/pull/10738

#10736: Avoid hang by AssertThrow (proposed by dangars) 
https://github.com/dealii/dealii/pull/10736

#10734: Check that MPIEXEC_EXECUTABLE is available in the test suite. (proposed 
by drwells) https://github.com/dealii/dealii/pull/10734

#10732: Simplify GridTools::get_face_connectivity_of_cells (proposed by 
peterrum; merged) https://github.com/dealii/dealii/pull/10732

#10730: Generalize FiniteElement::face_to_cell_index (proposed by peterrum; 
merged) https://github.com/dealii/dealii/pull/10730

#10729: Fix a warning about virtual destructors and virtual functions. 
(proposed by drwells; merged) https://github.com/dealii/dealii/pull/10729

#10728: Fix typo (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10728

#10727: GridIn::read_msh() now supports triangular and tetrahedral elements 
(proposed by DanielPaukner) https://github.com/dealii/dealii/pull/10727

#10726: Generalize FETools::Compositing::multiply_dof_numbers (proposed by 
peterrum; merged) https://github.com/dealii/dealii/pull/10726

#10725: Implement TriaAccessor::measure() and ::diameter() for simplex 
(proposed by peterrum; merged) https://github.com/dealii/dealii/pull/10725

#10724: Generate error message with conflicting Qt macros (proposed by 
philm001; merged) https://github.com/dealii/dealii/pull/10724

#10723: fix hang in periodic mesh smoothing flag (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/10723

#10722: Extend QProjector for simplex (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10722

#10721: Fix a typo. (proposed by bangerth; merged) 
https://github.com/dealii/dealii/pull/10721

#10720: Pass ReferenceCell::Type to QProjection (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10720

#10719: Move declaration of explicit specializations to correct file (proposed 
by peterrum; merged) https://github.com/dealii/dealii/pull/10719

#10718: Remove many GeometryInfos from fe_tools.templates.h (proposed by 
peterrum; merged) https://github.com/dealii/dealii/pull/10718

#10717: Store reference cell type in FiniteElementData (proposed by peterrum; 
merged) https://github.com/dealii/dealii/pull/10717

#10716: Unify set/get_dof_indices() and set/get_mg_dof_indices() (proposed by 
peterrum; merged) https://github.com/dealii/dealii/pull/10716

#10714: Add missing CRS entry and some asserts (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10714

#10713: [step-67] Fix typo in computation of speed of sound (proposed by 
kronbichler; merged) https://github.com/dealii/dealii/pull/10713

#10712: detect infinite loop in periodic refinement (proposed by tjhei; merged) 
https://github.com/dealii/dealii/pull/10712

#10711: Avoid the use of raw pointers in WorkStream. (proposed by bangerth; 
merged) https://github.com/dealii/dealii/pull/10711

#10710: Fix dynamic cast (proposed by peterrum; merged) 
https://github.com/dealii/dealii/pull/10710

#10709: Replace all GeometryInfos in 

Re: [deal.II] METIS partition error

2020-07-27 Thread David Wells
Hi Yuesu,

Essentially, yes. If you look at the code for partition_triangulation you
will find

// check for an easy return
if (n_partitions == 1)
  {
for (const auto  : triangulation.active_cell_iterators())
  cell->set_subdomain_id(0);
return;
  }

Hence step-17 only tries to use metis (and, if metis is not available,
aborts) if there are multiple partitions for the mesh.

Best,
David


On Mon, Jul 27, 2020 at 12:37 AM yuesu jin  wrote:

> Dear all,
>   I am running step-17 by mpirun, it returns the error message below:
> **
> 
> Exception on processing:
>
> 
> An error occurred in line <69> of file
>  in function
> void dealii::SparsityTools::{anonymous}::partition_metis(const
> dealii::SparsityPattern&, const std::vector&, unsigned int,
> std::vector&)
> The violated condition was:
> false
> Additional information:
> The function you called requires METIS, but you did not configure
> deal.II with METIS.
> 
> This message does't appear when I use a single node to run it.  Does the
> sparsity tools  automatically overload to partition_metis under parallel
> case?
> Thank you!
> Best regards
> --
> Yuesu Jin,
> Ph.D student,
> University of Houston,
> College of Natural Sciences and Mathematics,
> Department of Earth and Atmospheric Sciences,
> Houston, Texas 77204-5008
> 346-404-2062
>
> --
> 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/CA%2B25a%3DJ2Rzk9yL0Zt%2Boq_U-MV4hWcwNJGvj-4tjjjRAqABs81Q%40mail.gmail.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/CABrTbYRvtqh6T%3DbixPYJBA9i7d9QQeKAXaeq4ENEeqKD1k2ESw%40mail.gmail.com.