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

this will be removed later

parent 085d4e02
No related branches found
No related tags found
No related merge requests found
// $Id: CommandLine.cpp,v 1.99 2007-04-26 09:47:37 remacle Exp $ // $Id: CommandLine.cpp,v 1.100 2007-05-05 02:08:57 geuzaine Exp $
// //
// Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle // Copyright (C) 1997-2007 C. Geuzaine, J.-F. Remacle
// //
...@@ -83,6 +83,7 @@ void Print_Usage(char *name){ ...@@ -83,6 +83,7 @@ void Print_Usage(char *name){
Msg(DIRECT, " -o file Specify mesh output file name"); Msg(DIRECT, " -o file Specify mesh output file name");
Msg(DIRECT, " -format string Set output mesh format (msh, msh1, msh2, unv, vrml, stl, mesh,"); Msg(DIRECT, " -format string Set output mesh format (msh, msh1, msh2, unv, vrml, stl, mesh,");
Msg(DIRECT, " bdf, p3d, cgns, med)"); Msg(DIRECT, " bdf, p3d, cgns, med)");
Msg(DIRECT, " -bin Use binary format when available");
Msg(DIRECT, " -algo string Select mesh algorithm (iso, netgen, tetgen)"); Msg(DIRECT, " -algo string Select mesh algorithm (iso, netgen, tetgen)");
Msg(DIRECT, " -smooth int Set number of mesh smoothing steps"); Msg(DIRECT, " -smooth int Set number of mesh smoothing steps");
Msg(DIRECT, " -optimize Optimize quality of tetrahedral elements"); Msg(DIRECT, " -optimize Optimize quality of tetrahedral elements");
...@@ -425,6 +426,10 @@ void Get_Options(int argc, char *argv[]) ...@@ -425,6 +426,10 @@ void Get_Options(int argc, char *argv[])
exit(1); exit(1);
} }
} }
else if(!strcmp(argv[i] + 1, "bin")) {
i++;
CTX.mesh.stl_binary = CTX.mesh.msh_binary = 1;
}
else if(!strcmp(argv[i] + 1, "algo")) { else if(!strcmp(argv[i] + 1, "algo")) {
i++; i++;
if(argv[i] != NULL) { if(argv[i] != NULL) {
......
#include "GModel.h" #include "GModel.h"
#include "fourierFace.h" #include "GVertex.h"
#include "GEdge.h"
#include "GFace.h"
#include "gmshFace.h" #include "gmshFace.h"
#include "Message.h" #include "Message.h"
#include "Context.h" #include "Context.h"
#include "Views.h" #include "Views.h"
#include "Range.h"
#include "model.h"
#include "meshGFace.h"
extern Context_T CTX; extern Context_T CTX;
#if defined(HAVE_FOURIER_MODEL) #if defined(HAVE_FOURIER_MODEL)
#include "model.h"
#include "meshGFace.h"
static model *FM = 0; static model *FM = 0;
class fourierVertex : public GVertex {
private:
MVertex *_v;
public:
fourierVertex(GModel *m, MVertex *v) : GVertex(m, v->getNum()), _v(v)
{
mesh_vertices.push_back(v);
}
virtual ~fourierVertex() {}
virtual GPoint point() const { return GPoint(_v->x(), _v->y(), _v->z(), this); }
virtual double x() const { return _v->x(); }
virtual double y() const { return _v->y(); }
virtual double z() const { return _v->z(); }
virtual double prescribedMeshSizeAtVertex() const { return 0.1; }
ModelType getNativeType() const { return FourierModel; }
};
class fourierEdge : public GEdge {
public:
fourierEdge(GModel *m, int num, GVertex *v1, GVertex *v2);
virtual ~fourierEdge() {}
double period() const { throw ; }
virtual bool periodic(int dim=0) const { return false; }
virtual Range<double> parBounds(int i) const { throw; }
virtual GeomType geomType() const { throw; }
virtual bool degenerate(int) const { return false; }
virtual bool continuous(int dim) const { return true; }
virtual GPoint point(double p) const { throw; }
virtual GPoint closestPoint(const SPoint3 & queryPoint) { throw; }
virtual int containsPoint(const SPoint3 &pt) const { throw; }
virtual int containsParam(double pt) const { throw; }
virtual SVector3 firstDer(double par) const { throw; }
virtual SPoint2 reparamOnFace(GFace * face, double epar, int dir) const { throw; }
virtual double parFromPoint(const SPoint3 &pt) const { throw; }
virtual int minimumMeshSegments () const { throw; }
virtual int minimumDrawSegments () const { throw; }
ModelType getNativeType() const { return FourierModel; }
};
class fourierFace : public GFace {
private:
// flag to know if is the face is already meshed
int _discrete;
// floag to know if the face is just a plane
int _plane;
// vertices and edges purely local to the face (not shared with the model)
GVertex *_v[4];
GEdge *_e[4];
public:
fourierFace(GModel *m, int num);
fourierFace(GFace *f, std::vector<MVertex*> &loop, std::vector<MVertex*> &hole);
virtual ~fourierFace();
void meshBoundary();
Range<double> parBounds(int i) const;
virtual int paramDegeneracies(int dir, double *par) { return 0; }
virtual GPoint point(double par1, double par2) const;
virtual GPoint closestPoint(const SPoint3 & queryPoint) const ;
virtual int containsPoint(const SPoint3 &pt) const;
virtual int containsParam(const SPoint2 &pt) const;
virtual SVector3 normal(const SPoint2 &param) const;
virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const {throw;}
virtual GEntity::GeomType geomType() const;
virtual int geomDirection() const { return 1; }
virtual bool continuous(int dim) const { return true; }
virtual bool periodic(int dim) const { return false; }
virtual bool degenerate(int dim) const { return false; }
virtual double period(int dir) const {throw;}
ModelType getNativeType() const { return FourierModel; }
void * getNativePtr() const {throw;}
virtual bool surfPeriodic(int dim) const {throw;}
virtual SPoint2 parFromPoint(const SPoint3 &) const;
};
void debugVertices(std::vector<MVertex*> &vertices, std::string file, void debugVertices(std::vector<MVertex*> &vertices, std::string file,
bool parametric, int num=0) bool parametric, int num=0)
{ {
......
#ifndef _FOURIER_MODEL_H_
#define _FOURIER_MODEL_H_
#include "GModel.h"
#if defined(HAVE_FOURIER_MODEL)
#include "GVertex.h"
#include "GEdge.h"
#include "GFace.h"
#include "Range.h"
class fourierVertex : public GVertex {
private:
MVertex *_v;
public:
fourierVertex(GModel *m, MVertex *v) : GVertex(m, v->getNum()), _v(v)
{
mesh_vertices.push_back(v);
}
virtual ~fourierVertex() {}
virtual GPoint point() const { return GPoint(_v->x(), _v->y(), _v->z(), this); }
virtual double x() const { return _v->x(); }
virtual double y() const { return _v->y(); }
virtual double z() const { return _v->z(); }
virtual double prescribedMeshSizeAtVertex() const { return 0.1; }
ModelType getNativeType() const { return FourierModel; }
};
class fourierEdge : public GEdge {
public:
fourierEdge(GModel *m, int num, GVertex *v1, GVertex *v2);
virtual ~fourierEdge() {}
double period() const { throw ; }
virtual bool periodic(int dim=0) const { return false; }
virtual Range<double> parBounds(int i) const { throw; }
virtual GeomType geomType() const { throw; }
virtual bool degenerate(int) const { return false; }
virtual bool continuous(int dim) const { return true; }
virtual GPoint point(double p) const { throw; }
virtual GPoint closestPoint(const SPoint3 & queryPoint) { throw; }
virtual int containsPoint(const SPoint3 &pt) const { throw; }
virtual int containsParam(double pt) const { throw; }
virtual SVector3 firstDer(double par) const { throw; }
virtual SPoint2 reparamOnFace(GFace * face, double epar, int dir) const { throw; }
virtual double parFromPoint(const SPoint3 &pt) const { throw; }
virtual int minimumMeshSegments () const { throw; }
virtual int minimumDrawSegments () const { throw; }
ModelType getNativeType() const { return FourierModel; }
};
class fourierFace : public GFace {
private:
// flag to know if is the face is already meshed
int _discrete;
// floag to know if the face is just a plane
int _plane;
// vertices and edges purely local to the face (not shared with the model)
GVertex *_v[4];
GEdge *_e[4];
public:
fourierFace(GModel *m, int num);
fourierFace(GFace *f, std::vector<MVertex*> &loop, std::vector<MVertex*> &hole);
virtual ~fourierFace();
void meshBoundary();
Range<double> parBounds(int i) const;
virtual int paramDegeneracies(int dir, double *par) { return 0; }
virtual GPoint point(double par1, double par2) const;
virtual GPoint closestPoint(const SPoint3 & queryPoint) const ;
virtual int containsPoint(const SPoint3 &pt) const;
virtual int containsParam(const SPoint2 &pt) const;
virtual SVector3 normal(const SPoint2 &param) const;
virtual Pair<SVector3,SVector3> firstDer(const SPoint2 &param) const {throw;}
virtual GEntity::GeomType geomType() const;
virtual int geomDirection() const { return 1; }
virtual bool continuous(int dim) const { return true; }
virtual bool periodic(int dim) const { return false; }
virtual bool degenerate(int dim) const { return false; }
virtual double period(int dir) const {throw;}
ModelType getNativeType() const { return FourierModel; }
void * getNativePtr() const {throw;}
virtual bool surfPeriodic(int dim) const {throw;}
virtual SPoint2 parFromPoint(const SPoint3 &) const;
};
#endif
#endif
...@@ -20,6 +20,8 @@ Save all elements (discard physical group definitions) ...@@ -20,6 +20,8 @@ Save all elements (discard physical group definitions)
Specify mesh output file name Specify mesh output file name
@item -format string @item -format string
Set output mesh format (msh, unv, vrml, stl, mesh, bdf, p3d, cgns, med) Set output mesh format (msh, unv, vrml, stl, mesh, bdf, p3d, cgns, med)
@item -bin
Use binary format when available
@item -algo string @item -algo string
Select mesh algorithm (iso, netgen, tetgen) Select mesh algorithm (iso, netgen, tetgen)
@item -smooth int @item -smooth int
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment