https://mooseframework.inl.gov
Loading...
Searching...
No Matches
ProjectMaterialProperties.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 "ThreadedElementLoop.h"
14
15#include "libmesh/elem_range.h"
16
17class FEProblemBase;
20class MaterialData;
21class Assembly;
22
23class ProjectMaterialProperties : public ThreadedElementLoop<ConstElemPointerRange>
24{
25public:
26 ProjectMaterialProperties(bool refine,
27 FEProblemBase & fe_problem,
28 MaterialPropertyStorage & material_props,
29 MaterialPropertyStorage & bnd_material_props,
30 std::vector<std::vector<std::unique_ptr<Assembly>>> & assembly);
31
32 // Splitting Constructor
34
36
37 virtual void subdomainChanged() override;
38 virtual void onElement(const Elem * elem) override;
39 virtual void onBoundary(const Elem * elem,
40 unsigned int side,
41 BoundaryID bnd_id,
42 const Elem * lower_d_elem = nullptr) override;
43 virtual void onInternalSide(const Elem * elem, unsigned int side) override;
44
45 void join(const ProjectMaterialProperties & /*y*/);
46
47protected:
49 bool _refine;
53 std::vector<std::vector<std::unique_ptr<Assembly>>> & _assembly;
55
60
61private:
62 bool shouldComputeInternalSide(const Elem & /*elem*/, const Elem & /*neighbor*/) const override;
63};
64
65inline bool
67 const Elem & /*neighbor*/) const
68{
69 return true;
70}
boundary_id_type BoundaryID
Keeps track of stuff related to assembling.
Definition Assembly.h:110
Specialization of SubProblem for solving nonlinear equations plus auxiliary equations.
Proxy for accessing MaterialPropertyStorage.
Stores the stateful material properties computed by materials.
MaterialBase objects are special in that they have additional objects created automatically (see FEPr...
Nonlinear system to be solved.
std::vector< std::vector< std::unique_ptr< Assembly > > > & _assembly
bool _refine
Whether or not you are projecting refinements. Set to false for coarsening.
MaterialPropertyStorage & _bnd_material_props
const MaterialWarehouse & _materials
Materials warehouse.
virtual void onBoundary(const Elem *elem, unsigned int side, BoundaryID bnd_id, const Elem *lower_d_elem=nullptr) override
Called when doing boundary assembling.
MaterialPropertyStorage & _material_props
bool shouldComputeInternalSide(const Elem &, const Elem &) const override
Whether to compute the internal side for the provided element-neighbor pair.
void join(const ProjectMaterialProperties &)
virtual void onElement(const Elem *elem) override
Assembly of the element (not including surface assembly)
const MaterialWarehouse & _discrete_materials
Discrete materials warehouse.
virtual void subdomainChanged() override
Called every time the current subdomain changes (i.e.
virtual void onInternalSide(const Elem *elem, unsigned int side) override
Called when doing internal edge assembling.
Base class for assembly-like calculations.