https://mooseframework.inl.gov
Loading...
Searching...
No Matches
XFEMCutSwitchingMaterial.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#include "Material.h"
13#include "XFEM.h"
17
22template <typename T, bool is_ad>
24{
25public:
27
29
30protected:
31 // At the time of initializing this switching material, the initQpStatefulProperties methods of
32 // the base materials are already called. So we only need to assign the current values at _qp to
33 // the switching material property.
34 virtual void initQpStatefulProperties() override { computeProperties(); }
35
36 virtual void computeProperties() override;
37
38 virtual void computeQpProperties() override { _prop[_qp] = (*_mapped_prop)[_qp]; }
39
40private:
43
45 const std::vector<CutSubdomainID> _keys;
46 const std::vector<std::string> _vals;
48
50 const std::string _base_name;
51
53 const std::string _prop_name;
54
56 std::unordered_map<unsigned int, const GenericMaterialProperty<T, is_ad> *> _prop_map;
57
60
62 std::shared_ptr<XFEM> _xfem;
63
66};
67
73
typename GenericMaterialPropertyStruct< T, is_ad >::type GenericMaterialProperty
XFEMCutSwitchingMaterialTempl< RankThreeTensor, true > ADXFEMCutSwitchingMaterialRankThreeTensor
XFEMCutSwitchingMaterialTempl< RankFourTensor, true > ADXFEMCutSwitchingMaterialRankFourTensor
XFEMCutSwitchingMaterialTempl< RankTwoTensor, false > XFEMCutSwitchingMaterialRankTwoTensor
XFEMCutSwitchingMaterialTempl< Real, false > XFEMCutSwitchingMaterialReal
XFEMCutSwitchingMaterialTempl< RankFourTensor, false > XFEMCutSwitchingMaterialRankFourTensor
XFEMCutSwitchingMaterialTempl< Real, true > ADXFEMCutSwitchingMaterialReal
XFEMCutSwitchingMaterialTempl< RankTwoTensor, true > ADXFEMCutSwitchingMaterialRankTwoTensor
XFEMCutSwitchingMaterialTempl< RankThreeTensor, false > XFEMCutSwitchingMaterialRankThreeTensor
unsigned int _qp
const InputParameters & parameters() const
Switches between materials in a multi-material system where the interfaces are defined by multiple ge...
const std::vector< std::string > _vals
std::shared_ptr< XFEM > _xfem
shared pointer to XFEM
virtual void computeProperties() override
virtual void computeQpProperties() override
const std::string _base_name
global material property base name
std::unordered_map< unsigned int, const GenericMaterialProperty< T, is_ad > * > _prop_map
map of keys to material property
GenericMaterialProperty< T, is_ad > & _prop
the global material property
virtual void initQpStatefulProperties() override
const std::vector< CutSubdomainID > _keys
map keys and values
const GeometricCutUserObject * _cut
The geometric cut userobject that provides the cut subdomain IDs.
const GenericMaterialProperty< T, is_ad > * _mapped_prop
current mapped material property
const std::string _prop_name
property name