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 "MooseApp.h"
13 #include "MooseObject.h"
14 #include "SystemBase.h"
15 #include "MooseError.h"
16 
17 #include "libmesh/dof_object.h"
18 #include "libmesh/dof_map.h"
19 
20 using namespace libMesh;
21 
23 
24 #ifdef MOOSE_KOKKOS_ENABLED
27 {
28 }
29 #endif
30 
31 template <typename DofObjectType>
32 std::set<MooseVariableFieldBase *>
34  const DofObjectType & dof_object, const std::set<MooseVariableFieldBase *> & vars_to_check)
35 {
36  std::set<MooseVariableFieldBase *> vars_without_indices;
37  for (auto * const var : vars_to_check)
38  {
39  var->sys().dofMap().dof_indices(&dof_object, _dof_indices, var->number());
40  if (_dof_indices.empty())
41  vars_without_indices.insert(var);
42  }
43 
44  return vars_without_indices;
45 }
46 
47 template std::set<MooseVariableFieldBase *> MooseVariableDependencyInterface::checkVariablesHelper(
48  const Elem & dof_object, const std::set<MooseVariableFieldBase *> & vars_to_check);
49 template std::set<MooseVariableFieldBase *> MooseVariableDependencyInterface::checkVariablesHelper(
50  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 * > checkVariablesHelper(const DofObjectType &dof_object, const std::set< MooseVariableFieldBase *> &vars_to_check)
Helper method for checking variables for dof indices.
Every object that can be built by the factory should be derived from this class.
Definition: MooseObject.h:28