getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] r5098 - in /trunk/getfem: doc/sphinx/source/.templates/


From: logari81
Subject: [Getfem-commits] r5098 - in /trunk/getfem: doc/sphinx/source/.templates/ interface/src/ src/
Date: Thu, 15 Oct 2015 12:02:56 -0000

Author: logari81
Date: Thu Oct 15 14:02:55 2015
New Revision: 5098

URL: http://svn.gna.org/viewcvs/getfem?rev=5098&view=rev
Log:
support im_data on boundaries in generic assembly + some minor changes

Modified:
    trunk/getfem/doc/sphinx/source/.templates/download.html
    trunk/getfem/interface/src/gf_mesh_fem.cc
    trunk/getfem/src/getfem_generic_assembly.cc
    trunk/getfem/src/getfem_models.cc

Modified: trunk/getfem/doc/sphinx/source/.templates/download.html
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/doc/sphinx/source/.templates/download.html?rev=5098&r1=5097&r2=5098&view=diff
==============================================================================
--- trunk/getfem/doc/sphinx/source/.templates/download.html     (original)
+++ trunk/getfem/doc/sphinx/source/.templates/download.html     Thu Oct 15 
14:02:55 2015
@@ -42,7 +42,7 @@
   ({{ project }} only -- see specific notes for the matlab interface)</li>
 </ul>
 
-<p>Concerning the compilation on MacOS X, the simplest seems to install the 
package qhull and eventually the sequential version of Mumps with the package 
manager Homebrew. For the python interface, python 2 should be installed with 
numpy and scipy packages (you can use pip to install them). The compilation of 
the python interface may fail. Go to interface/src/python directory and try to 
add the right libraries to build the _getfem.so dynamic library.
+<p>Concerning the compilation on MacOS X, the simplest seems to be to install 
the package qhull and the sequential version of Mumps with the package manager 
Homebrew. For the python interface, python 2 should be installed with numpy and 
scipy packages (you can use pip to install them). The compilation of the python 
interface may fail. Go to interface/src/python directory and try to add the 
right libraries to build the _getfem.so dynamic library.
 </p>
 
 <p>You can find some help on how to build the Matlab interface on <a 
href="http://windhoff.net/wiki/how_to/build_getfem_matlab_toolbox_on_windows_xp";>Windows
 XP</a> and <a 
href="http://windhoff.net/wiki/how_to/build_getfem_matlab_toolbox_on_ubuntu_linux";>Ubuntu</a>
 on the page of Mirko Windhoff.

Modified: trunk/getfem/interface/src/gf_mesh_fem.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/interface/src/gf_mesh_fem.cc?rev=5098&r1=5097&r2=5098&view=diff
==============================================================================
--- trunk/getfem/interface/src/gf_mesh_fem.cc   (original)
+++ trunk/getfem/interface/src/gf_mesh_fem.cc   Thu Oct 15 14:02:55 2015
@@ -270,8 +270,8 @@
     else bad_cmd(init_cmd);
 
   } else if (check_cmd("MeshFem", "MeshFem", m_in, m_out, 1, 7, 0, 1)) {
-    /* Documentation iof the commande moved in first position to appear first
-       in the documentation. */
+    /* Documentation of the command moved to the beginning so that it appears
+       first in the documentation. */
     mm = m_in.pop().to_getfemint_mesh();
     bgeot::multi_index mi;
     dim_type qdim = 1;

Modified: trunk/getfem/src/getfem_generic_assembly.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_generic_assembly.cc?rev=5098&r1=5097&r2=5098&view=diff
==============================================================================
--- trunk/getfem/src/getfem_generic_assembly.cc (original)
+++ trunk/getfem/src/getfem_generic_assembly.cc Thu Oct 15 14:02:55 2015
@@ -1980,12 +1980,12 @@
 
   class ga_predef_function {
     size_type ftype_; // 0 : C++ function with C++ derivative(s)
-                     // 1 : function defined by an string expression.
+                      // 1 : function defined by an string expression.
 
     size_type dtype_; // 0 : no derivative(s)
-                     // 1 : derivative(s) given by C++ functions
-                     // 2 : derivatives(s) given by string expression(s)
-                     // 3 : derivatives(s) to be symbolically computed.
+                      // 1 : derivative(s) given by C++ functions
+                      // 2 : derivatives(s) given by string expression(s)
+                      // 3 : derivatives(s) to be symbolically computed.
     size_type nbargs_;         // One or two arguments
     pscalar_func_onearg f1_;   // Function pointer for a one argument function
     pscalar_func_twoargs f2_;  // Function pointer for a two arguments function
@@ -2529,7 +2529,8 @@
                           const std::string &der1, const std::string &der2) {
     PREDEF_FUNCTIONS[name] = ga_predef_function(f, 1, der1, der2);
     ga_predef_function &F = PREDEF_FUNCTIONS[name];
-    if (der1.size() == 0 || der2.size() == 0) F.dtype_ = 0;
+    if (der1.size() == 0 || der2.size() == 0)
+      F.dtype_ = 0;
     else if (!(ga_function_exists(der1)) || !(ga_function_exists(der2)))
       F.dtype_ = 2;
   }
@@ -2568,8 +2569,6 @@
         GMM_ASSERT1(imd.linked_mesh_im().int_method_of_element(cv)
                     ->approx_method() == pai, "Im data have to be used only "
                     "on their original integration method.");
-        GMM_ASSERT1(!(ctx.is_on_face()),
-                    "Im data cannot be used on boundaries");
       }
       size_type ipt = imd.filtered_index_of_point(cv, ctx.ii());
       GMM_ASSERT1(ipt != size_type(-1),
@@ -6653,7 +6652,7 @@
                              << child1->tensor_proper_size(0) << ","
                              << child1->tensor_proper_size(1) << ").");
           } else ga_throw_error(expr, pnode->pos,
-                                 "Unauthorized multiplication.");
+                                "Unauthorized multiplication.");
           pnode->t.adjust_sizes(mi);
           // Simplifications
           if (child0->tensor_is_zero() || child1->tensor_is_zero()) {
@@ -9118,13 +9117,13 @@
           pgai = 0;
           switch (pnode->node_type) {
           case GA_NODE_VAL: case GA_NODE_ELEMENTARY_VAL:
-             if (rmi.base.find(mf) == rmi.base.end() ||
-                !(if_hierarchy.is_compatible(rmi.base_hierarchy[mf]))) {
+            if (rmi.base.find(mf) == rmi.base.end() ||
+               !(if_hierarchy.is_compatible(rmi.base_hierarchy[mf]))) {
               rmi.base_hierarchy[mf].push_back(if_hierarchy);
               pgai = new ga_instruction_val_base
                 (rmi.base[mf], gis.ctx, *mf, rmi.pfps[mf]);
-             }
-             break;
+            }
+            break;
           case GA_NODE_XFEM_PLUS_VAL:
             if (rmi.xfem_plus_base.find(mf) == rmi.xfem_plus_base.end() ||
              !(if_hierarchy.is_compatible(rmi.xfem_plus_base_hierarchy[mf]))) {
@@ -10828,15 +10827,20 @@
     size_type s;
 
     virtual const bgeot::stored_point_tab &
-    points_for_element(size_type cv, short_type /*f*/,
+    points_for_element(size_type cv, short_type f,
                        std::vector<size_type> &ind) const {
       pintegration_method pim =imd.linked_mesh_im().int_method_of_element(cv);
       if (pim->type() == IM_NONE) return *(bgeot::pstored_point_tab(0));
       GMM_ASSERT1(pim->type() == IM_APPROX, "Sorry, exact methods cannot "
                   "be used in high level generic assembly");
-      for (size_type i = 0;
-           i < pim->approx_method()->nb_points_on_convex(); ++i)
-        ind.push_back(i);
+      size_type i_start(0), i_end(0);
+      if (f == short_type(-1))
+        i_end = pim->approx_method()->nb_points_on_convex();
+      else {
+        i_start = pim->approx_method()->ind_first_point_on_face(f);
+        i_end = i_start + pim->approx_method()->nb_points_on_face(f);
+      }
+      for (size_type i = i_start; i < i_end; ++i) ind.push_back(i);
       return pim->approx_method()->integration_points();
     }
 

Modified: trunk/getfem/src/getfem_models.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_models.cc?rev=5098&r1=5097&r2=5098&view=diff
==============================================================================
--- trunk/getfem/src/getfem_models.cc   (original)
+++ trunk/getfem/src/getfem_models.cc   Thu Oct 15 14:02:55 2015
@@ -3403,7 +3403,7 @@
                 "Split the brick.");
 
     if (vl_test1.size()) {
-      pbrick pbr = new gen_linear_assembly_brick(expr, mim,is_sym, is_coercive,
+      pbrick pbr = new gen_linear_assembly_brick(expr, mim, is_sym, 
is_coercive,
                                                  brickname,
                                                  vl_test1, vl_test2);
       model::termlist tl;




reply via email to

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