getfem-commits
[Top][All Lists]
Advanced

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

[Getfem-commits] r4905 - in /trunk/getfem: interface/src/gf_compute.cc s


From: logari81
Subject: [Getfem-commits] r4905 - in /trunk/getfem: interface/src/gf_compute.cc src/getfem_generic_assembly.cc src/gmm/gmm_sub_vector.h
Date: Wed, 25 Mar 2015 11:58:58 -0000

Author: logari81
Date: Wed Mar 25 12:58:57 2015
New Revision: 4905

URL: http://svn.gna.org/viewcvs/getfem?rev=4905&view=rev
Log:
improve documentation and error messages

Modified:
    trunk/getfem/interface/src/gf_compute.cc
    trunk/getfem/src/getfem_generic_assembly.cc
    trunk/getfem/src/gmm/gmm_sub_vector.h

Modified: trunk/getfem/interface/src/gf_compute.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/interface/src/gf_compute.cc?rev=4905&r1=4904&r2=4905&view=diff
==============================================================================
--- trunk/getfem/interface/src/gf_compute.cc    (original)
+++ trunk/getfem/interface/src/gf_compute.cc    Wed Mar 25 12:58:57 2015
@@ -550,13 +550,15 @@
       
       
       
-    /address@hidden E = ('convect', @tmf mf_v, @dvec V, @scalar dt, @int nt[, 
@str option[, @dvec per_min, @dvec per_max]])
+    /address@hidden ('convect', @tmf mf_v, @dvec V, @scalar dt, @int nt[, @str 
option[, @dvec per_min, @dvec per_max]])
     Compute a convection of `U` with regards to a steady state velocity
-    field `V` with a Characteristic-Galerkin method. This
-    method is restricted to pure Lagrange fems for U. `mf_v` should represent
-    a continuous finite element method. `dt` is the integration time and `nt`
-    is the number of integration step on the caracteristics. `option` is an
-    option for the part of the boundary where there is a re-entrant convection.
+    field `V` with a Characteristic-Galerkin method. The result is returned
+    in-place in `U`.
+    This method is restricted to pure Lagrange fems for U. `mf_v` should
+    represent a continuous finite element method. `dt` is the integration time
+    and `nt` is the number of integration step on the caracteristics. `option`
+    is an option for the part of the boundary where there is a re-entrant
+    convection.
     `option = 'extrapolation'` for an extrapolation on the nearest element,
     `option = 'unchanged'` for a constant value on that boundary or
     `option = 'periodicity'` for a peridiodic boundary. For this latter option

Modified: trunk/getfem/src/getfem_generic_assembly.cc
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/getfem_generic_assembly.cc?rev=4905&r1=4904&r2=4905&view=diff
==============================================================================
--- trunk/getfem/src/getfem_generic_assembly.cc (original)
+++ trunk/getfem/src/getfem_generic_assembly.cc Wed Mar 25 12:58:57 2015
@@ -8163,9 +8163,10 @@
 
        case GA_PLUS:
          if (pnode->t.size() == 1) {
-           GA_DEBUG_ASSERT(pnode->nb_test_functions() == 0 &&
-                           child0->t.size() == 1 && child1->t.size() == 1,
-                           "Internal error");
+           GA_DEBUG_ASSERT(pnode->nb_test_functions() == 0,
+                           "Internal error: non zero number of test 
functions");
+           GA_DEBUG_ASSERT(child0->t.size() == 1, "Internal error: child0 not 
scalar");
+           GA_DEBUG_ASSERT(child1->t.size() == 1, "Internal error: child1 not 
scalar");
            pgai = new ga_instruction_scalar_add
              (pnode->t[0], child0->t[0], child1->t[0]);
          } else {
@@ -8176,9 +8177,10 @@
 
        case GA_MINUS:
          if (pnode->t.size() == 1) {
-           GA_DEBUG_ASSERT(pnode->nb_test_functions() == 0 &&
-                           child0->t.size() == 1 && child1->t.size() == 1,
-                           "Internal error");
+           GA_DEBUG_ASSERT(pnode->nb_test_functions() == 0,
+                           "Internal error: non zero number of test 
functions");
+           GA_DEBUG_ASSERT(child0->t.size() == 1, "Internal error: child0 not 
scalar");
+           GA_DEBUG_ASSERT(child1->t.size() == 1, "Internal error: child1 not 
scalar");
            pgai = new ga_instruction_scalar_sub
              (pnode->t[0], child0->t[0], child1->t[0]);
          } else {

Modified: trunk/getfem/src/gmm/gmm_sub_vector.h
URL: 
http://svn.gna.org/viewcvs/getfem/trunk/getfem/src/gmm/gmm_sub_vector.h?rev=4905&r1=4904&r2=4905&view=diff
==============================================================================
--- trunk/getfem/src/gmm/gmm_sub_vector.h       (original)
+++ trunk/getfem/src/gmm/gmm_sub_vector.h       Wed Mar 25 12:58:57 2015
@@ -534,7 +534,8 @@
     typename sub_vector_type<const V *, SUBI>::vector_type,
     typename sub_vector_type<V *, SUBI>::vector_type, const V *>::return_type
   sub_vector(const V &v, const SUBI &si) {
-    GMM_ASSERT2(si.last() <= vect_size(v), "sub vector too large");
+    GMM_ASSERT2(si.last() <= vect_size(v),
+                "sub vector too large, " << si.last() << " > " << 
vect_size(v));
     return typename select_return<
       typename sub_vector_type<const V *, SUBI>::vector_type,
       typename sub_vector_type<V *, SUBI>::vector_type, const V *>::return_type
@@ -546,7 +547,8 @@
     typename sub_vector_type<const V *, SUBI>::vector_type,
     typename sub_vector_type<V *, SUBI>::vector_type, V *>::return_type
   sub_vector(V &v, const SUBI &si) {
-    GMM_ASSERT2(si.last() <= vect_size(v), "sub vector too large");
+    GMM_ASSERT2(si.last() <= vect_size(v),
+                "sub vector too large, " << si.last() << " > " << 
vect_size(v));
     return  typename select_return<
       typename sub_vector_type<const V *, SUBI>::vector_type,
       typename sub_vector_type<V *, SUBI>::vector_type, V *>::return_type




reply via email to

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