<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi, George.<br>
    <br>
    I had noticed the visit bridge subsystem while perusing the
    codebase, but I wasn't sure if it was used or not. I have it working
    now, but I made a small modification to the Cosmo Gadget reader that
    really makes things very nice. By changing the tag attribute from
    the particle ID to the particle type (i.e., dark matter, gas, stars,
    etc.) I am able to use the threshold mechanism to show only the
    particle types I want. I have attached an example image showing only
    the disk stars from the simulation output I provided previously.
    Once I add gas to my simulations, I can then use the tag to colorize
    the particles to further distinguish gas and stars. This isn't
    possible to do with the visit bridge as it does not store the mass
    (or if it does, it does not show it as a colorization value).<br>
    <br>
    This change really only works because I can ignore the particle IDs
    as my particles are not split across multiple input files, so it's
    not really a production-ready solution to getting Gadget
    visualizations into ParaView.<br>
    <br>
    Let me know if I can be of any help with testing ParaView changes
    with Gadget data.<br>
    <br>
    Many thanks for all of your help.<br>
    <br>
    - Tim<br>
    <br>
    P.S. An oddity I noticed between the Cosmo Gadget reader and the
    Visit Bridge one is that the Visit Bridge reader expects the Gadget2
    "enhanced" snapshot format (i.e., SnapFormat=2), but expects the
    file extension '.gadget'. While the Cosmo Reader uses the old Gadget
    format (i.e., SnapFormat=1), but expects the file extension
    '.gadget2'. It's only a small wart, though!<br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 09/12/2013 01:53 PM, George Zagaris
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAP6Wa3iR5VS0ogM49BirvPw2VK9cK29jgudQoL4Hzgc-9BPxxg@mail.gmail.com"
      type="cite">
      <div dir="ltr">By the way, another alternative is to enable
        VisItBridge -- turn PARAVIEW_USE_VISITBRIDGE to ON when you
        build ParaView -- and use the Gadget reader that is available
        through visit bridge. Currently, it expects a "*.gadget"
        extension. Attached is a figure of the dataset you shared with
        us, opened with that reader. This might be a better alternative
        in the short term.
        <div>
          <br>
        </div>
        <div>Best,</div>
        <div>George</div>
      </div>
      <div class="gmail_extra"><br>
        <br>
        <div class="gmail_quote">On Sat, Sep 7, 2013 at 2:08 AM, Tim
          Haines <span dir="ltr">&lt;<a moz-do-not-send="true"
              href="mailto:thaines@astro.wisc.edu" target="_blank">thaines@astro.wisc.edu</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000"> Hi, George.<br>
              <br>
              I was able to track down the issue. In
              ParticleDistribute::readFromBlockFile, there is a filter
              to determine the 'active' particles (near line 1300). It
              requires that the components of the positions of each
              particle lie within the components of the
              minAlive/maxAlive values (currently set to 0 and rL,
              respectively). However, the Gadget2 coordinate system uses
              an origin that lies between the two galaxies I was
              simulating. Hence, many of the coordinates lied well
              outside of the [0,rL] boundary (almost all were negative).
              Removing the bounding box filter, I get the expected (and
              correct!) results (attached; colored by particle type
              (tag) - pink is disk, white/blue are dark matter halo).<br>
              <br>
              My interpretation of this behaviour is that, in general,
              the bounding box filter is necessary to ensure only those
              particles which the user cares about are rendered. Is this
              true? If so, the enforcement of a physical box with
              **only** positive coordinate values seems unnecessarily
              constrained. For tree codes such as Gadget2, this is
              especially true since there is no box at all.<br>
              <br>
              I think the easiest fix is to tweak the interface to allow
              the user to specify the bounds of the simulation box
              rather than relying on the implicit use of [0,rL].<br>
              <br>
              Thoughts?<br>
              <br>
              Many thanks.<span class="HOEnZb"><font color="#888888"><br>
                  <br>
                  - Tim<br>
                </font></span><br>
              P.S. The resulting movie looks great! I really want to use
              ParaView for all my simulation visualizations because of
              the ease and quality of the movies it makes. I am hopeful
              we can get Gadget2 to work with the current importer
              without too much trouble.
              <div>
                <div class="h5"><br>
                  <br>
                  <br>
                  <br>
                  <div>On 09/03/2013 10:25 AM, George Zagaris wrote:<br>
                  </div>
                  <blockquote type="cite">
                    <div dir="ltr">Hi Tim,
                      <div><br>
                      </div>
                      <div>I was able to open the dataset you provided.
                        Here are a couple of suggestions:</div>
                      <div><br>
                      </div>
                      <div>(1) Make sure to uncheck the "Cosmo Format"
                        checkbox -- this will ensure that the underlying
                        reader will read in the data as a Gadget file.</div>
                      <div><br>
                      </div>
                      <div>(2) Set "rL", i.e., the box-size of the
                        simulation data accordingly</div>
                      <div><br>
                      </div>
                      <div>(3) Set overlap to 0 -- This parameter
                        creates ghost zones between inter-processor and
                        periodic boundaries which you may need if you
                        are running this in parallel, depending on what
                        you want to do after you read in the data.</div>
                      <div><br>
                      </div>
                      <div>Attached is an image of what the output looks
                        like when I do the above with rL=100.</div>
                      <div><br>
                      </div>
                      <div>Best,</div>
                      <div>George</div>
                    </div>
                    <div class="gmail_extra"><br>
                      <br>
                      <div class="gmail_quote"> On Sat, Aug 31, 2013 at
                        11:04 PM, Tim Haines <span dir="ltr">&lt;<a
                            moz-do-not-send="true"
                            href="mailto:thaines@astro.wisc.edu"
                            target="_blank">thaines@astro.wisc.edu</a>&gt;</span>
                        wrote:<br>
                        <blockquote class="gmail_quote" style="margin:0
                          0 0 .8ex;border-left:1px #ccc
                          solid;padding-left:1ex">
                          <div bgcolor="#FFFFFF" text="#000000"> @David,<br>
                            <br>
                            I put a snapshot file on github ( <a
                              moz-do-not-send="true"
                              href="https://github.com/hainest/Gadget2_test"
                              target="_blank">https://github.com/hainest/Gadget2_test</a>).


                            Let me know if you need more of them.<br>
                            <br>
                            @George,<br>
                            <br>
                            My apologies, I realize now that my
                            description wasn't specific enough. I put a
                            screenshot of the snapshot in the github
                            repo I linked above. When I color the
                            particles by mass, it appears that they are
                            being rendered using the velocity values
                            rather than the position values to determine
                            their coordinate in the volume. I hope that
                            clarifies things a bit more.<br>
                            <br>
                            Many thanks for all of your help!<br>
                            <br>
                            - Tim<br>
                            <br>
                            <br>
                            <div>On 08/31/2013 11:00 AM, <a
                                moz-do-not-send="true"
                                href="mailto:paraview-request@paraview.org"
                                target="_blank">paraview-request@paraview.org</a>
                              wrote:<br>
                            </div>
                            <blockquote type="cite">
                              <pre>Message: 2
Date: Sat, 31 Aug 2013 11:19:17 -0400
From: George Zagaris <a moz-do-not-send="true" href="mailto:george.zagaris@kitware.com" target="_blank">&lt;george.zagaris@kitware.com&gt;</a>
Subject: Re: [Paraview] viewing Gadget2 simulations
To: Tim Haines <a moz-do-not-send="true" href="mailto:thaines@astro.wisc.edu" target="_blank">&lt;thaines@astro.wisc.edu&gt;</a>
Cc: ParaView <a moz-do-not-send="true" href="mailto:paraview@paraview.org" target="_blank">&lt;paraview@paraview.org&gt;</a>
Message-ID:
        <a moz-do-not-send="true" href="mailto:CAP6Wa3gkiTtmJHnOKALccaM7vk46us5q=8A6evz+KWdTOXaSgg@mail.gmail.com" target="_blank">&lt;CAP6Wa3gkiTtmJHnOKALccaM7vk46us5q=8A6evz+KWdTOXaSgg@mail.gmail.com&gt;</a>
Content-Type: text/plain; charset="iso-8859-1"

Hi Tim,

I believe the position vector is used as the xyz position of the particles
that are being rendered, so, you cannot color by the position. Do you see
any particles when you open the file?

Best,
George

------------------------------

Message: 3
Date: Sat, 31 Aug 2013 11:19:35 -0400
From: David E DeMarle <a moz-do-not-send="true" href="mailto:dave.demarle@kitware.com" target="_blank">&lt;dave.demarle@kitware.com&gt;</a>
Subject: Re: [Paraview] viewing Gadget2 simulations
To: Tim Haines <a moz-do-not-send="true" href="mailto:thaines@astro.wisc.edu" target="_blank">&lt;thaines@astro.wisc.edu&gt;</a>
Cc: <a moz-do-not-send="true" href="mailto:paraview@paraview.org" target="_blank">"paraview@paraview.org"</a> <a moz-do-not-send="true" href="mailto:paraview@paraview.org" target="_blank">&lt;paraview@paraview.org&gt;</a>
Message-ID:
        <a moz-do-not-send="true" href="mailto:CANjZAi9cQtyYszXBa1z8xgr+HKAzGOd5g-Z6nG85vMyHR_4o=g@mail.gmail.com" target="_blank">&lt;CANjZAi9cQtyYszXBa1z8xgr+HKAzGOd5g-Z6nG85vMyHR_4o=g@mail.gmail.com&gt;</a>
Content-Type: text/plain; charset="iso-8859-1"

Can you share or point us to a url for a small Gadget2 data set that we can
try with?



David E DeMarle
Kitware, Inc.
R&amp;D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: <a moz-do-not-send="true" href="tel:518-881-4909" value="+15188814909" target="_blank">518-881-4909</a>
</pre>
                            </blockquote>
                          </div>
                          <br>
_______________________________________________<br>
                          Powered by <a moz-do-not-send="true"
                            href="http://www.kitware.com"
                            target="_blank">www.kitware.com</a><br>
                          <br>
                          Visit other Kitware open-source projects at <a
                            moz-do-not-send="true"
                            href="http://www.kitware.com/opensource/opensource.html"
                            target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
                          <br>
                          Please keep messages on-topic and check the
                          ParaView Wiki at: <a moz-do-not-send="true"
                            href="http://paraview.org/Wiki/ParaView"
                            target="_blank">http://paraview.org/Wiki/ParaView</a><br>
                          <br>
                          Follow this link to subscribe/unsubscribe:<br>
                          <a moz-do-not-send="true"
                            href="http://www.paraview.org/mailman/listinfo/paraview"
                            target="_blank">http://www.paraview.org/mailman/listinfo/paraview</a><br>
                          <br>
                        </blockquote>
                      </div>
                      <br>
                    </div>
                  </blockquote>
                  <br>
                </div>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
    </blockquote>
    <br>
  </body>
</html>