← Back to team overview

dolfin team mailing list archive

Re: [HG DOLFIN] Add broadcast/receive functions to MeshFunction.

 

On Tue, Dec 04, 2007 at 07:12:41PM +0000, Garth N. Wells wrote:
> 
> 
> Kristian Oelgaard wrote:
> > Quoting DOLFIN <dolfin@xxxxxxxxxx>:
> > 
> > I think this changeset broke PyDOLFIN
> > 
> > tialized -MT _dolfin_la-dolfin_wrap.lo -MD -MP -MF
> > .deps/_dolfin_la-dolfin_wrap.Tpo -c dolfin_wrap.cpp  -fPIC -DPIC -o
> > .libs/_dolfin_la-dolfin_wrap.o
> > ./../src/kernel/mesh/dolfin/MeshFunction.h: In member function 'void
> > dolfin::MeshFunction<T>::broadcast() const [with T = int]':
> > dolfin_wrap.cpp:80706:   instantiated from here
> > ./../src/kernel/mesh/dolfin/MeshFunction.h:184: error: no matching function for
> > call to 'dolfin::MPIMeshCommunicator::broadcast(const dolfin::MeshFunction<int>&)'
> > ./../src/kernel/mesh/dolfin/MPIMeshCommunicator.h:35: note: candidates are:
> > static void dolfin::MPIMeshCommunicator::broadcast(const dolfin::Mesh&)
> > ./../src/kernel/mesh/dolfin/MPIMeshCommunicator.h:41: note:                
> > static void dolfin::MPIMeshCommunicator::broadcast(const
> > dolfin::MeshFunction<unsigned int>&)
> > 
> 
> This should be fixed now.
> 
> I added member functions to MeshFunction for broadcast and receive which 
>   were wrappers for MPIMeshCommunicator::broadcast(..)/receive(..), 
> analogous to Mesh::broadcast()/receive(). The problem is that 
> MeshFunction is a templated class.
> 
> To keep a consistent interface, I see two options:
> 
> a) Create specialisations of MeshFunction::broadcast()/receive(); or
> 
> b) Remove the Mesh::broadcast()/receive() wrapper functions and call 
> MPIMeshComminicator::broadcast(..)/receive(..) directly.

Option (b) that you implemented looks good.

-- 
Anders


> Garth
> 
> > Kristian
> > 
> >> One or more new changesets pushed to the primary dolfin repository.
> >> A short summary of the last three changesets is included below.
> >>
> >> changeset:   3440:e01dd95f9da356340f354e3e3ce977e5d0e8a643
> >> tag:         tip
> >> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> >> date:        Tue Dec 04 12:15:11 2007 +0000
> >> files:       src/kernel/mesh/Mesh.cpp src/kernel/mesh/dolfin/MeshFunction.h
> >> description:
> >> Add broadcast/receive functions to MeshFunction.
> >>
> >>
> >> changeset:   3439:eb1785689455f071165927f7ba063cb8afdbc545
> >> user:        "Garth N. Wells <gnw20@xxxxxxxxx>"
> >> date:        Tue Dec 04 11:56:20 2007 +0000
> >> files:       src/kernel/mesh/Mesh.cpp
> >> description:
> >> Fix Mesh::partition when running in parallel.
> >>
> >>
> >> changeset:   3438:098413840bb352b38c630d9f358e2352f8cf8c66
> >> user:        "Kristian Oelgaard <k.b.oelgaard@xxxxxxxxxx>"
> >> date:        Mon Dec 03 14:00:09 2007 +0100
> >> files:       TODO src/demo/pde/elasticity/python/demo.py
> >> src/demo/pde/stokes/stabilized/python/demo.py
> >> src/demo/pde/stokes/taylor-hood/python/demo.py
> >> description:
> >> Fix PyDOLFIN demos with problems related to vector valued functions. Thanks
> >> to Marie for the tip. Updated TODO.
> >>
> >> ----------------------------------------------------------------------
> >> For more details, visit http://www.fenics.org/hg/dolfin
> >> _______________________________________________
> >> DOLFIN-dev mailing list
> >> DOLFIN-dev@xxxxxxxxxx
> >> http://www.fenics.org/mailman/listinfo/dolfin-dev
> >>
> > 
> > 
> > _______________________________________________
> > DOLFIN-dev mailing list
> > DOLFIN-dev@xxxxxxxxxx
> > http://www.fenics.org/mailman/listinfo/dolfin-dev
> 
> -
> _______________________________________________
> DOLFIN-dev mailing list
> DOLFIN-dev@xxxxxxxxxx
> http://www.fenics.org/mailman/listinfo/dolfin-dev


Follow ups

References