Skip to content

serial only intermediate version of SiloWriter::writeKullMesh capability#16

Open
dougmiller999 wants to merge 1 commit into
masterfrom
writeKullMeshes
Open

serial only intermediate version of SiloWriter::writeKullMesh capability#16
dougmiller999 wants to merge 1 commit into
masterfrom
writeKullMeshes

Conversation

@dougmiller999
Copy link
Copy Markdown
Collaborator

I don't think this breaks anything! I'm intending only to add the function SiloWriter::writeKullMesh to the SiloWriter class. But, since it's my first pull request, something will probably go wrong.

@jmikeowen
Copy link
Copy Markdown
Collaborator

jmikeowen commented Nov 7, 2019 via email

@dougmiller999
Copy link
Copy Markdown
Collaborator Author

I don't know! I think when I started the motivation was that ShaPo wasn't quite ready to make meshes on its own, and Draco was definitely not going to make unstructured polygonal anything for us. POLYTOPE seemed like a good tool to start generating some polygonal meshes.

I think I specialized it to Kull to avoid stepping on an existing mesh writer? I actually can't remember, it was so long ago.

@pbtoast
Copy link
Copy Markdown
Collaborator

pbtoast commented Nov 7, 2019

Worth trying to use Polytope's mesh writer and seeing what goes wrong? I seem to recall you saying something about unhappy faces, but that's something we should fix.

@jmikeowen
Copy link
Copy Markdown
Collaborator

jmikeowen commented Nov 7, 2019 via email

@dougmiller999
Copy link
Copy Markdown
Collaborator Author

Ah, I think that was the deal. The existing mesh writer worked fine for Silo but it actually had some finicky thing that wasn't exactly correct in the Silo format that Kull insisted on. I added a new function because I wasn't sure if someone was using the existing writer and didn't want to mess it up for them. I think I intended, way back when, to have this conversation before committing anything to the real code base. Do we have a test suite I can run my writer against? If it passes both the polytope suite and Kull can read the output, then yup, two writers is dumb.

@pbtoast
Copy link
Copy Markdown
Collaborator

pbtoast commented Nov 8, 2019

Hrmmm, doesn't look like we use the Silo writer anywhere in the tests. Opportunities abound!

Doug, do you have an "executive summary" of the modifications you made for Kull to read the mesh? Any reason we shouldn't incorporate them into the existing writer? Does it make assumptions specific to Kull and not to all arbitrary polygonal/hedral meshes?

@jmikeowen
Copy link
Copy Markdown
Collaborator

jmikeowen commented Nov 8, 2019 via email

@dougmiller999
Copy link
Copy Markdown
Collaborator Author

Ok, just reviewed the changes. Executive summary:

  1. the output file is definitely different, but it is definitely a legit SILO-compliant unstructured polygonal mesh, circa SILO March 2019. Also Kull-compliant. And VisIt-compliant.

  2. Output file includes Material data, hard-wired to 1 material. Kull must have needed that ("KMHNT").

  3. The DBOPT_COORDSYS option is included, hard-wired to DB_CARTESIAN. KMHNT.

  4. The names of the files written out for the mesh are hard-wired differently (KHMNT), and a directory is created where the files are dumped (the directory can be named anything the user wants).

  5. The file writing changes were only made to the serial case; the parallel code (the #ifdef HAVE_MPI clause) was not changed, so probably (certainly) the parallel case isn't Kull-compliant.

@jmikeowen
Copy link
Copy Markdown
Collaborator

jmikeowen commented Nov 8, 2019 via email

@dougmiller999
Copy link
Copy Markdown
Collaborator Author

Are we worried about the parallel file case? It doesn't seem like a high priority right now, but it'll have to be addressed eventually.

@jmikeowen
Copy link
Copy Markdown
Collaborator

jmikeowen commented Nov 8, 2019 via email

@dougmiller999
Copy link
Copy Markdown
Collaborator Author

Agreed. I suppose the choices for you are,

  1. accept this PR as is, or
  2. have me change SiloWriter::write to be this modified method and accept that, or,
  3. do (2) and also fix the parallel write before accepting the PR, or,
  4. some other thing I haven't thought of. Burn it all down! Who knows?

All of these are ok with me, btw. I bow to the accumulated wisdom of the polytope elders.

@pbtoast
Copy link
Copy Markdown
Collaborator

pbtoast commented Nov 9, 2019

Well in a perfect world, number 3 would be best, but it has to be weighed against the burden we're placing on your enthusiasm, Tough Guy.

In particular, it sounds like some things have to be decided which haven't definitely been yet (materials in silo files, coordinate systems, parallelism). I'm fine with 1 if you're willing to create one or more issues that represent these things so that we can address them down the line. If these things can be decided sooner rather than later and you want to work them out first thing, that's great too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants