https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
20using namespace libMesh;
21
23
24#ifdef MOOSE_KOKKOS_ENABLED
29#endif
30
31template <typename DofObjectType>
32std::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
47template std::set<MooseVariableFieldBase *> MooseVariableDependencyInterface::checkVariablesHelper(
48 const Elem & dof_object, const std::set<MooseVariableFieldBase *> & vars_to_check);
49template std::set<MooseVariableFieldBase *> MooseVariableDependencyInterface::checkVariablesHelper(
50 const Node & dof_object, const std::set<MooseVariableFieldBase *> & vars_to_check);
Every object that can be built by the factory should be derived from this class.
Definition MooseObject.h:31
std::set< MooseVariableFieldBase * > checkVariablesHelper(const DofObjectType &dof_object, const std::set< MooseVariableFieldBase * > &vars_to_check)
Helper method for checking variables for dof indices.
std::vector< libMesh::dof_id_type > _dof_indices
A container for holding dof indices in order to avoid constant memory reallocation.
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...