Dear All

I use *write_ucd* with *flags.write_faces = true*, but the result of .ucd 
file is *lack of information of face id 0.*
How I can output the information of face id 0?

The piece of code:







*    Triangulation<2> triangulation;    GridGenerator::hyper_cube 
(triangulation, 0, 1, true);    GridOut grid_out_ucd;    GridOutFlags::Ucd 
flags;    flags.write_faces = true;    grid_out_ucd.set_flags(flags);    
std::ofstream out_ucd ("triangulation.ucd");    grid_out_ucd.write_ucd 
(triangulation, out_ucd);*

The result of "*triangulation.ucd*"








*4 4 0 0 01  0 0 02  1 0 03  0 1 04  1 1 01 0 quad    1 2 4 3 2  2  line    
1 2 3  1  line    2 4 4  3  line    3 4 *

The information of line 0 (*5 0 line 1 3*) is not in output file

Best regards

Lam DANG

On Thursday, June 20, 2013 at 1:20:54 PM UTC+2, Helmut Müller wrote:
>
> Hi Bärbel,
>
> could you give me a short advice how to export the grid/mesh to ucd as you 
> suggested in a previous post ?
>
> I tried it this way:
> stringstream ss2;
>     ss2 << "grid-" << cycle << ".ucd";
>     GridOut myGridOut;
>     GridOutFlags::Ucd flags;
>     flags.write_faces = true;
>     flags.write_lines = true;
>     myGridOut.set_flags(flags);
>     std::ofstream output(ss2.str());
>     myGridOut.write_ucd(triangulation, output);
> but ParaView doesn´t find the mesh :
>
> ERROR: In 
> /Users/kitware/Dashboards/MyTests/NightlyMaster/ParaViewSuperbuild-Release/paraview/src/paraview/Utilities/VisItBridge/databases/AvtAlgorithms/vtkAvtSTMDFileFormatAlgorithm.cxx,
>  
> line 122
>
> vtkVisItCEAucdReader (0x10b664120): Unable to find any meshes
>
> Any help would be apreciated :)
>
> Cheers,
>
> Helmut
>
> Am Mittwoch, 19. Juni 2013 15:10:45 UTC+2 schrieb Bärbel Janssen:
>>
>> You could use GridOut to write it as a ucd file. If you pass the correct 
>> flags to GridOut it colorizes the boundaries and you can visualize it with 
>> paraview. That's how I usually do it. 
>> There is one more question: How does the solution on the adaptive mesh 
>> look compared to the uniform refined mesh? Is there something wrong with 
>> the solution or just with the quantity you compare?
>>
>> Best,
>> Bärbel
>>
>>
>> 2013/6/19 Scott Miller <[email protected]>
>>
>>> is there a way to output a (refined) grid with colorization (eg. with 
>>>> boundary-id and material-id as number) just to be sure that the 
>>>> inheritance 
>>>> is performed properly ? Which other way would be thinkable ?
>>>
>>>
>>> You can do something like this to output material ids:
>>>
>>> Vector<int> material_ids (triangulation.n_active_cells());
>>> // Omitted code:  Create iterators:  cell, endc
>>> unsigned int cell_counter =0;
>>>
>>> for (unsigned int cell_counter =0; cell!=endc; ++cell,++cell_counter)
>>>
>>>     material_ids(cell_counter) = int(cell->material_id());
>>>
>>>
>>> // Add to DataOut object
>>>
>>> data_out.add_data_vector (material_ids, "Material IDs");
>>>
>>>
>>> I don't know that you can output boundary ids to visualize easily, at 
>>> least I typically don't.  You can, however, do the same sort of thing but 
>>> give cells with certain boundary faces different values in the data vector.
>>>
>>>
>>> -Scott
>>>
>>>     
>>>  
>>>
>>> -- 
>>> 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 [email protected].
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>  
>>>  
>>>
>>
>>

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to