www.mooseframework.org
Public Member Functions | Protected Attributes | List of all members
ComputeMaterialsObjectThread Class Reference

#include <ComputeMaterialsObjectThread.h>

Inheritance diagram for ComputeMaterialsObjectThread:
[legend]

Public Member Functions

 ComputeMaterialsObjectThread (FEProblemBase &fe_problem, std::vector< std::shared_ptr< MaterialData >> &material_data, std::vector< std::shared_ptr< MaterialData >> &bnd_material_data, std::vector< std::shared_ptr< MaterialData >> &neighbor_material_data, MaterialPropertyStorage &material_props, MaterialPropertyStorage &bnd_material_props, MaterialPropertyStorage &neighbor_material_props, std::vector< std::unique_ptr< Assembly >> &assembly)
 
 ComputeMaterialsObjectThread (ComputeMaterialsObjectThread &x, Threads::split split)
 
virtual void post () override
 Called after the element range loop. More...
 
virtual void subdomainChanged () override
 Called every time the current subdomain changes (i.e. More...
 
virtual void onElement (const Elem *elem) override
 Assembly of the element (not including surface assembly) More...
 
virtual void onBoundary (const Elem *elem, unsigned int side, BoundaryID bnd_id) override
 Called when doing boundary assembling. More...
 
virtual void onInternalSide (const Elem *elem, unsigned int side) override
 Called when doing internal edge assembling. More...
 
void join (const ComputeMaterialsObjectThread &)
 
virtual void caughtMooseException (MooseException &e) override
 Called if a MooseException is caught anywhere during the computation. More...
 
virtual bool keepGoing () override
 Whether or not the loop should continue. More...
 
virtual void preElement (const Elem *elem) override
 Called before the element assembly. More...
 
virtual void preInternalSide (const Elem *elem, unsigned int side) override
 Called before evaluations on an element internal side. More...
 
virtual void neighborSubdomainChanged () override
 Called every time the neighbor subdomain changes (i.e. More...
 
void operator() (const ConstElemRange &range, bool bypass_threading=false)
 
virtual void pre ()
 Called before the element range loop. More...
 
virtual void postElement (const Elem *elem)
 Called after the element assembly is done (including surface assembling) More...
 
virtual void postInternalSide (const Elem *elem, unsigned int side)
 Called after evaluations on an element internal side. More...
 
virtual void onInterface (const Elem *elem, unsigned int side, BoundaryID bnd_id)
 Called when doing interface assembling. More...
 

Protected Attributes

FEProblemBase_fe_problem
 
NonlinearSystemBase_nl
 
std::vector< std::shared_ptr< MaterialData > > & _material_data
 
std::vector< std::shared_ptr< MaterialData > > & _bnd_material_data
 
std::vector< std::shared_ptr< MaterialData > > & _neighbor_material_data
 
MaterialPropertyStorage_material_props
 
MaterialPropertyStorage_bnd_material_props
 
MaterialPropertyStorage_neighbor_material_props
 
const MaterialWarehouse_materials
 Reference to the Material object warehouses. More...
 
const MaterialWarehouse_residual_materials
 
const MaterialWarehouse_jacobian_materials
 
const MaterialWarehouse_discrete_materials
 
std::vector< std::unique_ptr< Assembly > > & _assembly
 
bool _need_internal_side_material
 
const bool _has_stateful_props
 
const bool _has_bnd_stateful_props
 
const bool _has_neighbor_stateful_props
 
MooseMesh_mesh
 
THREAD_ID _tid
 
SubdomainID _subdomain
 The subdomain for the current element. More...
 
SubdomainID _old_subdomain
 The subdomain for the last element. More...
 
SubdomainID _neighbor_subdomain
 The subdomain for the current neighbor. More...
 
SubdomainID _old_neighbor_subdomain
 The subdomain for the last neighbor. More...
 

Detailed Description

Definition at line 24 of file ComputeMaterialsObjectThread.h.

Constructor & Destructor Documentation

◆ ComputeMaterialsObjectThread() [1/2]

ComputeMaterialsObjectThread::ComputeMaterialsObjectThread ( FEProblemBase fe_problem,
std::vector< std::shared_ptr< MaterialData >> &  material_data,
std::vector< std::shared_ptr< MaterialData >> &  bnd_material_data,
std::vector< std::shared_ptr< MaterialData >> &  neighbor_material_data,
MaterialPropertyStorage material_props,
MaterialPropertyStorage bnd_material_props,
MaterialPropertyStorage neighbor_material_props,
std::vector< std::unique_ptr< Assembly >> &  assembly 
)

Definition at line 24 of file ComputeMaterialsObjectThread.C.

34  _fe_problem(fe_problem),
35  _nl(fe_problem.getNonlinearSystemBase()),
36  _material_data(material_data),
37  _bnd_material_data(bnd_material_data),
38  _neighbor_material_data(neighbor_material_data),
39  _material_props(material_props),
40  _bnd_material_props(bnd_material_props),
41  _neighbor_material_props(neighbor_material_props),
46  _assembly(assembly),
51 {
52 }
std::vector< std::shared_ptr< MaterialData > > & _neighbor_material_data
std::vector< std::shared_ptr< MaterialData > > & _material_data
NonlinearSystemBase & getNonlinearSystemBase()
MaterialPropertyStorage & _material_props
const MaterialWarehouse & getComputeMaterialWarehouse() const
const MaterialWarehouse & getDiscreteMaterialWarehouse() const
std::vector< std::shared_ptr< MaterialData > > & _bnd_material_data
const MaterialWarehouse & _residual_materials
const MaterialWarehouse & _jacobian_materials
const MaterialWarehouse & _materials
Reference to the Material object warehouses.
MaterialPropertyStorage & _neighbor_material_props
const MaterialWarehouse & getJacobianMaterialsWarehouse() const
std::vector< std::unique_ptr< Assembly > > & _assembly
const MaterialWarehouse & getResidualMaterialsWarehouse() const
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _discrete_materials

◆ ComputeMaterialsObjectThread() [2/2]

ComputeMaterialsObjectThread::ComputeMaterialsObjectThread ( ComputeMaterialsObjectThread x,
Threads::split  split 
)

Definition at line 55 of file ComputeMaterialsObjectThread.C.

58  _fe_problem(x._fe_problem),
59  _nl(x._nl),
60  _material_data(x._material_data),
61  _bnd_material_data(x._bnd_material_data),
62  _neighbor_material_data(x._neighbor_material_data),
63  _material_props(x._material_props),
64  _bnd_material_props(x._bnd_material_props),
65  _neighbor_material_props(x._neighbor_material_props),
66  _materials(x._materials),
67  _residual_materials(x._residual_materials),
68  _jacobian_materials(x._jacobian_materials),
69  _discrete_materials(x._discrete_materials),
70  _assembly(x._assembly),
71  _need_internal_side_material(x._need_internal_side_material),
75 {
76 }
std::vector< std::shared_ptr< MaterialData > > & _neighbor_material_data
std::vector< std::shared_ptr< MaterialData > > & _material_data
MaterialPropertyStorage & _material_props
static PetscErrorCode Vec x
std::vector< std::shared_ptr< MaterialData > > & _bnd_material_data
const MaterialWarehouse & _residual_materials
const MaterialWarehouse & _jacobian_materials
const MaterialWarehouse & _materials
Reference to the Material object warehouses.
MaterialPropertyStorage & _neighbor_material_props
std::vector< std::unique_ptr< Assembly > > & _assembly
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _discrete_materials

Member Function Documentation

◆ caughtMooseException()

void ThreadedElementLoop< ConstElemRange >::caughtMooseException ( MooseException e)
overridevirtualinherited

Called if a MooseException is caught anywhere during the computation.

The single input parameter taken is a MooseException object.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 77 of file ThreadedElementLoop.h.

78 {
79  Threads::spin_mutex::scoped_lock lock(threaded_element_mutex);
80 
81  std::string what(e.what());
83 }
virtual const char * what() const
Get out the error message.
virtual void setException(const std::string &message)
Set an exception.
static Threads::spin_mutex threaded_element_mutex
This mutex is used by all derived classes of the ThreadedElementLoop.

◆ join()

void ComputeMaterialsObjectThread::join ( const ComputeMaterialsObjectThread )

Definition at line 277 of file ComputeMaterialsObjectThread.C.

278 {
279 }

◆ keepGoing()

virtual bool ThreadedElementLoop< ConstElemRange >::keepGoing ( )
inlineoverridevirtualinherited

Whether or not the loop should continue.

Returns
true to keep going, false to stop.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 45 of file ThreadedElementLoop.h.

45 { return !_fe_problem.hasException(); }
virtual bool hasException()
Whether or not an exception has occurred.

◆ neighborSubdomainChanged()

void ThreadedElementLoop< ConstElemRange >::neighborSubdomainChanged ( )
overridevirtualinherited

Called every time the neighbor subdomain changes (i.e.

the subdomain of this neighbor is not the same as the subdomain of the last neighbor). Beware of over-using this! You might think that you can do some expensive stuff in here and get away with it... but there are applications that have TONS of subdomains....

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 101 of file ThreadedElementLoop.h.

102 {
105 }
virtual void neighborSubdomainSetup(SubdomainID subdomain, THREAD_ID tid)
Base class for assembly-like calculations.

◆ onBoundary()

void ComputeMaterialsObjectThread::onBoundary ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id 
)
overridevirtual

Called when doing boundary assembling.

Parameters
elem- The element we are checking is on the boundary.
side- The side of the element in question.
bnd_id- ID of the boundary we are at

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 134 of file ComputeMaterialsObjectThread.C.

135 {
137  {
138  _assembly[_tid]->reinit(elem, side);
139  unsigned int face_n_points = _assembly[_tid]->qRuleFace()->n_points();
140 
141  _bnd_material_data[_tid]->resize(face_n_points);
142 
144  {
145  // Face Materials
146  if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(_subdomain, _tid))
150  face_n_points,
151  *elem,
152  side);
153  if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(_subdomain, _tid))
156  _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(_subdomain, _tid),
157  face_n_points,
158  *elem,
159  side);
160 
161  // Boundary Materials
165  face_n_points,
166  *elem,
167  side);
171  face_n_points,
172  *elem,
173  side);
174  MaterialWarehouse const * ad_materials;
176  ad_materials = &_jacobian_materials;
177  else
178  ad_materials = &_residual_materials;
179  if (ad_materials->hasActiveBoundaryObjects(bnd_id, _tid))
181  ad_materials->getActiveBoundaryObjects(bnd_id, _tid),
182  face_n_points,
183  *elem,
184  side);
185  }
186  }
187 }
void initStatefulProps(MaterialData &material_data, const std::vector< std::shared_ptr< Material >> &mats, unsigned int n_qpoints, const Elem &elem, unsigned int side=0)
Initialize stateful material properties.
Material objects are special in that they have additional objects created automatically (see FEProble...
bool hasActiveBoundaryObjects(THREAD_ID tid=0) const
std::vector< std::shared_ptr< MaterialData > > & _bnd_material_data
const MaterialWarehouse & _residual_materials
const MaterialWarehouse & _jacobian_materials
const MaterialWarehouse & _materials
Reference to the Material object warehouses.
virtual bool currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:501
const std::map< BoundaryID, std::vector< std::shared_ptr< T > > > & getActiveBoundaryObjects(THREAD_ID tid=0) const
std::vector< std::unique_ptr< Assembly > > & _assembly
SubdomainID _subdomain
The subdomain for the current element.
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _discrete_materials
bool needBoundaryMaterialOnSide(BoundaryID bnd_id, THREAD_ID tid)
These methods are used to determine whether stateful material properties need to be stored on interna...

◆ onElement()

void ComputeMaterialsObjectThread::onElement ( const Elem *  elem)
overridevirtual

Assembly of the element (not including surface assembly)

Parameters
elem- active element

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 94 of file ComputeMaterialsObjectThread.C.

95 {
96  MaterialWarehouse const * ad_materials;
98  ad_materials = &_jacobian_materials;
99  else
100  ad_materials = &_residual_materials;
103  ad_materials->hasActiveBlockObjects(_subdomain, _tid))
104  {
105  _fe_problem.prepare(elem, _tid);
106  _fe_problem.reinitElem(elem, _tid);
107 
108  unsigned int n_points = _assembly[_tid]->qRule()->n_points();
109  _material_data[_tid]->resize(n_points);
110 
112  {
117  n_points,
118  *elem);
122  n_points,
123  *elem);
124  if (ad_materials->hasActiveBlockObjects(_subdomain, _tid))
126  ad_materials->getActiveBlockObjects(_subdomain, _tid),
127  n_points,
128  *elem);
129  }
130  }
131 }
virtual void prepare(const Elem *elem, THREAD_ID tid) override
std::vector< std::shared_ptr< MaterialData > > & _material_data
bool hasActiveBlockObjects(THREAD_ID tid=0) const
const std::map< SubdomainID, std::vector< std::shared_ptr< T > > > & getActiveBlockObjects(THREAD_ID tid=0) const
void initStatefulProps(MaterialData &material_data, const std::vector< std::shared_ptr< Material >> &mats, unsigned int n_qpoints, const Elem &elem, unsigned int side=0)
Initialize stateful material properties.
MaterialPropertyStorage & _material_props
Material objects are special in that they have additional objects created automatically (see FEProble...
virtual void reinitElem(const Elem *elem, THREAD_ID tid) override
const MaterialWarehouse & _residual_materials
const MaterialWarehouse & _jacobian_materials
const MaterialWarehouse & _materials
Reference to the Material object warehouses.
virtual bool currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:501
std::vector< std::unique_ptr< Assembly > > & _assembly
SubdomainID _subdomain
The subdomain for the current element.
const MaterialWarehouse & _discrete_materials

◆ onInterface()

void ThreadedElementLoopBase< ConstElemRange >::onInterface ( const Elem *  elem,
unsigned int  side,
BoundaryID  bnd_id 
)
virtualinherited

Called when doing interface assembling.

Parameters
elem- Element we are on
side- local side number of the element 'elem'
bnd_id- ID of the interface we are at

Reimplemented in ComputeResidualThread, and ComputeJacobianThread.

Definition at line 300 of file ThreadedElementLoopBase.h.

303 {
304 }

◆ onInternalSide()

void ComputeMaterialsObjectThread::onInternalSide ( const Elem *  elem,
unsigned int  side 
)
overridevirtual

Called when doing internal edge assembling.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 190 of file ComputeMaterialsObjectThread.C.

191 {
193  {
194  _assembly[_tid]->reinit(elem, side);
195  unsigned int face_n_points = _assembly[_tid]->qRuleFace()->n_points();
196  _bnd_material_data[_tid]->resize(face_n_points);
197  _neighbor_material_data[_tid]->resize(face_n_points);
198 
200  {
201  if (_discrete_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(_subdomain, _tid))
205  face_n_points,
206  *elem,
207  side);
208  if (_materials[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(_subdomain, _tid))
211  _materials[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(_subdomain, _tid),
212  face_n_points,
213  *elem,
214  side);
215  MaterialWarehouse const * ad_materials;
217  ad_materials = &_jacobian_materials;
218  else
219  ad_materials = &_residual_materials;
220  if ((*ad_materials)[Moose::FACE_MATERIAL_DATA].hasActiveBlockObjects(_subdomain, _tid))
223  (*ad_materials)[Moose::FACE_MATERIAL_DATA].getActiveBlockObjects(_subdomain, _tid),
224  face_n_points,
225  *elem,
226  side);
227  }
228 
229  const Elem * neighbor = elem->neighbor_ptr(side);
230  unsigned int neighbor_side = neighbor->which_neighbor_am_i(_assembly[_tid]->elem());
231  const dof_id_type elem_id = elem->id(), neighbor_id = neighbor->id();
232 
234  ((neighbor->active() && (neighbor->level() == elem->level()) && (elem_id < neighbor_id)) ||
235  (neighbor->level() < elem->level())))
236  {
237  _assembly[_tid]->reinitElemAndNeighbor(elem, side, neighbor, neighbor_side);
238 
239  // Neighbor Materials
240  if (_discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(
241  neighbor->subdomain_id(), _tid))
244  _discrete_materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(
245  neighbor->subdomain_id(), _tid),
246  face_n_points,
247  *elem,
248  side);
249  if (_materials[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(neighbor->subdomain_id(),
250  _tid))
253  _materials[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(
254  neighbor->subdomain_id(), _tid),
255  face_n_points,
256  *neighbor,
257  neighbor_side);
258  MaterialWarehouse const * ad_materials;
260  ad_materials = &_jacobian_materials;
261  else
262  ad_materials = &_residual_materials;
263  if ((*ad_materials)[Moose::NEIGHBOR_MATERIAL_DATA].hasActiveBlockObjects(
264  neighbor->subdomain_id(), _tid))
267  (*ad_materials)[Moose::NEIGHBOR_MATERIAL_DATA].getActiveBlockObjects(
268  neighbor->subdomain_id(), _tid),
269  face_n_points,
270  *neighbor,
271  neighbor_side);
272  }
273  }
274 }
std::vector< std::shared_ptr< MaterialData > > & _neighbor_material_data
void initStatefulProps(MaterialData &material_data, const std::vector< std::shared_ptr< Material >> &mats, unsigned int n_qpoints, const Elem &elem, unsigned int side=0)
Initialize stateful material properties.
Material objects are special in that they have additional objects created automatically (see FEProble...
std::vector< std::shared_ptr< MaterialData > > & _bnd_material_data
const MaterialWarehouse & _residual_materials
const MaterialWarehouse & _jacobian_materials
const MaterialWarehouse & _materials
Reference to the Material object warehouses.
virtual bool currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:501
MaterialPropertyStorage & _neighbor_material_props
std::vector< std::unique_ptr< Assembly > > & _assembly
SubdomainID _subdomain
The subdomain for the current element.
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _discrete_materials

◆ operator()()

void ThreadedElementLoopBase< ConstElemRange >::operator() ( const ConstElemRange &  range,
bool  bypass_threading = false 
)
inherited

Definition at line 171 of file ThreadedElementLoopBase.h.

172 {
173  try
174  {
175  ParallelUniqueId puid;
176  _tid = bypass_threading ? 0 : puid.id;
177 
178  pre();
179 
182  typename RangeType::const_iterator el = range.begin();
183  for (el = range.begin(); el != range.end(); ++el)
184  {
185  if (!keepGoing())
186  break;
187 
188  const Elem * elem = *el;
189 
190  preElement(elem);
191 
193  _subdomain = elem->subdomain_id();
194  if (_subdomain != _old_subdomain)
196 
197  onElement(elem);
198 
199  for (unsigned int side = 0; side < elem->n_sides(); side++)
200  {
201  std::vector<BoundaryID> boundary_ids = _mesh.getBoundaryIDs(elem, side);
202 
203  if (boundary_ids.size() > 0)
204  for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
205  it != boundary_ids.end();
206  ++it)
207  onBoundary(elem, side, *it);
208 
209  const Elem * neighbor = elem->neighbor_ptr(side);
210  if (neighbor != nullptr)
211  {
212  preInternalSide(elem, side);
213 
215  _neighbor_subdomain = neighbor->subdomain_id();
218 
219  onInternalSide(elem, side);
220 
221  if (boundary_ids.size() > 0)
222  for (std::vector<BoundaryID>::iterator it = boundary_ids.begin();
223  it != boundary_ids.end();
224  ++it)
225  onInterface(elem, side, *it);
226 
227  postInternalSide(elem, side);
228  }
229  } // sides
230  postElement(elem);
231 
232  } // range
233 
234  post();
235  }
236  catch (MooseException & e)
237  {
239  }
240 }
virtual bool keepGoing()
Whether or not the loop should continue.
virtual void onElement(const Elem *elem)
Assembly of the element (not including surface assembly)
virtual void pre()
Called before the element range loop.
virtual void subdomainChanged()
Called every time the current subdomain changes (i.e.
virtual void neighborSubdomainChanged()
Called every time the neighbor subdomain changes (i.e.
virtual void preInternalSide(const Elem *elem, unsigned int side)
Called before evaluations on an element internal side.
virtual void postInternalSide(const Elem *elem, unsigned int side)
Called after evaluations on an element internal side.
const SubdomainID INVALID_BLOCK_ID
Definition: MooseTypes.h:320
virtual void postElement(const Elem *elem)
Called after the element assembly is done (including surface assembling)
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id)
Called when doing interface assembling.
SubdomainID _old_neighbor_subdomain
The subdomain for the last neighbor.
virtual void onInternalSide(const Elem *elem, unsigned int side)
Called when doing internal edge assembling.
Provides a way for users to bail out of the current solve.
virtual void caughtMooseException(MooseException &)
Called if a MooseException is caught anywhere during the computation.
std::vector< BoundaryID > getBoundaryIDs(const Elem *const elem, const unsigned short int side) const
Returns a vector of boundary IDs for the requested element on the requested side. ...
Definition: MooseMesh.C:2105
SubdomainID _subdomain
The subdomain for the current element.
SubdomainID _old_subdomain
The subdomain for the last element.
virtual void post()
Called after the element range loop.
virtual void preElement(const Elem *elem)
Called before the element assembly.
SubdomainID _neighbor_subdomain
The subdomain for the current neighbor.
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id)
Called when doing boundary assembling.

◆ post()

void ComputeMaterialsObjectThread::post ( )
overridevirtual

Called after the element range loop.

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 282 of file ComputeMaterialsObjectThread.C.

283 {
285 }
virtual void clearActiveElementalMooseVariables(THREAD_ID tid) override
Clear the active elemental MooseVariableFEBase.

◆ postElement()

void ThreadedElementLoopBase< ConstElemRange >::postElement ( const Elem *  elem)
virtualinherited

Called after the element assembly is done (including surface assembling)

Parameters
elem- active element

Reimplemented in ComputeJacobianBlocksThread, ComputeResidualThread, ComputeIndicatorThread, ComputeJacobianThread, and ComputeMarkerThread.

Definition at line 268 of file ThreadedElementLoopBase.h.

269 {
270 }

◆ postInternalSide()

void ThreadedElementLoopBase< ConstElemRange >::postInternalSide ( const Elem *  elem,
unsigned int  side 
)
virtualinherited

Called after evaluations on an element internal side.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Definition at line 288 of file ThreadedElementLoopBase.h.

289 {
290 }

◆ pre()

void ThreadedElementLoopBase< ConstElemRange >::pre ( )
virtualinherited

Called before the element range loop.

Definition at line 244 of file ThreadedElementLoopBase.h.

245 {
246 }

◆ preElement()

void ThreadedElementLoop< ConstElemRange >::preElement ( const Elem *  elem)
overridevirtualinherited

Called before the element assembly.

Parameters
elem- active element

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 87 of file ThreadedElementLoop.h.

88 {
90 }
virtual void setCurrentSubdomainID(const Elem *elem, THREAD_ID tid) override
Base class for assembly-like calculations.

◆ preInternalSide()

void ThreadedElementLoop< ConstElemRange >::preInternalSide ( const Elem *  elem,
unsigned int  side 
)
overridevirtualinherited

Called before evaluations on an element internal side.

Parameters
elem- Element we are on
side- local side number of the element 'elem'

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 94 of file ThreadedElementLoop.h.

95 {
97 }
Base class for assembly-like calculations.
virtual void setNeighborSubdomainID(const Elem *elem, unsigned int side, THREAD_ID tid) override

◆ subdomainChanged()

void ComputeMaterialsObjectThread::subdomainChanged ( )
overridevirtual

Called every time the current subdomain changes (i.e.

the subdomain of this element is not the same as the subdomain of the last element). Beware of over-using this! You might think that you can do some expensive stuff in here and get away with it... but there are applications that have TONS of subdomains....

Reimplemented from ThreadedElementLoopBase< ConstElemRange >.

Definition at line 79 of file ComputeMaterialsObjectThread.C.

80 {
83 
84  std::set<MooseVariableFEBase *> needed_moose_vars;
85  _materials.updateVariableDependency(needed_moose_vars, _tid);
88  else
91 }
virtual void setActiveElementalMooseVariables(const std::set< MooseVariableFEBase *> &moose_vars, THREAD_ID tid) override
Set the MOOSE variables to be reinited on each element.
bool needSubdomainMaterialOnSide(SubdomainID subdomain_id, THREAD_ID tid)
virtual void subdomainSetup(SubdomainID subdomain, THREAD_ID tid)
const MaterialWarehouse & _residual_materials
const MaterialWarehouse & _jacobian_materials
const MaterialWarehouse & _materials
Reference to the Material object warehouses.
virtual bool currentlyComputingJacobian() const
Returns true if the problem is in the process of computing Jacobian.
Definition: SubProblem.h:501
void updateVariableDependency(std::set< MooseVariableFEBase *> &needed_moose_vars, THREAD_ID tid=0) const
Update variable dependency vector.
SubdomainID _subdomain
The subdomain for the current element.

Member Data Documentation

◆ _assembly

std::vector<std::unique_ptr<Assembly> >& ComputeMaterialsObjectThread::_assembly
protected

Definition at line 63 of file ComputeMaterialsObjectThread.h.

Referenced by onBoundary(), onElement(), and onInternalSide().

◆ _bnd_material_data

std::vector<std::shared_ptr<MaterialData> >& ComputeMaterialsObjectThread::_bnd_material_data
protected

Definition at line 51 of file ComputeMaterialsObjectThread.h.

Referenced by onBoundary(), and onInternalSide().

◆ _bnd_material_props

MaterialPropertyStorage& ComputeMaterialsObjectThread::_bnd_material_props
protected

Definition at line 54 of file ComputeMaterialsObjectThread.h.

Referenced by onBoundary(), and onInternalSide().

◆ _discrete_materials

const MaterialWarehouse& ComputeMaterialsObjectThread::_discrete_materials
protected

Definition at line 61 of file ComputeMaterialsObjectThread.h.

Referenced by onBoundary(), onElement(), and onInternalSide().

◆ _fe_problem

FEProblemBase& ComputeMaterialsObjectThread::_fe_problem
protected

◆ _has_bnd_stateful_props

const bool ComputeMaterialsObjectThread::_has_bnd_stateful_props
protected

Definition at line 67 of file ComputeMaterialsObjectThread.h.

Referenced by onBoundary(), and onInternalSide().

◆ _has_neighbor_stateful_props

const bool ComputeMaterialsObjectThread::_has_neighbor_stateful_props
protected

Definition at line 68 of file ComputeMaterialsObjectThread.h.

Referenced by onInternalSide().

◆ _has_stateful_props

const bool ComputeMaterialsObjectThread::_has_stateful_props
protected

Definition at line 66 of file ComputeMaterialsObjectThread.h.

Referenced by onElement().

◆ _jacobian_materials

const MaterialWarehouse& ComputeMaterialsObjectThread::_jacobian_materials
protected

◆ _material_data

std::vector<std::shared_ptr<MaterialData> >& ComputeMaterialsObjectThread::_material_data
protected

Definition at line 50 of file ComputeMaterialsObjectThread.h.

Referenced by onElement().

◆ _material_props

MaterialPropertyStorage& ComputeMaterialsObjectThread::_material_props
protected

Definition at line 53 of file ComputeMaterialsObjectThread.h.

Referenced by onElement().

◆ _materials

const MaterialWarehouse& ComputeMaterialsObjectThread::_materials
protected

Reference to the Material object warehouses.

Definition at line 58 of file ComputeMaterialsObjectThread.h.

Referenced by onBoundary(), onElement(), onInternalSide(), and subdomainChanged().

◆ _mesh

MooseMesh& ThreadedElementLoopBase< ConstElemRange >::_mesh
protectedinherited

Definition at line 136 of file ThreadedElementLoopBase.h.

◆ _need_internal_side_material

bool ComputeMaterialsObjectThread::_need_internal_side_material
protected

Definition at line 64 of file ComputeMaterialsObjectThread.h.

Referenced by onInternalSide(), and subdomainChanged().

◆ _neighbor_material_data

std::vector<std::shared_ptr<MaterialData> >& ComputeMaterialsObjectThread::_neighbor_material_data
protected

Definition at line 52 of file ComputeMaterialsObjectThread.h.

Referenced by onInternalSide().

◆ _neighbor_material_props

MaterialPropertyStorage& ComputeMaterialsObjectThread::_neighbor_material_props
protected

Definition at line 55 of file ComputeMaterialsObjectThread.h.

Referenced by onInternalSide().

◆ _neighbor_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_neighbor_subdomain
protectedinherited

The subdomain for the current neighbor.

Definition at line 146 of file ThreadedElementLoopBase.h.

◆ _nl

NonlinearSystemBase& ComputeMaterialsObjectThread::_nl
protected

Definition at line 49 of file ComputeMaterialsObjectThread.h.

◆ _old_neighbor_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_old_neighbor_subdomain
protectedinherited

The subdomain for the last neighbor.

Definition at line 149 of file ThreadedElementLoopBase.h.

◆ _old_subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_old_subdomain
protectedinherited

The subdomain for the last element.

Definition at line 143 of file ThreadedElementLoopBase.h.

◆ _residual_materials

const MaterialWarehouse& ComputeMaterialsObjectThread::_residual_materials
protected

◆ _subdomain

SubdomainID ThreadedElementLoopBase< ConstElemRange >::_subdomain
protectedinherited

◆ _tid

THREAD_ID ThreadedElementLoopBase< ConstElemRange >::_tid
protectedinherited

Definition at line 137 of file ThreadedElementLoopBase.h.

Referenced by ComputeFullJacobianThread::computeFaceJacobian(), ComputeJacobianThread::computeFaceJacobian(), ComputeFullJacobianThread::computeInternalFaceJacobian(), ComputeJacobianThread::computeInternalFaceJacobian(), ComputeFullJacobianThread::computeInternalInterFaceJacobian(), ComputeJacobianThread::computeInternalInterFaceJacobian(), ComputeFullJacobianThread::computeJacobian(), ComputeJacobianThread::computeJacobian(), ComputeJacobianThread::onBoundary(), ComputeResidualThread::onBoundary(), onBoundary(), ComputeUserObjectsThread::onBoundary(), ComputeMarkerThread::onElement(), ComputeElemDampingThread::onElement(), ComputeElemAuxVarsThread::onElement(), ComputeJacobianThread::onElement(), ComputeIndicatorThread::onElement(), ComputeResidualThread::onElement(), onElement(), ComputeUserObjectsThread::onElement(), ComputeJacobianThread::onInterface(), ComputeResidualThread::onInterface(), ComputeJacobianThread::onInternalSide(), ComputeIndicatorThread::onInternalSide(), ComputeResidualThread::onInternalSide(), onInternalSide(), ComputeUserObjectsThread::onInternalSide(), ComputeMarkerThread::post(), ComputeElemAuxVarsThread::post(), post(), ComputeJacobianThread::post(), ComputeIndicatorThread::post(), ComputeResidualThread::post(), ComputeUserObjectsThread::post(), ComputeJacobianThread::postElement(), ComputeResidualThread::postElement(), ComputeJacobianBlocksThread::postElement(), ComputeUserObjectsThread::queryBoundary(), ComputeUserObjectsThread::querySubdomain(), ComputeMarkerThread::subdomainChanged(), ComputeElemAuxVarsThread::subdomainChanged(), ComputeJacobianThread::subdomainChanged(), ComputeIndicatorThread::subdomainChanged(), ComputeResidualThread::subdomainChanged(), subdomainChanged(), and ComputeUserObjectsThread::subdomainChanged().


The documentation for this class was generated from the following files: