Skip to content
Snippets Groups Projects
Commit 4264befd authored by Jean-François Remacle's avatar Jean-François Remacle
Browse files

*** empty log message ***

parent 0b7d1d70
No related branches found
No related tags found
No related merge requests found
......@@ -460,16 +460,19 @@ SVector3 discreteEdge::firstDer(double par) const
MVertex *vE = lines[iEdge]->getVertex(1);
double dx,dy,dz;
double dt = sqrt((vE->x()-vB->x())*(vE->x()-vB->x()) + (vE->y()-vB->y())*(vE->y()-vB->y()) + (vE->z()-vB->z())*(vE->z()-vB->z()));
//double dt = sqrt((vE->x()-vB->x())*(vE->x()-vB->x()) + (vE->y()-vB->y())*(vE->y()-vB->y()) + (vE->z()-vB->z())*(vE->z()-vB->z()));
//Length of each line of discrete Edge=1.
double dt= 1.0;
dx = (vE->x() - vB->x() ) /dt;
dy = (vE->y() - vB->y() ) /dt;
dz = (vE->z() - vB->z() ) /dt;
//printf("firstDer discreteEdge par=%g, dx=%g, dy=%g dz=%g dt=%g \n", par,dx,dy,dz, dt);
return SVector3(dx,dy,dz);
SVector3 der(dx,dy,dz);
return der;
}
Range<double> discreteEdge::parBounds(int i) const
{
// printf("par bound discreteEdge =%g \n", lines.size());
return Range<double>(0, lines.size());
}
......@@ -97,7 +97,11 @@ static double F_Lc(GEdge *ge, double t)
SVector3 der = ge->firstDer(t);
const double d = norm(der);
//printf("lc_here=%g d=%g nb =%g\n", lc_here,d, d/lc_here);
return d / lc_here;
}
static double F_Transfinite(GEdge *ge, double t)
......@@ -275,7 +279,6 @@ void meshGEdge::operator() (GEdge *ge)
else if(ge->meshAttributes.Method == MESH_TRANSFINITE){
a = Integration(ge, t_begin, t_end, F_Transfinite, Points, 1.e-8);
N = ge->meshAttributes.nbPointsTransfinite;
Msg::Debug("Meshing transfinite N=%d, a=%g", N, a);
}
else{
if(CTX::instance()->mesh.lcIntegrationPrecision > 1.e-8){
......@@ -287,9 +290,10 @@ void meshGEdge::operator() (GEdge *ge)
}
else{
a = Integration(ge, t_begin, t_end, F_Lc, Points,
CTX::instance()->mesh.lcIntegrationPrecision);
CTX::instance()->mesh.lcIntegrationPrecision);
}
N = std::max(ge->minimumMeshSegments() + 1, (int)(a + 1.));
}
// if the curve is periodic and if the begin vertex is identical to
......
......@@ -38,7 +38,7 @@ void gmshLaplaceTerm::elementMatrix(MElement *e, gmshMatrix<double> &m) const
invjac[2][2] * grads[j][2];
}
double pi = 3.14;
double K_x=1.0;
double K_x= 1.0;
double K_y=1.0;
double K_z=1.0;
for (int j = 0; j < nbNodes; j++){
......
This diff is collapsed.
......@@ -1476,6 +1476,25 @@ Shape :
$$.Type = MSH_PHYSICAL_SURFACE;
$$.Num = num;
}
//EMI ADDED
| tCompound tSurface '(' FExpr ')' tAFFECT ListOfDouble tEND
{
int num = (int)$4;
if(FindPhysicalGroup(num, MSH_PHYSICAL_SURFACE)){
yymsg(0, "Physical surface %d already exists", num);
}
else{
List_T *temp = ListOfDouble2ListOfInt($7);
List_T *S[4] = {0, 0, 0, 0};
PhysicalGroup *p = Create_PhysicalGroup(num, MSH_PHYSICAL_SURFACE, temp, S);
List_Delete(temp);
List_Add(GModel::current()->getGEOInternals()->PhysicalGroups, &p);
}
List_Delete($7);
$$.Type = MSH_PHYSICAL_SURFACE;
$$.Num = num;
}
// END EMI ADDED
| tCompound tLine '(' FExpr ')' tAFFECT ListOfDouble tEND
{
......
Mesh.CharacteristicLengthFactor=0.03;
Mesh.CharacteristicLengthFactor=0.2;
Merge "PelvisARTHUR_CLASS.msh";
CreateTopology;
......@@ -10,7 +10,7 @@ Compound Line(10)={4};
Compound Line(20)={5};
Compound Surface(200)={2} Boundary {{}};
Compound Surface(400)={3} Boundary {{4},{5}};
Compound Surface(400)={3} Boundary {{}};
Compound Volume(2000) = {1003};
......
Mesh.CharacteristicLengthFactor=0.03;
Mesh.CharacteristicLengthFactor=0.1;
Merge "PelvisHEMI_CLASS.msh";
CreateTopology;
......@@ -12,10 +12,9 @@ Compound Line(70)={7};
Compound Line(80)={8};
Compound Line(90)={9};
//Compound Surface(100)={2} Boundary {{}};
//Compound Surface(200)={3} Boundary {{},{},{},{}};
//Compound Surface(200)={3} Boundary {{8},{6,7},{},{}};
//Compound Surface(300)={4} Boundary {{}};
Compound Surface(100)={2} Boundary {{}};
//Compound Surface(200)={3} Boundary {{}};
Compound Surface(300)={4} Boundary {{}};
Compound Surface(400)={5} Boundary {{}};
//Compound Volume(5000)={1000};
......
This diff is collapsed.
Mesh.CharacteristicLengthFactor=0.05;
Mesh.CharacteristicLengthFactor=0.5;
Merge "implant_CLASS.msh";
CreateTopology;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment