www.mooseframework.org
LevelSetBiMaterialRankFour.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
11 
14  "01/01/2022 00:00",
18  "01/01/2022 00:00",
20 
21 template <bool is_ad>
24 {
26  params.addClassDescription(
27  "Compute a RankFourTensor material property for bi-materials problem (consisting of two "
28  "different materials) defined by a level set function.");
29  return params;
30 }
31 
32 template <bool is_ad>
34  const InputParameters & parameters)
35  : LevelSetBiMaterialBase(parameters),
36  _bimaterial_material_prop(2),
37  _material_prop(declareGenericProperty<RankFourTensor, is_ad>(_base_name + _prop_name))
38 {
39  _bimaterial_material_prop[0] = &getGenericMaterialProperty<RankFourTensor, is_ad>(
40  getParam<std::string>("levelset_positive_base") + "_" + _prop_name);
41  _bimaterial_material_prop[1] = &getGenericMaterialProperty<RankFourTensor, is_ad>(
42  getParam<std::string>("levelset_negative_base") + "_" + _prop_name);
43 }
44 
45 template <bool is_ad>
46 void
48 {
49  _material_prop[_qp] = (*_bimaterial_material_prop[0])[_qp];
50 }
51 
52 template <bool is_ad>
53 void
55 {
56  _material_prop[_qp] = (*_bimaterial_material_prop[1])[_qp];
57 }
58 
virtual void assignQpPropertiesForLevelSetPositive() override
assign the material properties for the positive level set region.
LevelSetBiMaterialRankFourTempl(const InputParameters &parameters)
Switches between materials in a multi-material system where the interfaces are defined by multiple ge...
std::string _prop_name
Property name.
registerMooseObjectReplaced("XFEMApp", LevelSetBiMaterialRankFour, "01/01/2022 00:00", XFEMCutSwitchingMaterialRankFourTensor)
std::vector< const GenericMaterialProperty< RankFourTensor, is_ad > * > _bimaterial_material_prop
RankFourTensor Material properties for the two separate materials in the bi-material system...
static InputParameters validParams()
Compute a RankFourTensor material property for bi-materials problem (consisting of two different mate...
void addClassDescription(const std::string &doc_string)
Base class for switching between materials in a bi-material system where the interface is defined by ...
virtual void assignQpPropertiesForLevelSetNegative() override
assign the material properties for the negative level set region.