www.mooseframework.org
ResetDisplacedMeshThread.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "DisplacedProblem.h"
12 #include "MooseMesh.h"
13 
14 #include "SubProblem.h"
15 
17  DisplacedProblem & displaced_problem)
18  : ThreadedNodeLoop<NodeRange, NodeRange::const_iterator>(fe_problem),
19  _displaced_problem(displaced_problem),
20  _ref_mesh(_displaced_problem.refMesh())
21 {
22 }
23 
25  Threads::split split)
26  : ThreadedNodeLoop<NodeRange, NodeRange::const_iterator>(x, split),
27  _displaced_problem(x._displaced_problem),
28  _ref_mesh(x._ref_mesh)
29 {
30 }
31 
32 void
33 ResetDisplacedMeshThread::onNode(NodeRange::const_iterator & nd)
34 {
35  Node & displaced_node = **nd;
36 
37  // Get the same node from the reference mesh.
38  Node & reference_node = _ref_mesh.nodeRef(displaced_node.id());
39 
40  // Undisplace the node
41  for (const auto i : make_range(Moose::dim))
42  displaced_node(i) = reference_node(i);
43 }
44 
45 void
47 {
48 }
void onNode(NodeRange::const_iterator &nd)
Called for each node.
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:148
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:637
tbb::split split
IntRange< T > make_range(T beg, T end)
void join(const ResetDisplacedMeshThread &)
ResetDisplacedMeshThread(FEProblemBase &fe_problem, DisplacedProblem &displaced_problem)
StoredRange< MeshBase::node_iterator, Node *> NodeRange