www.mooseframework.org
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CoupledDirectionalMeshHeightInterpolation Class Reference

Couples to some other value and modulates it by the mesh height in a direction. More...

#include <CoupledDirectionalMeshHeightInterpolation.h>

Inheritance diagram for CoupledDirectionalMeshHeightInterpolation:
[legend]

Public Member Functions

 CoupledDirectionalMeshHeightInterpolation (const InputParameters &parameters)
 Factory constructor, takes parameters so that all derived classes can be built using the same constructor. More...
 
virtual ~CoupledDirectionalMeshHeightInterpolation ()
 

Protected Member Functions

virtual Real computeValue ()
 

Protected Attributes

const VariableValue & _coupled_val
 The value of a coupled variable to modulate. More...
 
unsigned int _direction
 The direction to interpolate in. More...
 
Real _direction_min
 
Real _direction_max
 

Detailed Description

Couples to some other value and modulates it by the mesh height in a direction.

What this means is that a constant field will become a linear field that is zero at the end of the domain that is most negative in the given direction and is that given constant value at the extremum of the mesh in the given direction.

This can be useful for specifying linear mesh "stretches". If you are wanting to stretch a mesh by "5"... put 5 into the field that this couples to and this AuxKernel can create a linear "displacement" field that will give that stretch.

Definition at line 32 of file CoupledDirectionalMeshHeightInterpolation.h.

Constructor & Destructor Documentation

◆ CoupledDirectionalMeshHeightInterpolation()

CoupledDirectionalMeshHeightInterpolation::CoupledDirectionalMeshHeightInterpolation ( const InputParameters &  parameters)

Factory constructor, takes parameters so that all derived classes can be built using the same constructor.

Definition at line 31 of file CoupledDirectionalMeshHeightInterpolation.C.

33  : AuxKernel(parameters),
34  _coupled_val(coupledValue("coupled_var")),
35  _direction(getParam<MooseEnum>("direction"))
36 {
37  BoundingBox bounding_box = MeshTools::create_bounding_box(_subproblem.mesh());
38 
39  _direction_min = bounding_box.min()(_direction);
40  _direction_max = bounding_box.max()(_direction);
41 }
const VariableValue & _coupled_val
The value of a coupled variable to modulate.
unsigned int _direction
The direction to interpolate in.

◆ ~CoupledDirectionalMeshHeightInterpolation()

virtual CoupledDirectionalMeshHeightInterpolation::~CoupledDirectionalMeshHeightInterpolation ( )
inlinevirtual

Definition at line 41 of file CoupledDirectionalMeshHeightInterpolation.h.

41 {}

Member Function Documentation

◆ computeValue()

Real CoupledDirectionalMeshHeightInterpolation::computeValue ( )
protectedvirtual

Definition at line 44 of file CoupledDirectionalMeshHeightInterpolation.C.

45 {
46  const Node & current_pos = *_current_node;
47 
48  Real percentage_along_direction =
50 
51  return percentage_along_direction * _coupled_val[_qp];
52 }
const VariableValue & _coupled_val
The value of a coupled variable to modulate.
unsigned int _direction
The direction to interpolate in.

Member Data Documentation

◆ _coupled_val

const VariableValue& CoupledDirectionalMeshHeightInterpolation::_coupled_val
protected

The value of a coupled variable to modulate.

Definition at line 47 of file CoupledDirectionalMeshHeightInterpolation.h.

Referenced by computeValue().

◆ _direction

unsigned int CoupledDirectionalMeshHeightInterpolation::_direction
protected

The direction to interpolate in.

Definition at line 50 of file CoupledDirectionalMeshHeightInterpolation.h.

Referenced by computeValue(), and CoupledDirectionalMeshHeightInterpolation().

◆ _direction_max

Real CoupledDirectionalMeshHeightInterpolation::_direction_max
protected

◆ _direction_min

Real CoupledDirectionalMeshHeightInterpolation::_direction_min
protected

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