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: Sat, 30 Sep 2017 04:48:42 -0400 (EDT)

branch: master
commit 84041971d92d3d6d68a90d8a9cce2fc5da7b3520
Author: Yves Renard <address@hidden>
Date:   Sat Sep 30 10:41:31 2017 +0200

    doc fixes for std::vector output with gmm
---
 doc/sphinx/source/gmm/blas.rst       | 4 ++--
 doc/sphinx/source/gmm/first-step.rst | 4 ++--
 doc/sphinx/source/gmm/misc.rst       | 2 +-
 doc/sphinx/source/whatsnew/5.2.rst   | 4 ++++
 4 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/doc/sphinx/source/gmm/blas.rst b/doc/sphinx/source/gmm/blas.rst
index a23c646..b21ef1c 100644
--- a/doc/sphinx/source/gmm/blas.rst
+++ b/doc/sphinx/source/gmm/blas.rst
@@ -54,10 +54,10 @@ addition of vectors or matrices. It is alway possible to 
mix different type of v
   gmm::clear(V1);
   ...
   gmm::add(V1, V2); // V1 + V2 --> V2
-  cout << V2;
+  cout << gmm::vref(V2);
 
   gmm::add(V1, gmm::scaled(V2, -2.0), V2); // V1 - 2.0 * V2 --> V2
-  cout << V2;
+  cout << gmm::vref(V2);
 
   gmm::row_matrix< std::vector<double> > M1(10, 10);
   gmm::col_matrix< gmm::wsvector<double> > M2(1000, 1000);
diff --git a/doc/sphinx/source/gmm/first-step.rst 
b/doc/sphinx/source/gmm/first-step.rst
index d691a26..d3950e4 100644
--- a/doc/sphinx/source/gmm/first-step.rst
+++ b/doc/sphinx/source/gmm/first-step.rst
@@ -48,7 +48,7 @@ You have more than one possibility to solve a linear system. 
If you have a dense
 
   gmm::mult(M, X, Bagain);
 
-  std::cout << M << " times " << X << " is equal to " << Bagain << endl;
+  std::cout << M << " times " << gmm::vref(X) << " is equal to " << 
gmm::vref(Bagain) << endl;
 
 
 If, now, you have a sparse system coming for example from a pde 
discretization, you have various iterative solvers, with or without 
preconditioners. This is an example with a precontionned GMRES::
@@ -68,7 +68,7 @@ If, now, you have a sparse system coming for example from a 
pde discretization,
 
   gmm::gmres(M, X, B, P, 50, iter);  // execute the GMRES algorithm
 
-  std::cout << "The result " << X << endl;
+  std::cout << "The result " << gmm::vref(X) << endl;
 
 
 How can I transform a vector into a matrix and reshape it ?
diff --git a/doc/sphinx/source/gmm/misc.rst b/doc/sphinx/source/gmm/misc.rst
index de4f2ef..7c0dd78 100644
--- a/doc/sphinx/source/gmm/misc.rst
+++ b/doc/sphinx/source/gmm/misc.rst
@@ -50,7 +50,7 @@ Miscellaneous methods
 
 Most of the time it is more convenient to use::
 
-  std::cout << V << std::endl;
+  std::cout << gmm::vref(V) << std::endl;
   std::cout << M << std::endl;
 
 
diff --git a/doc/sphinx/source/whatsnew/5.2.rst 
b/doc/sphinx/source/whatsnew/5.2.rst
index 49deed5..7122a35 100644
--- a/doc/sphinx/source/whatsnew/5.2.rst
+++ b/doc/sphinx/source/whatsnew/5.2.rst
@@ -29,3 +29,7 @@ The main changes are:
 
    * Compatibility for Windows and Mac installation has been checked.
 
+   * For std::vector<T> the overload of std::cout << V << endl; added to gmm
+     induces some conflicts. Is has been suppressed. Please use instead
+     std::cout << gmm::vref(V) << endl;
+



reply via email to

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