https://mooseframework.inl.gov
MaxVarNDofsPerNode.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
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 #include "MaxVarNDofsPerNode.h"
11 #include "SolverSystem.h"
12 #include "Problem.h"
13 #include "Damper.h"
14 
15 // libmesh includes
16 #include "libmesh/threads.h"
17 
19  : ThreadedNodeLoop<ConstNodeRange, ConstNodeRange::const_iterator>(feproblem),
20  _system(sys),
21  _max(0),
22  _dof_map(_system.dofMap())
23 {
24 }
25 
26 // Splitting Constructor
28  : ThreadedNodeLoop<ConstNodeRange, ConstNodeRange::const_iterator>(x, split),
29  _system(x._system),
30  _max(0),
31  _dof_map(x._dof_map)
32 {
33 }
34 
36 
37 void
39 {
40  for (unsigned int var = 0; var < _system.nVariables(); var++)
41  {
42  _dof_map.dof_indices(*node_it, _dof_indices, var);
43 
44  _max = std::max(_max, _dof_indices.size());
45  }
46 }
47 
48 void
50 {
51  _max = std::max(_max, y._max);
52 }
const DofMap & _dof_map
DOF map.
void join(const MaxVarNDofsPerNode &)
SolverSystem & _system
The nonlinear system.
MaxVarNDofsPerNode(FEProblemBase &feproblem, SolverSystem &sys)
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
auto max(const L &left, const R &right)
virtual unsigned int nVariables() const
Get the number of variables in this system.
Definition: SystemBase.C:874
std::vector< dof_id_type > _dof_indices
Reusable storage.
tbb::split split
size_t _max
Maximum number of dofs for any one variable on any one node.
vec_type::const_iterator const_iterator
virtual void onNode(ConstNodeRange::const_iterator &node_it) override