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

*** empty log message ***

parent 70af6579
No related branches found
No related tags found
No related merge requests found
...@@ -52,31 +52,35 @@ double F_Transfini_bis(double t) ...@@ -52,31 +52,35 @@ double F_Transfini_bis(double t)
switch (abs(type)) { switch (abs(type)) {
case 1: // Geometric progression ar^i; Sum of n terms = THEC->l = a (r^n-1)/(r-1) case 1: // Geometric progression ar^i; Sum of n terms = THEC->l = a (r^n-1)/(r-1)
if(sign(type) >= 0) {
r = coef; if(sign(type) >= 0)
else r = coef;
r = 1. / coef; else
double a = _myGEdgeLength * (r - 1.) / (pow(r, nbpt - 1.) - 1.); r = 1. / coef;
int i = (int)(log(t * _myGEdgeLength / a * (r - 1.) + 1.) / log(r)); double a = _myGEdgeLength * (r - 1.) / (pow(r, nbpt - 1.) - 1.);
val = d / (a * pow(r, (double)i)); int i = (int)(log(t * _myGEdgeLength / a * (r - 1.) + 1.) / log(r));
val = d / (a * pow(r, (double)i));
}
break; break;
case 2: // Bump case 2: // Bump
if(coef > 1.0) { {
a = -4. * sqrt(coef - 1.) * if(coef > 1.0) {
atan2(1., sqrt(coef - 1.)) / a = -4. * sqrt(coef - 1.) *
((double)nbpt * _myGEdgeLength); atan2(1., sqrt(coef - 1.)) /
((double)nbpt * _myGEdgeLength);
}
else {
a = 2. * sqrt(1. - coef) *
log(fabs((1. + 1. / sqrt(1. - coef))
/ (1. - 1. / sqrt(1. - coef))))
/ ((double)nbpt * _myGEdgeLength);
}
double b = -a * _myGEdgeLength * _myGEdgeLength / (4. * (coef - 1.));
val = d / (-a * DSQR(t * _myGEdgeLength - (_myGEdgeLength) * 0.5) + b);
} }
else {
a = 2. * sqrt(1. - coef) *
log(fabs((1. + 1. / sqrt(1. - coef))
/ (1. - 1. / sqrt(1. - coef))))
/ ((double)nbpt * _myGEdgeLength);
}
double b = -a * _myGEdgeLength * _myGEdgeLength / (4. * (coef - 1.));
val = d / (-a * DSQR(t * _myGEdgeLength - (_myGEdgeLength) * 0.5) + b);
break; break;
default: default:
Msg(WARNING, "Unknown case in Transfinite Line mesh"); Msg(WARNING, "Unknown case in Transfinite Line mesh");
val = 1.; val = 1.;
......
#ifndef _MESH_GEDGE_H_
#define _MESH_GEDGE_H_
class GEdge;
// Create the mesh of the edge
class meshGEdge
{
public :
void operator () ( GEdge * );
};
// destroy the mesh of the edge
class deMeshGEdge
{
public :
void operator () ( GEdge * );
};
#endif
// $Id: OpenFile.cpp,v 1.95 2006-07-10 12:16:35 remacle Exp $ // $Id: OpenFile.cpp,v 1.96 2006-07-11 13:41:22 remacle Exp $
// //
// Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2006 C. Geuzaine, J.-F. Remacle
// //
...@@ -49,6 +49,7 @@ void UpdateViewsInGUI(); ...@@ -49,6 +49,7 @@ void UpdateViewsInGUI();
#endif #endif
extern Mesh *THEM, M; extern Mesh *THEM, M;
extern GModel *GMODEL;
extern Context_T CTX; extern Context_T CTX;
extern void BDS_To_Mesh(Mesh *m); extern void BDS_To_Mesh(Mesh *m);
...@@ -351,7 +352,7 @@ int MergeProblem(char *name, int warn_if_missing) ...@@ -351,7 +352,7 @@ int MergeProblem(char *name, int warn_if_missing)
} }
else { else {
status = ParseFile(name, 0, 1); status = ParseFile(name, 0, 1);
gmshModel m ; GMODEL = new gmshModel ;
} }
} }
......
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