Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1 Gmsh2MDF loses count of sides

open
nobody
None
5
2003-06-14
2003-06-14
Anonymous
No

in ToMDF.cpp, Gmsh2MDF can count a side and not
add it, which leads to the vector count being off. It works
fine if you change follow the pattern used elsewhere like
below where the new Side(ks++,.. is changed to new
Side(ks, .. and the ks++ is done in the code block where
the Add is done.

if (elem[j].type==1) {
sd = new Side(ks,string("line"));
for (i=0; i<2; i++)
sd->Add(mesh.PtrNode(num(elem[j].node[i])));
if (cd%2 == 1) {
for (i=0; i<sd->NbNodes(); i++) {
nd = sd->PtrNode(i+1);
DOFCode(cd,nb_dof,code);
for (k=0; k<nb_dof; k++)
nd->Code(k+1,code[k]);
}
delete sd; sd = NULL;
}
else {
ks++;
sd->NbDOF(nb_dof);
DOFCode(cd,nb_dof,code);
for (k=0; k<nb_dof; k++)
sd->Code(k+1,code[k]);
mesh.Add(sd);
}
}

Discussion

  • Rachid Touzani
    Rachid Touzani
    2003-11-20

    Logged In: YES
    user_id=166427

    Yes it does. I think that release 1.2.3-3 fixes that