Base class for multi-dimensional slope limiting to limit the slopes of cell average variables.
More...
#include <SlopeLimitingMultiDBase.h>
|
static Threads::spin_mutex | _mutex |
|
Base class for multi-dimensional slope limiting to limit the slopes of cell average variables.
Definition at line 24 of file SlopeLimitingMultiDBase.h.
◆ SlopeLimitingMultiDBase()
SlopeLimitingMultiDBase::SlopeLimitingMultiDBase |
( |
const InputParameters & |
parameters | ) |
|
◆ caughtMooseException()
void ElementLoopUserObject::caughtMooseException |
( |
MooseException & |
e | ) |
|
|
protectedvirtualinherited |
◆ computeBoundary()
void ElementLoopUserObject::computeBoundary |
( |
| ) |
|
|
protectedvirtualinherited |
◆ computeElement()
void SlopeLimitingBase::computeElement |
( |
| ) |
|
|
virtualinherited |
◆ computeInterface()
void ElementLoopUserObject::computeInterface |
( |
| ) |
|
|
protectedvirtualinherited |
◆ computeInternalSide()
void ElementLoopUserObject::computeInternalSide |
( |
| ) |
|
|
protectedvirtualinherited |
◆ deserialize()
void SlopeLimitingBase::deserialize |
( |
std::vector< std::string > & |
serialized_buffers | ) |
|
|
protectedvirtualinherited |
Definition at line 97 of file SlopeLimitingBase.C.
100 std::istringstream iss;
102 mooseAssert(serialized_buffers.size() == _app.n_processors(),
103 "Unexpected size of serialized_buffers: " << serialized_buffers.size());
105 for (
auto rank = decltype(_app.n_processors())(0); rank < serialized_buffers.size(); ++rank)
107 if (rank == processor_id())
110 iss.str(serialized_buffers[rank]);
115 unsigned int size = 0;
116 iss.read((
char *)&size,
sizeof(size));
118 for (
unsigned int i = 0; i < size; i++)
121 loadHelper(iss, key,
this);
123 std::vector<RealGradient> value;
124 loadHelper(iss, value,
this);
127 _lslope.insert(std::pair<dof_id_type, std::vector<RealGradient>>(key, value));
Referenced by SlopeLimitingBase::finalize().
◆ execute()
void ElementLoopUserObject::execute |
( |
| ) |
|
|
virtualinherited |
Definition at line 75 of file ElementLoopUserObject.C.
77 ConstElemRange & elem_range = *
_mesh.getActiveLocalElementRange();
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)
90 const Elem * elem = *el;
91 unsigned int cur_subdomain = elem->subdomain_id();
104 for (
unsigned int side = 0; side < elem->n_sides(); side++)
106 std::vector<BoundaryID> boundary_ids =
_mesh.getBoundaryIDs(elem, side);
108 if (boundary_ids.size() > 0)
109 for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
110 it != boundary_ids.end();
114 if (elem->neighbor_ptr(side) != NULL)
116 if (this->hasBlocks(elem->neighbor_ptr(side)->subdomain_id()))
118 if (boundary_ids.size() > 0)
119 for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
120 it != boundary_ids.end();
130 catch (MooseException & e)
◆ finalize()
void SlopeLimitingBase::finalize |
( |
| ) |
|
|
virtualinherited |
Reimplemented from ElementLoopUserObject.
Definition at line 133 of file SlopeLimitingBase.C.
137 if (_app.n_processors() > 1)
139 std::vector<std::string> send_buffers(1);
140 std::vector<std::string> recv_buffers;
142 recv_buffers.reserve(_app.n_processors());
144 comm().allgather_packed_range((
void *)(
nullptr),
145 send_buffers.begin(),
147 std::back_inserter(recv_buffers));
◆ getElementSlope()
const std::vector< RealGradient > & SlopeLimitingBase::getElementSlope |
( |
dof_id_type |
elementid | ) |
const |
|
virtualinherited |
accessor function call
Definition at line 58 of file SlopeLimitingBase.C.
60 Threads::spin_mutex::scoped_lock lock(
_mutex);
61 std::map<dof_id_type, std::vector<RealGradient>>::const_iterator pos =
_lslope.find(elementid);
64 mooseError(
"Limited slope is not cached for element id '", elementid,
"' in ", __FUNCTION__);
Referenced by AEFVMaterial::computeQpProperties().
◆ initialize()
void SlopeLimitingBase::initialize |
( |
| ) |
|
|
virtualinherited |
◆ join()
◆ keepGoing()
virtual bool ElementLoopUserObject::keepGoing |
( |
| ) |
|
|
inlinevirtualinherited |
◆ limitElementSlope()
virtual std::vector<RealGradient> SlopeLimitingBase::limitElementSlope |
( |
| ) |
const |
|
pure virtualinherited |
◆ meshChanged()
void ElementLoopUserObject::meshChanged |
( |
| ) |
|
|
virtualinherited |
◆ onBoundary()
void ElementLoopUserObject::onBoundary |
( |
const Elem * |
elem, |
|
|
unsigned int |
side, |
|
|
BoundaryID |
bnd_id |
|
) |
| |
|
virtualinherited |
◆ onElement()
void ElementLoopUserObject::onElement |
( |
const Elem * |
elem | ) |
|
|
virtualinherited |
◆ onInterface()
void ElementLoopUserObject::onInterface |
( |
const Elem * |
elem, |
|
|
unsigned int |
side, |
|
|
BoundaryID |
bnd_id |
|
) |
| |
|
virtualinherited |
◆ onInternalSide()
void ElementLoopUserObject::onInternalSide |
( |
const Elem * |
elem, |
|
|
unsigned int |
side |
|
) |
| |
|
virtualinherited |
◆ post()
void ElementLoopUserObject::post |
( |
| ) |
|
|
virtualinherited |
◆ pre()
void ElementLoopUserObject::pre |
( |
| ) |
|
|
virtualinherited |
◆ preElement()
void ElementLoopUserObject::preElement |
( |
const Elem * |
elem | ) |
|
|
virtualinherited |
◆ serialize()
void SlopeLimitingBase::serialize |
( |
std::string & |
serialized_buffer | ) |
|
|
protectedvirtualinherited |
◆ subdomainChanged()
void ElementLoopUserObject::subdomainChanged |
( |
| ) |
|
|
virtualinherited |
◆ _coord
const MooseArray<Real>& ElementLoopUserObject::_coord |
|
protectedinherited |
◆ _current_elem
const Elem* ElementLoopUserObject::_current_elem |
|
protectedinherited |
◆ _current_elem_volume
const Real& ElementLoopUserObject::_current_elem_volume |
|
protectedinherited |
◆ _current_neighbor
const Elem* ElementLoopUserObject::_current_neighbor |
|
protectedinherited |
◆ _current_side
unsigned int ElementLoopUserObject::_current_side |
|
protectedinherited |
◆ _have_interface_elems
bool ElementLoopUserObject::_have_interface_elems |
|
protectedinherited |
◆ _include_bc
const bool SlopeLimitingBase::_include_bc |
|
protectedinherited |
◆ _interface_elem_ids
std::set<dof_id_type> ElementLoopUserObject::_interface_elem_ids |
|
protectedinherited |
◆ _JxW
const MooseArray<Real>& ElementLoopUserObject::_JxW |
|
protectedinherited |
◆ _JxW_face
const MooseArray<Real>& SlopeLimitingBase::_JxW_face |
|
protectedinherited |
◆ _lslope
std::map<dof_id_type, std::vector<RealGradient> >& SlopeLimitingBase::_lslope |
|
protectedinherited |
◆ _mesh
MooseMesh& ElementLoopUserObject::_mesh |
|
protectedinherited |
◆ _mutex
Threads::spin_mutex SlopeLimitingBase::_mutex |
|
staticprivateinherited |
◆ _neighbor_elem
const Elem* const & SlopeLimitingBase::_neighbor_elem |
|
protectedinherited |
◆ _normals_face
const MooseArray<Point>& SlopeLimitingBase::_normals_face |
|
protectedinherited |
◆ _old_subdomain
SubdomainID ElementLoopUserObject::_old_subdomain |
|
protectedinherited |
◆ _q_point
const MooseArray<Point>& ElementLoopUserObject::_q_point |
|
protectedinherited |
◆ _q_point_face
const MooseArray<Point>& SlopeLimitingBase::_q_point_face |
|
protectedinherited |
◆ _qrule
const QBase* const & ElementLoopUserObject::_qrule |
|
protectedinherited |
◆ _qrule_face
const QBase* const & SlopeLimitingBase::_qrule_face |
|
protectedinherited |
◆ _rslope
◆ _side
const unsigned int& SlopeLimitingBase::_side |
|
protectedinherited |
◆ _side_elem
const Elem* const & SlopeLimitingBase::_side_elem |
|
protectedinherited |
◆ _side_volume
const Real& SlopeLimitingBase::_side_volume |
|
protectedinherited |
◆ _subdomain
SubdomainID ElementLoopUserObject::_subdomain |
|
protectedinherited |
The documentation for this class was generated from the following files:
virtual void initialize()
virtual void serialize(std::string &serialized_buffer)
virtual void computeInternalSide()
virtual void computeBoundary()
unsigned int _current_side
std::map< dof_id_type, std::vector< RealGradient > > & _lslope
store the updated slopes into this map indexed by element ID
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.
virtual void computeInterface()
SubdomainID _subdomain
The subdomain for the current element.
virtual void preElement(const Elem *elem)
static Threads::spin_mutex _mutex
SlopeLimitingBase(const InputParameters ¶meters)
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id)
bool _have_interface_elems
true if we have cached interface elements, false if they need to be cached. We want to (re)cache only...
virtual void onElement(const Elem *elem)
const SlopeReconstructionBase & _rslope
slope reconstruction user object
virtual void deserialize(std::vector< std::string > &serialized_buffers)
virtual void onInternalSide(const Elem *elem, unsigned int side)
SubdomainID _old_subdomain
The subdomain for the last element.
virtual void caughtMooseException(MooseException &e)
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id)
virtual void subdomainChanged()
virtual void computeElement()
const Elem * _current_elem
virtual std::vector< RealGradient > limitElementSlope() const =0
compute the slope of the cell
const Elem * _current_neighbor