← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 5302: Intialise _colored in Mesh constructors.

 



On 18/11/10 22:09, Anders Logg wrote:
On Thu, Nov 18, 2010 at 09:19:27PM -0000, noreply@xxxxxxxxxxxxx wrote:
------------------------------------------------------------
revno: 5302
committer: Garth N. Wells<gnw20@xxxxxxxxx>
branch nick: dolfin-all
timestamp: Thu 2010-11-18 21:16:50 +0000
message:
   Intialise _colored in Mesh constructors.

Did this fix the segfault? Seems likely this was the problem.


Yes.

Garth

--
Anders


modified:
   dolfin/mesh/Mesh.cpp



=== modified file 'dolfin/mesh/Mesh.cpp'
--- dolfin/mesh/Mesh.cpp	2010-11-18 17:52:35 +0000
+++ dolfin/mesh/Mesh.cpp	2010-11-18 21:16:50 +0000
@@ -36,23 +36,23 @@
  using namespace dolfin;

  //-----------------------------------------------------------------------------
-Mesh::Mesh()
-  : Variable("mesh", "DOLFIN mesh"),
-    _data(*this), _cell_type(0), _intersection_operator(*this), _ordered(false)
+Mesh::Mesh() : Variable("mesh", "DOLFIN mesh"), _data(*this), _cell_type(0),
+               _intersection_operator(*this), _ordered(false), _colored(-1)
  {
    // Do nothing
  }
  //-----------------------------------------------------------------------------
-Mesh::Mesh(const Mesh&  mesh)
-  : Variable("mesh", "DOLFIN mesh"),
-    _data(*this), _cell_type(0), _intersection_operator(*this), _ordered(false)
+Mesh::Mesh(const Mesh&  mesh) : Variable("mesh", "DOLFIN mesh"), _data(*this),
+                               _cell_type(0), _intersection_operator(*this),
+                               _ordered(false), _colored(-1)
  {
    *this = mesh;
  }
  //-----------------------------------------------------------------------------
-Mesh::Mesh(std::string filename)
-  : Variable("mesh", "DOLFIN mesh"),
-    _data(*this), _cell_type(0), _intersection_operator(*this), _ordered(false)
+Mesh::Mesh(std::string filename) : Variable("mesh", "DOLFIN mesh"),
+                                   _data(*this), _cell_type(0),
+                                   _intersection_operator(*this),
+                                   _ordered(false), _colored(-1)
  {
    if (MPI::num_processes()>  1)
    {



_______________________________________________
Mailing list: https://launchpad.net/~dolfin
Post to     : dolfin@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~dolfin
More help   : https://help.launchpad.net/ListHelp



References