← Back to team overview

yade-dev team mailing list archive

KLA

 

Hi Vincent,

The function KinematicLocalisationAnalyser::DefToFile(const char* output_file_name) is
now generating files like this (code below).
Can you check how to make vtk magic with that?
Note that ids will start at 6 in some cases as ids=0...5 are for walls.
I attach one small example.

Bruno

________________
Nspheres
id0 x0 y0 z0 rad0
...
idN xN yN zN radN

Ncells*
v1->id v2->id v3->id v4->id (vertices ids)
...
vN*->id vN*->id vN*->id vN*->id (vertices ids)


id0
grad(disp)(id0) //matrix3
norm(sym(grad(disp)(id0))) //scalar -> norm of the deviatoric strain

id1
....
___________________



for (RTriangulation::Finite_vertices_iterator V_it =
Tri.finite_vertices_begin(); V_it != Tri.finite_vertices_end(); V_it++)
output_file<<V_it->info().id()<<" "<<V_it->point()<<endl;

output_file << Tri.number_of_finite_cells()<<endl;
Finite_cells_iterator cell = Tri.finite_cells_begin();
Finite_cells_iterator cell0 = Tri.finite_cells_end();
for (; cell != cell0; cell++) {
for (unsigned int index=0; index<4; index++) output_file << cell->vertex(index)->info().id()<<" " ;
output_file<<endl;
}

for (RTriangulation::Finite_vertices_iterator V_it =
Tri.finite_vertices_begin(); V_it != Tri.finite_vertices_end(); V_it++) {
Tenseur_sym3 epsilon(ParticleDeformation[V_it->info().id()]); // partie sym?trique
double dev = (double) epsilon.Deviatoric().Norme();
output_file<<V_it->info().id()<<endl<<ParticleDeformation[V_it->info().id()]<<dev<<endl;
}

Attachment: deformations.tar.gz
Description: GNU Zip compressed data


Follow ups