www.mooseframework.org
ComputeMaterialsObjectThread.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 "ThreadedElementLoop.h"
13 
14 #include "libmesh/elem_range.h"
15 
16 // Forward declarations
17 class FEProblemBase;
20 class MaterialData;
21 class Assembly;
22 
23 class ComputeMaterialsObjectThread : public ThreadedElementLoop<ConstElemRange>
24 {
25 public:
27  MaterialPropertyStorage & material_props,
28  MaterialPropertyStorage & bnd_material_props,
29  MaterialPropertyStorage & neighbor_material_props,
30  std::vector<std::vector<std::unique_ptr<Assembly>>> & assembly);
31 
32  // Splitting Constructor
34 
35  virtual void post() override;
36  virtual void subdomainChanged() override;
37  virtual void onElement(const Elem * elem) override;
38  virtual void onBoundary(const Elem * elem,
39  unsigned int side,
40  BoundaryID bnd_id,
41  const Elem * lower_d_elem = nullptr) override;
42  virtual void onInternalSide(const Elem * elem, unsigned int side) override;
43  virtual void onInterface(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
44 
45  void join(const ComputeMaterialsObjectThread & /*y*/);
46 
47 protected:
52 
57 
63 
65 
66  std::vector<std::vector<std::unique_ptr<Assembly>>> & _assembly;
68 
69  const bool _has_stateful_props;
72 };
Base class for assembly-like calculations.
void join(const ComputeMaterialsObjectThread &)
Keeps track of stuff related to assembling.
Definition: Assembly.h:93
MaterialPropertyStorage & _material_props
Stores the stateful material properties computed by materials.
MaterialBase objects are special in that they have additional objects created automatically (see FEPr...
const MaterialWarehouse & _interface_materials
This is populated using _fe_problem.getResidualInterfaceMaterialsWarehouse because it has the union o...
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Nonlinear system to be solved.
const MaterialWarehouse & _materials
This is populated using _fe_problem.getResidualMaterialsWarehouse because it has the union of traditi...
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
Called when doing boundary assembling.
boundary_id_type BoundaryID
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
MaterialPropertyStorage & _neighbor_material_props
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
tbb::split split
std::vector< std::vector< std::unique_ptr< Assembly > > > & _assembly
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
ComputeMaterialsObjectThread(FEProblemBase &fe_problem, MaterialPropertyStorage &material_props, MaterialPropertyStorage &bnd_material_props, MaterialPropertyStorage &neighbor_material_props, std::vector< std::vector< std::unique_ptr< Assembly >>> &assembly)
Proxy for accessing MaterialPropertyStorage.
Definition: MaterialData.h:33
virtual void post() override
Called after the element range loop.
virtual void onInterface(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing interface assembling.
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _discrete_materials