freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH-PING] Re: [pooma-dev] Problem with Field::makeOwnCopy() and Relat


From: Richard Guenther
Subject: [PATCH-PING] Re: [pooma-dev] Problem with Field::makeOwnCopy() and Relations
Date: Fri, 30 May 2003 00:18:17 +0200 (CEST)

What about this patch? It fixes the problem with makeOwnCopy() on
multi-centering fields for me.

Richard.

On Wed, 21 May 2003, Richard Guenther wrote:

> On Wed, 21 May 2003, Richard Guenther wrote:
>
> > Hi!
> >
> > We have a problem with Field::makeOwnCopy() and Relations in case of
> > a Field with multiple subfields. Consider
> >
> >   Field_t f(canonicalCentering(FaceType, Continuous), ...);
> >   Pooma::addAllConstantFaceBC(f, 0.0);
> >   Field_t g(f);
> >   g.makeOwnCopy();
> >
> > now in FieldEngine::makeOwnCopy() we get passed g as target s and do
> >
> >    ...
> >       data(m, c).relations().makeOwnCopy(s);
> >    ...
> >
> > i.e. we retarget all the subfields relation to the base field g which
> > the relation later chokes on with an assert.
>
> It seems it does. Tested with Fields, Ok?
>
> Richard.
>
> ===== FieldEngine.h 1.4 vs edited =====
> --- 1.4/r2/src/Field/FieldEngine/FieldEngine.h        Thu Jan 30 12:11:07 2003
> +++ edited/FieldEngine.h      Wed May 21 17:04:26 2003
> @@ -606,7 +606,7 @@
>        {
>          data(m, c) = model[m*stride_m + c];
>          data(m, c).engine().makeOwnCopy();
> -        data(m, c).relations().makeOwnCopy(s);
> +        data(m, c).relations().makeOwnCopy(s.subField(m, c));
>        }
>      }
>    }
>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]