https://mooseframework.inl.gov
MaterialWarehouse.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 // MOOSE includes
13 #include "MooseObjectWarehouse.h"
14 
15 // Forward declarations
16 class MaterialBase;
17 
26 class MaterialWarehouse : public MooseObjectWarehouse<MaterialBase>
27 {
28 public:
30 
32 
36  virtual void initialSetup(THREAD_ID tid = 0) const override;
37  virtual void timestepSetup(THREAD_ID tid = 0) const override;
38  virtual void subdomainSetup(THREAD_ID tid = 0) const override;
39  virtual void subdomainSetup(SubdomainID id, THREAD_ID tid = 0) const override;
40  virtual void neighborSubdomainSetup(THREAD_ID tid = 0) const;
41  virtual void neighborSubdomainSetup(SubdomainID id, THREAD_ID tid = 0) const;
42  virtual void jacobianSetup(THREAD_ID tid = 0) const override;
43  virtual void residualSetup(THREAD_ID tid = 0) const override;
44  virtual void updateActive(THREAD_ID tid = 0) override;
51  void sort(THREAD_ID tid = 0, bool sort_all_objects = false);
53 
57  void addObjects(std::shared_ptr<MaterialBase> block,
58  std::shared_ptr<MaterialBase> neighbor,
59  std::shared_ptr<MaterialBase> face,
60  THREAD_ID tid = 0);
61 
62 protected:
65 
68 
72  virtual void
73  updateMatPropDependencyHelper(std::unordered_set<unsigned int> & needed_mat_props,
74  const std::vector<std::shared_ptr<MaterialBase>> & objects,
75  const bool producer_only) const override;
76 };
MooseObjectWarehouse< MaterialBase > _neighbor_materials
Storage for neighbor material objects (Block are stored in the base class)
const MooseObjectWarehouse< MaterialBase > & operator[](Moose::MaterialDataType data_type) const
MPI_Datatype data_type
virtual void jacobianSetup(THREAD_ID tid=0) const override
virtual void neighborSubdomainSetup(THREAD_ID tid=0) const
A storage container for MooseObjects that inherit from SetupInterface.
virtual void timestepSetup(THREAD_ID tid=0) const override
MaterialDataType
MaterialData types.
Definition: MooseTypes.h:740
MooseObjectWarehouse< MaterialBase > _face_materials
Storage for face material objects (Block are stored in the base class)
MaterialBase objects are special in that they have additional objects created automatically (see FEPr...
virtual void updateMatPropDependencyHelper(std::unordered_set< unsigned int > &needed_mat_props, const std::vector< std::shared_ptr< MaterialBase >> &objects, const bool producer_only) const override
Helper method for updating material property dependency vector.
void sort(THREAD_ID tid=0, bool sort_all_objects=false)
By default, this method only sorts block and boundary-wise object storages that are used by the MOOSE...
void addObjects(std::shared_ptr< MaterialBase > block, std::shared_ptr< MaterialBase > neighbor, std::shared_ptr< MaterialBase > face, THREAD_ID tid=0)
A special method unique to this class for adding Block, Neighbor, and Face material objects...
virtual void residualSetup(THREAD_ID tid=0) const override
virtual void subdomainSetup(THREAD_ID tid=0) const override
virtual void initialSetup(THREAD_ID tid=0) const override
Convenience methods for calling object setup methods that handle the extra neighbor and face objects...
MaterialBases compute MaterialProperties.
Definition: MaterialBase.h:62
virtual void updateActive(THREAD_ID tid=0) override
Update the active status of Kernels.
unsigned int THREAD_ID
Definition: MooseTypes.h:237