On Aug 17 2009, Anders Logg wrote:

>On Mon, Aug 17, 2009 at 01:15:41AM +0200, DOLFIN wrote:
>> One or more new changesets pushed to the primary dolfin repository.
>> A short summary of the last three changesets is included below.
>>
>> changeset: 6749:561a047f68a0b53b97b24ab32021c63bc6822764 tag: tip user: 
>> "Garth N. Wells <gn...@cam.ac.uk>" date: Mon Aug 17 00:15:22 2009 +0100 
>> files: dolfin/fem/DofMap.cpp dolfin/fem/DofMap.h 
>> dolfin/function/Function.cpp dolfin/function/FunctionSpace.cpp 
>> dolfin/function/FunctionSpace.h dolfin/function/SubSpace.cpp 
>> description: Add 'bool is_view' argument to DofMap::extract_sub_dofmap.
>>
>> Implemementation not yet modified.
>
>We've managed to do without is_view, is_local etc in most places now
>that we use shared pointers. Is there no way to avoid it?
>

Yes, but it will required a design change for sub-Functions (see below). 
Different from before, 'is_view' doesn't say anything about ownership. 
'is_view == true' means that the sub dof map indexes into the original 
array, i.e. the global dimension of the sub dofmap is less than the length 
of the array into which it indexes. 'is_view == false' means that the sub 
dofmap will be extracted from the 'mother dofmap' and is used for indexing 
into an array which has been extracted from the 'mother' array, i.e. the 
global dimension of the sub dofmap is equal to the length of the array into 
which it indexes.

'is_view == false' is only needed as far as I can see for SubFunctions since

  Function u0 = u[0];

involves u0 copying entries from the the Vector which belongs to u into a 
new Vector. If u0 were to only point to the Vector belonging to u, then 
'is_view' will not be required. I can see a number advantages to having u0 
point to the Vector of u. Opinions?

Garth



 



>--
>Anders
>
>
>>
>> changeset: 6748:be2f5e422f3ce958f5a3c0994a55d945b167ee34 user: "Garth 
>> N. Wells <gn...@cam.ac.uk>" date: Mon Aug 17 00:00:56 2009 +0100 files: 
>> dolfin/fem/DofMap.cpp dolfin/fem/DofMap.h 
>> dolfin/function/FunctionSpace.cpp description: Remove 'uint& offset' 
>> argument to DofMap::extract_sub_dofmap(...).
>>
>>
>> changeset: 6747:b1726d60940ea5d10a01ea7b7303e8e5e765a1bd user: "Garth 
>> N. Wells <gn...@cam.ac.uk>" date: Sun Aug 16 23:44:42 2009 +0100 files: 
>> demo/pde/elasticity/cpp/main.cpp dolfin/fem/DirichletBC.cpp 
>> dolfin/fem/DofMap.cpp dolfin/fem/DofMap.h dolfin/function/Function.cpp 
>> description: Small tidy up.
>>
>> ----------------------------------------------------------------------
>> For more details, visit http://www.fenics.org/hg/dolfin
>> _______________________________________________
>> DOLFIN-dev mailing list
>> DOLFIN-dev@fenics.org
>> http://www.fenics.org/mailman/listinfo/dolfin-dev
>


_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@fenics.org
http://www.fenics.org/mailman/listinfo/dolfin-dev

Reply via email to