← Back to team overview

dolfin team mailing list archive

[noreply@xxxxxxxxxxxxx: [Branch ~dolfin-core/dolfin/wells] Rev 5796: Some SWIG updates.]

 

Looks like you left some debugging in there.

--
Anders
--- Begin Message ---
------------------------------------------------------------
revno: 5796
committer: Garth N. Wells <gnw20@xxxxxxxxx>
branch nick: dolfin-all
timestamp: Tue 2011-03-29 15:06:11 +0100
message:
  Some SWIG updates.
modified:
  dolfin/fem/DirichletBC.cpp
  dolfin/fem/LinearVariationalSolver.cpp
  dolfin/swig/fem_pre.i


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

You are subscribed to branch lp:~dolfin-core/dolfin/wells.
To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/wells/+edit-subscription
=== modified file 'dolfin/fem/DirichletBC.cpp'
--- dolfin/fem/DirichletBC.cpp	2011-03-29 11:34:31 +0000
+++ dolfin/fem/DirichletBC.cpp	2011-03-29 14:06:11 +0000
@@ -428,18 +428,26 @@
                         GenericVector* b,
                         const GenericVector* x) const
 {
+  cout << "Apply bcss" << endl;
   // Check arguments
   check_arguments(A, b, x);
 
+  cout << "Apply bcs (1)" << endl;
+
   // A map to hold the mapping from boundary dofs to boundary values
   Map boundary_values;
 
+  cout << "Apply bcs (2)" << endl;
+
   // Create local data for application of boundary conditions
   BoundaryCondition::LocalData data(*_function_space);
 
+  cout << "Apply bcs (3)" << endl;
+
   // Compute dofs and values
   compute_bc(boundary_values, data, _method);
 
+
   // Copy boundary value data to arrays
   const uint size = boundary_values.size();
   std::vector<uint> dofs(size);
@@ -452,6 +460,8 @@
     values[i++] = bv->second;
   }
 
+  cout << "Apply bcs (2)" << endl;
+
   // Modify boundary values for nonlinear problems
   if (x)
   {
@@ -465,6 +475,8 @@
       values[i] = x_values[i] - values[i];
   }
 
+  cout << "Apply bcs (3)" << endl;
+
   log(PROGRESS, "Applying boundary conditions to linear system.");
 
   // Modify RHS vector (b[i] = value) and apply changes
@@ -492,6 +504,7 @@
     // Apply changes
     A->apply("add");
   }
+  cout << "End bcs" << endl;
 }
 //-----------------------------------------------------------------------------
 void DirichletBC::check() const

=== modified file 'dolfin/fem/LinearVariationalSolver.cpp'
--- dolfin/fem/LinearVariationalSolver.cpp	2011-03-12 09:54:55 +0000
+++ dolfin/fem/LinearVariationalSolver.cpp	2011-03-29 14:06:11 +0000
@@ -14,6 +14,8 @@
 #include "VariationalProblem.h"
 #include "LinearVariationalSolver.h"
 
+#include "GenericDofMap.h"
+
 using namespace dolfin;
 
 //-----------------------------------------------------------------------------
@@ -65,7 +67,10 @@
 
     // Apply boundary conditions
     for (uint i = 0; i < problem.bcs().size(); i++)
+    {
+      assert(problem.bcs()[i]);
       problem.bcs()[i]->apply(*A, *b);
+    }
   }
 
   // Print vector/matrix

=== modified file 'dolfin/swig/fem_pre.i'
--- dolfin/swig/fem_pre.i	2011-03-12 09:54:55 +0000
+++ dolfin/swig/fem_pre.i	2011-03-29 14:06:11 +0000
@@ -22,25 +22,25 @@
 //-----------------------------------------------------------------------------
 %ignore dolfin::EqualityBC::EqualityBC(const FunctionSpace&, uint);
 
-%ignore dolfin::DirichletBC::DirichletBC(const FunctionSpace&,
+%ignore dolfin::DirichletBC::DirichletBC(const GenericFunctionSpace&,
 					 const GenericFunction&,
 					 const SubDomain&,
 					 std::string method="topological");
 
-%ignore dolfin::DirichletBC::DirichletBC(const FunctionSpace&,
+%ignore dolfin::DirichletBC::DirichletBC(const GenericFunctionSpace&,
 					 const GenericFunction&,
 					 const MeshFunction<unsigned int>&,
 					 uint,
 					 std::string method="topological");
 
-%ignore dolfin::DirichletBC::DirichletBC(const FunctionSpace&,
+%ignore dolfin::DirichletBC::DirichletBC(const GenericFunctionSpace&,
 					 const GenericFunction&,
 					 uint,
 					 std::string method="topological");
 
-%ignore dolfin::PeriodicBC::PeriodicBC(const FunctionSpace&, const SubDomain&);
+%ignore dolfin::PeriodicBC::PeriodicBC(const GenericFunctionSpace&, const SubDomain&);
 
-%ignore dolfin::DirichletBC(const FunctionSpace&,
+%ignore dolfin::DirichletBC(const GenericFunctionSpace&,
                             const GenericFunction&,
                             const std::vector<std::pair<uint, uint> >&,
                             std::string method="topological");


--- End Message ---

Follow ups