https://mooseframework.inl.gov
ResetDisplacedMeshThread.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 "DisplacedProblem.h"
12 #include "MooseMesh.h"
13 
14 #include "SubProblem.h"
15 
18  : ThreadedNodeLoop<NodeRange, NodeRange::const_iterator>(fe_problem),
19  _displaced_problem(displaced_problem),
20  _ref_mesh(_displaced_problem.refMesh())
21 {
22 }
23 
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
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 }
std::shared_ptr< DisplacedProblem > displaced_problem
void onNode(NodeRange::const_iterator &nd)
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition: Moose.h:153
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:831
tbb::split split
vec_type::const_iterator const_iterator
IntRange< T > make_range(T beg, T end)
void join(const ResetDisplacedMeshThread &)
ResetDisplacedMeshThread(FEProblemBase &fe_problem, DisplacedProblem &displaced_problem)