www.mooseframework.org
LevelSetBiMaterialReal.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 
10 #include "LevelSetBiMaterialReal.h"
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 Real 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  : 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 
44 template <bool is_ad>
45 void
47 {
48  _material_prop[_qp] = (*_bimaterial_material_prop[0])[_qp];
49 }
50 
51 template <bool is_ad>
52 void
54 {
55  _material_prop[_qp] = (*_bimaterial_material_prop[1])[_qp];
56 }
57 
std::vector< const GenericMaterialProperty< Real, is_ad > * > _bimaterial_material_prop
Real Material properties for the two separate materials in the bi-material system.
virtual void assignQpPropertiesForLevelSetPositive() override
assign the material properties for the positive level set region.
static InputParameters validParams()
Switches between materials in a multi-material system where the interfaces are defined by multiple ge...
std::string _prop_name
Property name.
virtual void assignQpPropertiesForLevelSetNegative() override
assign the material properties for the negative level set region.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
static InputParameters validParams()
registerMooseObjectReplaced("XFEMApp", LevelSetBiMaterialReal, "01/01/2022 00:00", XFEMCutSwitchingMaterialReal)
void addClassDescription(const std::string &doc_string)
LevelSetBiMaterialRealTempl(const InputParameters &parameters)
Base class for switching between materials in a bi-material system where the interface is defined by ...
Compute a Real material property for bi-materials problem (consisting of two different materials) def...