mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 21:40:33 +05:00
bcnames - string as reference
This commit is contained in:
parent
ce505100a5
commit
81a3f3ff8a
@ -5588,14 +5588,16 @@ namespace netgen
|
||||
bcnames[bcnr] = 0;
|
||||
}
|
||||
|
||||
string Mesh ::GetBCName ( int bcnr ) const
|
||||
const string & Mesh ::GetBCName ( int bcnr ) const
|
||||
{
|
||||
static string defaultstring = "default";
|
||||
|
||||
if ( !bcnames.Size() )
|
||||
return "default";
|
||||
return defaultstring;
|
||||
if ( bcnames[bcnr] )
|
||||
return *bcnames[bcnr];
|
||||
else
|
||||
return "default";
|
||||
return defaultstring;
|
||||
}
|
||||
|
||||
void Mesh :: SetUserData(const char * id, Array<int> & data)
|
||||
|
@ -585,7 +585,7 @@ namespace netgen
|
||||
|
||||
DLL_HEADER void SetBCName ( int bcnr, const string & abcname );
|
||||
|
||||
string GetBCName ( int bcnr ) const;
|
||||
const string & GetBCName ( int bcnr ) const;
|
||||
|
||||
string * GetBCNamePtr ( int bcnr )
|
||||
{ return bcnames[bcnr]; }
|
||||
|
@ -44,7 +44,6 @@ namespace netgen
|
||||
meshopt.ImproveMesh(mesh, mp);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'c':
|
||||
{
|
||||
MeshOptimize2d meshopt;
|
||||
|
@ -2311,13 +2311,11 @@ namespace netgen
|
||||
}
|
||||
|
||||
|
||||
string FaceDescriptor :: GetBCName () const
|
||||
const string & FaceDescriptor :: GetBCName () const
|
||||
{
|
||||
if ( bcname )
|
||||
return *bcname;
|
||||
else
|
||||
return "default";
|
||||
|
||||
static string defaultstring = "default";
|
||||
if (bcname) return *bcname;
|
||||
return defaultstring;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -847,12 +847,10 @@ namespace netgen
|
||||
const string * BCNamePtr () const
|
||||
{ return bcname; }
|
||||
|
||||
string GetBCName () const
|
||||
const string & GetBCName () const
|
||||
{
|
||||
if (! bcname )
|
||||
{
|
||||
return "default";
|
||||
}
|
||||
static string defaultstring = "default";
|
||||
if (! bcname ) return defaultstring;
|
||||
return *bcname;
|
||||
}
|
||||
|
||||
@ -934,7 +932,7 @@ namespace netgen
|
||||
// Philippose - 06/07/2009
|
||||
// Get Surface colour
|
||||
Vec3d SurfColour () const { return surfcolour; }
|
||||
string GetBCName () const;
|
||||
const string & GetBCName () const;
|
||||
// string * BCNamePtr () { return bcname; }
|
||||
// const string * BCNamePtr () const { return bcname; }
|
||||
void SetSurfNr (int sn) { surfnr = sn; }
|
||||
|
@ -865,7 +865,6 @@ namespace netgen
|
||||
// (*testout) << "x = " << x << endl;
|
||||
}
|
||||
|
||||
|
||||
Point3d origp = mesh[pi];
|
||||
int loci = 1;
|
||||
double fact = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user