https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ElementLoopUserObject.h
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
10#pragma once
11
12#include "GeneralUserObject.h"
13#include "Coupleable.h"
14#include "ScalarCoupleable.h"
16#include "MooseVariable.h"
17#include "SubProblem.h"
18#include "NonlinearSystem.h"
19#include "Assembly.h"
20#include "FEProblem.h"
21#include "MooseMesh.h"
22
23#include "libmesh/elem.h"
24#include "libmesh/parallel_algebra.h"
25
26// Forward Declarations
27
28namespace libMesh
29{
30class Elem;
31class QBase;
32}
33
55 public BlockRestrictable,
56 public Coupleable,
58{
59public:
61
63 ElementLoopUserObject(ElementLoopUserObject & x, Threads::split split);
64 virtual ~ElementLoopUserObject();
65
66 virtual void initialize();
67 virtual void execute();
68 virtual void finalize();
69
70 virtual void pre();
71 virtual void preElement(const Elem * elem);
72 virtual void onElement(const Elem * elem);
73 virtual void onBoundary(const Elem * elem, unsigned int side, BoundaryID bnd_id);
74 virtual void onInternalSide(const Elem * elem, unsigned int side);
75 virtual void onInterface(const Elem * elem, unsigned int side, BoundaryID bnd_id);
76 virtual void post();
77 virtual void subdomainChanged();
78 virtual bool keepGoing() { return true; }
79
80 virtual void meshChanged();
81
82 void join(const ElementLoopUserObject & /*y*/);
83
84protected:
85 virtual void caughtMooseException(MooseException & e);
86
88
89 const Elem * _current_elem;
91 unsigned int _current_side;
92 const Elem * _current_neighbor;
93
95 const QBase * const & _qrule;
98
102 std::set<dof_id_type> _interface_elem_ids;
103
106
109
110 virtual void computeElement();
111 virtual void computeBoundary();
112 virtual void computeInternalSide();
113 virtual void computeInterface();
114};
boundary_id_type BoundaryID
const std::vector< double > x
A base class that loops over elements and do things.
SubdomainID _subdomain
The subdomain for the current element.
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id)
const MooseArray< Real > & _JxW
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id)
virtual void onElement(const Elem *elem)
bool _have_interface_elems
true if we have cached interface elements, false if they need to be cached. We want to (re)cache only...
std::set< dof_id_type > _interface_elem_ids
List of element IDs that are on the processor boundary and need to be send to other processors.
SubdomainID _old_subdomain
The subdomain for the last element.
const QBase *const & _qrule
virtual void caughtMooseException(MooseException &e)
virtual void preElement(const Elem *elem)
void join(const ElementLoopUserObject &)
virtual void onInternalSide(const Elem *elem, unsigned int side)
const MooseArray< Real > & _coord
const MooseArray< Point > & _q_point
static InputParameters validParams()
const InputParameters & parameters() const
The following methods are specializations for using the Parallel::packed_range_* routines for a vecto...