- 
                Notifications
    
You must be signed in to change notification settings  - Fork 299
 
CheckpointIO DistributedMesh fixes #1291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            26 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      2e95ce2
              
                Typo fix
              
              
                roystgnr 6e4108d
              
                xdr_translator<long long> + missing instantiations
              
              
                roystgnr 03f8e21
              
                Use xdr_translator<> in Xdr::data_stream
              
              
                roystgnr 7ed0467
              
                CheckPointIO read/write_remote_elem methods
              
              
                roystgnr 1e1efe0
              
                Fixup segfault in read_remote_elem
              
              
                roystgnr 4424eb9
              
                Read and write remote_elem info in CheckpointIO
              
              
                roystgnr 968add6
              
                Add MeshBase::set_distributed()
              
              
                roystgnr 0908291
              
                Don't try to second guess ghosting functors
              
              
                roystgnr 4327698
              
                ReplicatedMesh reads of parallel CheckpointIO
              
              
                roystgnr 550b2cc
              
                Restore _parallel autodetection
              
              
                roystgnr 2507edf
              
                ReplicateMesh should only read once
              
              
                roystgnr e607725
              
                Read on ReplicatedMesh proc 0
              
              
                roystgnr ba9f8ef
              
                Don't double-add elements or nodes
              
              
                roystgnr 32ce10f
              
                Unit test both binary and ASCII CheckpointIO
              
              
                roystgnr 7fb3f72
              
                Careful when handing off from ParMETIS to METIS
              
              
                roystgnr 4ba979b
              
                A one-processor mesh is never *really* distributed
              
              
                roystgnr 5217e3d
              
                More CheckpointIO mesh combination tests
              
              
                roystgnr 727241b
              
                CompareElemIdsByLevel deserves a header
              
              
                roystgnr 333d8e7
              
                Add compare_elems_by_level.h to build system
              
              
                roystgnr 5d7fcb1
              
                Re-bootstrap
              
              
                roystgnr 69d1cba
              
                Use CompareElemIdsByLevel from header
              
              
                roystgnr 93094dd
              
                Expose MeshCommunication ghosting utilities
              
              
                roystgnr 969d684
              
                Massive CheckpointIO refactoring
              
              
                roystgnr 7465651
              
                Make header guard define match filename
              
              
                roystgnr 5c3c91b
              
                Prefer C++ style casts
              
              
                roystgnr a90f8fa
              
                Remove C++11-ism from code
              
              
                roystgnr File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| // The libMesh Finite Element Library. | ||
| // Copyright (C) 2002-2017 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner | ||
| 
     | 
||
| // This library is free software; you can redistribute it and/or | ||
| // modify it under the terms of the GNU Lesser General Public | ||
| // License as published by the Free Software Foundation; either | ||
| // version 2.1 of the License, or (at your option) any later version. | ||
| 
     | 
||
| // This library is distributed in the hope that it will be useful, | ||
| // but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| // Lesser General Public License for more details. | ||
| 
     | 
||
| // You should have received a copy of the GNU Lesser General Public | ||
| // License along with this library; if not, write to the Free Software | ||
| // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
| 
     | 
||
| 
     | 
||
| 
     | 
||
| #ifndef LIBMESH_COMPARE_ELEMS_BY_LEVEL_H | ||
| #define LIBMESH_COMPARE_ELEMS_BY_LEVEL_H | ||
| 
     | 
||
| 
     | 
||
| // Local Includes | ||
| #include "libmesh/elem.h" | ||
| 
     | 
||
| // C++ Includes | ||
| #include <numeric> | ||
| #include <set> | ||
| 
     | 
||
| 
     | 
||
| 
     | 
||
| 
     | 
||
| namespace libMesh { | ||
| 
     | 
||
| /** | ||
| * Specific weak ordering for Elem *'s to be used in a set. | ||
| * We use the id, but first sort by level. This guarantees | ||
| * when traversing the set from beginning to end the lower | ||
| * level (parent) elements are encountered first. | ||
| */ | ||
| struct CompareElemIdsByLevel | ||
| { | ||
| bool operator()(const Elem * a, | ||
| const Elem * b) const | ||
| { | ||
| libmesh_assert (a); | ||
| libmesh_assert (b); | ||
| const unsigned int | ||
| al = a->level(), bl = b->level(); | ||
| const dof_id_type | ||
| aid = a->id(), bid = b->id(); | ||
| 
     | 
||
| return (al == bl) ? aid < bid : al < bl; | ||
| } | ||
| }; | ||
| 
     | 
||
| 
     | 
||
| } // namespace libMesh | ||
| 
     | 
||
| #endif // LIBMESH_COMPARE_ELEMS_BY_LEVEL_H | ||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI The elem_hash.h file already has some Elem comparison helper functors in this vein... but since you've already done all the build system changes to add a new header, this is probably fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually like this better, personally; digging through MOOSE is made much, much easier by how consistent you guys are about keeping one class per file, with the class name and filename matching.