mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
2d meshing improvements
This commit is contained in:
parent
1316c224d2
commit
75a6623419
@ -393,6 +393,16 @@ namespace netgen
|
|||||||
Array<T>::operator= (val);
|
Array<T>::operator= (val);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// array copy
|
||||||
|
ArrayMem & operator= (const FlatArray<T> & a2)
|
||||||
|
{
|
||||||
|
SetSize (a2.Size());
|
||||||
|
for (int i = 0; i < this->size; i++)
|
||||||
|
(*this)[i] = a2[i];
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -603,7 +613,7 @@ namespace netgen
|
|||||||
T hv = data[i];
|
T hv = data[i];
|
||||||
data[i] = data[j];
|
data[i] = data[j];
|
||||||
data[j] = hv;
|
data[j] = hv;
|
||||||
|
|
||||||
S hvs = slave[i];
|
S hvs = slave[i];
|
||||||
slave[i] = slave[j];
|
slave[i] = slave[j];
|
||||||
slave[j] = hvs;
|
slave[j] = hvs;
|
||||||
|
@ -95,18 +95,12 @@ void netrule :: SetFreeZoneTransformation (const Vector & devp, int tolclass)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
vn /= sqrt (len2); // should not be necessary
|
vn /= sqrt (len2); // scaling necessary ?
|
||||||
|
|
||||||
freesetinequ(i,0) = vn.X();
|
freesetinequ(i,0) = vn.X();
|
||||||
freesetinequ(i,1) = vn.Y();
|
freesetinequ(i,1) = vn.Y();
|
||||||
freesetinequ(i,2) = -(p1.X() * vn.X() + p1.Y() * vn.Y());
|
freesetinequ(i,2) = -(p1.X() * vn.X() + p1.Y() * vn.Y());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
freesetinequ(i,0) = vn.X();
|
|
||||||
freesetinequ(i,1) = vn.Y();
|
|
||||||
freesetinequ(i,2) = -(p1.X() * vn.X() + p1.Y() * vn.Y());
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -211,7 +211,7 @@ namespace netgen
|
|||||||
edgeflag[i2] = i;
|
edgeflag[i2] = i;
|
||||||
edgenr[i2] = ednr;
|
edgenr[i2] = ednr;
|
||||||
}
|
}
|
||||||
for (int j = 0; j << vert2vertcoarse[i].Size(); j++)
|
for (int j = 0; j < vert2vertcoarse[i].Size(); j++) // fix by Markus
|
||||||
{
|
{
|
||||||
int v2 = vert2vertcoarse[i][j];
|
int v2 = vert2vertcoarse[i][j];
|
||||||
if (edgeflag[v2] < i)
|
if (edgeflag[v2] < i)
|
||||||
|
@ -20,6 +20,8 @@ namespace netgen
|
|||||||
|
|
||||||
bool merge_solids = 1;
|
bool merge_solids = 1;
|
||||||
|
|
||||||
|
|
||||||
|
// can you please explain what you intend to compute here (JS) !!!
|
||||||
double Line :: Dist (Line l)
|
double Line :: Dist (Line l)
|
||||||
{
|
{
|
||||||
Vec<3> n = p1-p0;
|
Vec<3> n = p1-p0;
|
||||||
|
@ -26,45 +26,71 @@ namespace netgen
|
|||||||
virtual ~SolutionData ()
|
virtual ~SolutionData ()
|
||||||
{ ; }
|
{ ; }
|
||||||
|
|
||||||
int GetComponents() { return components; }
|
int GetComponents()
|
||||||
bool IsComplex() { return iscomplex; }
|
{
|
||||||
|
return components;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool IsComplex()
|
||||||
|
{
|
||||||
|
return iscomplex;
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool GetValue (int /* elnr */,
|
virtual bool GetValue (int /* elnr */,
|
||||||
double /* lam1 */, double /* lam2 */, double /* lam3 */,
|
double /* lam1 */, double /* lam2 */, double /* lam3 */,
|
||||||
double * /* values */)
|
double * /* values */)
|
||||||
{ return false; }
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool GetValue (int selnr,
|
virtual bool GetValue (int selnr,
|
||||||
const double xref[], const double x[], const double dxdxref[],
|
const double xref[], const double x[], const double dxdxref[],
|
||||||
double * values)
|
double * values)
|
||||||
{ return GetValue (selnr, xref[0], xref[1], xref[2], values); }
|
{
|
||||||
|
return GetValue (selnr, xref[0], xref[1], xref[2], values);
|
||||||
|
}
|
||||||
|
|
||||||
virtual bool GetMultiValue (int elnr, int npts,
|
virtual bool GetMultiValue (int elnr, int npts,
|
||||||
const double * xref, int sxref,
|
const double * xref, int sxref,
|
||||||
const double * x, int sx,
|
const double * x, int sx,
|
||||||
const double * dxdxref, int sdxdxref,
|
const double * dxdxref, int sdxdxref,
|
||||||
double * values, int svalues);
|
double * values, int svalues)
|
||||||
|
{
|
||||||
|
bool res = false;
|
||||||
|
for (int i = 0; i < npts; i++)
|
||||||
|
res = GetValue (elnr, &xref[i*sxref], &x[i*sx], &dxdxref[i*sdxdxref], &values[i*svalues]);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool GetSurfValue (int /* selnr */,
|
virtual bool GetSurfValue (int /* selnr */,
|
||||||
double /* lam1 */, double /* lam2 */,
|
double /* lam1 */, double /* lam2 */,
|
||||||
double * /* values */)
|
double * /* values */)
|
||||||
{ return false; }
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual bool GetSurfValue (int selnr,
|
virtual bool GetSurfValue (int selnr,
|
||||||
const double xref[], const double x[], const double dxdxref[],
|
const double xref[], const double x[], const double dxdxref[],
|
||||||
double * values)
|
double * values)
|
||||||
{ return GetSurfValue (selnr, xref[0], xref[1], values); }
|
{
|
||||||
|
return GetSurfValue (selnr, xref[0], xref[1], values);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
virtual bool GetMultiSurfValue (int selnr, int npts,
|
virtual bool GetMultiSurfValue (int selnr, int npts,
|
||||||
const double * xref, int sxref,
|
const double * xref, int sxref,
|
||||||
const double * x, int sx,
|
const double * x, int sx,
|
||||||
const double * dxdxref, int sdxdxref,
|
const double * dxdxref, int sdxdxref,
|
||||||
double * values, int svalues);
|
double * values, int svalues)
|
||||||
|
{
|
||||||
|
bool res = false;
|
||||||
|
for (int i = 0; i < npts; i++)
|
||||||
|
res = GetSurfValue (selnr, &xref[i*sxref], &x[i*sx], &dxdxref[i*sdxdxref], &values[i*svalues]);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
void SetMultiDimComponent (int mc)
|
void SetMultiDimComponent (int mc)
|
||||||
{ multidimcomponent = mc; }
|
{ multidimcomponent = mc; }
|
||||||
|
@ -29,6 +29,7 @@ namespace netgen
|
|||||||
delete solclass;
|
delete solclass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
bool SolutionData :: GetMultiValue (int elnr, int npts,
|
bool SolutionData :: GetMultiValue (int elnr, int npts,
|
||||||
const double * xref, int sxref,
|
const double * xref, int sxref,
|
||||||
const double * x, int sx,
|
const double * x, int sx,
|
||||||
@ -53,6 +54,7 @@ namespace netgen
|
|||||||
res = GetSurfValue (selnr, &xref[i*sxref], &x[i*sx], &dxdxref[i*sdxdxref], &values[i*svalues]);
|
res = GetSurfValue (selnr, &xref[i*sxref], &x[i*sx], &dxdxref[i*sdxdxref], &values[i*svalues]);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
VisualSceneSolution :: VisualSceneSolution ()
|
VisualSceneSolution :: VisualSceneSolution ()
|
||||||
: VisualScene()
|
: VisualScene()
|
||||||
|
Loading…
Reference in New Issue
Block a user