getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] r5398 - in /trunk/getfem/src: getfem/bgeot_small_vector


From: Yves . Renard
Subject: [Getfem-commits] r5398 - in /trunk/getfem/src: getfem/bgeot_small_vector.h getfem_generic_assembly.cc
Date: Sun, 09 Oct 2016 19:09:03 -0000

Author: renard
Date: Sun Oct  9 21:09:02 2016
New Revision: 5398

URL: http://svn.gna.org/viewcvs/getfem?rev=5398&view=rev
Log:
minor change

Modified:
    trunk/getfem/src/getfem/bgeot_small_vector.h
    trunk/getfem/src/getfem_generic_assembly.cc

Modified: trunk/getfem/src/getfem/bgeot_small_vector.h
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem/bgeot_small_vector.h?rev=5398&r1=5397&r2=5398&view=diff
==============================================================================
--- trunk/getfem/src/getfem/bgeot_small_vector.h        (original)
+++ trunk/getfem/src/getfem/bgeot_small_vector.h        Sun Oct  9 21:09:02 2016
@@ -394,7 +394,7 @@
   template <class VEC_CONT>
   void vectors_to_base_matrix(base_matrix &G, const VEC_CONT &a) {
     size_type P = (*(a.begin())).size(), NP = a.end() - a.begin();
-    G.resize(P, NP);
+    G.base_resize(P, NP);
     typename VEC_CONT::const_iterator it = a.begin(), ite = a.end();
     base_matrix::iterator itm = G.begin();
     for (; it != ite; ++it, itm += P)

Modified: trunk/getfem/src/getfem_generic_assembly.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_generic_assembly.cc?rev=5398&r1=5397&r2=5398&view=diff
==============================================================================
--- trunk/getfem/src/getfem_generic_assembly.cc (original)
+++ trunk/getfem/src/getfem_generic_assembly.cc Sun Oct  9 21:09:02 2016
@@ -11744,13 +11744,22 @@
       size_type old_cv = size_type(-1);
       bgeot::pgeometric_trans pgt = 0;
       pintegration_method pim = 0;
+      papprox_integration pai = 0;
       bgeot::pstored_point_tab pspt = 0, old_pspt = 0;
       bool first_gp = true;
       for (getfem::mr_visitor v(rg, m); !v.finished(); ++v) {
         if (mim.convex_index().is_in(v.cv())) {
           // cout << "proceed with element " << v.cv() << endl;
           if (v.cv() != old_cv) {
-            bgeot::vectors_to_base_matrix(G, m.points_of_convex(v.cv()));
+
+           // const bgeot::mesh_structure::ind_cv_ct 
&ct=m.ind_points_of_convex(v.cv());
+           // G.base_resize(m.dim(), ct.size());
+           // auto it = G.begin();
+           // for (size_type i = 0; i < ct.size(); ++i, it += m.dim())
+           //   std::copy(m.points()[ct[i]].begin(),  m.points()[ct[i]].end(), 
it);
+
+           
+           bgeot::vectors_to_base_matrix(G, m.points_of_convex(v.cv()));
             pgt = m.trans_of_convex(v.cv());
             up.resize(G.nrows());
             un.resize(pgt->dim());
@@ -11758,20 +11767,19 @@
             if (pim->type() == IM_NONE) continue;
             GMM_ASSERT1(pim->type() == IM_APPROX, "Sorry, exact methods cannot 
"
                         "be used in high level generic assembly");
-
-            pspt = pim->approx_method()->pintegration_points();
+           pai = pim->approx_method();
+            pspt = pai->pintegration_points();
             if (pspt->size()) {
-              if (gis.ctx.have_pgp() && gis.pai == pim->approx_method() &&
-                  gis.ctx.pgt() == pgt) {
+              if (gis.ctx.have_pgp() && gis.pai == pai && gis.ctx.pgt()==pgt) {
                 gis.ctx.change(gis.ctx.pgp(), 0, 0, G, v.cv(), v.f());
               } else {
-                if (pim->approx_method()->is_built_on_the_fly()) {
+                if (pai->is_built_on_the_fly()) {
                   gis.ctx.change(pgt, 0, (*pspt)[0], G, v.cv(), v.f());
                 } else {
                   gis.ctx.change(gis.gp_pool(pgt, pspt), 0,0, G, v.cv(), 
v.f());
                 }
               }
-              gis.pai = pim->approx_method();
+              gis.pai = pai;
               if (gis.need_elt_size)
                 gis.elt_size = m.convex_radius_estimate(v.cv())*scalar_type(2);
             }
@@ -11783,11 +11791,11 @@
          if (pspt != old_pspt) { first_gp = true; old_pspt = pspt; }
           if (pspt->size()) {
             // iterations on Gauss points
-            gis.nbpt = gis.pai->nb_points_on_convex();
+            gis.nbpt = pai->nb_points_on_convex();
             size_type first_ind = 0;
             if (v.f() != short_type(-1)) {
-              gis.nbpt = gis.pai->nb_points_on_face(v.f());
-              first_ind = gis.pai->ind_first_point_on_face(v.f());
+              gis.nbpt = pai->nb_points_on_face(v.f());
+              first_ind = pai->ind_first_point_on_face(v.f());
             }
             for (gis.ipt = 0; gis.ipt < gis.nbpt; ++(gis.ipt)) {
               if (gis.ctx.have_pgp()) gis.ctx.set_ii(first_ind+gis.ipt);
@@ -11805,7 +11813,7 @@
                   gis.Normal = up;
                 } else gis.Normal.resize(0);
               }
-              gis.coeff = J * gis.pai->coeff(first_ind+gis.ipt);
+              gis.coeff = J * pai->coeff(first_ind+gis.ipt);
               if (first_gp) {
                for (size_type j = 0; j < gilb.size(); ++j) j+=gilb[j]->exec();
                first_gp = false;




reply via email to

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