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 ...@@ -460,16 +460,19 @@ SVector3 discreteEdge::firstDer(double par) const
MVertex *vE = lines[iEdge]->getVertex(1); MVertex *vE = lines[iEdge]->getVertex(1);
double dx,dy,dz; 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; dx = (vE->x() - vB->x() ) /dt;
dy = (vE->y() - vB->y() ) /dt; dy = (vE->y() - vB->y() ) /dt;
dz = (vE->z() - vB->z() ) /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); SVector3 der(dx,dy,dz);
return SVector3(dx,dy,dz); return der;
} }
Range<double> discreteEdge::parBounds(int i) const Range<double> discreteEdge::parBounds(int i) const
{ {
// printf("par bound discreteEdge =%g \n", lines.size());
return Range<double>(0, lines.size()); return Range<double>(0, lines.size());
} }
...@@ -97,7 +97,11 @@ static double F_Lc(GEdge *ge, double t) ...@@ -97,7 +97,11 @@ static double F_Lc(GEdge *ge, double t)
SVector3 der = ge->firstDer(t); SVector3 der = ge->firstDer(t);
const double d = norm(der); const double d = norm(der);
//printf("lc_here=%g d=%g nb =%g\n", lc_here,d, d/lc_here);
return d / lc_here; return d / lc_here;
} }
static double F_Transfinite(GEdge *ge, double t) static double F_Transfinite(GEdge *ge, double t)
...@@ -275,7 +279,6 @@ void meshGEdge::operator() (GEdge *ge) ...@@ -275,7 +279,6 @@ void meshGEdge::operator() (GEdge *ge)
else if(ge->meshAttributes.Method == MESH_TRANSFINITE){ else if(ge->meshAttributes.Method == MESH_TRANSFINITE){
a = Integration(ge, t_begin, t_end, F_Transfinite, Points, 1.e-8); a = Integration(ge, t_begin, t_end, F_Transfinite, Points, 1.e-8);
N = ge->meshAttributes.nbPointsTransfinite; N = ge->meshAttributes.nbPointsTransfinite;
Msg::Debug("Meshing transfinite N=%d, a=%g", N, a);
} }
else{ else{
if(CTX::instance()->mesh.lcIntegrationPrecision > 1.e-8){ if(CTX::instance()->mesh.lcIntegrationPrecision > 1.e-8){
...@@ -290,6 +293,7 @@ void meshGEdge::operator() (GEdge *ge) ...@@ -290,6 +293,7 @@ void meshGEdge::operator() (GEdge *ge)
CTX::instance()->mesh.lcIntegrationPrecision); CTX::instance()->mesh.lcIntegrationPrecision);
} }
N = std::max(ge->minimumMeshSegments() + 1, (int)(a + 1.)); N = std::max(ge->minimumMeshSegments() + 1, (int)(a + 1.));
} }
// if the curve is periodic and if the begin vertex is identical to // if the curve is periodic and if the begin vertex is identical to
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
...@@ -1476,6 +1476,25 @@ Shape : ...@@ -1476,6 +1476,25 @@ Shape :
$$.Type = MSH_PHYSICAL_SURFACE; $$.Type = MSH_PHYSICAL_SURFACE;
$$.Num = num; $$.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 | tCompound tLine '(' FExpr ')' tAFFECT ListOfDouble tEND
{ {
......
Mesh.CharacteristicLengthFactor=0.03; Mesh.CharacteristicLengthFactor=0.2;
Merge "PelvisARTHUR_CLASS.msh"; Merge "PelvisARTHUR_CLASS.msh";
CreateTopology; CreateTopology;
...@@ -10,7 +10,7 @@ Compound Line(10)={4}; ...@@ -10,7 +10,7 @@ Compound Line(10)={4};
Compound Line(20)={5}; Compound Line(20)={5};
Compound Surface(200)={2} Boundary {{}}; Compound Surface(200)={2} Boundary {{}};
Compound Surface(400)={3} Boundary {{4},{5}}; Compound Surface(400)={3} Boundary {{}};
Compound Volume(2000) = {1003}; Compound Volume(2000) = {1003};
......
Mesh.CharacteristicLengthFactor=0.03; Mesh.CharacteristicLengthFactor=0.1;
Merge "PelvisHEMI_CLASS.msh"; Merge "PelvisHEMI_CLASS.msh";
CreateTopology; CreateTopology;
...@@ -12,10 +12,9 @@ Compound Line(70)={7}; ...@@ -12,10 +12,9 @@ Compound Line(70)={7};
Compound Line(80)={8}; Compound Line(80)={8};
Compound Line(90)={9}; Compound Line(90)={9};
//Compound Surface(100)={2} Boundary {{}}; Compound Surface(100)={2} Boundary {{}};
//Compound Surface(200)={3} Boundary {{},{},{},{}}; //Compound Surface(200)={3} Boundary {{}};
//Compound Surface(200)={3} Boundary {{8},{6,7},{},{}}; Compound Surface(300)={4} Boundary {{}};
//Compound Surface(300)={4} Boundary {{}};
Compound Surface(400)={5} Boundary {{}}; Compound Surface(400)={5} Boundary {{}};
//Compound Volume(5000)={1000}; //Compound Volume(5000)={1000};
......
Source diff could not be displayed: it is too large. Options to address this: view the blob.
Mesh.CharacteristicLengthFactor=0.05; Mesh.CharacteristicLengthFactor=0.5;
Merge "implant_CLASS.msh"; Merge "implant_CLASS.msh";
CreateTopology; CreateTopology;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment