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

fix

parent af7495ad
Branches
Tags
No related merge requests found
...@@ -748,7 +748,7 @@ namespace onelab{ ...@@ -748,7 +748,7 @@ namespace onelab{
const std::string &client=""){ return _get(ps, name, client, _functions); } const std::string &client=""){ return _get(ps, name, client, _functions); }
unsigned int getNumParameters() unsigned int getNumParameters()
{ {
return _numbers.size() + _strings.size() + _regions.size() + _functions.size(); return (int)(_numbers.size() + _strings.size() + _regions.size() + _functions.size());
} }
// check if at least one parameter depends on the given client // check if at least one parameter depends on the given client
bool hasClient(const std::string &client) const bool hasClient(const std::string &client) const
...@@ -943,7 +943,7 @@ namespace onelab{ ...@@ -943,7 +943,7 @@ namespace onelab{
typedef std::map<std::string, client*>::iterator citer; typedef std::map<std::string, client*>::iterator citer;
citer firstClient(){ return _clients.begin(); } citer firstClient(){ return _clients.begin(); }
citer lastClient(){ return _clients.end(); } citer lastClient(){ return _clients.end(); }
int getNumClients() { return _clients.size(); }; int getNumClients() { return (int)_clients.size(); };
citer findClient(const std::string &name){ return _clients.find(name); } citer findClient(const std::string &name){ return _clients.find(name); }
void registerClient(client *c) void registerClient(client *c)
{ {
......
...@@ -25,7 +25,7 @@ struct GEdgeSigned ...@@ -25,7 +25,7 @@ struct GEdgeSigned
int getSign(){ return _sign; } int getSign(){ return _sign; }
}; };
class GEdgeLoop class GEdgeLoop
{ {
private: private:
std::list<GEdgeSigned> loop; std::list<GEdgeSigned> loop;
...@@ -39,7 +39,7 @@ class GEdgeLoop ...@@ -39,7 +39,7 @@ class GEdgeLoop
inline citer end() const { return loop.end(); } inline citer end() const { return loop.end(); }
inline void erase(iter it){ loop.erase(it); } inline void erase(iter it){ loop.erase(it); }
int count(GEdge*) const; int count(GEdge*) const;
int count() const { return loop.size(); } int count() const { return (int)loop.size(); }
}; };
#endif #endif
...@@ -111,8 +111,8 @@ class GEntity { ...@@ -111,8 +111,8 @@ class GEntity {
}; };
enum MeshGenerationStatus { enum MeshGenerationStatus {
PENDING, PENDING,
DONE, DONE,
FAILED FAILED
}; };
...@@ -192,7 +192,7 @@ class GEntity { ...@@ -192,7 +192,7 @@ class GEntity {
virtual std::list<GVertex*> vertices() const { return std::list<GVertex*>(); } virtual std::list<GVertex*> vertices() const { return std::list<GVertex*>(); }
// for python, temporary solution while iterator are not binded // for python, temporary solution while iterator are not binded
std::vector<GRegion*> bindingsGetRegions() { std::vector<GRegion*> bindingsGetRegions() {
std::list<GRegion*> r = regions(); // NOTE : two-line to dont create two different lists with diff pointers std::list<GRegion*> r = regions(); // NOTE : two-line to dont create two different lists with diff pointers
return std::vector<GRegion*> (r.begin(), r.end()); return std::vector<GRegion*> (r.begin(), r.end());
} }
...@@ -257,7 +257,7 @@ class GEntity { ...@@ -257,7 +257,7 @@ class GEntity {
return physicals; return physicals;
} }
// returns the tag of the entity that its master entity (for mesh) // returns the tag of the entity that its master entity (for mesh)
int meshMaster() const; int meshMaster() const;
void setMeshMaster(int m); void setMeshMaster(int m);
...@@ -270,7 +270,7 @@ class GEntity { ...@@ -270,7 +270,7 @@ class GEntity {
// get/set the visibility flag // get/set the visibility flag
virtual char getVisibility(); virtual char getVisibility();
virtual void setVisibility(char val, bool recursive=false){ _visible = val; } virtual void setVisibility(char val, bool recursive=false){ _visible = val; }
// get/set the selection flag // get/set the selection flag
virtual char getSelection(){ return _selection; } virtual char getSelection(){ return _selection; }
virtual void setSelection(char val){ _selection = val; } virtual void setSelection(char val){ _selection = val; }
...@@ -310,7 +310,7 @@ class GEntity { ...@@ -310,7 +310,7 @@ class GEntity {
void setAllElementsVisible(bool val){ _allElementsVisible = val ? 1 : 0; } void setAllElementsVisible(bool val){ _allElementsVisible = val ? 1 : 0; }
// get the number of mesh vertices in the entity // get the number of mesh vertices in the entity
unsigned int getNumMeshVertices() { return mesh_vertices.size(); } unsigned int getNumMeshVertices() { return (int)mesh_vertices.size(); }
// get the mesh vertex at the given index // get the mesh vertex at the given index
MVertex *getMeshVertex(unsigned int index) { return mesh_vertices[index]; } MVertex *getMeshVertex(unsigned int index) { return mesh_vertices[index]; }
......
...@@ -17,13 +17,13 @@ ...@@ -17,13 +17,13 @@
class MFace { class MFace {
private: private:
std::vector<MVertex *> _v; std::vector<MVertex *> _v;
std::vector<char> _si; // sorted indices std::vector<char> _si; // sorted indices
public: public:
MFace() {} MFace() {}
MFace(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3=0); MFace(MVertex *v0, MVertex *v1, MVertex *v2, MVertex *v3=0);
MFace(const std::vector<MVertex*> v); MFace(const std::vector<MVertex*> v);
inline int getNumVertices() const { return _v.size(); } inline int getNumVertices() const { return (int)_v.size(); }
inline MVertex *getVertex(const int i) const { return _v[i]; } inline MVertex *getVertex(const int i) const { return _v[i]; }
inline MVertex *getSortedVertex(const int i) const { return _v[int(_si[i])]; } inline MVertex *getSortedVertex(const int i) const { return _v[int(_si[i])]; }
inline MEdge getEdge(const int i) const inline MEdge getEdge(const int i) const
...@@ -46,7 +46,7 @@ class MFace { ...@@ -46,7 +46,7 @@ class MFace {
SVector3 normal() const; SVector3 normal() const;
SVector3 tangent(int num) const SVector3 tangent(int num) const
{ {
SVector3 t0(_v[1]->x() - _v[0]->x(), SVector3 t0(_v[1]->x() - _v[0]->x(),
_v[1]->y() - _v[0]->y(), _v[1]->y() - _v[0]->y(),
_v[1]->z() - _v[0]->z()); _v[1]->z() - _v[0]->z());
t0.normalize(); t0.normalize();
...@@ -87,13 +87,13 @@ class MFace { ...@@ -87,13 +87,13 @@ class MFace {
const double ff[4] = {(1 - u) * (1. - v), const double ff[4] = {(1 - u) * (1. - v),
(1 + u) * (1. - v), (1 + u) * (1. - v),
(1 + u) * (1. + v), (1 + u) * (1. + v),
(1 - u) * (1. + v)}; (1 - u) * (1. + v)};
for(int i = 0; i < n; i++) { for(int i = 0; i < n; i++) {
MVertex *v = getVertex(i); MVertex *v = getVertex(i);
p[0] += v->x() * ff[i] * .25; p[0] += v->x() * ff[i] * .25;
p[1] += v->y() * ff[i] * .25; p[1] += v->y() * ff[i] * .25;
p[2] += v->z() * ff[i] * .25; p[2] += v->z() * ff[i] * .25;
} }
} }
else else
Msg::Error("Cannot interpolate inside a polygonal MFace with more than 4 edges"); Msg::Error("Cannot interpolate inside a polygonal MFace with more than 4 edges");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment