Skip to content
Snippets Groups Projects
Commit 443b78ea authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix compile

parent e4d3b2eb
No related branches found
No related tags found
No related merge requests found
......@@ -467,14 +467,16 @@ double GFace::curvatureDiv(const SPoint2 &param) const
if(param.x() - eps < 0.0) {
n1 = normal(SPoint2(param.x(), param.y()));
n2 = normal(SPoint2(param.x() + eps, param.y()));
} else {
}
else {
n1 = normal(SPoint2(param.x() - eps, param.y()));
n2 = normal(SPoint2(param.x(), param.y()));
}
if(param.y() - eps < 0.0) {
n3 = normal(SPoint2(param.x(), param.y() ));
n4 = normal(SPoint2(param.x(), param.y() + eps));
} else {
}
else {
n3 = normal(SPoint2(param.x(), param.y() - eps));
n4 = normal(SPoint2(param.x(), param.y() ));
}
......@@ -503,16 +505,12 @@ double GFace::curvatureMax(const SPoint2 &param) const
return fabs(eigVal[1]);
}
double GFace::curvatures(const SPoint2 &param,
SVector3 *dirMax,
SVector3 *dirMin,
double *curvMax,
double *curvMin) const
double GFace::curvatures(const SPoint2 &param, SVector3 *dirMax, SVector3 *dirMin,
double *curvMax, double *curvMin) const
{
Pair<SVector3, SVector3> D1 = firstDer(param);
if (geomType() == Plane)
{
if(geomType() == Plane){
*dirMax = D1.first();
*dirMin = D1.second();
*curvMax = 0.;
......@@ -520,8 +518,7 @@ double GFace::curvatures(const SPoint2 &param,
return 0.;
}
if (geomType() == Sphere)
{
if(geomType() == Sphere){
*dirMax = D1.first();
*dirMin = D1.second();
*curvMax = curvatureDiv(param);
......@@ -550,8 +547,7 @@ double GFace::getMetricEigenvalue(const SPoint2 &)
// eigen values are absolute values and sorted from min to max of absolute values
// eigen vectors are the corresponding COLUMNS of eigVec
void GFace::getMetricEigenVectors(const SPoint2 &param,
double eigVal[2],
double eigVec[4]) const
double eigVal[2], double eigVec[4]) const
{
// first derivatives
Pair<SVector3,SVector3> D1 = firstDer(param);
......@@ -596,14 +592,14 @@ void GFace::getMetricEigenVectors(const SPoint2 &param,
double work2[2];
double eigValI[2];
if (EigSolve(2, 2, N, eigVal, eigValI, eigVec, work1, work2) != 1) {
Msg::Warning("Problem in eigen vectors computation");
printf(" N: %f %f %f %f\n",N[0],N[1],N[2],N[3]);
printf(" * Eigen values:\n %f + i * %f\n %f + i * %f\n",
Msg::Error("Problem in eigen vectors computation");
Msg::Error(" N: %f %f %f %f", N[0], N[1], N[2], N[3]);
Msg::Error(" * Eigen values:");
Msg::Error(" %f + i * %f, %f + i * %f",
eigVal[0], eigValI[0], eigVal[1], eigValI[1]);
printf(" * Eigen vectors (trust it only if eigen values are real):\n");
printf(" ( %f, %f ),\n ( %f, %f ).\n",
Msg::Error(" * Eigen vectors (trust it only if eigen values are real):");
Msg::Error(" ( %f, %f ), ( %f, %f )",
eigVec[0], eigVec[2], eigVec[1], eigVec[3]);
throw;
}
if (fabs(eigValI[0]) > 1.e-12 || fabs(eigValI[1]) > 1.e-12) {
Msg::Error("Found imaginary eigenvalues");
......
......@@ -151,7 +151,6 @@ class GFace : public GEntity
virtual Pair<SVector3, SVector3> firstDer(const SPoint2 &param) const = 0;
// compute the second derivates of the face at the parameter location
// (default implementation by central differences)
// the derivates have to be allocated before calling this function
virtual void secondDer(const SPoint2 &param,
SVector3 *dudu, SVector3 *dvdv, SVector3 *dudv) const = 0;
......
......@@ -26,13 +26,10 @@ discreteEdge::discreteEdge(GModel *model, int num, GVertex *_v0, GVertex *_v1)
Tree_Add(model->getGEOInternals()->Curves, &c);
CreateReversedCurve(c);
#endif
}
void discreteEdge::orderMLines()
{
//printf(" *** ORDERING DISCRETE EDGE %d of size %d \n", this->tag(), lines.size());
std::vector<MLine*> _m ;
......@@ -281,11 +278,9 @@ void discreteEdge::parametrize()
}
void discreteEdge::getLocalParameter ( const double &t,
int &iLine,
void discreteEdge::getLocalParameter(const double &t, int &iLine,
double &tLoc) const
{
for (iLine=0 ; iLine<lines.size() ;iLine++){
double tmin = _pars[iLine];
double tmax = _pars[iLine+1];
......@@ -319,7 +314,6 @@ GPoint discreteEdge::point(double par) const
SVector3 discreteEdge::firstDer(double par) const
{
double tLoc;
int iEdge;
getLocalParameter(par,iEdge,tLoc);
......@@ -335,11 +329,9 @@ SVector3 discreteEdge::firstDer(double par) const
//printf("firstDer discreteEdge par=%g, dx=%g, dy=%g dz=%g dt=%g \n", par,dx,dy,dz, dt);
return SVector3(dx,dy,dz);
}
Range<double> discreteEdge::parBounds(int i) const {
Range<double> discreteEdge::parBounds(int i) const
{
return Range<double>(0, lines.size());
}
......@@ -18,9 +18,7 @@ class discreteEdge : public GEdge {
public:
discreteEdge(GModel *model, int num, GVertex *_v0, GVertex *_v1);
virtual ~discreteEdge() {}
void getLocalParameter ( const double &t,
int &iEdge,
double & tLoc) const;
void getLocalParameter(const double &t, int &iEdge, double &tLoc) const;
virtual GeomType geomType() const { return DiscreteCurve; }
virtual GPoint point(double p) const;
virtual SVector3 firstDer(double par) const;
......
......@@ -22,8 +22,8 @@ discreteFace::discreteFace(GModel *model, int num) : GFace(model, num)
meshStatistics.status = GFace::DONE;
}
void discreteFace::findEdges(std::map<MEdge, std::vector<int>, Less_Edge > &map_edges){
void discreteFace::findEdges(std::map<MEdge, std::vector<int>, Less_Edge > &map_edges)
{
//find the boundary edges
std::list<MEdge> bound_edges;
for (int iFace = 0; iFace < getNumMeshElements() ; iFace++) {
......@@ -39,7 +39,6 @@ void discreteFace::findEdges(std::map<MEdge, std::vector<int>, Less_Edge > &map_
}
}
//for the boundary edges, associate the tag of the current discrete face
for (std::list<MEdge>::iterator itv = bound_edges.begin() ; itv != bound_edges.end() ; ++itv){
std::map<MEdge, std::vector<int> , Less_Edge >::iterator itmap = map_edges.find(*itv);
......@@ -57,8 +56,6 @@ void discreteFace::findEdges(std::map<MEdge, std::vector<int>, Less_Edge > &map_
}
//printf( "There are %d bound msh edges \n ", map_edges.size());
}
void discreteFace::setBoundEdges(std::vector<int> tagEdges)
......@@ -85,11 +82,8 @@ void discreteFace::setBoundEdges(std::vector<int> tagEdges)
}
// printf("bound edges =%d \n", edges().size());
}
GPoint discreteFace::point(double par1, double par2) const
{
Msg::Error("Cannot evaluate point on discrete face");
......
......@@ -74,7 +74,7 @@ Pair<SVector3, SVector3> fourierFace::firstDer(const SPoint2 &param) const
void fourierFace::secondDer(const SPoint2 &param,
SVector3 *dudu, SVector3 *dvdv, SVector3 *dudv) const
{
Msg::Error("Computation of the second derivatives not implemented for fourer face");
Msg::Error("Computation of the second derivatives not implemented for fourier face");
}
#endif
......@@ -4,6 +4,7 @@
// bugs and problems to <gmsh@geuz.org>.
#include "GmshConfig.h"
#include "GmshMessage.h"
#include "fourierProjectionFace.h"
#include "VertexArray.h"
......@@ -40,6 +41,12 @@ Pair<SVector3,SVector3> fourierProjectionFace::firstDer(const SPoint2 &param) co
return Pair<SVector3,SVector3>(du,dv);
}
void fourierProjectionFace::secondDer(const SPoint2 &param,
SVector3 *dudu, SVector3 *dvdv, SVector3 *dudv) const
{
Msg::Error("Computation of the second derivatives not implemented");
}
SVector3 fourierProjectionFace::normal(const SPoint2 &param) const
{
double x, y, z;
......
......@@ -24,6 +24,7 @@ class fourierProjectionFace : public GFace {
GPoint point(double par1, double par2) const;
SVector3 normal(const SPoint2 &param) const;
Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const;
void secondDer(const SPoint2 &, SVector3 *, SVector3 *, SVector3 *) const;
SPoint2 parFromPoint(const SPoint3 &) const;
virtual GEntity::GeomType geomType() const { return GEntity::ProjectionFace; }
ModelType getNativeType() const { return UnknownModel; }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment