getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] r5427 - in /trunk/getfem: doc/sphinx/source/userdoc/ sr


From: Yves . Renard
Subject: [Getfem-commits] r5427 - in /trunk/getfem: doc/sphinx/source/userdoc/ src/ src/getfem/
Date: Wed, 19 Oct 2016 18:11:52 -0000

Author: renard
Date: Wed Oct 19 20:11:51 2016
New Revision: 5427

URL: http://svn.gna.org/viewcvs/getfem?rev=5427&view=rev
Log:
small fix

Modified:
    trunk/getfem/doc/sphinx/source/userdoc/gasm_high.rst
    trunk/getfem/src/getfem/getfem_mesh_region.h
    trunk/getfem/src/getfem_mesh_fem.cc
    trunk/getfem/src/getfem_mesh_region.cc

Modified: trunk/getfem/doc/sphinx/source/userdoc/gasm_high.rst
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/doc/sphinx/source/userdoc/gasm_high.rst?rev=5427&r1=5426&r2=5427&view=diff
==============================================================================
--- trunk/getfem/doc/sphinx/source/userdoc/gasm_high.rst        (original)
+++ trunk/getfem/doc/sphinx/source/userdoc/gasm_high.rst        Wed Oct 19 
20:11:51 2016
@@ -790,7 +790,7 @@
 Storage of sub-expressions in a getfem::im_data object during assembly
 ----------------------------------------------------------------------
 
-It is possible to store in a vector depending on a getfem::im_data object a 
part of an assembly computation, for instance to use this compuation in another 
assembly. This is an alternative to the interpolation functions which allows 
not to compute twice the same expression.
+It is possible to store in a vector depending on a getfem::im_data object a 
part of an assembly computation, for instance in order to use this computation 
in another assembly. This is an alternative to the interpolation functions 
which allows not to compute twice the same expression.
 
 The method to add such an assignment in the assembly is the following for a 
model or a ga_workspace::
 
@@ -804,11 +804,12 @@
 assigned to the data `dataname` which has to be of im_data type.
 `order` represents the order of assembly where this assignement has to be
 done (potential(0), weak form(1) or tangent system(2) or at each
-order(-1)). The default value is 1 which means at each order.
-If before = 1, the the assignement is perfromed before the computation
+order(-1)). The default value is 1.
+If before = 1, the the assignement is performed before the computation
 of the other assembly terms, such that the data can be used in the
 remaining of the assembly as an intermediary result (be careful that it is
-still considered as a data, no derivation of the expression is performed).
+still considered as a data, no derivation of the expression is performed for
+the tangent system).
 If before = 0 (default), the assignement is done after the assembly terms.
 
 Additionally, In a model, the method::

Modified: trunk/getfem/src/getfem/getfem_mesh_region.h
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/getfem_mesh_region.h?rev=5427&r1=5426&r2=5427&view=diff
==============================================================================
--- trunk/getfem/src/getfem/getfem_mesh_region.h        (original)
+++ trunk/getfem/src/getfem/getfem_mesh_region.h        Wed Oct 19 20:11:51 2016
@@ -270,28 +270,7 @@
       size_type is_face() const { return f_ != 0; }
       short_type f() const { return short_type(f_-1); }
 
-      bool next() 
-      {
-       if (whole_mesh) {
-         if (itb == iteb) { finished_=true; return false; }
-         cv_ = itb.index();
-         c = 0;
-         f_ = 0;
-         ++itb; while (itb != iteb && !(*itb)) ++itb;
-         return true;
-       }
-       while (c.none()) 
-       {
-         if (it == ite) { finished_=true; return false; }
-         cv_ = it->first;
-         c   = it->second;  
-         f_ = short_type(-1);
-         ++it; 
-         if (c.none()) continue;
-       }
-       next_face();
-       return true;
-      }
+      bool next();
       bool operator++() { return next(); }
 
       bool finished() const { return finished_; }

Modified: trunk/getfem/src/getfem_mesh_fem.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_mesh_fem.cc?rev=5427&r1=5426&r2=5427&view=diff
==============================================================================
--- trunk/getfem/src/getfem_mesh_fem.cc (original)
+++ trunk/getfem/src/getfem_mesh_fem.cc Wed Oct 19 20:11:51 2016
@@ -75,7 +75,6 @@
   dal::bit_vector mesh_fem::basic_dof_on_region(const mesh_region &b) const {
     context_check(); if (!dof_enumeration_made) this->enumerate_dof();
     dal::bit_vector res;
-    cout << "region = " << b << endl;
     for (getfem::mr_visitor v(b,linked_mesh()); !v.finished(); ++v) {
       size_type cv = v.cv();
       if (convex_index().is_in(cv)) {

Modified: trunk/getfem/src/getfem_mesh_region.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_mesh_region.cc?rev=5427&r1=5426&r2=5427&view=diff
==============================================================================
--- trunk/getfem/src/getfem_mesh_region.cc      (original)
+++ trunk/getfem/src/getfem_mesh_region.cc      Wed Oct 19 20:11:51 2016
@@ -556,6 +556,28 @@
     }
   }
 
+  bool mesh_region::visitor::next() 
+  {
+    if (whole_mesh) {
+      if (itb == iteb) { finished_ = true; return false; }
+      cv_ = itb.index();
+      c = 0;
+      f_ = 0;
+      ++itb; while (itb != iteb && !(*itb)) ++itb;
+      return true;
+    }
+    while (c.none()) 
+      {
+       if (it == ite) { finished_=true; return false; }
+       cv_ = it->first;
+       c   = it->second;  
+       f_ = short_type(-1);
+       ++it; 
+       if (c.none()) continue;
+      }
+    next_face();
+    return true;
+  }
 
   mesh_region::visitor::visitor(const mesh_region &s) :
     cv_(size_type(-1)), f_(short_type(-1)), finished_(false) 
@@ -567,6 +589,7 @@
   {
     whole_mesh = true;
     itb = bv.begin(); iteb = bv.end();
+    while (itb != iteb && !(*itb)) ++itb;
     next();
   }
 
@@ -584,15 +607,20 @@
   {
     if (w.id() == size_type(-1))
       os << " ALL_CONVEXES";
-    else 
+    else if (w.p.get())
+    {
       for (mr_visitor cv(w); !cv.finished(); cv.next()) 
-      {
-        os << cv.cv();
-        if (cv.is_face()) os << "/" << cv.f();
-        os << " ";
-      }
-
-      return os;
+       {
+         os << cv.cv();
+         if (cv.is_face()) os << "/" << cv.f();
+         os << " ";
+       }
+    }
+    else
+    {
+      os << " region " << w.id();
+    }
+    return os;
   }
 
   struct dummy_mesh_region_ {




reply via email to

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