freepooma-devel
[Top][All Lists]
Advanced

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

adapting Particles to NewFields


From: Julian C. Cummings
Subject: adapting Particles to NewFields
Date: Mon, 9 Apr 2001 14:52:36 -0700

Hi All,

OK, I have done some preliminary investigation
of the work required to adapt the Particles 
classes from our old Fields to NewFields (which
will then become "Field"!).  It's not too bad.

There are two main places where Fields come up
with respect to Particles.  One is in SpatialLayout,
where the particle data distribution is based upon
particle position and the field decomposition.
Fortunately, we are still using the same FieldLayouts
as before.  What's new is that the geometry does not
have a centering template parameter.  So we just 
drop that extra parameter here.  The other place 
where Fields appear prominently is in the interpolators.

In both of these places, it mostly boils down to the
implementation of the pointIndex() and indexPoint()
conversion functions.  These functions are used to 
convert a position in coordinate space to the index of
the nearest field element, or to get the position in
coordinate space of a field element.  With the old
Fields, these functions were members of the geometry 
class.  They were implemented using functionality of
the mesh object contained inside.  The centering 
template argument of the geometry was used to select 
the appropriate implementation.

In the new implementation, the FieldEngine stores the 
mesh information, and centering information is stored 
in FieldEngineBase as a set of offsets for each dimension.
It seems to me that FieldEngine would be a reasonable
place to resurrect and reimplement the pointIndex() and
indexPoint() conversion functions (with the public API
to these functions being through Field).  All of the 
necessary information is there.  With these functions 
in place, the switch of Particles to NewField should be
fairly smooth.

One thing I am not so clear on is how to handle Fields
that have multiple subFields inside.  What I am worried
about is how to differentiate the case of multiple 
subFields that all have one centering from the case of 
a Vector Field where different components have different
centerings.  I would need to distinguish these two cases
when it comes to particle/field interpolation.  Is there
a simple way to do that?

Comments on the plan I have outlined here?

-- Julian C.


reply via email to

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