www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | Static Private Attributes | List of all members
SlopeReconstructionBase Class Referenceabstract

Base class for piecewise linear slope reconstruction to get the slopes of element average variables. More...

#include <SlopeReconstructionBase.h>

Inheritance diagram for SlopeReconstructionBase:
[legend]

Public Member Functions

 SlopeReconstructionBase (const InputParameters &parameters)
 
virtual void initialize ()
 
virtual void finalize ()
 
virtual void computeElement ()
 
virtual const std::vector< RealGradient > & getElementSlope (dof_id_type elementid) const
 accessor function call to get element slope values More...
 
virtual const std::vector< Real > & getElementAverageValue (dof_id_type elementid) const
 accessor function call to get element average variable values More...
 
virtual const std::vector< Real > & getBoundaryAverageValue (dof_id_type elementid, unsigned int side) const
 accessor function call to get boundary average variable values More...
 
virtual const Point & getSideCentroid (dof_id_type elementid, dof_id_type neighborid) const
 accessor function call to get cached internal side centroid More...
 
virtual const Point & getBoundarySideCentroid (dof_id_type elementid, unsigned int side) const
 accessor function call to get cached boundary side centroid More...
 
virtual const Point & getSideNormal (dof_id_type elementid, dof_id_type neighborid) const
 accessor function call to get cached internal side normal More...
 
virtual const Point & getBoundarySideNormal (dof_id_type elementid, unsigned int side) const
 accessor function call to get cached boundary side centroid More...
 
virtual const Real & getSideArea (dof_id_type elementid, dof_id_type neighborid) const
 accessor function call to get cached internal side area More...
 
virtual const Real & getBoundarySideArea (dof_id_type elementid, unsigned int side) const
 accessor function call to get cached boundary side area More...
 
virtual void reconstructElementSlope ()=0
 compute the slope of the cell More...
 
virtual void meshChanged ()
 
virtual void execute ()
 
virtual void pre ()
 
virtual void preElement (const Elem *elem)
 
virtual void onElement (const Elem *elem)
 
virtual void onBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id)
 
virtual void onInternalSide (const Elem *elem, unsigned int side)
 
virtual void onInterface (const Elem *elem, unsigned int side, BoundaryID bnd_id)
 
virtual void post ()
 
virtual void subdomainChanged ()
 
virtual bool keepGoing ()
 
void join (const ElementLoopUserObject &)
 

Protected Member Functions

virtual void serialize (std::string &serialized_buffer)
 
virtual void deserialize (std::vector< std::string > &serialized_buffers)
 
virtual void caughtMooseException (MooseException &e)
 
virtual void computeBoundary ()
 
virtual void computeInternalSide ()
 
virtual void computeInterface ()
 

Protected Attributes

std::map< dof_id_type, std::vector< RealGradient > > & _rslope
 store the reconstructed slopes into this map indexed by element ID More...
 
std::map< dof_id_type, std::vector< Real > > & _avars
 store the average variable values into this map indexed by element ID More...
 
std::map< std::pair< dof_id_type, unsigned int >, std::vector< Real > > & _bnd_avars
 store the boundary average variable values into this map indexed by pair of element ID and local side ID More...
 
std::map< std::pair< dof_id_type, dof_id_type >, Point > & _side_centroid
 store the side centroid into this map indexed by pair of element ID and neighbor ID More...
 
std::map< std::pair< dof_id_type, unsigned int >, Point > & _bnd_side_centroid
 store the boundary side centroid into this map indexed by pair of element ID and local side ID More...
 
std::map< std::pair< dof_id_type, dof_id_type >, Real > & _side_area
 store the side area into this map indexed by pair of element ID and neighbor ID More...
 
std::map< std::pair< dof_id_type, unsigned int >, Real > & _bnd_side_area
 store the boundary side area into this map indexed by pair of element ID and local side ID More...
 
std::map< std::pair< dof_id_type, dof_id_type >, Point > & _side_normal
 store the side normal into this map indexed by pair of element ID and neighbor ID More...
 
std::map< std::pair< dof_id_type, unsigned int >, Point > & _bnd_side_normal
 store the boundary side normal into this map indexed by pair of element ID and local side ID More...
 
const MooseArray< Point > & _q_point_face
 required data for face assembly More...
 
const QBase *const & _qrule_face
 
const MooseArray< Real > & _JxW_face
 
const MooseArray< Point > & _normals_face
 
const unsigned int & _side
 current side of the current element More...
 
const Elem *const & _side_elem
 
const Real & _side_volume
 
const Elem *const & _neighbor_elem
 the neighboring element More...
 
bool _side_geoinfo_cached
 flag to indicated if side geometry info is cached More...
 
MooseMesh & _mesh
 
const Elem * _current_elem
 
const Real & _current_elem_volume
 
unsigned int _current_side
 
const Elem * _current_neighbor
 
const MooseArray< Point > & _q_point
 
const QBase *const & _qrule
 
const MooseArray< Real > & _JxW
 
const MooseArray< Real > & _coord
 
bool _have_interface_elems
 true if we have cached interface elements, false if they need to be cached. We want to (re)cache only when mesh changed More...
 
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. More...
 
SubdomainID _subdomain
 The subdomain for the current element. More...
 
SubdomainID _old_subdomain
 The subdomain for the last element. More...
 

Static Private Attributes

static Threads::spin_mutex _mutex
 

Detailed Description

Base class for piecewise linear slope reconstruction to get the slopes of element average variables.

Definition at line 25 of file SlopeReconstructionBase.h.

Constructor & Destructor Documentation

◆ SlopeReconstructionBase()

SlopeReconstructionBase::SlopeReconstructionBase ( const InputParameters &  parameters)

Definition at line 25 of file SlopeReconstructionBase.C.

26  : ElementLoopUserObject(parameters),
27  _rslope(declareRestartableData<std::map<dof_id_type, std::vector<RealGradient>>>(
28  "reconstructed_slopes")),
29  _avars(declareRestartableData<std::map<dof_id_type, std::vector<Real>>>("avg_var_values")),
30  _bnd_avars(
31  declareRestartableData<std::map<std::pair<dof_id_type, unsigned int>, std::vector<Real>>>(
32  "avg_bnd_var_values")),
33  _side_centroid(declareRestartableData<std::map<std::pair<dof_id_type, dof_id_type>, Point>>(
34  "side_centroid")),
36  declareRestartableData<std::map<std::pair<dof_id_type, unsigned int>, Point>>(
37  "bnd_side_centroid")),
38  _side_area(
39  declareRestartableData<std::map<std::pair<dof_id_type, dof_id_type>, Real>>("side_area")),
40  _bnd_side_area(declareRestartableData<std::map<std::pair<dof_id_type, unsigned int>, Real>>(
41  "bnd_side_area")),
42  _side_normal(declareRestartableData<std::map<std::pair<dof_id_type, dof_id_type>, Point>>(
43  "side_normal")),
44  _bnd_side_normal(declareRestartableData<std::map<std::pair<dof_id_type, unsigned int>, Point>>(
45  "bnd_side_normal")),
46  _q_point_face(_assembly.qPointsFace()),
47  _qrule_face(_assembly.qRuleFace()),
48  _JxW_face(_assembly.JxWFace()),
49  _normals_face(_assembly.normals()),
50  _side(_assembly.side()),
51  _side_elem(_assembly.sideElem()),
52  _side_volume(_assembly.sideElemVolume()),
53  _neighbor_elem(_assembly.neighbor()),
55 {
56 }

Member Function Documentation

◆ caughtMooseException()

void ElementLoopUserObject::caughtMooseException ( MooseException &  e)
protectedvirtualinherited

Definition at line 260 of file ElementLoopUserObject.C.

261 {
262  std::string what(e.what());
263  _fe_problem.setException(what);
264 }

Referenced by ElementLoopUserObject::execute().

◆ computeBoundary()

void ElementLoopUserObject::computeBoundary ( )
protectedvirtualinherited

Definition at line 238 of file ElementLoopUserObject.C.

239 {
240 }

Referenced by ElementLoopUserObject::onBoundary().

◆ computeElement()

void SlopeReconstructionBase::computeElement ( )
virtual

Reimplemented from ElementLoopUserObject.

Definition at line 258 of file SlopeReconstructionBase.C.

259 {
261 }

◆ computeInterface()

void ElementLoopUserObject::computeInterface ( )
protectedvirtualinherited

Definition at line 248 of file ElementLoopUserObject.C.

249 {
250 }

Referenced by ElementLoopUserObject::onInterface().

◆ computeInternalSide()

void ElementLoopUserObject::computeInternalSide ( )
protectedvirtualinherited

Definition at line 243 of file ElementLoopUserObject.C.

244 {
245 }

Referenced by ElementLoopUserObject::onInternalSide().

◆ deserialize()

void SlopeReconstructionBase::deserialize ( std::vector< std::string > &  serialized_buffers)
protectedvirtual

Definition at line 283 of file SlopeReconstructionBase.C.

284 {
285  // The input string stream used for deserialization
286  std::istringstream iss;
287 
288  mooseAssert(serialized_buffers.size() == _app.n_processors(),
289  "Unexpected size of serialized_buffers: " << serialized_buffers.size());
290 
291  for (auto rank = decltype(_app.n_processors())(0); rank < serialized_buffers.size(); ++rank)
292  {
293  if (rank == processor_id())
294  continue;
295 
296  iss.str(serialized_buffers[rank]); // populate the stream with a new buffer
297  iss.clear(); // reset the string stream state
298 
299  // Load the communicated data into all of the other processors' slots
300 
301  unsigned int size = 0;
302  iss.read((char *)&size, sizeof(size));
303 
304  for (unsigned int i = 0; i < size; i++)
305  {
306  dof_id_type key;
307  loadHelper(iss, key, this);
308 
309  std::vector<RealGradient> value;
310  loadHelper(iss, value, this);
311 
312  // merge the data we received from other procs
313  _rslope.insert(std::pair<dof_id_type, std::vector<RealGradient>>(key, value));
314  }
315  }
316 }

Referenced by finalize().

◆ execute()

void ElementLoopUserObject::execute ( )
virtualinherited

Definition at line 75 of file ElementLoopUserObject.C.

76 {
77  ConstElemRange & elem_range = *_mesh.getActiveLocalElementRange();
78 
79  try
80  {
81  pre();
82 
83  _subdomain = std::numeric_limits<SubdomainID>::max();
84  ConstElemRange::const_iterator el = elem_range.begin();
85  for (el = elem_range.begin(); el != elem_range.end(); ++el)
86  {
87  if (!keepGoing())
88  break;
89 
90  const Elem * elem = *el;
91  unsigned int cur_subdomain = elem->subdomain_id();
92  preElement(elem);
93 
95  _subdomain = cur_subdomain;
96 
97  if (this->hasBlocks(_subdomain))
98  {
101 
102  onElement(elem);
103 
104  for (unsigned int side = 0; side < elem->n_sides(); side++)
105  {
106  std::vector<BoundaryID> boundary_ids = _mesh.getBoundaryIDs(elem, side);
107 
108  if (boundary_ids.size() > 0)
109  for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
110  it != boundary_ids.end();
111  ++it)
112  onBoundary(elem, side, *it);
113 
114  if (elem->neighbor_ptr(side) != NULL)
115  {
116  if (this->hasBlocks(elem->neighbor_ptr(side)->subdomain_id()))
117  onInternalSide(elem, side);
118  if (boundary_ids.size() > 0)
119  for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
120  it != boundary_ids.end();
121  ++it)
122  onInterface(elem, side, *it);
123  }
124  } // sides
125  }
126  } // range
127 
128  post();
129  }
130  catch (MooseException & e)
131  {
133  }
134 }

◆ finalize()

void SlopeReconstructionBase::finalize ( )
virtual

Reimplemented from ElementLoopUserObject.

Definition at line 68 of file SlopeReconstructionBase.C.

69 {
71 
72  if (_app.n_processors() > 1)
73  {
74  _side_geoinfo_cached = true;
75 
76  std::vector<std::string> send_buffers(1);
77  std::vector<std::string> recv_buffers;
78 
79  recv_buffers.reserve(_app.n_processors());
80  serialize(send_buffers[0]);
81  comm().allgather_packed_range((void *)(nullptr),
82  send_buffers.begin(),
83  send_buffers.end(),
84  std::back_inserter(recv_buffers));
85  deserialize(recv_buffers);
86  }
87 }

◆ getBoundaryAverageValue()

const std::vector< Real > & SlopeReconstructionBase::getBoundaryAverageValue ( dof_id_type  elementid,
unsigned int  side 
) const
virtual

accessor function call to get boundary average variable values

Definition at line 132 of file SlopeReconstructionBase.C.

133 {
134  Threads::spin_mutex::scoped_lock lock(_mutex);
135  std::map<std::pair<dof_id_type, unsigned int>, std::vector<Real>>::const_iterator pos =
136  _bnd_avars.find(std::pair<dof_id_type, unsigned int>(elementid, side));
137 
138  if (pos == _bnd_avars.end())
139  mooseError("Average variable values are not cached for element id '",
140  elementid,
141  "' and side '",
142  side,
143  "' in ",
144  __FUNCTION__);
145 
146  return pos->second;
147 }

◆ getBoundarySideArea()

const Real & SlopeReconstructionBase::getBoundarySideArea ( dof_id_type  elementid,
unsigned int  side 
) const
virtual

accessor function call to get cached boundary side area

Definition at line 240 of file SlopeReconstructionBase.C.

241 {
242  Threads::spin_mutex::scoped_lock lock(_mutex);
243  std::map<std::pair<dof_id_type, unsigned int>, Real>::const_iterator pos =
244  _bnd_side_area.find(std::pair<dof_id_type, unsigned int>(elementid, side));
245 
246  if (pos == _bnd_side_area.end())
247  mooseError("Boundary side area values are not cached for element id '",
248  elementid,
249  "' and side '",
250  side,
251  "' in ",
252  __FUNCTION__);
253 
254  return pos->second;
255 }

◆ getBoundarySideCentroid()

const Point & SlopeReconstructionBase::getBoundarySideCentroid ( dof_id_type  elementid,
unsigned int  side 
) const
virtual

accessor function call to get cached boundary side centroid

Definition at line 168 of file SlopeReconstructionBase.C.

169 {
170  Threads::spin_mutex::scoped_lock lock(_mutex);
171  std::map<std::pair<dof_id_type, unsigned int>, Point>::const_iterator pos =
172  _bnd_side_centroid.find(std::pair<dof_id_type, unsigned int>(elementid, side));
173 
174  if (pos == _bnd_side_centroid.end())
175  mooseError("Boundary side centroid values are not cached for element id '",
176  elementid,
177  "' and side '",
178  side,
179  "' in ",
180  __FUNCTION__);
181 
182  return pos->second;
183 }

◆ getBoundarySideNormal()

const Point & SlopeReconstructionBase::getBoundarySideNormal ( dof_id_type  elementid,
unsigned int  side 
) const
virtual

accessor function call to get cached boundary side centroid

Definition at line 204 of file SlopeReconstructionBase.C.

205 {
206  Threads::spin_mutex::scoped_lock lock(_mutex);
207  std::map<std::pair<dof_id_type, unsigned int>, Point>::const_iterator pos =
208  _bnd_side_normal.find(std::pair<dof_id_type, unsigned int>(elementid, side));
209 
210  if (pos == _bnd_side_normal.end())
211  mooseError("Boundary side normal values are not cached for element id '",
212  elementid,
213  "' and side '",
214  side,
215  "' in ",
216  __FUNCTION__);
217 
218  return pos->second;
219 }

◆ getElementAverageValue()

const std::vector< Real > & SlopeReconstructionBase::getElementAverageValue ( dof_id_type  elementid) const
virtual

accessor function call to get element average variable values

Definition at line 117 of file SlopeReconstructionBase.C.

118 {
119  Threads::spin_mutex::scoped_lock lock(_mutex);
120  std::map<dof_id_type, std::vector<Real>>::const_iterator pos = _avars.find(elementid);
121 
122  if (pos == _avars.end())
123  mooseError("Average variable values are not cached for element id '",
124  elementid,
125  "' in ",
126  __FUNCTION__);
127 
128  return pos->second;
129 }

◆ getElementSlope()

const std::vector< RealGradient > & SlopeReconstructionBase::getElementSlope ( dof_id_type  elementid) const
virtual

accessor function call to get element slope values

Definition at line 104 of file SlopeReconstructionBase.C.

105 {
106  Threads::spin_mutex::scoped_lock lock(_mutex);
107  std::map<dof_id_type, std::vector<RealGradient>>::const_iterator pos = _rslope.find(elementid);
108 
109  if (pos == _rslope.end())
110  mooseError(
111  "Reconstructed slope is not cached for element id '", elementid, "' in ", __FUNCTION__);
112 
113  return pos->second;
114 }

◆ getSideArea()

const Real & SlopeReconstructionBase::getSideArea ( dof_id_type  elementid,
dof_id_type  neighborid 
) const
virtual

accessor function call to get cached internal side area

Definition at line 222 of file SlopeReconstructionBase.C.

223 {
224  Threads::spin_mutex::scoped_lock lock(_mutex);
225  std::map<std::pair<dof_id_type, dof_id_type>, Real>::const_iterator pos =
226  _side_area.find(std::pair<dof_id_type, dof_id_type>(elementid, neighborid));
227 
228  if (pos == _side_area.end())
229  mooseError("Side area values are not cached for element id '",
230  elementid,
231  "' and neighbor id '",
232  neighborid,
233  "' in ",
234  __FUNCTION__);
235 
236  return pos->second;
237 }

◆ getSideCentroid()

const Point & SlopeReconstructionBase::getSideCentroid ( dof_id_type  elementid,
dof_id_type  neighborid 
) const
virtual

accessor function call to get cached internal side centroid

Definition at line 150 of file SlopeReconstructionBase.C.

151 {
152  Threads::spin_mutex::scoped_lock lock(_mutex);
153  std::map<std::pair<dof_id_type, dof_id_type>, Point>::const_iterator pos =
154  _side_centroid.find(std::pair<dof_id_type, dof_id_type>(elementid, neighborid));
155 
156  if (pos == _side_centroid.end())
157  mooseError("Side centroid values are not cached for element id '",
158  elementid,
159  "' and neighbor id '",
160  neighborid,
161  "' in ",
162  __FUNCTION__);
163 
164  return pos->second;
165 }

◆ getSideNormal()

const Point & SlopeReconstructionBase::getSideNormal ( dof_id_type  elementid,
dof_id_type  neighborid 
) const
virtual

accessor function call to get cached internal side normal

Definition at line 186 of file SlopeReconstructionBase.C.

187 {
188  Threads::spin_mutex::scoped_lock lock(_mutex);
189  std::map<std::pair<dof_id_type, dof_id_type>, Point>::const_iterator pos =
190  _side_normal.find(std::pair<dof_id_type, dof_id_type>(elementid, neighborid));
191 
192  if (pos == _side_normal.end())
193  mooseError("Side normal values are not cached for element id '",
194  elementid,
195  "' and neighbor id '",
196  neighborid,
197  "' in ",
198  __FUNCTION__);
199 
200  return pos->second;
201 }

◆ initialize()

void SlopeReconstructionBase::initialize ( )
virtual

Reimplemented from ElementLoopUserObject.

Definition at line 59 of file SlopeReconstructionBase.C.

60 {
62 
63  _rslope.clear();
64  _avars.clear();
65 }

◆ join()

void ElementLoopUserObject::join ( const ElementLoopUserObject )
inherited

Definition at line 228 of file ElementLoopUserObject.C.

229 {
230 }

◆ keepGoing()

virtual bool ElementLoopUserObject::keepGoing ( )
inlinevirtualinherited

Definition at line 80 of file ElementLoopUserObject.h.

80 { return true; }

Referenced by ElementLoopUserObject::execute().

◆ meshChanged()

void SlopeReconstructionBase::meshChanged ( )
virtual

Reimplemented from ElementLoopUserObject.

Definition at line 90 of file SlopeReconstructionBase.C.

91 {
93 
94  _side_geoinfo_cached = false;
95  _side_centroid.clear();
96  _bnd_side_centroid.clear();
97  _side_normal.clear();
98  _bnd_side_normal.clear();
99  _side_area.clear();
100  _bnd_side_area.clear();
101 }

◆ onBoundary()

void ElementLoopUserObject::onBoundary ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id 
)
virtualinherited

Definition at line 160 of file ElementLoopUserObject.C.

161 {
162  _current_side = side;
163  computeBoundary();
164 }

Referenced by ElementLoopUserObject::execute().

◆ onElement()

void ElementLoopUserObject::onElement ( const Elem *  elem)
virtualinherited

Definition at line 153 of file ElementLoopUserObject.C.

154 {
155  _current_elem = elem;
156  computeElement();
157 }

Referenced by ElementLoopUserObject::execute().

◆ onInterface()

void ElementLoopUserObject::onInterface ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id 
)
virtualinherited

Definition at line 195 of file ElementLoopUserObject.C.

196 {
197  _current_elem = elem;
198  // Pointer to the neighbor we are currently working on.
199  _current_neighbor = elem->neighbor_ptr(side);
200 
201  // Get the global id of the element and the neighbor
202  const dof_id_type elem_id = elem->id();
203  const dof_id_type neighbor_id = _current_neighbor->id();
204 
205  // TODO: add if-statement to check if this needs to be executed
206  if ((_current_neighbor->active() && (_current_neighbor->level() == elem->level()) &&
207  (elem_id < neighbor_id)) ||
208  (_current_neighbor->level() < elem->level()))
209  {
211  }
212 
213  if (!_have_interface_elems &&
214  (_current_elem->processor_id() != _current_neighbor->processor_id()))
215  {
216  // if my current neighbor is on another processor store the current element
217  // ID for later communication
218  _interface_elem_ids.insert(_current_elem->id());
219  }
220 }

Referenced by ElementLoopUserObject::execute().

◆ onInternalSide()

void ElementLoopUserObject::onInternalSide ( const Elem *  elem,
unsigned int  side 
)
virtualinherited

Definition at line 167 of file ElementLoopUserObject.C.

168 {
169  _current_elem = elem;
170  // Pointer to the neighbor we are currently working on.
171  _current_neighbor = elem->neighbor_ptr(side);
172 
173  // Get the global id of the element and the neighbor
174  const dof_id_type elem_id = elem->id();
175  const dof_id_type neighbor_id = _current_neighbor->id();
176 
177  // TODO: add if-statement to check if this needs to be executed
178  if ((_current_neighbor->active() && (_current_neighbor->level() == elem->level()) &&
179  (elem_id < neighbor_id)) ||
180  (_current_neighbor->level() < elem->level()))
181  {
183  }
184 
185  if (!_have_interface_elems &&
186  (_current_elem->processor_id() != _current_neighbor->processor_id()))
187  {
188  // if my current neighbor is on another processor store the current element ID for later
189  // communication
190  _interface_elem_ids.insert(_current_elem->id());
191  }
192 }

Referenced by ElementLoopUserObject::execute().

◆ post()

void ElementLoopUserObject::post ( )
virtualinherited

Definition at line 223 of file ElementLoopUserObject.C.

224 {
225 }

Referenced by ElementLoopUserObject::execute().

◆ pre()

void ElementLoopUserObject::pre ( )
virtualinherited

Definition at line 143 of file ElementLoopUserObject.C.

144 {
145 }

Referenced by ElementLoopUserObject::execute().

◆ preElement()

void ElementLoopUserObject::preElement ( const Elem *  elem)
virtualinherited

Definition at line 69 of file ElementLoopUserObject.C.

70 {
71  _fe_problem.setCurrentSubdomainID(elem, _tid);
72 }

Referenced by ElementLoopUserObject::execute().

◆ reconstructElementSlope()

virtual void SlopeReconstructionBase::reconstructElementSlope ( )
pure virtual

compute the slope of the cell

Referenced by computeElement().

◆ serialize()

void SlopeReconstructionBase::serialize ( std::string &  serialized_buffer)
protectedvirtual

Definition at line 264 of file SlopeReconstructionBase.C.

265 {
266  std::ostringstream oss;
267 
268  // First store the number of elements to send
269  unsigned int size = _interface_elem_ids.size();
270  oss.write((char *)&size, sizeof(size));
271 
272  for (auto it = _interface_elem_ids.begin(); it != _interface_elem_ids.end(); ++it)
273  {
274  storeHelper(oss, *it, this);
275  storeHelper(oss, _rslope[*it], this);
276  }
277 
278  // Populate the passed in string pointer with the string stream's buffer contents
279  serialized_buffer.assign(oss.str());
280 }

Referenced by finalize().

◆ subdomainChanged()

void ElementLoopUserObject::subdomainChanged ( )
virtualinherited

Definition at line 148 of file ElementLoopUserObject.C.

149 {
150 }

Referenced by ElementLoopUserObject::execute().

Member Data Documentation

◆ _avars

std::map<dof_id_type, std::vector<Real> >& SlopeReconstructionBase::_avars
protected

store the average variable values into this map indexed by element ID

Definition at line 76 of file SlopeReconstructionBase.h.

Referenced by getElementAverageValue(), and initialize().

◆ _bnd_avars

std::map<std::pair<dof_id_type, unsigned int>, std::vector<Real> >& SlopeReconstructionBase::_bnd_avars
protected

store the boundary average variable values into this map indexed by pair of element ID and local side ID

Definition at line 79 of file SlopeReconstructionBase.h.

Referenced by getBoundaryAverageValue().

◆ _bnd_side_area

std::map<std::pair<dof_id_type, unsigned int>, Real>& SlopeReconstructionBase::_bnd_side_area
protected

store the boundary side area into this map indexed by pair of element ID and local side ID

Definition at line 91 of file SlopeReconstructionBase.h.

Referenced by getBoundarySideArea(), and meshChanged().

◆ _bnd_side_centroid

std::map<std::pair<dof_id_type, unsigned int>, Point>& SlopeReconstructionBase::_bnd_side_centroid
protected

store the boundary side centroid into this map indexed by pair of element ID and local side ID

Definition at line 85 of file SlopeReconstructionBase.h.

Referenced by getBoundarySideCentroid(), and meshChanged().

◆ _bnd_side_normal

std::map<std::pair<dof_id_type, unsigned int>, Point>& SlopeReconstructionBase::_bnd_side_normal
protected

store the boundary side normal into this map indexed by pair of element ID and local side ID

Definition at line 97 of file SlopeReconstructionBase.h.

Referenced by getBoundarySideNormal(), and meshChanged().

◆ _coord

const MooseArray<Real>& ElementLoopUserObject::_coord
protectedinherited

Definition at line 99 of file ElementLoopUserObject.h.

◆ _current_elem

const Elem* ElementLoopUserObject::_current_elem
protectedinherited

◆ _current_elem_volume

const Real& ElementLoopUserObject::_current_elem_volume
protectedinherited

Definition at line 92 of file ElementLoopUserObject.h.

◆ _current_neighbor

const Elem* ElementLoopUserObject::_current_neighbor
protectedinherited

◆ _current_side

unsigned int ElementLoopUserObject::_current_side
protectedinherited

Definition at line 93 of file ElementLoopUserObject.h.

Referenced by ElementLoopUserObject::onBoundary().

◆ _have_interface_elems

bool ElementLoopUserObject::_have_interface_elems
protectedinherited

true if we have cached interface elements, false if they need to be cached. We want to (re)cache only when mesh changed

Definition at line 102 of file ElementLoopUserObject.h.

Referenced by ElementLoopUserObject::finalize(), ElementLoopUserObject::meshChanged(), ElementLoopUserObject::onInterface(), and ElementLoopUserObject::onInternalSide().

◆ _interface_elem_ids

std::set<dof_id_type> ElementLoopUserObject::_interface_elem_ids
protectedinherited

List of element IDs that are on the processor boundary and need to be send to other processors.

Definition at line 104 of file ElementLoopUserObject.h.

Referenced by ElementLoopUserObject::meshChanged(), ElementLoopUserObject::onInterface(), ElementLoopUserObject::onInternalSide(), SlopeLimitingBase::serialize(), and serialize().

◆ _JxW

const MooseArray<Real>& ElementLoopUserObject::_JxW
protectedinherited

Definition at line 98 of file ElementLoopUserObject.h.

◆ _JxW_face

const MooseArray<Real>& SlopeReconstructionBase::_JxW_face
protected

Definition at line 102 of file SlopeReconstructionBase.h.

◆ _mesh

MooseMesh& ElementLoopUserObject::_mesh
protectedinherited

◆ _mutex

Threads::spin_mutex SlopeReconstructionBase::_mutex
staticprivate

◆ _neighbor_elem

const Elem* const & SlopeReconstructionBase::_neighbor_elem
protected

the neighboring element

Definition at line 112 of file SlopeReconstructionBase.h.

◆ _normals_face

const MooseArray<Point>& SlopeReconstructionBase::_normals_face
protected

Definition at line 103 of file SlopeReconstructionBase.h.

◆ _old_subdomain

SubdomainID ElementLoopUserObject::_old_subdomain
protectedinherited

The subdomain for the last element.

Definition at line 110 of file ElementLoopUserObject.h.

Referenced by ElementLoopUserObject::execute().

◆ _q_point

const MooseArray<Point>& ElementLoopUserObject::_q_point
protectedinherited

Definition at line 96 of file ElementLoopUserObject.h.

◆ _q_point_face

const MooseArray<Point>& SlopeReconstructionBase::_q_point_face
protected

required data for face assembly

Definition at line 100 of file SlopeReconstructionBase.h.

◆ _qrule

const QBase* const & ElementLoopUserObject::_qrule
protectedinherited

Definition at line 97 of file ElementLoopUserObject.h.

◆ _qrule_face

const QBase* const & SlopeReconstructionBase::_qrule_face
protected

Definition at line 101 of file SlopeReconstructionBase.h.

◆ _rslope

std::map<dof_id_type, std::vector<RealGradient> >& SlopeReconstructionBase::_rslope
protected

store the reconstructed slopes into this map indexed by element ID

Definition at line 73 of file SlopeReconstructionBase.h.

Referenced by deserialize(), getElementSlope(), initialize(), and serialize().

◆ _side

const unsigned int& SlopeReconstructionBase::_side
protected

current side of the current element

Definition at line 106 of file SlopeReconstructionBase.h.

◆ _side_area

std::map<std::pair<dof_id_type, dof_id_type>, Real>& SlopeReconstructionBase::_side_area
protected

store the side area into this map indexed by pair of element ID and neighbor ID

Definition at line 88 of file SlopeReconstructionBase.h.

Referenced by getSideArea(), and meshChanged().

◆ _side_centroid

std::map<std::pair<dof_id_type, dof_id_type>, Point>& SlopeReconstructionBase::_side_centroid
protected

store the side centroid into this map indexed by pair of element ID and neighbor ID

Definition at line 82 of file SlopeReconstructionBase.h.

Referenced by getSideCentroid(), and meshChanged().

◆ _side_elem

const Elem* const & SlopeReconstructionBase::_side_elem
protected

Definition at line 108 of file SlopeReconstructionBase.h.

◆ _side_geoinfo_cached

bool SlopeReconstructionBase::_side_geoinfo_cached
protected

flag to indicated if side geometry info is cached

Definition at line 115 of file SlopeReconstructionBase.h.

Referenced by finalize(), and meshChanged().

◆ _side_normal

std::map<std::pair<dof_id_type, dof_id_type>, Point>& SlopeReconstructionBase::_side_normal
protected

store the side normal into this map indexed by pair of element ID and neighbor ID

Definition at line 94 of file SlopeReconstructionBase.h.

Referenced by getSideNormal(), and meshChanged().

◆ _side_volume

const Real& SlopeReconstructionBase::_side_volume
protected

Definition at line 109 of file SlopeReconstructionBase.h.

◆ _subdomain

SubdomainID ElementLoopUserObject::_subdomain
protectedinherited

The subdomain for the current element.

Definition at line 107 of file ElementLoopUserObject.h.

Referenced by ElementLoopUserObject::execute().


The documentation for this class was generated from the following files:
ElementLoopUserObject::initialize
virtual void initialize()
Definition: ElementLoopUserObject.C:64
ElementLoopUserObject::_mesh
MooseMesh & _mesh
Definition: ElementLoopUserObject.h:89
ElementLoopUserObject::computeInternalSide
virtual void computeInternalSide()
Definition: ElementLoopUserObject.C:243
SlopeReconstructionBase::_side_elem
const Elem *const & _side_elem
Definition: SlopeReconstructionBase.h:108
SlopeReconstructionBase::_side_normal
std::map< std::pair< dof_id_type, dof_id_type >, Point > & _side_normal
store the side normal into this map indexed by pair of element ID and neighbor ID
Definition: SlopeReconstructionBase.h:94
ElementLoopUserObject::computeBoundary
virtual void computeBoundary()
Definition: ElementLoopUserObject.C:238
ElementLoopUserObject::_current_side
unsigned int _current_side
Definition: ElementLoopUserObject.h:93
SlopeReconstructionBase::_bnd_side_normal
std::map< std::pair< dof_id_type, unsigned int >, Point > & _bnd_side_normal
store the boundary side normal into this map indexed by pair of element ID and local side ID
Definition: SlopeReconstructionBase.h:97
SlopeReconstructionBase::_side
const unsigned int & _side
current side of the current element
Definition: SlopeReconstructionBase.h:106
ElementLoopUserObject::_interface_elem_ids
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.
Definition: ElementLoopUserObject.h:104
SlopeReconstructionBase::_mutex
static Threads::spin_mutex _mutex
Definition: SlopeReconstructionBase.h:118
ElementLoopUserObject::keepGoing
virtual bool keepGoing()
Definition: ElementLoopUserObject.h:80
SlopeReconstructionBase::_side_geoinfo_cached
bool _side_geoinfo_cached
flag to indicated if side geometry info is cached
Definition: SlopeReconstructionBase.h:115
SlopeReconstructionBase::_neighbor_elem
const Elem *const & _neighbor_elem
the neighboring element
Definition: SlopeReconstructionBase.h:112
ElementLoopUserObject::computeInterface
virtual void computeInterface()
Definition: ElementLoopUserObject.C:248
SlopeReconstructionBase::_rslope
std::map< dof_id_type, std::vector< RealGradient > > & _rslope
store the reconstructed slopes into this map indexed by element ID
Definition: SlopeReconstructionBase.h:73
SlopeReconstructionBase::_JxW_face
const MooseArray< Real > & _JxW_face
Definition: SlopeReconstructionBase.h:102
SlopeReconstructionBase::_qrule_face
const QBase *const & _qrule_face
Definition: SlopeReconstructionBase.h:101
ElementLoopUserObject::_subdomain
SubdomainID _subdomain
The subdomain for the current element.
Definition: ElementLoopUserObject.h:107
SlopeReconstructionBase::_bnd_side_centroid
std::map< std::pair< dof_id_type, unsigned int >, Point > & _bnd_side_centroid
store the boundary side centroid into this map indexed by pair of element ID and local side ID
Definition: SlopeReconstructionBase.h:85
ElementLoopUserObject::preElement
virtual void preElement(const Elem *elem)
Definition: ElementLoopUserObject.C:69
SlopeReconstructionBase::_side_area
std::map< std::pair< dof_id_type, dof_id_type >, Real > & _side_area
store the side area into this map indexed by pair of element ID and neighbor ID
Definition: SlopeReconstructionBase.h:88
SlopeReconstructionBase::_q_point_face
const MooseArray< Point > & _q_point_face
required data for face assembly
Definition: SlopeReconstructionBase.h:100
SlopeReconstructionBase::serialize
virtual void serialize(std::string &serialized_buffer)
Definition: SlopeReconstructionBase.C:264
SlopeReconstructionBase::_side_volume
const Real & _side_volume
Definition: SlopeReconstructionBase.h:109
ElementLoopUserObject::onBoundary
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id)
Definition: ElementLoopUserObject.C:160
ElementLoopUserObject::_have_interface_elems
bool _have_interface_elems
true if we have cached interface elements, false if they need to be cached. We want to (re)cache only...
Definition: ElementLoopUserObject.h:102
ElementLoopUserObject::pre
virtual void pre()
Definition: ElementLoopUserObject.C:143
ElementLoopUserObject::onElement
virtual void onElement(const Elem *elem)
Definition: ElementLoopUserObject.C:153
SlopeReconstructionBase::_side_centroid
std::map< std::pair< dof_id_type, dof_id_type >, Point > & _side_centroid
store the side centroid into this map indexed by pair of element ID and neighbor ID
Definition: SlopeReconstructionBase.h:82
ElementLoopUserObject::post
virtual void post()
Definition: ElementLoopUserObject.C:223
ElementLoopUserObject::onInternalSide
virtual void onInternalSide(const Elem *elem, unsigned int side)
Definition: ElementLoopUserObject.C:167
ElementLoopUserObject::_old_subdomain
SubdomainID _old_subdomain
The subdomain for the last element.
Definition: ElementLoopUserObject.h:110
ElementLoopUserObject::caughtMooseException
virtual void caughtMooseException(MooseException &e)
Definition: ElementLoopUserObject.C:260
ElementLoopUserObject::onInterface
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id)
Definition: ElementLoopUserObject.C:195
ElementLoopUserObject::subdomainChanged
virtual void subdomainChanged()
Definition: ElementLoopUserObject.C:148
ElementLoopUserObject::computeElement
virtual void computeElement()
Definition: ElementLoopUserObject.C:233
SlopeReconstructionBase::_bnd_side_area
std::map< std::pair< dof_id_type, unsigned int >, Real > & _bnd_side_area
store the boundary side area into this map indexed by pair of element ID and local side ID
Definition: SlopeReconstructionBase.h:91
ElementLoopUserObject::_current_elem
const Elem * _current_elem
Definition: ElementLoopUserObject.h:91
SlopeReconstructionBase::_bnd_avars
std::map< std::pair< dof_id_type, unsigned int >, std::vector< Real > > & _bnd_avars
store the boundary average variable values into this map indexed by pair of element ID and local side...
Definition: SlopeReconstructionBase.h:79
SlopeReconstructionBase::_avars
std::map< dof_id_type, std::vector< Real > > & _avars
store the average variable values into this map indexed by element ID
Definition: SlopeReconstructionBase.h:76
SlopeReconstructionBase::deserialize
virtual void deserialize(std::vector< std::string > &serialized_buffers)
Definition: SlopeReconstructionBase.C:283
ElementLoopUserObject::finalize
virtual void finalize()
Definition: ElementLoopUserObject.C:137
ElementLoopUserObject::_current_neighbor
const Elem * _current_neighbor
Definition: ElementLoopUserObject.h:94
ElementLoopUserObject::ElementLoopUserObject
ElementLoopUserObject(const InputParameters &parameters)
Definition: ElementLoopUserObject.C:21
ElementLoopUserObject::meshChanged
virtual void meshChanged()
Definition: ElementLoopUserObject.C:253
SlopeReconstructionBase::reconstructElementSlope
virtual void reconstructElementSlope()=0
compute the slope of the cell
SlopeReconstructionBase::_normals_face
const MooseArray< Point > & _normals_face
Definition: SlopeReconstructionBase.h:103