Skip to content
Snippets Groups Projects
Commit 581c0eb6 authored by Emilie Marchandise's avatar Emilie Marchandise
Browse files

No commit message

No commit message
parent 6cd55dd1
No related branches found
No related tags found
No related merge requests found
...@@ -226,13 +226,13 @@ void meshMetric::computeMetric(){ ...@@ -226,13 +226,13 @@ void meshMetric::computeMetric(){
else if (_technique == meshMetric::FREY ){ else if (_technique == meshMetric::FREY ){
SVector3 gr = grads[ver]; SVector3 gr = grads[ver];
SMetric3 hfrey(1./(hmax*hmax)); SMetric3 hfrey(1./(hmax*hmax));
double kappa = hessian(0,0)+hessian(1,1)+hessian(2,2);
double Np = 15.0;
double epsGeom = 4.0*3.14*3.14/(kappa*Np);
double norm = gr(0)*gr(0)+gr(1)*gr(1)+gr(2)*gr(2); double norm = gr(0)*gr(0)+gr(1)*gr(1)+gr(2)*gr(2);
if (dist < _E && norm != 0.0){ if (dist < _E && norm != 0.0){
double h = hmin*(hmax/hmin-1.0)*dist/_E + hmin; double h = hmin*(hmax/hmin-1.0)*dist/_E + hmin;
double C = 1./(h*h) -1./(hmax*hmax); double C = 1./(h*h) -1./(hmax*hmax);
double kappa = hessian(0,0)+hessian(1,1)+hessian(2,2);
double Np = 15.0;
double epsGeom = 4.0*3.14*3.14/(kappa*Np);
hfrey(0,0) += C*gr(0)*gr(0)/(norm) + hessian(0,0)/epsGeom; hfrey(0,0) += C*gr(0)*gr(0)/(norm) + hessian(0,0)/epsGeom;
hfrey(1,1) += C*gr(1)*gr(1)/(norm) + hessian(1,1)/epsGeom; hfrey(1,1) += C*gr(1)*gr(1)/(norm) + hessian(1,1)/epsGeom;
hfrey(2,2) += C*gr(2)*gr(2)/(norm) + hessian(2,2)/epsGeom; hfrey(2,2) += C*gr(2)*gr(2)/(norm) + hessian(2,2)/epsGeom;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment