[visit-developers] mesh of expressions

Miller, Mark C. miller86 at llnl.gov
Tue Jun 2 00:28:14 EDT 2015


Hmm. Well, I think if you are trying to do this from within plugin code or elsewhere in VisIt source code, then my response may have been a bit misleading.

avtDatabaseMetadata::MeshForVar() should return the name of the mesh for any variable including an expression variable.

So, I agree with Kathleen, pass Expression::GetName() into avtDatabaseMetaData::MeshForVar.

Mark


From: "Kathleen S. Biagas" <biagas2 at llnl.gov<mailto:biagas2 at llnl.gov>>
Reply-To: "Biagas, Kathleen" <biagas2 at llnl.gov<mailto:biagas2 at llnl.gov>>, "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: Monday, June 1, 2015 5:42 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: Re: [visit-developers] mesh of expressions

Maybe call avtDatabaseMetaData::MeshForVar, passing it the result of
Expression::GetName()

?

May depend on where you are calling this from your plugin.
Not sure when the expressions are actually parsed for their individual
pieces like meshname, or if/when they are actually set back in the
Expression state object.

Kathleen



On Mon, 2015-06-01 at 18:29 -0600, sveta wrote:
Hi Mark and Kathleen,
I am using:
avtDatabaseMetaData::getExpression(int) method returning an object of
type Expression*.  Then I apply GetMeshName to this Expression object.
It return an empty string.
In short, I would like to access avtMeshMetaData from the Expression object.
I keep grepping for various things but a pointer to some methods would
be great!
Thank you,
Sveta
On 6/1/15 5:00 PM, Kathleen S. Biagas wrote:
> Hi Sveta,
>
> Are you trying to get the meshname during the plugin's GetVar method?
> You might want to use avtDatabaseMetaData::MeshForVar method.
> You can use the protected 'metadata' object of avtFileFormat, IIRC.
>
> Kathleen
>
> On Mon, 2015-06-01 at 22:51 +0000, Miller, Mark C. wrote:
>> Hi Sveta,
>>
>>
>> Hmm. Well, first, I'll assume you are NOT talking about CMFE
>> expressions as those a) change the mesh and b) include information
>> about the target mesh in the expression's arguments.
>>
>>
>> For other expressions, I think its sufficient to find first terminal
>> node (e.g. non-expression term) in the expression and ask that
>> variable what its mesh is. However, I am not sure how easy it is to
>> traverse an expression in python code.
>>
>>
>> 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: Monday, June 1, 2015 12:52 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] mesh of expressions
>>
>>
>>
>>          In Vs plugin, we register expressions, but when I try to
>>          access the name
>>          of the mesh (exr->GetMesh()) associated with an expression, no
>>          name
>>          comes up, although VisIt knows this internally after
>>          parsing.  Is there
>>          a way to know the expression's mesh?
>>
>>
>>          Thanks,
>>          Sveta
>>
>>
>
>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://elist.ornl.gov/pipermail/visit-developers/attachments/20150602/4d4f64b5/attachment.html>


More information about the visit-developers mailing list