Comments (5)
Looks like we added subdomain id output back in 2013, but nobody's ever bothered to add input? The VTKIO::write-to-VTKIO::read case should be easy to fix.
I'd be paranoid that this is just one of a number of similar shortcomings, though. IIRC most of our developers have mostly used VTK as a format for visualization, not restarts.
And, while I can add the VTKIO round-trip support easily enough ... enabling Paraview conversions might be trickier. It looks like newer versions of VTK support a vtkMultiBlockDataSet, and I'm guessing that's what they use to handle block ids if anything is, but the vtkUnstructuredGrid we use doesn't seem to be related to that.
You'd think there'd still be room for subdomain identification somewhere ... but maybe that's really just a libMesh thing? Even ExodusII doesn't have subdomain info; it has "blocks" to keep hexes and the tets in separate fixed-element-type sections as a low-level data structure thing, and then we have an ugly hack where we map those to high-level-concept subdomains and just pray that users who want to put mixed element types in the same element type don't need to use Exodus.
from libmesh.
nobody's ever bothered to add input?
Wow, I can see why. I can't find VTKIO::read() coverage anywhere in the existing libMesh tests or MOOSE tests, just a half dozen or so xmldiff'ed output tests in MOOSE tests and about as many invocations (without even diff testing) in libMesh examples. Someone did add a bit of read() support at one time, but the most recently I can see it getting real attention in the git logs was 2016.
Trying to write new tests, I can't even figure out what you must be doing, since our support for VTK reads is so bad. Trying to write .vtu currently complains and dies (because we just make everyone use .pvtu now), but trying to do a name-based read of .pvtu fails (because we never added it alongside .vtu to the list of suffixes to check), and if I fix that then doing any read of .pvtu fails (because we use vtkXMLPUnstructuredGridWriter
but we only use vtkXMLUnstructuredGridReader
without the P).
Any way, I've got like 5 fixes coming down the pipe in libMesh, so whatever you're doing, is there any way we can get a quick regression test (for the non-broken aspects of it) into MOOSE? It's scary to edit code with zero test coverage...
from libmesh.
I was just trying to read a mesh file that I only had in this vtu format. And I had output it in that format to provide it to someone for them to use in StarCCM.
But then they started using MOOSE and were struggling to read it.
from libmesh.
But yeah I did not end up reading in the .vtu. I converted it to exodus using Paraview then grabbed the EEIDs like this:
[Mesh]
[fmg]
type = FileMeshGenerator
file = 'mesh.e'
exodus_extra_element_integers = 'subdomain_id processor_id'
[]
[convert_eeid_to_blocks_0]
type = ParsedSubdomainMeshGenerator
input = fmg
block_id = 9
combinatorial_geometry = 'subdomain_id<2'
extra_element_id_names = 'subdomain_id'
show_info = true
[]
[convert_eeid_to_blocks_1]
type = ParsedSubdomainMeshGenerator
input = convert_eeid_to_blocks_0
block_id = 20
combinatorial_geometry = 'subdomain_id>10'
extra_element_id_names = 'subdomain_id'
show_info = true
[]
[]
from libmesh.
.pvtu reads are actually quite horrifying to try to fix.
How is any software supposed to piece together connectivity here? Points on multiple processors get written out on each, with no ids, nothing to say whether they're ghosting/sharing other processors' points or whether they're independent ... and it doesn't look like this is our fault; I can't find anything along those lines in https://vtk.org/wp-content/uploads/2015/04/file-formats.pdf either.
Looking at the Information tab in a .pvtu loaded in Paraview, it doesn't even bother trying to connect up the individual pieces, it just happily reports that a 16-node mesh has 21 nodes because it saw 5 duplicates.
I'm thinking of adding a "libmesh_node_id" array to go along with "libmesh_elem_id", and then just refusing to load any file split across more than one processor unless it has node ids. We could try stitching by node location, but that's not the sort of thing to do automatically unless we want one-in-a-billion failures on problems with moving meshes and one-in-one failures on problems with slit meshes.
from libmesh.
Related Issues (20)
- constrain_element_matrix changes the col_dofs vector size HOT 3
- Investigating the possibility of only having one solution vector in systems HOT 3
- Make Abaqus node/side ID maps available
- DM type 'libmesh' did not attach the DM to the matrix HOT 6
- Issues with latest libmesh devel -> master merge HOT 1
- Operator `()` of a petsc vector is not safe if used together with `set()` in a threaded loop.
- The 'mesh.read()' operation encounters errors when executed with 2048 processors HOT 1
- ExodusII IO has variable ID bug which can prevent coordinates from being read-in from a file HOT 4
- The release v1.7.2 doesn't have the tarballs attached HOT 1
- "No rule to make target..." installation error on Windows HOT 3
- Install FParser `fptypes.hh` header
- Libmesh out-of-date on spack HOT 3
- install error with vcpkg on linux HOT 5
- System destructor requires the mesh to still be around, through the dof map HOT 11
- Setting a variable to zero in a given iteration
- Issue with metaphysicl tests when running "make check" HOT 5
- Issue with libmetis.so.5 while make install HOT 3
- Implement static condensation
- make error src/base/libmesh_opt_la-libmesh.lo error 1 HOT 2
- Import from MSH-File: HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libmesh.