https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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
32void
33ResetDisplacedMeshThread::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
45void
std::shared_ptr< DisplacedProblem > displaced_problem
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const Node & nodeRef(const dof_id_type i) const
Definition MooseMesh.C:841
ResetDisplacedMeshThread(FEProblemBase &fe_problem, DisplacedProblem &displaced_problem)
void onNode(NodeRange::const_iterator &nd)
void join(const ResetDisplacedMeshThread &)
static constexpr std::size_t dim
This is the dimension of all vector and tensor datastructures used in MOOSE.
Definition Moose.h:165