← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 4421: Fux bug in PeriodicBC.

 

On Sun, Jan 31, 2010 at 03:04:23PM +0000, Garth N. Wells wrote:
> I just fixed what looked like a pretty bad bug in PeriodicBC. I changed
>
>   // Call recursively for subspaces, should work for arbitrary nesting
>   const uint num_sub_spaces =
>                    function_space.element().num_sub_elements();
>   if (num_sub_spaces > 1)
>   {
>      ...
>      return;
>   }
>
>   // Assuming we have a non-mixed element
>   assert(function_space.element().num_sub_elements() == 1);
>
> to
>
>   // Call recursively for subspaces, should work for arbitrary nesting
>   const uint num_sub_spaces =
>                    function_space.element().num_sub_elements();
>   if (num_sub_spaces > 0)
>   {
>      ...
>      return;
>   }
>
>   // Assuming we have a non-mixed element
>   assert(function_space.element().num_sub_elements() == 0);
>
> Can someone confirm that a non-mixed element should have zero
> 'sub_elements'? How did this code work before? Was there are error in
> the old generated code?
>
> Garth

Looks correct now. A simple (non-nested) element should have 0 sub
elements. This is something that has changed in the new FFC. We still
need to update the UFC manual to reflect this changed meaning of
num_sub_elements / num_sub_dof_maps.

--
Anders

Attachment: signature.asc
Description: Digital signature


References