getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Yves Renard
Subject: [Getfem-commits] (no subject)
Date: Fri, 30 Jun 2017 07:51:51 -0400 (EDT)

branch: master
commit 7de420432caa1a6539dce055951af869b1cae127
Author: Yves Renard <address@hidden>
Date:   Fri Jun 30 13:03:17 2017 +0200

    last changes for version 5.2
---
 bin/extract_doc                            |  2 +-
 doc/doxygen/Doxyfile                       |  2 +-
 doc/sphinx/source/.templates/download.html |  8 ++--
 doc/sphinx/source/replaces.txt             |  4 +-
 doc/sphinx/source/whatsnew/5.2.rst         |  2 +-
 extract_gmm++                              |  4 +-
 interface/src/python/getfem_python.c       |  2 +-
 src/getfem_generic_assembly.cc             | 60 +++++++++++++++++++-----------
 8 files changed, 50 insertions(+), 34 deletions(-)

diff --git a/bin/extract_doc b/bin/extract_doc
index 66a785e..b6648b8 100755
--- a/bin/extract_doc
+++ b/bin/extract_doc
@@ -1573,7 +1573,7 @@ elif (option == 'python-com' or option == 
'python-com-par'):
 #
 # Python GetFEM++ interface
 #
-# Copyright (C) 2004-2016 Yves Renard, Julien Pommier.
+# Copyright (C) 2004-2017 Yves Renard, Julien Pommier.
 #
 # This file is a part of GetFEM++
 #
diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile
index 7e4dceb..d461e3d 100644
--- a/doc/doxygen/Doxyfile
+++ b/doc/doxygen/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME           = GetFEM++
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER         = 5.1
+PROJECT_NUMBER         = 5.2
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
diff --git a/doc/sphinx/source/.templates/download.html 
b/doc/sphinx/source/.templates/download.html
index 7113978..c8430f5 100644
--- a/doc/sphinx/source/.templates/download.html
+++ b/doc/sphinx/source/.templates/download.html
@@ -20,19 +20,17 @@ Public License, either version 3 of the license or any 
later version along with
   <tr><th>Format</th><th>Packed as .tar.gz</th></tr>
   <tr>
     <td>{{ project }} stable </td>
-    <td><a 
href="http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.1.tar.gz";>getfem-5.1.tar.gz</a></td>
+    <td><a 
href="http://download-mirror.savannah.gnu.org/releases/getfem/stable/getfem-5.2.tar.gz";>getfem-5.2.tar.gz</a></td>
   </tr>
   <tr>
     <td>Gmm++ standalone</td>
-    <td><a 
href="http://download-mirror.savannah.gnu.org/releases/getfem/stable/gmm-5.1.tar.gz";>gmm-5.1.tar.gz</a></td>
+    <td><a 
href="http://download-mirror.savannah.gnu.org/releases/getfem/stable/gmm-5.2.tar.gz";>gmm-5.2.tar.gz</a></td>
   </tr>
 </table>
 
 <p>For older releases, look <a 
href="http://download-mirror.savannah.gnu.org/releases/getfem/stable";>here</a>.</p>
 
-<p>Building a portable C++ library is not an easy task. We try to build it 
with many
-combinations of OS and compilers. The last stable version has been tested on 
the following
-configurations:<p>
+<p>Building a portable C++ library is not an easy task. We try to build it 
with many combinations of OS and compilers. The last stable version has been 
tested on the following configurations:<p>
 
 <ul>
   <li>Linux with g++ (versions 4.8 to 7.1) </li>
diff --git a/doc/sphinx/source/replaces.txt b/doc/sphinx/source/replaces.txt
index ce73281..9cf67ab 100644
--- a/doc/sphinx/source/replaces.txt
+++ b/doc/sphinx/source/replaces.txt
@@ -17,8 +17,8 @@
 .. |sLU| replace:: *SuperLU*
 .. |mumps| replace:: *MUMPS*
 .. |sphinx| replace:: *Sphinx*
-.. |version| replace:: 5.1
-.. |licyears| replace:: 2004-2016
+.. |version| replace:: 5.2
+.. |licyears| replace:: 2004-2017
 .. |gfi| replace:: *getfem-interface*
 .. |m| replace:: `mesh`
 .. |mls| replace:: `mesh_level_set`
diff --git a/doc/sphinx/source/whatsnew/5.2.rst 
b/doc/sphinx/source/whatsnew/5.2.rst
index 7938a57..a0b1926 100644
--- a/doc/sphinx/source/whatsnew/5.2.rst
+++ b/doc/sphinx/source/whatsnew/5.2.rst
@@ -6,7 +6,7 @@
 
 The main contribution of this release is the sharp optimization of the high 
level generic assembly. Speed up in assembly time can be very important. The 
first pyramidal elements were also designed.
 
-Released version, 2016/06/29.
+Released version, 2017/06/30.
 
 The main changes are:
 
diff --git a/extract_gmm++ b/extract_gmm++
index 4b8bfbd..2efdcfe 100755
--- a/extract_gmm++
+++ b/extract_gmm++
@@ -1,3 +1,4 @@
+# -*- perl -*-
 #  Copyright (C) 1999-2017 Yves Renard
 #
 #  This file is a part of GetFEM++
@@ -15,13 +16,12 @@
 #  along  with  this program;  if not, write to the Free Software Foundation,
 #  Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA.
 
-# -*- perl -*-
 eval 'exec perl -S $0 "$@"'
   if 0;
 
 $getfem_root = ".";
 $MAJOR_VERSION = "5";
-$MINOR_VERSION = "1";
+$MINOR_VERSION = "2";
 # $DATE_VERSION = -`date +%Y%m%d`;
 # $DATE_VERSION = ".0";
 
diff --git a/interface/src/python/getfem_python.c 
b/interface/src/python/getfem_python.c
index ad08299..e01c70e 100644
--- a/interface/src/python/getfem_python.c
+++ b/interface/src/python/getfem_python.c
@@ -778,7 +778,7 @@ getfem_env(PyObject *self, PyObject *args) {
     word_out = PyString_FromString("GetFEM++");
   } else if (strcmp(word_in,"copyright") == 0) {
     word_out = PyString_FromString
-    ("2004-2016 GetFEM++ project");
+    ("2004-2017 GetFEM++ project");
   } else if (strcmp(word_in,"authors") == 0) {
     word_out = PyString_FromString
     ("Yves Renard, Julien Pommier");
diff --git a/src/getfem_generic_assembly.cc b/src/getfem_generic_assembly.cc
index 58eb4b0..289adf2 100644
--- a/src/getfem_generic_assembly.cc
+++ b/src/getfem_generic_assembly.cc
@@ -3332,11 +3332,12 @@ namespace getfem {
                          "Wrong size for coeff vector");
          for (size_type q = 0; q < qdim; ++q) {
            auto itZ = Z.begin(); auto it = t.begin() + q;
-           for (size_type k = 0; k < N; ++k, it += qdim) {
+           for (size_type k = 0; k < N; ++k) {
+             if (k)  it += qdim;
              auto itc = coeff.begin() + q;
-             *it = (*itc) * (*itZ++); itc += qdim;
-             for (size_type j = 1; j < ndof; ++j, itc += qdim)
-               *it += (*itc) * (*itZ++);
+             *it = (*itc) * (*itZ++);
+             for (size_type j = 1; j < ndof; ++j)
+               { itc += qdim; *it += (*itc) * (*itZ++); }
            }
          }
        } else {
@@ -3485,7 +3486,8 @@ namespace getfem {
            
            // Performs t(i*Qmult+j, k*Qmult + j) = Z(i,k);
            auto it = t.begin();
-           for (size_type i = 0; i < ndof; ++i, ++itZ, it += Qmult) {
+           for (size_type i = 0; i < ndof; ++i, ++itZ) {
+             if (i) it += Qmult;
              auto it2 = it;
              *it2 = *itZ;
              for (size_type j = 1; j < Qmult; ++j) { it2 += sss; *it2 = *itZ; }
@@ -3501,7 +3503,8 @@ namespace getfem {
            // Performs t(i*Qmult+j, k*Qmult + j) = Z(i,k);
            for (size_type k = 0; k < target_dim; ++k) {
              auto it = t.begin() + (ss * k);
-             for (size_type i = 0; i < ndof; ++i, ++itZ, it += Qmult) {
+             for (size_type i = 0; i < ndof; ++i, ++itZ) {
+               if (i) it += Qmult;
                auto it2 = it;
                *it2 = *itZ;
                for (size_type j = 1; j < Qmult; ++j)
@@ -3542,7 +3545,8 @@ namespace getfem {
            // Performs t(i*Qmult+j, k*Qmult + j, l) = Z(i,k,l);
            for (size_type l = 0; l < N; ++l) {
              base_tensor::iterator it = t.begin() + (ssss*l);
-             for (size_type i = 0; i < ndof; ++i, ++itZ, it += Qmult) {
+             for (size_type i = 0; i < ndof; ++i, ++itZ) {
+               if (i) it += Qmult;
                base_tensor::iterator it2 = it;
                *it2 = *itZ;
                for (size_type j = 1; j < Qmult; ++j) { it2+=sss; *it2=*itZ; }
@@ -3562,7 +3566,8 @@ namespace getfem {
            for (size_type l = 0; l < N; ++l)
              for (size_type k = 0; k < target_dim; ++k) {
                base_tensor::iterator it = t.begin() + (ss * k + ssss*l);
-               for (size_type i = 0; i < ndof; ++i, ++itZ, it += Qmult) {
+               for (size_type i = 0; i < ndof; ++i, ++itZ) {
+                 if (i) it += Qmult;
                  base_tensor::iterator it2 = it;
                  *it2 = *itZ;
                  for (size_type j = 1; j < Qmult; ++j) { it2+=sss; *it2=*itZ; }
@@ -3596,7 +3601,8 @@ namespace getfem {
       
       // Performs t(i*qdim+j, k*qdim + j) = Z(i,k);
       auto it = t.begin();
-      for (size_type i = 0; i < ndof; ++i, ++itZ, it += qdim) {
+      for (size_type i = 0; i < ndof; ++i, ++itZ) {
+       if (i) it += qdim;
        auto it2 = it;
        *it2 = *itZ;
        for (size_type j = 1; j < qdim; ++j) { it2 += sss; *it2 = *itZ; }
@@ -3624,7 +3630,8 @@ namespace getfem {
       // Performs t(i*qdim+j, k*qdim + j, l) = Z(i,k,l);
       for (size_type l = 0; l < N; ++l) {
        base_tensor::iterator it = t.begin() + (ssss*l);
-       for (size_type i = 0; i < ndof; ++i, ++itZ, it += qdim) {
+       for (size_type i = 0; i < ndof; ++i, ++itZ) {
+         if (i) it += qdim;
          base_tensor::iterator it2 = it;
          *it2 = *itZ;
          for (size_type j = 1; j < qdim; ++j) { it2+=sss; *it2=*itZ; }
@@ -3658,7 +3665,8 @@ namespace getfem {
         size_type NNdim = Z.sizes()[2]*target_dim;
         for (size_type klm = 0; klm < NNdim; ++klm) {
           base_tensor::iterator it = t.begin() + (ss * klm);
-          for (size_type i = 0; i < ndof; ++i, ++itZ, it += Qmult) {
+          for (size_type i = 0; i < ndof; ++i, ++itZ) {
+           if (i) it += Qmult;
             base_tensor::iterator it2 = it;
             *it2 = *itZ;
             for (size_type j = 1; j < Qmult; ++j) { it2 += sss; *it2 = *itZ; }
@@ -4777,9 +4785,11 @@ namespace getfem {
       auto it = t.begin(), it1 = tc1.begin();
       for (size_type i = 0; i < s1; ++i, ++it1) {
        auto it2 = tc2.begin();
-               for (size_type j = 0; j < s2_q; ++j, it2+=q) {
+               for (size_type j = 0; j < s2_q; ++j) {
+         if (j) it2+=q;
          auto itt1 = it1;
-         for (size_type l = 0; l < q; ++l, ++it, itt1 += s1) {
+         for (size_type l = 0; l < q; ++l, ++it) {
+           if (l) itt1 += s1;
            auto ittt1 = itt1, ittt2 = it2;
            *it = *ittt1 * (*ittt2);
            for (size_type m = 1; m < n; ++m) {
@@ -4815,9 +4825,11 @@ namespace getfem {
       auto it = t.begin(), it1 = tc1.begin();
       for (size_type i = 0; i < s1; ++i, ++it1) {
        auto it2 = tc2.begin();
-               for (size_type j = 0; j < s2_q; ++j, it2+=q) {
+               for (size_type j = 0; j < s2_q; ++j) {
+         if (j) it2+=q;
          auto itt1 = it1;
-         for (size_type l = 0; l < q; ++l, ++it, itt1 += s1) {
+         for (size_type l = 0; l < q; ++l, ++it) {
+           if (l) itt1 += s1;
            auto ittt1 = itt1, ittt2 = it2;
            *it = *ittt1 * (*ittt2);
            for (size_type m = 1; m < N; ++m) {
@@ -4847,9 +4859,11 @@ namespace getfem {
       auto it = t.begin(), it1 = tc1.begin();
       for (size_type i = 0; i < s1; ++i, ++it1) {
        auto it2 = tc2.begin();
-               for (size_type j = 0; j < s2_q; ++j, it2+=Q) {
+               for (size_type j = 0; j < s2_q; ++j) {
+         if (j) it2+=Q;
          auto itt1 = it1;
-         for (size_type l = 0; l < Q; ++l, ++it, itt1 += s1) {
+         for (size_type l = 0; l < Q; ++l, ++it) {
+           if (l) itt1 += s1;
            auto ittt1 = itt1, ittt2 = it2;
            *it = *ittt1 * (*ittt2);
            for (size_type m = 1; m < N; ++m) {
@@ -4973,7 +4987,8 @@ namespace getfem {
       auto it = t.begin(), it1 = tc1.begin();
       for (size_type i = 0; i < s1; ++i, ++it1) {
        auto it2 = tc2.begin();
-       for (size_type j = 0; j < s2_n; ++j, it2 += nn) {
+       for (size_type j = 0; j < s2_n; ++j) {
+         if (j) it2 += nn;
          auto itt1 = it1;
          *it++ = (*itt1) * (*it2);
          for (size_type k = 1; k < nn; ++k)
@@ -5032,9 +5047,11 @@ namespace getfem {
 
       // std::fill(t.begin(), t.end(), scalar_type(0)); // Factorized
       auto it2 = tc2.begin();
-      for (size_type j = 0; j < ss2; ++j, it2 += nn) {
+      for (size_type j = 0; j < ss2; ++j) {
+       if (j) it2 += nn;
        auto it1 = tc1.begin(), it = t.begin() + j*nn;
-       for (size_type i = 0; i < ss1; ++i, it1 += nn, it += s2*nn) {
+       for (size_type i = 0; i < ss1; ++i) {
+         if (i) { it1 += nn, it += s2*nn; }
                  scalar_type a = (*it1) * (*it2);
          auto itt = it;
          *itt = a; itt += s2_1; *itt = a;
@@ -6473,7 +6490,8 @@ namespace getfem {
     // qsort(&(dofs1_sort[0]), s1, sizeof(size_type), compare_my_indices);
 
     base_vector::const_iterator it = elem.cbegin();
-    for (size_type j = 0; j < s2; ++j, it += s1) { // Iteration on columns
+    for (size_type j = 0; j < s2; ++j) { // Iteration on columns
+      if (j) it += s1;
       std::vector<gmm::elt_rsvector_<scalar_type>> &col = K[dofs2[j]];
       size_type nb = col.size();
       



reply via email to

[Prev in Thread] Current Thread [Next in Thread]