https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MaxVarNDofsPerElem.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 "MaxVarNDofsPerElem.h"
11#include "SolverSystem.h"
12#include "Problem.h"
13#include "Damper.h"
14
15// libmesh includes
16#include "libmesh/threads.h"
17
19 : ThreadedElementLoop<ConstElemRange>(feproblem),
20 _system(sys),
21 _max(0),
22 _dof_map(_system.dofMap())
23{
24}
25
26// Splitting Constructor
28 : ThreadedElementLoop<ConstElemRange>(x, split), _system(x._system), _max(0), _dof_map(x._dof_map)
29{
30}
31
33
34void
36{
37 for (unsigned int var = 0; var < _system.nVariables(); var++)
38 {
39 _dof_map.dof_indices(elem, _dof_indices, var);
40
41 _max = std::max(_max, _dof_indices.size());
42 }
43}
44
45void
47{
48 _max = std::max(_max, y._max);
49}
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
std::vector< dof_id_type > _dof_indices
Reusable storage.
const DofMap & _dof_map
DOF map.
size_t _max
Maximum number of dofs for any one variable on any one element.
virtual void onElement(const Elem *elem)
Assembly of the element (not including surface assembly)
void join(const MaxVarNDofsPerElem &)
MaxVarNDofsPerElem(FEProblemBase &feproblem, SolverSystem &sys)
SolverSystem & _system
The nonlinear system.
virtual unsigned int nVariables() const
Get the number of variables in this system.
Definition SystemBase.C:890
Base class for assembly-like calculations.