www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LevelSetBiMaterialBase Class Referenceabstract

Base class for switching between materials in a bi-material system where the interface is defined by a level set function. More...

#include <LevelSetBiMaterialBase.h>

Inheritance diagram for LevelSetBiMaterialBase:
[legend]

Public Member Functions

 LevelSetBiMaterialBase (const InputParameters &parameters)
 

Protected Member Functions

virtual void computeProperties ()
 
virtual void computeQpProperties ()
 
virtual void assignQpPropertiesForLevelSetNegative ()=0
 assign the material properties for the negative level set region. More...
 
virtual void assignQpPropertiesForLevelSetPositive ()=0
 assign the material properties for the positive level set region. More...
 

Protected Attributes

std::string _base_name
 global material properties More...
 
std::string _prop_name
 Property name. More...
 
std::shared_ptr< XFEM_xfem
 shared pointer to XFEM More...
 
const unsigned int _level_set_var_number
 The variable number of the level set variable we are operating on. More...
 
const System & _system
 system reference More...
 
const NumericVector< Number > * _solution
 the subproblem solution vector More...
 
bool _use_positive_property
 use the positive level set region's material properties More...
 

Detailed Description

Base class for switching between materials in a bi-material system where the interface is defined by a level set function.

Definition at line 23 of file LevelSetBiMaterialBase.h.

Constructor & Destructor Documentation

◆ LevelSetBiMaterialBase()

LevelSetBiMaterialBase::LevelSetBiMaterialBase ( const InputParameters &  parameters)

Definition at line 31 of file LevelSetBiMaterialBase.C.

32  : Material(parameters),
33  _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""),
34  _prop_name(getParam<std::string>("prop_name")),
35  _level_set_var_number(_subproblem
36  .getVariable(_tid,
37  parameters.get<VariableName>("level_set_var"),
38  Moose::VarKindType::VAR_ANY,
39  Moose::VarFieldType::VAR_FIELD_STANDARD)
40  .number()),
41  _system(_subproblem.getSystem(getParam<VariableName>("level_set_var"))),
42  _solution(_system.current_local_solution.get()),
44 {
45  FEProblemBase * fe_problem = dynamic_cast<FEProblemBase *>(&_subproblem);
46 
47  if (fe_problem == NULL)
48  mooseError("Problem casting _subproblem to FEProblemBase in XFEMMaterialStateMarkerBase");
49 
50  _xfem = MooseSharedNamespace::dynamic_pointer_cast<XFEM>(fe_problem->getXFEM());
51 }
const System & _system
system reference
const unsigned int _level_set_var_number
The variable number of the level set variable we are operating on.
This is the XFEM class.
Definition: XFEM.h:62
bool _use_positive_property
use the positive level set region&#39;s material properties
std::shared_ptr< XFEM > _xfem
shared pointer to XFEM
std::string _base_name
global material properties
std::string _prop_name
Property name.
const NumericVector< Number > * _solution
the subproblem solution vector

Member Function Documentation

◆ assignQpPropertiesForLevelSetNegative()

virtual void LevelSetBiMaterialBase::assignQpPropertiesForLevelSetNegative ( )
protectedpure virtual

assign the material properties for the negative level set region.

Implemented in LevelSetBiMaterialRankFour, LevelSetBiMaterialRankTwo, and LevelSetBiMaterialReal.

Referenced by computeQpProperties().

◆ assignQpPropertiesForLevelSetPositive()

virtual void LevelSetBiMaterialBase::assignQpPropertiesForLevelSetPositive ( )
protectedpure virtual

assign the material properties for the positive level set region.

Implemented in LevelSetBiMaterialRankFour, LevelSetBiMaterialRankTwo, and LevelSetBiMaterialReal.

Referenced by computeQpProperties().

◆ computeProperties()

void LevelSetBiMaterialBase::computeProperties ( )
protectedvirtual

Definition at line 54 of file LevelSetBiMaterialBase.C.

55 {
56  const Node * node = _current_elem->node_ptr(0);
57 
58  dof_id_type ls_dof_id = node->dof_number(_system.number(), _level_set_var_number, 0);
59  Number ls_node_value = (*_solution)(ls_dof_id);
60 
61  _use_positive_property = false;
62 
63  if (_xfem->isPointInsidePhysicalDomain(_current_elem, *node))
64  {
65  if (ls_node_value > 0.0)
67  }
68  else
69  {
70  if (ls_node_value < 0.0)
72  }
73 
74  Material::computeProperties();
75 }
const System & _system
system reference
const unsigned int _level_set_var_number
The variable number of the level set variable we are operating on.
bool _use_positive_property
use the positive level set region&#39;s material properties
std::shared_ptr< XFEM > _xfem
shared pointer to XFEM

◆ computeQpProperties()

void LevelSetBiMaterialBase::computeQpProperties ( )
protectedvirtual

Definition at line 78 of file LevelSetBiMaterialBase.C.

79 {
82  else
84 }
virtual void assignQpPropertiesForLevelSetPositive()=0
assign the material properties for the positive level set region.
bool _use_positive_property
use the positive level set region&#39;s material properties
virtual void assignQpPropertiesForLevelSetNegative()=0
assign the material properties for the negative level set region.

Member Data Documentation

◆ _base_name

std::string LevelSetBiMaterialBase::_base_name
protected

global material properties

Definition at line 43 of file LevelSetBiMaterialBase.h.

◆ _level_set_var_number

const unsigned int LevelSetBiMaterialBase::_level_set_var_number
protected

The variable number of the level set variable we are operating on.

Definition at line 52 of file LevelSetBiMaterialBase.h.

Referenced by computeProperties().

◆ _prop_name

std::string LevelSetBiMaterialBase::_prop_name
protected

◆ _solution

const NumericVector<Number>* LevelSetBiMaterialBase::_solution
protected

the subproblem solution vector

Definition at line 58 of file LevelSetBiMaterialBase.h.

◆ _system

const System& LevelSetBiMaterialBase::_system
protected

system reference

Definition at line 55 of file LevelSetBiMaterialBase.h.

Referenced by computeProperties().

◆ _use_positive_property

bool LevelSetBiMaterialBase::_use_positive_property
protected

use the positive level set region's material properties

Definition at line 61 of file LevelSetBiMaterialBase.h.

Referenced by computeProperties(), and computeQpProperties().

◆ _xfem

std::shared_ptr<XFEM> LevelSetBiMaterialBase::_xfem
protected

shared pointer to XFEM

Definition at line 49 of file LevelSetBiMaterialBase.h.

Referenced by computeProperties(), and LevelSetBiMaterialBase().


The documentation for this class was generated from the following files: