www.mooseframework.org
AllLocalDofIndicesThread.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 #include "Moose.h"
13 #include "MooseTypes.h"
14 
15 #include "libmesh/elem_range.h"
16 #include "libmesh/parallel_object.h"
17 
18 // Forward declare classes in libMesh
19 namespace libMesh
20 {
21 class System;
22 class DofMap;
23 }
24 class SubProblem;
25 
30 class AllLocalDofIndicesThread : public ParallelObject
31 {
32 public:
34  std::vector<std::string> vars,
35  bool include_semilocal = false);
36  // Splitting Constructor
38 
39  void operator()(const ConstElemRange & range);
40 
41  void join(const AllLocalDofIndicesThread & y);
42 
43  const std::set<dof_id_type> & getDofIndices() const { return _all_dof_indices; }
44 
45  void dofIndicesSetUnion();
46 
47 protected:
49  System * _sys;
50  std::vector<unsigned int> _var_numbers;
51 
53  const bool _include_semilocal;
54 
56 
57  std::set<dof_id_type> _all_dof_indices;
58 };
void operator()(const ConstElemRange &range)
std::vector< unsigned int > _var_numbers
void join(const AllLocalDofIndicesThread &y)
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
const std::set< dof_id_type > & getDofIndices() const
StoredRange< MeshBase::const_element_iterator, const Elem *> ConstElemRange
Grab all the (possibly semi)local dof indices for the variables passed in, in the system passed in...
std::set< dof_id_type > _all_dof_indices
tbb::split split
Generic class for solving transient nonlinear problems.
Definition: SubProblem.h:75
const bool _include_semilocal
Whether to include semilocal dof indices.
AllLocalDofIndicesThread(SubProblem &problem, std::vector< std::string > vars, bool include_semilocal=false)
unsigned int THREAD_ID
Definition: MooseTypes.h:198