https://mooseframework.inl.gov
MooseVariableDependencyInterface.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 
11 #include "MooseVariableFieldBase.h"
12 #include "MooseObject.h"
13 #include "SystemBase.h"
14 #include "MooseError.h"
15 
16 #include "libmesh/dof_object.h"
17 #include "libmesh/dof_map.h"
18 
19 using namespace libMesh;
20 
22 
23 template <typename DofObjectType>
24 std::set<MooseVariableFieldBase *>
26  const DofObjectType & dof_object, const std::set<MooseVariableFieldBase *> & vars_to_check)
27 {
28  std::set<MooseVariableFieldBase *> vars_without_indices;
29  for (auto * const var : vars_to_check)
30  {
31  var->sys().dofMap().dof_indices(&dof_object, _dof_indices, var->number());
32  if (_dof_indices.empty())
33  vars_without_indices.insert(var);
34  }
35 
36  return vars_without_indices;
37 }
38 
39 template std::set<MooseVariableFieldBase *> MooseVariableDependencyInterface::checkVariables(
40  const Elem & dof_object, const std::set<MooseVariableFieldBase *> & vars_to_check);
41 template std::set<MooseVariableFieldBase *> MooseVariableDependencyInterface::checkVariables(
42  const Node & dof_object, const std::set<MooseVariableFieldBase *> & vars_to_check);
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
std::set< MooseVariableFieldBase * > checkVariables(const DofObjectType &dof_object, const std::set< MooseVariableFieldBase *> &vars_to_check)
Check whether all of the supplied variables have degree of freedom indices on the supplied degree of ...
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28