forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ProjectedStatefulMaterialStorageAction.h
66 lines (55 loc) · 1.89 KB
/
ProjectedStatefulMaterialStorageAction.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "Action.h"
#include "libmesh/fe_type.h"
/**
* Set up AuxKernels and AxVariables for projected material property storage (PoMPS).
*/
class ProjectedStatefulMaterialStorageAction : public Action
{
public:
static InputParameters validParams();
ProjectedStatefulMaterialStorageAction(const InputParameters & parameters);
virtual void act() override;
protected:
/**
* Perform setup for a single scalar component of the material property prop_name, and gather the
* names of teh AuxVariables used to represent each component in `vars`.
*/
void processComponent(const std::string & prop_name,
std::vector<unsigned int> idx,
std::vector<VariableName> & vars,
bool is_ad);
/**
* Add the material object to obtain the interpolated old state (for use with
* InterpolatedStatefulMaterialPropertyInterface)
*/
void addMaterial(const std::string & prop_type,
const std::string & prop_name,
std::vector<VariableName> & vars);
enum class PropertyType
{
REAL,
REALVECTORVALUE,
RANKTWOTENSOR,
RANKFOURTENSOR
};
typedef std::pair<PropertyType, bool> PropertyInfo;
/**
* Return the property type and whether to use AD or not. If no property with a supported type is
* found, throw an error.
*/
PropertyInfo checkProperty(const std::string & prop_name);
const std::vector<MaterialPropertyName> & _prop_names;
const MooseEnum _order;
FEType _fe_type;
const std::string _var_type;
const std::string _pomps_prefix;
};