Hello everybody,

I have the following doubt and problem:

*******************************************************************************************************************
I have a 3D file written with extension ".ucd" (file.ucd), so I use "grid_leida.read_ucd(in)", where in=file.ucd
The "*file.ucd*" says:
*[
number_of_vertices number_of_cells  0           0           0
1   value_of_x   value_of_y   value_of_z
.
.
.
number_of_vertices  value_of_x   value_of_y   value_of_z
1 domain hex node1 node2 node3 node4 node5 node6 node7 node8
.
.
.
number_of_HEXcells domain hex node1 node2 node3 node4 node5 node6 node7 node8
(number_of_HEXcells+1) boundary_value quad node1 node2 node3 node4
.
.
.
number_of_cells boundary_value quad node1 node2 node3 node4
]*

The value of number_of_cells= number_of_HEXcells+number_of_QUADcells.
The value of domain is always different from zero.
The value of boundary_value is always different from zero.

*******************************************************************************************************************
In my "*.cpp*" program I do:

std::ifstream in ("file.ucd"); GridIn<DIMENSION> grid_leida; grid_leida.attach_triangulation(triangulation); grid_leida.read_ucd(in);
// I initialize the "dof_handler" and different variables:
initialize_matrices_and_vectors(...); std::vector< bool > selected_dofs(dof_handler.n_dofs()); DoFTools::*extract_subdomain_dofs*(dof_handler,domain, selected_dofs); //Being "domain", the value written in the "file.ucd".

And here, I obtain the problem because I don't get any true value for the "selected_dofs" vector. *¿?*

*******************************************************************************************************************
So, I went into the "*grid_in.cpp*" in "deal.II/source/grid" and inside the method "read_ucd()" and after "tria->create_triangulation_compatibility (vertices, cells, subcelldata);"

I write:

std::cout<<"NUMBER OF HEXS: "<<cuentohexs<<std::endl; // where cuentohexs=number of HEX cells, this is OK.

std::cout<<"NUMBER OF QUADS: "<<cuentoquads<<std::endl; // where cuentohexs=number of QUADS, This is OK. double cuentohexs2=0;
for (unsigned int cell=0; cell<cuentohexs; ++cell)
{ if (((int)cells[cell].material_id ==domain) ) //where domain is the value written in the "file.ucd"
     cuentohexs2++;
   }
std::cout <<"NUMBER OF HEXS: "<<cuentohexs2 <<std::endl; //where cuentohexs2= cuentohexs, this is OK. double cuentoquads2=0;
for (unsigned int cell=cuentohexs; cell<(cuentoquads+cuentohexs); ++cell)
{ if ((int)cells[cell].material_id ==boundary_value)
     cuentoquads2++;
   }
std::cout <<"NUMBER OF QUADS: "<<cuentoquads2 <<std::endl; //where cuentoquads2= 0, i.e., this is different from cuentoquads, This is *WRONG*.

*******************************************************************************************************************

I really don't know where the information about the hexs and their domain values and also the quads and their boundary values are missed. Could you help me giving me some ideas?

Thanks in advance.
Best.
Isa

--
****************************************************
María Isabel Gil Lorente

LITEC - Laboratorio en Tecnologías de la Combustión.
(CSIC/DGA/UZ)
C/ María de Luna 10, 50018
Zaragoza / SPAIN

Tel : (+34) 976 716461
e-mail: [email protected]
****************************************************


_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii

Reply via email to