[visit-developers] 2d meshes and 3d vectors

Allen Sanderson allen at sci.utah.edu
Mon Jul 27 13:34:20 EDT 2015

Hi Sveta,

Yes, as Jeremy notes when in 2d view mode it is flat earth. So vectors will be just XY with z=0;

It is not necessary to elevate the data if the spatial dimension is three. So within the VS reader you might what to consider an option to allow topologically two-dimensional planar surfaces that are on the z=0 plane to have spatial dimension of three. That will then force the view mode to be three dimensional.



On Jul 23, 2015, at 7:02 PM, sveta <sveta at txcorp.com> wrote:

> Thank you, Allen!  We now have basically a 2d vector truncated in the 3d dim.  This still means that if we want to see them as 3d, we will need to implement a 3d mesh for it, right?
> Thanks,
> Sveta
> On 7/23/15 5:11 PM, Allen Sanderson wrote:
>> Hello,
>> Sometime ago while working with John and Sveta we got code from one of
>> the developers (It may have been me but I can not remember). That
>> basically created the three dimensional vector even if on a two
>> dimensional mesh. It was basically a no fowl operation because the vtk
>> structure wants three components regardless if the mesh was two or three
>> dimensional. The same with creating a tensor there had to be nine
>> components.
>> Conversely when working on three dimensional mesh and if the incoming
>> data has only two dimensions we can still construct the vector but make
>> the z component is  zero. As such, I see the code
>> in avtVectorComposeExpression::DeriveVariable being overly restrictive.
>> I am checking in code that removes the restriction so that is does not
>> matter.
>> Committed revision 26791.
>> Cheers,
>> Allen
>> On Jul 23, 2015, at 10:27 AM, "Miller, Mark C." <miller86 at llnl.gov
>> <mailto:miller86 at llnl.gov>> wrote:
>>> Hi Jeremey,
>>> Yeah, I'd argue that VisIt is constraining behavior here that users
>>> wind up all to often having to work-around by doing someting
>>> unnatural, like having to add a transform operator to rotate a 2D mesh
>>> ever so slightly so its a 3D mesh.
>>> OTOH, I am not sure what the practicalities are within VisIt's
>>> implementation w.r.t. allowing 3D entities in 2D windows.
>>> I know a long while back, we didn't allow 'curves' in 2D windows but
>>> that was a faily artificial constraint and now we do allow curves in
>>> 2D windows. But, allowing 3D entities in 2D windows might present
>>> bigger issues.
>>> Mark
>>> From: <Meredith>, "Jeremy S." <jsmeredith at ornl.gov
>>> <mailto:jsmeredith at ornl.gov>>
>>> Reply-To: "visit-developers at elist.ornl.gov
>>> <mailto:visit-developers at elist.ornl.gov>"
>>> <visit-developers at elist.ornl.gov <mailto:visit-developers at elist.ornl.gov>>
>>> Date: Thursday, July 23, 2015 6:57 AM
>>> To: "visit-developers at elist.ornl.gov
>>> <mailto:visit-developers at elist.ornl.gov>"
>>> <visit-developers at elist.ornl.gov <mailto:visit-developers at elist.ornl.gov>>
>>> Subject: Re: [visit-developers] 2d meshes and 3d vectors
>>>> Is there a good reason to **keep** the dimensionality constraints on
>>>> vectors?
>>>> Even ignoring physical meaning, we sometimes want to represent a
>>>> non-physical 3-component values on a 2D grid, such as RGB, and I
>>>> think the constraints can come up there as well.
>>>> --
>>>> Jeremy Meredith
>>>> Oak Ridge National Laboratory
>>>> *From:*Miller, Mark C. [mailto:miller86 at llnl.gov]
>>>> *Sent:* Wednesday, July 22, 2015 4:11 PM
>>>> *To:* VisIt Developers
>>>> *Subject:* Re: [visit-developers] 2d meshes and 3d vectors
>>>> First, wanna make sure what you mean by 2d mesh. You have a mesh in
>>>> which z coord is always zero? If so, yeah, VisIt won't let you have
>>>> vectors on that mesh with more than two components. If you don't have
>>>> option of applying an operator of some kind (like transform with
>>>> x-rotate by a tiny fraction of a degree), then probably best thing is
>>>> to accomodate this in the plugin.
>>>> Out of curiosity thoug, can you describe the use case for 3D vectors
>>>> on a 2D mesh? It might be best if we ultimately get rid of the
>>>> constraints prohibiting this in VisIt.
>>>> Mark
>>>> *From: *Sveta <sveta at txcorp.com <mailto:sveta at txcorp.com>>
>>>> *Reply-To: *"visit-developers at elist.ornl.gov
>>>> <mailto:visit-developers at elist.ornl.gov>"
>>>> <visit-developers at elist.ornl.gov
>>>> <mailto:visit-developers at elist.ornl.gov>>
>>>> *Date: *Wednesday, July 22, 2015 12:49 PM
>>>> *To: *"visit-developers at elist.ornl.gov
>>>> <mailto:visit-developers at elist.ornl.gov>"
>>>> <visit-developers at elist.ornl.gov
>>>> <mailto:visit-developers at elist.ornl.gov>>
>>>> *Subject: *[visit-developers] 2d meshes and 3d vectors
>>>>> Hi everybody,
>>>>> What is the best way to be able to deal with 3d vectors and their
>>>>> magnitudes, when the mesh is 2d?
>>>>> I could check in Vs plugin for this and create a 3d mesh if the the
>>>>> vector has 3 components.  But is there a better way?  Can I set a mesh
>>>>> dimensionality through some function call of VisIt?  I cannot not go
>>>>> interactively through elevate operator as we have embeddded VisIt in
>>>>> our
>>>>> application.
>>>>> Thank you,
>>>>> SVeta

More information about the visit-developers mailing list