[SCM] Gmsh packaging. Gmsh is an automatic 3D finite element mesh generator. branch, master, updated. debian/2.5.1_beta2_svn12375_dfsg-1-4-g8ffce57
Anton Gladky
gladky.anton at gmail.com
Tue Jun 19 20:46:53 UTC 2012
The following commit has been merged in the master branch:
commit e3079c407623daa06c4a9f57ea708019f58a346d
Author: Anton Gladky <gladky.anton at gmail.com>
Date: Tue Jun 19 22:43:25 2012 +0200
Refresh patches, remove applied by upstream.
diff --git a/debian/patches/alauzet.patch b/debian/patches/alauzet.patch
deleted file mode 100644
index 0d635ac..0000000
--- a/debian/patches/alauzet.patch
+++ /dev/null
@@ -1,295 +0,0 @@
-Description: <short summary of the patch>
-Author: Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>
-Reviewed-by: Anton Gladky <gladky.anton at gmail.com>
-Last-Update: <YYYY-MM-DD>
-
---- a/Geo/STensor3.h
-+++ b/Geo/STensor3.h
-@@ -171,6 +171,8 @@
- // compute the largest inscribed ellipsoid...
- SMetric3 intersection (const SMetric3 &m1,
- const SMetric3 &m2);
-+SMetric3 intersection_alauzet (const SMetric3 &m1,
-+ const SMetric3 &m2);
- SMetric3 interpolation (const SMetric3 &m1,
- const SMetric3 &m2,
- const double t);
---- a/Geo/STensor3.cpp
-+++ b/Geo/STensor3.cpp
-@@ -38,6 +38,27 @@
- return iv;
- }
-
-+SMetric3 intersection_alauzet (const SMetric3 &m1, const SMetric3 &m2)
-+{
-+ SMetric3 im1 = m1.invert();
-+ fullMatrix<double> V(3,3);
-+ fullVector<double> S(3);
-+ im1 *= m2;
-+ im1.eig(V,S,true);
-+ SVector3 v0(V(0,0),V(1,0),V(2,0));
-+ SVector3 v1(V(0,1),V(1,1),V(2,1));
-+ SVector3 v2(V(0,2),V(1,2),V(2,2));
-+ // is this required??
-+ v0.normalize();
-+ v1.normalize();
-+ v2.normalize();
-+ double l0 = std::max(dot(v0,m1,v0),dot(v0,m2,v0));
-+ double l1 = std::max(dot(v1,m1,v1),dot(v1,m2,v1));
-+ double l2 = std::max(dot(v2,m1,v2),dot(v2,m2,v2));
-+ SMetric3 iv(l0,l1,l2,v0,v1,v2);
-+ return iv;
-+}
-+
- // preserve orientation of m1 !!!
- SMetric3 intersection_conserveM1 (const SMetric3 &m1, const SMetric3 &m2)
- {
---- a/Mesh/Field.cpp
-+++ b/Mesh/Field.cpp
-@@ -479,6 +479,55 @@
- }
- };
-
-+class SphereField : public Field
-+{
-+ double v_in, v_out;
-+ double xc,yc,zc;
-+ double R;
-+
-+ public:
-+ std::string getDescription()
-+ {
-+ return "The value of this field is VIn inside a sphere, VOut outside. "
-+ "The sphere is given by\n\n"
-+ " ||dX||^2 < R^2 &&\n"
-+ " dX = (X - XC)^2 + (Y-YC)^2 + (Z-ZC)^2";
-+ }
-+ SphereField()
-+ {
-+ v_in = v_out = xc = yc = zc = R = 0;
-+
-+ options["VIn"] = new FieldOptionDouble
-+ (v_in, "Value inside the sphere");
-+ options["VOut"] = new FieldOptionDouble
-+ (v_out, "Value outside the sphere");
-+
-+ options["XCenter"] = new FieldOptionDouble
-+ (xc, "X coordinate of the sphere center");
-+ options["YCenter"] = new FieldOptionDouble
-+ (yc, "Y coordinate of the sphere center");
-+ options["ZCenter"] = new FieldOptionDouble
-+ (zc, "Z coordinate of the sphere center");
-+
-+
-+ options["Radius"] = new FieldOptionDouble
-+ (R,"Radius");
-+
-+ }
-+ const char *getName()
-+ {
-+ return "Sphere";
-+ }
-+ double operator() (double x, double y, double z, GEntity *ge=0)
-+ {
-+ double dx = x-xc;
-+ double dy = y-yc;
-+ double dz = z-zc;
-+
-+ return ( (dx*dx + dy*dy + dz*dz < R*R) ) ? v_in : v_out;
-+ }
-+};
-+
- class FrustumField : public Field
- {
- double x1,y1,z1;
-@@ -1280,17 +1329,21 @@
- }
- virtual void operator() (double x, double y, double z, SMetric3 &metr, GEntity *ge=0)
- {
-+ std::cout << "MinAnisoField idlist=" << idlist.size() << "\n";
- SMetric3 v (1./MAX_LC);
- for(std::list<int>::iterator it = idlist.begin(); it != idlist.end(); it++) {
- Field *f = (GModel::current()->getFields()->get(*it));
-+ std::cout << "Field[" << *it << "]\n";
- SMetric3 ff;
- if(f && *it != id) {
- if (f->isotropic()){
- double l = (*f) (x, y, z, ge);
- ff = SMetric3(1./(l*l));
-+ //printf("ff=[%g %g %g %g %g %g]\n",ff(0,0),ff(1,1),ff(2,2),ff(0,1),ff(0,2),ff(1,2));
- }
- else{
- (*f) (x, y, z, ff, ge);
-+ //printf("ff_iso=[%g %g %g %g %g %g]\n",ff(0,0),ff(1,1),ff(2,2),ff(0,1),ff(0,2),ff(1,2));
- }
- v = intersection_conserve_mostaniso(v,ff);
- }
-@@ -1328,6 +1381,77 @@
- }
- };
-
-+class IntersectAnisoField : public Field
-+{
-+ std::list<int> idlist;
-+ public:
-+ IntersectAnisoField()
-+ {
-+ options["FieldsList"] = new FieldOptionList
-+ (idlist, "Field indices", &update_needed);
-+ }
-+ virtual bool isotropic () const {return false;}
-+ std::string getDescription()
-+ {
-+ return "Take the intersection of 2 anisotropic fields according to Alauzet.";
-+ }
-+ virtual void operator() (double x, double y, double z, SMetric3 &metr, GEntity *ge=0)
-+ {
-+ // check if idlist contains 2 elements other error message
-+ SMetric3 v;
-+ for(std::list<int>::iterator it = idlist.begin(); it != idlist.end(); it++) {
-+ Field *f = (GModel::current()->getFields()->get(*it));
-+ SMetric3 ff;
-+ if(f && *it != id) {
-+ if (f->isotropic()){
-+ double l = (*f) (x, y, z, ge);
-+ ff = SMetric3(1./(l*l));
-+ }
-+ else{
-+ (*f) (x, y, z, ff, ge);
-+ }
-+ if (it == idlist.begin())
-+ v = ff;
-+ else
-+ v = intersection_alauzet(v,ff);
-+ }
-+ }
-+ metr = v;
-+ }
-+ double operator() (double x, double y, double z, GEntity *ge=0)
-+ {
-+ // check if idlist contains 2 elements other error message
-+ SMetric3 metr;
-+ double v = MAX_LC;
-+ for(std::list<int>::iterator it = idlist.begin(); it != idlist.end(); it++) {
-+ Field *f = (GModel::current()->getFields()->get(*it));
-+ SMetric3 m;
-+ if(f && *it != id){
-+ if (!f->isotropic()){
-+ (*f)(x, y, z, m, ge);
-+ }
-+ else {
-+ double L = (*f)(x, y, z, ge);
-+ for (int i = 0; i < 3; i++)
-+ m(i,i) = 1. / (L*L);
-+ }
-+ }
-+ if (it == idlist.begin())
-+ metr = m;
-+ else
-+ metr = intersection_alauzet(metr,m);
-+ }
-+ fullMatrix<double> V(3,3);
-+ fullVector<double> S(3);
-+ metr.eig(V, S, 1);
-+ return sqrt(1./S(2)); //S(2) is largest eigenvalue
-+ }
-+ const char *getName()
-+ {
-+ return "IntersectAniso";
-+ }
-+};
-+
- class MinField : public Field
- {
- std::list<int> idlist;
-@@ -1346,7 +1470,18 @@
- double v = MAX_LC;
- for(std::list<int>::iterator it = idlist.begin(); it != idlist.end(); it++) {
- Field *f = (GModel::current()->getFields()->get(*it));
-- if(f && *it != id) v = std::min(v, (*f) (x, y, z, ge));
-+ if(f && *it != id) {
-+ if (f->isotropic())
-+ v = std::min(v, (*f) (x, y, z, ge));
-+ else{
-+ SMetric3 ff;
-+ (*f) (x, y, z, ff, ge);
-+ fullMatrix<double> V(3,3);
-+ fullVector<double> S(3);
-+ ff.eig(V, S, 1);
-+ v = std::min(v, sqrt(1./S(2))); //S(2) is largest eigenvalue
-+ }
-+ }
- }
- return v;
- }
-@@ -1374,7 +1509,18 @@
- double v = -MAX_LC;
- for(std::list<int>::iterator it = idlist.begin(); it != idlist.end(); it++) {
- Field *f = (GModel::current()->getFields()->get(*it));
-- if(f && *it != id) v = std::max(v, (*f) (x, y, z, ge));
-+ if(f && *it != id) {
-+ if (f->isotropic())
-+ v = std::max(v, (*f) (x, y, z, ge));
-+ else{
-+ SMetric3 ff;
-+ (*f) (x, y, z, ff, ge);
-+ fullMatrix<double> V(3,3);
-+ fullVector<double> S(3);
-+ ff.eig(V, S, 1);
-+ v = std::max(v, sqrt(1./S(0))); //S(0) is smallest eigenvalue
-+ }
-+ }
- }
- return v;
- }
-@@ -2032,6 +2178,7 @@
- #endif
- map_type_name["Box"] = new FieldFactoryT<BoxField>();
- map_type_name["Cylinder"] = new FieldFactoryT<CylinderField>();
-+ map_type_name["Sphere"] = new FieldFactoryT<SphereField>();
- map_type_name["Frustum"] = new FieldFactoryT<FrustumField>();
- map_type_name["LonLat"] = new FieldFactoryT<LonLatField>();
- #if defined(HAVE_POST)
-@@ -2041,6 +2188,7 @@
- map_type_name["Restrict"] = new FieldFactoryT<RestrictField>();
- map_type_name["Min"] = new FieldFactoryT<MinField>();
- map_type_name["MinAniso"] = new FieldFactoryT<MinAnisoField>();
-+ map_type_name["IntersectAniso"] = new FieldFactoryT<IntersectAnisoField>();
- map_type_name["Max"] = new FieldFactoryT<MaxField>();
- map_type_name["UTM"] = new FieldFactoryT<UTMField>();
- map_type_name["Laplacian"] = new FieldFactoryT<LaplacianField>();
---- a/Mesh/BackgroundMesh.cpp
-+++ b/Mesh/BackgroundMesh.cpp
-@@ -402,6 +402,7 @@
- double U, double V,
- double X, double Y, double Z)
- {
-+ std::cout << "BGM\n";
- // default lc (mesh size == size of the model)
- double l1 = CTX::instance()->lc;
- const double max_lc = CTX::instance()->mesh.lcMax;
-@@ -419,11 +420,15 @@
- // lc from fields
- SMetric3 l4(1./(max_lc*max_lc));
- FieldManager *fields = ge->model()->getFields();
-+ //std::cout << "backgroundfield=" << fields->getBackgroundField() << "\n";
- if(fields->getBackgroundField() > 0){
- Field *f = fields->get(fields->getBackgroundField());
-+ //std::cout << "isotropic=" << f->isotropic() << "\n";
- if(f){
-+ //std::cout << "isotropic=" << f->isotropic() << "\n";
- if (!f->isotropic()){
- (*f)(X, Y, Z, l4,ge);
-+ //printf("l=[%g %g %g %g %g %g]\n",l4(0,0),l4(1,1),l4(2,2),l4(0,1),l4(0,2),l4(1,2));
- /*
- if (ge->tag() == 3){
- printf("X = %12.5E , l4 = %12.5E %12.5E %12.5E l2 = %12.5E\n",X,l4(0,0),l4(1,1),l4(0,1),l2);
-@@ -450,7 +455,7 @@
-
- SMetric3 LC(1./(lc*lc));
- SMetric3 m = intersection_conserveM1(intersection_conserveM1 (l4, LC),l3);
-- //printf("%g %g %g %g %g %g\n",m(0,0),m(1,1),m(2,2),m(0,1),m(0,2),m(1,2));
-+ //printf("m=[%g %g %g %g %g %g]\n",m(0,0),m(1,1),m(2,2),m(0,1),m(0,2),m(1,2));
- {
- fullMatrix<double> V(3,3);
- fullVector<double> S(3);
diff --git a/debian/patches/change_shared_library_name.patch b/debian/patches/change_shared_library_name.patch
index cb9395a..a0cb89e 100644
--- a/debian/patches/change_shared_library_name.patch
+++ b/debian/patches/change_shared_library_name.patch
@@ -4,7 +4,7 @@ Last-Update: 2011-12-09
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1017,7 +1017,7 @@
+@@ -1027,7 +1027,7 @@
# want to build the lib we need to recompile everything (the first
# time--it's a separate target)
add_library(lib STATIC EXCLUDE_FROM_ALL ${GMSH_SRC})
@@ -13,7 +13,7 @@ Last-Update: 2011-12-09
if(MSVC)
set_target_properties(lib PROPERTIES DEBUG_POSTFIX d)
if(ENABLE_MSVC_STATIC_RUNTIME)
-@@ -1027,7 +1027,7 @@
+@@ -1037,7 +1037,7 @@
# shared library target: we don't build it by default either
add_library(shared SHARED EXCLUDE_FROM_ALL ${GMSH_SRC})
diff --git a/debian/patches/delete_gl2ps_from_source.patch b/debian/patches/delete_gl2ps_from_source.patch
index 03aa2f1..f310afd 100644
--- a/debian/patches/delete_gl2ps_from_source.patch
+++ b/debian/patches/delete_gl2ps_from_source.patch
@@ -14,7 +14,7 @@ Last-Update: 2011-12-09
gl2png.cpp
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1050,7 +1050,7 @@
+@@ -1060,7 +1060,7 @@
add_executable(gmsh_dynamic EXCLUDE_FROM_ALL Common/Main.cpp)
target_link_libraries(gmsh_dynamic shared)
endif(HAVE_FLTK)
diff --git a/debian/patches/fix_FTBFS_linking.patch b/debian/patches/fix_FTBFS_linking.patch
index ef870d4..9821688 100644
--- a/debian/patches/fix_FTBFS_linking.patch
+++ b/debian/patches/fix_FTBFS_linking.patch
@@ -4,7 +4,7 @@ Last-Update: 2012-04-08
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1051,7 +1051,7 @@
+@@ -1061,7 +1061,7 @@
message("WARNING: By enabling ENABLE_MSVC_STATIC_RUNTIME, shared library wont link. "
"Change in msvc /MT flag to /MD in the shared project properties")
endif(MSVC AND ENABLE_MSVC_STATIC_RUNTIME)
diff --git a/debian/patches/pedantic.patch b/debian/patches/pedantic.patch
index 03fdea7..6b1b05e 100644
--- a/debian/patches/pedantic.patch
+++ b/debian/patches/pedantic.patch
@@ -3,9 +3,9 @@ Author: Christophe Trophime <christophe.trophime at lncmi.cnrs.fr>
Reviewed-by: Anton Gladky <gladky.anton at gmail.com>
Last-Update: 2012-03-11
---- gmsh-2.5.1~beta2~svn12143~dfsg.orig/Geo/STensor3.h
-+++ gmsh-2.5.1~beta2~svn12143~dfsg/Geo/STensor3.h
-@@ -334,7 +334,7 @@ inline SVector3 operator* (const STensor
+--- a/Geo/STensor3.h
++++ b/Geo/STensor3.h
+@@ -332,7 +332,7 @@
for (int j=0; j<3; j++)
temp[i]+= t(i,j)*v[j];
return temp;
@@ -14,7 +14,7 @@ Last-Update: 2012-03-11
inline SVector3 operator* (const SVector3& v, const STensor3& t){
SVector3 temp(0.,0.,0.);
-@@ -342,7 +342,7 @@ inline SVector3 operator* (const SVector
+@@ -340,7 +340,7 @@
for (int j=0; j<3; j++)
temp[j]+= v[i]*t(i,j);
return temp;
diff --git a/debian/patches/series b/debian/patches/series
index 55aa53d..8213b23 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,6 +5,5 @@ delete_gl2ps_from_source.patch
switch_from_opencascade_to_oce.patch
api_demos.patch
fix_FTBFS_linking.patch
-alauzet.patch
cgns.patch
pedantic.patch
diff --git a/debian/patches/skip_license_file.patch b/debian/patches/skip_license_file.patch
index 7b2081d..224ed4d 100644
--- a/debian/patches/skip_license_file.patch
+++ b/debian/patches/skip_license_file.patch
@@ -4,7 +4,7 @@ Last-Update: 2011-12-09
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -1098,7 +1098,7 @@
+@@ -1102,7 +1102,7 @@
endif(UNIX)
set(WELCOME_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/WELCOME.txt)
@@ -13,7 +13,7 @@ Last-Update: 2011-12-09
set(CREDITS_FILE ${CMAKE_CURRENT_SOURCE_DIR}/doc/CREDITS.txt)
file(GLOB TUTORIAL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/tutorial/?*.*)
file(GLOB DEMO_FILES ${CMAKE_CURRENT_SOURCE_DIR}/demos/?*.*)
-@@ -1193,7 +1193,7 @@
+@@ -1197,7 +1197,7 @@
if(MAKEINFO AND TEXI2PDF)
add_custom_target(doc COMMAND ${CMAKE_COMMAND} -E tar zcf
${CMAKE_CURRENT_BINARY_DIR}/gmsh-${GMSH_VERSION}-doc.tgz
--
Gmsh packaging. Gmsh is an automatic 3D finite element mesh generator.
More information about the debian-science-commits
mailing list