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