[Paraview] Comparing results computed with 2 different meshes

Cory Quammen cory.quammen at kitware.com
Mon Feb 3 08:12:11 EST 2014


On Fri, Jan 31, 2014 at 1:04 PM, Evan Kao <tossin at gmail.com> wrote:
> Thanks a lot for the help.  I think Merge Blocks > Resample With Dataset >
> Python Calculator (or Append Attributes > Calculator) allows me to do what I
> originally asked for, although now I'm realizing the Python Calculator may
> not be enough to do the calculations I want.  I had some questions regarding
> the Python Calculator and the Programmable Filter:
>
> 1.  The data I'm looking at is from a transient simulation.  If I wanted to
> standardize a parameter for each time step by dividing it by the standard
> deviation of the population for that time point, am I understanding
> correctly that I would either have to calculate the standard deviation first
> and then manually type in the number into the Python Calculator or use the
> Python Programmable Filter?
>
> 2.  Additionally, I've been looking around and it seems the only way to
> perform a summing operation is to use the Programmable Filter.  Is that
> correct?

For doing anything mildly complicated like summing data arrays, you're
probably better off with the Programmable Filter. You might
theoretically be able to use the Python Calculator, but you'll have
some long expressions to fit into that small Expression line.

> 3.  Regarding both the Python Calculator or Programmable Filter, is there an
> easy way to tell which index corresponds to which input?  I thought perhaps
> it had to do with just order you click the inputs in, but I'm not so sure
> about that.

No, that appears to not be the case in a quick test I ran. They appear
to be ordered in the order in which they appear in the pipeline
browser..

> Thanks for your time,
> Evan
>
>
> On Thu, Jan 30, 2014 at 12:25 PM, Cory Quammen <cory.quammen at kitware.com>
> wrote:
>>
>> On Thu, Jan 30, 2014 at 2:31 PM, Evan Kao <tossin at gmail.com> wrote:
>> > Hi Cory,
>> >
>> > Thanks for the suggestion.  Resample With Dataset solves the problem of
>> > matching up the Point IDs, but only passes data from the Input (which I
>> > guess makes sense given its purpose), so I think regardless of what I
>> > rename
>> > the arrays, the data will always be from only one of the meshes meaning
>> > I
>> > can't use Calculator to compare the data.
>>
>> How about using Append Attributes to combine the arrays of Resample
>> With Dataset and the Source?
>>
>> > I think my main obstacle is the data type.  Paraview reads in Ensight
>> > data
>> > as a Multi-Block data set, but neither Append Datasets nor the Python
>> > Calculator seem to work on that data type.  Is there a simple way to
>> > convert
>> > them into a format that can be read by those filters?
>>
>> You can use Merge Blocks to combine all the blocks in a Multi-Block
>> data set to an unstructured grid.
>>
>> Best,
>> Cory
>>
>> > Thanks,
>> > Evan
>> >
>> >
>> > On Thu, Jan 30, 2014 at 6:10 AM, Cory Quammen <cory.quammen at kitware.com>
>> > wrote:
>> >>
>> >> Evan,
>> >>
>> >> You might want to take a look at the Resample With Dataset filter. One
>> >> of your meshes would be the Input and one would be the Source. What
>> >> this filter will do is sample the data values in the Input mesh at the
>> >> locations of points in the Source. If I understand the setup of your
>> >> meshes, this should essentially take care of the problem where your
>> >> point IDs are not the same. The result will be a single mesh with two
>> >> data arrays that you can then compare point by point.
>> >>
>> >> You might run into a problem if both meshes use the same name for the
>> >> point array from which you want to get values (one will clobber the
>> >> other). You can take care of that by using the Calculator to rename
>> >> one of the mesh's arrays, then using the result of the calculator as
>> >> the Input or Source.
>> >>
>> >> Hope that helps,
>> >> Cory
>> >>
>> >> On Mon, Jan 27, 2014 at 4:18 PM, Evan Kao <tossin at gmail.com> wrote:
>> >> > Hello all,
>> >> >
>> >> > I'm trying to compare the results of 2 CFD simulations (which are
>> >> > imported
>> >> > into Paraview as Ensight data) point-by-point but I'm having trouble
>> >> > figuring out how to even combine the data into a single Pipeline
>> >> > object
>> >> > so
>> >> > that I can do some simple calculations with the Calculator Filter.
>> >> > I'd
>> >> > appreciate it if anyone could let me know if what I'm trying to do is
>> >> > natively possible in Paraview, and if not, provide some suggestions
>> >> > on
>> >> > how
>> >> > to approach it.
>> >> >
>> >> > What might complicate the process is that the results were obtained
>> >> > using
>> >> > two different meshes (in fact, it's a mesh comparison test).  The
>> >> > points
>> >> > I
>> >> > want to look at are the same for both meshes, but the point IDs are
>> >> > different.
>> >> >
>> >> > So what I'd like to do in summary is:
>> >> > 1) Is there a way to extract and sort the data in a way such that the
>> >> > point
>> >> > IDs are the same for both meshes?
>> >> >
>> >> > 2) Is there a way to convert/manipulate the data into a single
>> >> > Pipeline
>> >> > object for comparison?  Or to compare the results of different
>> >> > Pipeline
>> >> > objects?  I've tried various combinations of filters like
>> >> > AppendDatasets,
>> >> > GroupDatasets, and MergeBlocks with little success.
>> >> >
>> >> > Thanks,
>> >> > Evan
>> >> >
>> >> > _______________________________________________
>> >> > Powered by www.kitware.com
>> >> >
>> >> > Visit other Kitware open-source projects at
>> >> > http://www.kitware.com/opensource/opensource.html
>> >> >
>> >> > Please keep messages on-topic and check the ParaView Wiki at:
>> >> > http://paraview.org/Wiki/ParaView
>> >> >
>> >> > Follow this link to subscribe/unsubscribe:
>> >> > http://www.paraview.org/mailman/listinfo/paraview
>> >> >
>> >
>> >
>
>


More information about the ParaView mailing list