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 
13 
14 template <>
15 InputParameters
17 {
18  InputParameters params = validParams<LevelSetBiMaterialBase>();
19  params.addClassDescription(
20  "Compute a Real material property for bi-materials problem (consisting of two "
21  "different materials) defined by a level set function.");
22  return params;
23 }
24 
25 LevelSetBiMaterialReal::LevelSetBiMaterialReal(const InputParameters & parameters)
26  : LevelSetBiMaterialBase(parameters),
27  _bimaterial_material_prop(2),
28  _material_prop(declareProperty<Real>(_base_name + _prop_name))
29 {
30  _bimaterial_material_prop[0] = &getMaterialProperty<Real>(
31  getParam<std::string>("levelset_positive_base") + "_" + _prop_name);
32  _bimaterial_material_prop[1] = &getMaterialProperty<Real>(
33  getParam<std::string>("levelset_negative_base") + "_" + _prop_name);
34 }
35 
36 void
38 {
39  _material_prop[_qp] = (*_bimaterial_material_prop[0])[_qp];
40 }
41 
42 void
44 {
45  _material_prop[_qp] = (*_bimaterial_material_prop[1])[_qp];
46 }
validParams< LevelSetBiMaterialBase >
InputParameters validParams< LevelSetBiMaterialBase >()
Definition: LevelSetBiMaterialBase.C:17
LevelSetBiMaterialReal::assignQpPropertiesForLevelSetNegative
virtual void assignQpPropertiesForLevelSetNegative()
assign the material properties for the negative level set region.
Definition: LevelSetBiMaterialReal.C:43
LevelSetBiMaterialReal::assignQpPropertiesForLevelSetPositive
virtual void assignQpPropertiesForLevelSetPositive()
assign the material properties for the positive level set region.
Definition: LevelSetBiMaterialReal.C:37
LevelSetBiMaterialReal::_material_prop
MaterialProperty< Real > & _material_prop
Global Real material property (switch bi-material diffusion coefficient based on level set values)
Definition: LevelSetBiMaterialReal.h:38
registerMooseObject
registerMooseObject("XFEMApp", LevelSetBiMaterialReal)
validParams< LevelSetBiMaterialReal >
InputParameters validParams< LevelSetBiMaterialReal >()
Definition: LevelSetBiMaterialReal.C:16
LevelSetBiMaterialReal::_bimaterial_material_prop
std::vector< const MaterialProperty< Real > * > _bimaterial_material_prop
Real Material properties for the two separate materials in the bi-material system.
Definition: LevelSetBiMaterialReal.h:35
LevelSetBiMaterialReal::LevelSetBiMaterialReal
LevelSetBiMaterialReal(const InputParameters &parameters)
Definition: LevelSetBiMaterialReal.C:25
LevelSetBiMaterialReal.h
LevelSetBiMaterialBase
Base class for switching between materials in a bi-material system where the interface is defined by ...
Definition: LevelSetBiMaterialBase.h:25
LevelSetBiMaterialReal
Compute a Real material property for bi-materials problem (consisting of two different materials) def...
Definition: LevelSetBiMaterialReal.h:25
LevelSetBiMaterialBase::_prop_name
std::string _prop_name
Property name.
Definition: LevelSetBiMaterialBase.h:48