www.mooseframework.org
ResetDisplacedMeshThread.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
16 #include "DisplacedProblem.h"
17 #include "MooseMesh.h"
18 
19 #include "SubProblem.h"
20 
22  DisplacedProblem & displaced_problem)
23  : ThreadedNodeLoop<NodeRange, NodeRange::const_iterator>(fe_problem),
24  _displaced_problem(displaced_problem),
25  _ref_mesh(_displaced_problem.refMesh())
26 {
27 }
28 
30  Threads::split split)
31  : ThreadedNodeLoop<NodeRange, NodeRange::const_iterator>(x, split),
34 {
35 }
36 
37 void
38 ResetDisplacedMeshThread::onNode(NodeRange::const_iterator & nd)
39 {
40  Node & displaced_node = **nd;
41 
42  // Get the same node from the reference mesh.
43  Node & reference_node = _ref_mesh.nodeRef(displaced_node.id());
44 
45  // Undisplace the node
46  for (unsigned int i = 0; i < LIBMESH_DIM; ++i)
47  displaced_node(i) = reference_node(i);
48 }
49 
50 void
52 {
53 }
void onNode(NodeRange::const_iterator &nd)
Called for each node.
static PetscErrorCode Vec x
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual const Node & nodeRef(const dof_id_type i) const
Definition: MooseMesh.C:398
void join(const ResetDisplacedMeshThread &)
ResetDisplacedMeshThread(FEProblemBase &fe_problem, DisplacedProblem &displaced_problem)
DisplacedProblem & _displaced_problem