Commit 3a08b7a2 authored by Christophe Geuzaine's avatar Christophe Geuzaine

fix compile

parent 66a25e9b
......@@ -81,7 +81,7 @@ struct contextGeometryOptions {
int matchGeomAndMesh;
double matchMeshScaleFactor;
double matchMeshTolerance;
int hideCompounds, orientedPhysicals, doubleClickedEntityTag;
int hideCompounds, orientedPhysicals;
int reparamOnFaceRobust;
// geometry display
int draw, light, lightTwoSide, points, curves, surfaces, volumes;
......
This diff is collapsed.
......@@ -192,15 +192,15 @@ void GEntity::addVerticesInSet(std::set<MVertex*>&vtcs,bool closure) const
switch (dim()) {
case 3:
{
std::list<GFace*> clos = faces();
std::list<GFace*>::iterator cIter = clos.begin();
std::vector<GFace*> clos = faces();
std::vector<GFace*>::iterator cIter = clos.begin();
for (;cIter!=clos.end();++cIter) (*cIter)->addVerticesInSet(vtcs,true);
break;
}
case 2:
{
std::list<GEdge*> clos = edges();
std::list<GEdge*>::iterator cIter = clos.begin();
std::vector<GEdge*> clos = edges();
std::vector<GEdge*>::iterator cIter = clos.begin();
for (;cIter!=clos.end();++cIter) (*cIter)->addVerticesInSet(vtcs,true);
break;
}
......@@ -215,7 +215,8 @@ void GEntity::addVerticesInSet(std::set<MVertex*>&vtcs,bool closure) const
}
}
void GEntity::updateCorrespondingVertices() {
void GEntity::updateCorrespondingVertices()
{
if (_meshMaster != this && affineTransform.size() == 16) {
......@@ -262,8 +263,8 @@ void GEntity::updateCorrespondingVertices() {
}
}
void GEntity::copyMasterCoordinates() {
void GEntity::copyMasterCoordinates()
{
if (_meshMaster != this && affineTransform.size() == 16) {
......@@ -308,5 +309,5 @@ void GEntity::copyMasterCoordinates() {
}
}
>>>>>>> origin/cgnsUnstructured
}
......@@ -465,7 +465,7 @@ void createTopologyFromMesh2D(GModel *gm, int &num)
int order = parent->getPolynomialOrder();
bool serendipity = parent->getIsOnlySerendipity();
int tag = ElementType::getTag(type,order,serendipity);
int tag = ElementType::getType(type,order,serendipity);
MLine* edge = dynamic_cast<MLine*> (eltFactory.create(tag,vtcs));
......@@ -504,7 +504,7 @@ void createTopologyFromMesh2D(GModel *gm, int &num)
GFace* gf = gfToge->first;
std::set<GEdge*>& gEdgeSet = gfToge->second;
std::list<GEdge*> gEdges;
std::vector<GEdge*> gEdges;
gEdges.insert(gEdges.begin(),gEdgeSet.begin(),gEdgeSet.end());
gf->set(gEdges);
......@@ -665,7 +665,7 @@ void createTopologyFromMesh3D(GModel *gm, int &num)
int type = tf.getType();
int order = parent->getPolynomialOrder();
bool serendipity = parent->getIsOnlySerendipity();
int tag = ElementType::getTag(type,order,serendipity);
int tag = ElementType::getType(type,order,serendipity);
MElement* face = eltFactory.create(tag,vtcs);
......@@ -681,10 +681,10 @@ void createTopologyFromMesh3D(GModel *gm, int &num)
GRegionToGFacesMap::iterator itTo = gRegionToGFaces.begin();
for (;itTo !=gRegionToGFaces.end();++itTo) {
GRegion* gr = itTo->first;
std::list<GFace*> faces;
std::vector<GFace*> faces;
faces.insert (faces.begin(), itTo->second.begin(), itTo->second.end());
gr->set(faces);
for (std::list<GFace*>::iterator it3 = faces.begin() ; it3 != faces.end() ; ++it3)
for (std::vector<GFace*>::iterator it3 = faces.begin() ; it3 != faces.end() ; ++it3)
(*it3)->addRegion(itTo->first);
}
}
......
......@@ -904,8 +904,8 @@ public: // transformation operations
// --- definition of a set for storing periodic connections --------------------
struct CGNSStruPeriodicLess {
class CGNSStruPeriodicLess {
public:
bool operator() (const CGNSStruPeriodic& f,const CGNSStruPeriodic& d) {
int s = f.srcName.compare(d.srcName);
if (s != 0) return (s < 0);
......@@ -1096,8 +1096,8 @@ bool matchGEntities(GModel* model,int dim) {
// -----------------------------------------------------------------------------
struct CGNSUnstPeriodicLess {
class CGNSUnstPeriodicLess {
public:
bool operator() (const CGNSUnstPeriodic& f,const CGNSUnstPeriodic& d) {
if (f.nbPoints() == d.nbPoints()) {
......@@ -1300,6 +1300,7 @@ bool readCGNSPeriodicConnections(int fileIndex,
if (connType != Abutting1to1) {
Msg::Error("Non-conformal connection not supported");
return false;
}
cgsize_t* tgtPts = new cgsize_t[tgtSize];
......@@ -1654,7 +1655,7 @@ int GModel::readCGNSUnstructured(const std::string& fileName)
int eltType = tagFromCGNSType(myType);
int eltSize = ElementType::NbNodesFromTag(eltType);
int eltSize = ElementType::getNumVertices(eltType);
int* renum = NULL;
......@@ -1800,7 +1801,7 @@ int GModel::readCGNSStructured(const std::string &name)
Msg::Debug("Reading zone to compute MG level %i.", index_zone);
CG_ZoneType_t zoneType;
ZoneType_t zoneType;
cg_zone_type(index_file, index_base, index_zone, &zoneType);
if ( zoneType == Unstructured ) {
Msg::Info("Unstructured zone detected");
......@@ -1893,9 +1894,9 @@ int GModel::readCGNSStructured(const std::string &name)
int offset = vnum;
CG_ZoneType_t zoneType;
ZoneType_t zoneType;
cg_zone_type(index_file, index_base, index_zone, &zoneType);
if ( zoneType == CG_Unstructured ) {
if ( zoneType == Unstructured ) {
Msg::Debug("Unstructured zone detected, skipping.");
continue;
}
......@@ -1930,7 +1931,7 @@ int GModel::readCGNSStructured(const std::string &name)
int nCoords;
cg_ncoords(index_file, index_base, index_zone, &nCoords);
CG_DataType_t dataType;
DataType_t dataType;
char coordName[35];
void* coord;
double nodes[nnodesZone][nCoords];
......@@ -1946,7 +1947,7 @@ int GModel::readCGNSStructured(const std::string &name)
Msg::Debug("Reading coordinate %i : %s.", iCoord+1, coordName);
switch(dataType) {
case CG_RealSingle:
case RealSingle:
Msg::Debug(" [Type is float]");
coord = new float[nnodesZone];
if ( cg_coord_read(index_file, index_base, index_zone,
......@@ -1960,7 +1961,7 @@ int GModel::readCGNSStructured(const std::string &name)
}
delete [] (float*)coord;
break;
case CG_RealDouble:
case RealDouble:
Msg::Debug(" [Type is double]");
coord = new double[nnodesZone];
if ( cg_coord_read(index_file, index_base, index_zone,
......
......@@ -239,7 +239,7 @@ GeomMeshMatcher:: matchFaces(GModel* m1, GModel* m2,
GFace* f1 = (GFace*) *fit;
std::vector<std::list<GFace*> > lists;
std::vector<std::vector<GFace*> > lists;
std::vector<GEdge*> boundary_edges = f1->edges();
......@@ -334,11 +334,11 @@ GeomMeshMatcher::matchRegions(GModel* m1, GModel* m2,
num_total_regions++;
//std::vector<list<GRegion*> > lists;
std::list<GFace*> boundary_faces = ((GFace*)(*entity1))->faces();
std::list<GFace*> coresp_bound_faces;
std::vector<GFace*> boundary_faces = ((GFace*)(*entity1))->faces();
std::vector<GFace*> coresp_bound_faces;
std::vector<GRegion*> common_regions;
for (std::list<GFace*>::iterator boundary_face = boundary_faces.begin();
for (std::vector<GFace*>::iterator boundary_face = boundary_faces.begin();
boundary_face != boundary_faces.end(); boundary_face++) {
coresp_bound_faces.push_back(findMatching<GFace*>(*coresp_f,*boundary_face));
}
......@@ -347,7 +347,7 @@ GeomMeshMatcher::matchRegions(GModel* m1, GModel* m2,
entity2++)
{
if((*entity2)->dim() != 3) continue;
std::vector<std::list<GFace*> > lists;
std::vector<std::vector<GFace*> > lists;
lists.push_back(coresp_bound_faces);
lists.push_back(((GRegion*)*entity2)->faces());
std::vector<GFace*> common_faces;
......@@ -369,7 +369,7 @@ GeomMeshMatcher::matchRegions(GModel* m1, GModel* m2,
/*
This is made in a backward fashion compared to the other entities...
*/
std::list<GEdge*> boundaries = ((GRegion*) *entity1)->edges();
std::vector<GEdge*> boundaries = ((GRegion*) *entity1)->edges();
// Then, compute the minimal bounding box
SOrientedBoundingBox geo_obb = ((GRegion*) *entity1)->getOBB();
......
......@@ -298,7 +298,7 @@ void updateBoVec<2, MEdge>
{
// Get the edge entities that are connected to the vertex
std::list<GEdge*> gEdgeList = ent->edges();
std::vector<GEdge*> gEdgeList = ent->edges();
// Find edge entities that are connected to elements in the zone
std::vector<std::pair<GEdge*, int> > useGEdge;
const int nFace = faces.size();
......@@ -531,9 +531,9 @@ void updateBoVec<3, MFace>
switch(ent->dim()) {
case 0:
{
std::list<GEdge*> gEdgeList = ent->edges();
std::vector<GEdge*> gEdgeList = ent->edges();
std::list<GFace*> gFaceList;
for(std::list<GEdge*>::const_iterator gEIt = gEdgeList.begin();
for(std::vector<GEdge*>::const_iterator gEIt = gEdgeList.begin();
gEIt != gEdgeList.end(); ++gEIt) {
std::vector<GFace*> alist = (*gEIt)->faces();
gFaceList.insert(gFaceList.end(), alist.begin(), alist.end());
......@@ -555,7 +555,7 @@ void updateBoVec<3, MFace>
//--zone
std::list<const GFace*> useGFace;
std::list<GEdge*> gEdgeList;
std::vector<GEdge*> gEdgeList;
const int nFace = faces.size();
for(int iFace = 0; iFace != nFace; ++iFace) {
if(zoneIndex == faces[iFace].zoneIndex) {
......
......@@ -70,18 +70,11 @@ class SVector3 {
P[0] = a[0]; P[1] = a[1]; P[2] = a[2];
return *this;
}
SVector3 & operator = (double v)
{
P[0] = v; P[1] = v; P[2] = v;
return *this;
}
SVector3 & operator = (const SVector3& a)
{
P[0] = a[0]; P[1] = a[1]; P[2] = a[2];
return *this;
}
operator double *() { return P; }
void print(std::string name="") const
{
......
This diff is collapsed.
/* A Bison parser, made by GNU Bison 2.7. */
/* A Bison parser, made by GNU Bison 2.3. */
/* Bison interface for Yacc-like parsers in C
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
/* Skeleton interface for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
......@@ -26,20 +29,10 @@
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
# define YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
#if YYDEBUG
extern int gmsh_yydebug;
#endif
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
......@@ -272,7 +265,6 @@ extern int gmsh_yydebug;
tPLUSPLUS = 481
};
#endif
<<<<<<< HEAD
/* Tokens. */
#define tDOUBLE 258
#define tSTRING 259
......@@ -500,20 +492,12 @@ extern int gmsh_yydebug;
#define tPLUSPLUS 481
=======
>>>>>>> origin/cgnsUnstructured
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef union YYSTYPE
<<<<<<< HEAD
#line 165 "Gmsh.y"
=======
>>>>>>> origin/cgnsUnstructured
{
/* Line 2058 of yacc.c */
#line 164 "Gmsh.y"
char *c;
int i;
unsigned int u;
......@@ -522,30 +506,14 @@ typedef union YYSTYPE
Shape s;
List_T *l;
struct TwoChar c2;
/* Line 2058 of yacc.c */
#line 295 "Gmsh.tab.hpp"
} YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
}
/* Line 1529 of yacc.c. */
#line 512 "Gmsh.tab.hpp"
YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
extern YYSTYPE gmsh_yylval;
#ifdef YYPARSE_PARAM
#if defined __STDC__ || defined __cplusplus
int gmsh_yyparse (void *YYPARSE_PARAM);
#else
int gmsh_yyparse ();
#endif
#else /* ! YYPARSE_PARAM */
#if defined __STDC__ || defined __cplusplus
int gmsh_yyparse (void);
#else
int gmsh_yyparse ();
#endif
#endif /* ! YYPARSE_PARAM */
#endif /* !YY_GMSH_YY_GMSH_TAB_HPP_INCLUDED */
......@@ -28,7 +28,7 @@
#define FLEX_SCANNER
#define YY_FLEX_MAJOR_VERSION 2
#define YY_FLEX_MINOR_VERSION 5
#define YY_FLEX_SUBMINOR_VERSION 37
#define YY_FLEX_SUBMINOR_VERSION 35
#if YY_FLEX_SUBMINOR_VERSION > 0
#define FLEX_BETA
#endif
......@@ -66,6 +66,7 @@ typedef int16_t flex_int16_t;
typedef uint16_t flex_uint16_t;
typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
typedef uint64_t flex_uint64_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
......@@ -73,6 +74,7 @@ typedef int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
#endif /* ! C99 */
/* Limits of integral types. */
#ifndef INT8_MIN
......@@ -103,8 +105,6 @@ typedef unsigned int flex_uint32_t;
#define UINT32_MAX (4294967295U)
#endif
#endif /* ! C99 */
#endif /* ! FLEXINT_H */
#ifdef __cplusplus
......@@ -375,7 +375,7 @@ static void yy_fatal_error (yyconst char msg[] );
*/
#define YY_DO_BEFORE_ACTION \
(yytext_ptr) = yy_bp; \
gmsh_yyleng = (size_t) (yy_cp - yy_bp); \
gmsh_yyleng = (yy_size_t) (yy_cp - yy_bp); \
(yy_hold_char) = *yy_cp; \
*yy_cp = '\0'; \
(yy_c_buf_p) = yy_cp;
......@@ -1389,7 +1389,7 @@ static int input (void );
/* This used to be an fputs(), but since the string might contain NUL's,
* we now use fwrite().
*/
#define ECHO do { if (fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )) {} } while (0)
#define ECHO fwrite( gmsh_yytext, gmsh_yyleng, 1, gmsh_yyout )
#endif
/* Gets input and stuffs it into "buf". number of characters read, or YY_NULL,
......@@ -1400,7 +1400,7 @@ static int input (void );
if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \
{ \
int c = '*'; \
size_t n; \
yy_size_t n; \
for ( n = 0; n < max_size && \
(c = getc( gmsh_yyin )) != EOF && c != '\n'; ++n ) \
buf[n] = (char) c; \
......@@ -3043,7 +3043,7 @@ static int yy_get_next_buffer (void)
{ /* Not enough room in the buffer - grow it. */
/* just a shorter name for the current buffer */
YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;
YY_BUFFER_STATE b = YY_CURRENT_BUFFER;
int yy_c_buf_p_offset =
(int) ((yy_c_buf_p) - b->yy_ch_buf);
......@@ -3176,7 +3176,7 @@ static int yy_get_next_buffer (void)
yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
yy_is_jam = (yy_current_state == 1306);
return yy_is_jam ? 0 : yy_current_state;
return yy_is_jam ? 0 : yy_current_state;
}
static void yyunput (int c, register char * yy_bp )
......@@ -3264,7 +3264,7 @@ static int yy_get_next_buffer (void)
case EOB_ACT_END_OF_FILE:
{
if ( gmsh_yywrap( ) )
return EOF;
return 0;
if ( ! (yy_did_buffer_switch_on_eof) )
YY_NEW_FILE;
......@@ -3400,6 +3400,10 @@ static void gmsh_yy_load_buffer_state (void)
gmsh_yyfree((void *) b );
}
#ifndef __cplusplus
extern int isatty (int );
#endif /* __cplusplus */
/* Initializes or reinitializes a buffer.
* This function is sometimes called more than once on the same buffer,
* such as during a gmsh_yyrestart() or at EOF.
......@@ -3604,8 +3608,8 @@ YY_BUFFER_STATE gmsh_yy_scan_string (yyconst char * yystr )
/** Setup the input buffer state to scan the given bytes. The next call to gmsh_yylex() will
* scan from a @e copy of @a bytes.
* @param yybytes the byte buffer to scan
* @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes.
* @param bytes the byte buffer to scan
* @param len the number of bytes in the buffer pointed to by @a bytes.
*
* @return the newly allocated buffer state object.
*/
......@@ -3613,8 +3617,7 @@ YY_BUFFER_STATE gmsh_yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes
{
YY_BUFFER_STATE b;
char *buf;
yy_size_t n;
int i;
yy_size_t n, i;
/* Get memory for full buffer, including space for trailing EOB's. */
n = _yybytes_len + 2;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment