www.mooseframework.org
ProjectMaterialProperties.h
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #ifndef PROJECTMATERIALPROPERTIES_H
16 #define PROJECTMATERIALPROPERTIES_H
17 
18 // MOOSE includes
19 #include "ThreadedElementLoop.h"
20 
21 #include "libmesh/elem_range.h"
22 
23 class FEProblemBase;
26 class MaterialData;
27 class Assembly;
28 
29 class ProjectMaterialProperties : public ThreadedElementLoop<ConstElemPointerRange>
30 {
31 public:
32  ProjectMaterialProperties(bool refine,
33  FEProblemBase & fe_problem,
34  NonlinearSystemBase & sys,
35  std::vector<std::shared_ptr<MaterialData>> & material_data,
36  std::vector<std::shared_ptr<MaterialData>> & bnd_material_data,
37  MaterialPropertyStorage & material_props,
38  MaterialPropertyStorage & bnd_material_props,
39  std::vector<Assembly *> & assembly);
40 
41  // Splitting Constructor
42  ProjectMaterialProperties(ProjectMaterialProperties & x, Threads::split split);
43 
45 
46  virtual void subdomainChanged() override;
47  virtual void onElement(const Elem * elem) override;
48  virtual void onBoundary(const Elem * elem, unsigned int side, BoundaryID bnd_id) override;
49  virtual void onInternalSide(const Elem * elem, unsigned int side) override;
50 
51  void join(const ProjectMaterialProperties & /*y*/);
52 
53 protected:
55  bool _refine;
58  std::vector<std::shared_ptr<MaterialData>> & _material_data;
59  std::vector<std::shared_ptr<MaterialData>> & _bnd_material_data;
62  std::vector<Assembly *> & _assembly;
64 };
65 
66 #endif // PROJECTMATERIALPROPERTIES_H
Base class for assembly-like calculations.
std::vector< std::shared_ptr< MaterialData > > & _bnd_material_data
Keeps track of stuff related to assembling.
Definition: Assembly.h:63
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
Stores the stateful material properties computed by materials.
MaterialPropertyStorage & _bnd_material_props
static PetscErrorCode Vec x
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
Nonlinear system to be solved.
bool _refine
Whether or not you are projecting refinements. Set to false for coarsening.
MaterialPropertyStorage & _material_props
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id) override
Called when doing boundary assembling.
std::vector< std::shared_ptr< MaterialData > > & _material_data
ProjectMaterialProperties(bool refine, FEProblemBase &fe_problem, NonlinearSystemBase &sys, std::vector< std::shared_ptr< MaterialData >> &material_data, std::vector< std::shared_ptr< MaterialData >> &bnd_material_data, MaterialPropertyStorage &material_props, MaterialPropertyStorage &bnd_material_props, std::vector< Assembly * > &assembly)
std::vector< Assembly * > & _assembly
Proxy for accessing MaterialPropertyStorage.
Definition: MaterialData.h:33
void join(const ProjectMaterialProperties &)
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
boundary_id_type BoundaryID
Definition: MooseTypes.h:75