← Back to team overview

dolfin team mailing list archive

[noreply@xxxxxxxxxxxxx: [Branch ~dolfin-core/dolfin/trunk] Rev 6519: Update speedup benchmark (is the * necessary?) and add it to "make bench" target.]

 

Yes, the star is necessary since u.vector() now returns a shared
pointer in C++.

--
Anders
--- Begin Message ---
------------------------------------------------------------
revno: 6519
committer: Johannes Ring <johannr@xxxxxxxxx>
branch nick: trunk
timestamp: Fri 2012-01-20 10:20:42 +0100
message:
  Update speedup benchmark (is the * necessary?) and add it to "make bench" target.
modified:
  bench/CMakeLists.txt
  bench/fem/speedup/cpp/solve-poisson.cpp


--
lp:dolfin
https://code.launchpad.net/~dolfin-core/dolfin/trunk

Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/trunk/+edit-subscription
=== modified file 'bench/CMakeLists.txt'
--- bench/CMakeLists.txt	2010-09-01 20:15:53 +0000
+++ bench/CMakeLists.txt	2012-01-20 09:20:42 +0000
@@ -23,6 +23,9 @@
     add_subdirectory(${cpp_dir})
   endforeach()
 
+  # Add fem/speedup/cpp manually (no main.cpp so not picked up automatically)
+  add_subdirectory(fem/speedup/cpp)
+
 else()
 
   message(STATUS "Could not locate dolfin-config.cmake file. Did you do 'make install' for the DOLFIN library and set the appropriate paths (source <build_dir>/dolfin.conf)?")

=== modified file 'bench/fem/speedup/cpp/solve-poisson.cpp'
--- bench/fem/speedup/cpp/solve-poisson.cpp	2011-06-02 19:26:59 +0000
+++ bench/fem/speedup/cpp/solve-poisson.cpp	2012-01-20 09:20:42 +0000
@@ -78,7 +78,7 @@
   // Solve linear system
   dolfin::MPI::barrier();
   double t = time();
-  solver.solve(A, u.vector(), b);
+  solver.solve(A, *u.vector(), b);
   dolfin::MPI::barrier();
   t = time() - t;
   if (dolfin::MPI::process_number() == 0)
@@ -86,10 +86,10 @@
 
   // Solve linear system (preconditioner assuming same non-zero pattern)
   solver.parameters("preconditioner")["same_nonzero_pattern"] = true;
-  u.vector().zero();
+  u.vector()->zero();
   dolfin::MPI::barrier();
   t = time();
-  solver.solve(A, u.vector(), b);
+  solver.solve(A, *u.vector(), b);
   dolfin::MPI::barrier();
   t = time() - t;
   if (dolfin::MPI::process_number() == 0)
@@ -97,10 +97,10 @@
 
   // Solve linear system (re-use preconditioner)
   solver.parameters("preconditioner")["reuse"] = true;
-  u.vector().zero();
+  u.vector()->zero();
   dolfin::MPI::barrier();
   t = time();
-  solver.solve(A, u.vector(), b);
+  solver.solve(A, *u.vector(), b);
   dolfin::MPI::barrier();
   t = time() - t;
   if (dolfin::MPI::process_number() == 0)


--- End Message ---

Follow ups