← Back to team overview

dolfin team mailing list archive

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

 

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

noreply@xxxxxxxxxxxxx wrote:
> ------------------------------------------------------------
> revno: 4421
> committer: Garth N. Wells <gnw20@xxxxxxxxx>
> branch nick: dolfin-test
> timestamp: Sun 2010-01-31 14:57:16 +0000
> message:
>   Fux bug in PeriodicBC.
> modified:
>   dolfin/fem/PeriodicBC.cpp
> 
> 
> --
> lp:dolfin
> https://code.launchpad.net/~dolfin-core/dolfin/main
> 
> Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
> To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription.
> 





Follow ups