www.mooseframework.org
SerializerGuard.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #pragma once
11 
12 namespace libMesh
13 {
14 namespace Parallel
15 {
16 class Communicator;
17 }
18 }
19 
25 {
26 public:
27  SerializerGuard(const libMesh::Parallel::Communicator & comm, bool warn = true);
29 
30 protected:
31  const libMesh::Parallel::Communicator & _comm;
32  bool _warn;
33 };
34 
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
SerializerGuard(const libMesh::Parallel::Communicator &comm, bool warn=true)
const libMesh::Parallel::Communicator & _comm
MPI_Comm comm
A scope guard that guarantees that whatever happens between when it gets created and when it is destr...