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

Defines the position of a moving front. More...

#include <MovingPlanarFront.h>

Inheritance diagram for MovingPlanarFront:
[legend]

Public Member Functions

 MovingPlanarFront (const InputParameters &parameters)
 
virtual Real value (Real t, const Point &p) override
 

Protected Attributes

const RealVectorValue _start_posn
 Initial position of front. More...
 
const RealVectorValue _end_posn
 Final position of the front: together with start_posn this defines the front's normal. More...
 
Function & _distance
 The front's distance from start_posn (along the normal direction) More...
 
const Real _active_length
 active length More...
 
const Real _true_value
 true value to return More...
 
const Real _false_value
 false value to return More...
 
const Real _activation_time
 activation time More...
 
const Real _deactivation_time
 deactivation time More...
 
RealVectorValue _front_normal
 front unit normal More...
 

Detailed Description

Defines the position of a moving front.

The front is an infinite plane with normal pointing from start_posn to end_posn. The front's distance from start_posn is defined by the 'distance' function

This Function may be used to define the geometry of an underground excavation, probably in conjunction with a predefined sideset.

Definition at line 28 of file MovingPlanarFront.h.

Constructor & Destructor Documentation

MovingPlanarFront::MovingPlanarFront ( const InputParameters &  parameters)

Definition at line 43 of file MovingPlanarFront.C.

44  : Function(parameters),
45  FunctionInterface(this),
46  _start_posn(getParam<RealVectorValue>("start_posn")),
47  _end_posn(getParam<RealVectorValue>("end_posn")),
48  _distance(getFunction("distance")),
49  _active_length(getParam<Real>("active_length")),
50  _true_value(getParam<Real>("true_value")),
51  _false_value(getParam<Real>("false_value")),
52  _activation_time(getParam<Real>("activation_time")),
53  _deactivation_time(getParam<Real>("deactivation_time")),
55 {
56  if (_front_normal.size() == 0)
57  mooseError("MovingPlanarFront: start_posn and end_posn must be different points");
58  _front_normal /= _front_normal.size();
59 }
const Real _activation_time
activation time
const Real _deactivation_time
deactivation time
const RealVectorValue _start_posn
Initial position of front.
const Real _false_value
false value to return
Function & _distance
The front&#39;s distance from start_posn (along the normal direction)
const Real _true_value
true value to return
const RealVectorValue _end_posn
Final position of the front: together with start_posn this defines the front&#39;s normal.
const Real _active_length
active length
RealVectorValue _front_normal
front unit normal

Member Function Documentation

Real MovingPlanarFront::value ( Real  t,
const Point &  p 
)
overridevirtual

Definition at line 62 of file MovingPlanarFront.C.

63 {
64  if (t < _activation_time)
65  return _false_value;
66 
67  if (t >= _deactivation_time)
68  return _false_value;
69 
70  if ((p - _start_posn) * _front_normal < 0)
71  // point is behind start posn - it'll never be active
72  return _false_value;
73 
74  const RealVectorValue current_posn = _start_posn + _distance.value(t, p) * _front_normal;
75 
76  const Real distance_ahead_of_front = (p - current_posn) * _front_normal;
77 
78  if (distance_ahead_of_front > 0)
79  return _false_value;
80 
81  if (distance_ahead_of_front < -_active_length)
82  // point is too far behind front
83  return _false_value;
84 
85  return _true_value;
86 }
const Real _activation_time
activation time
const Real _deactivation_time
deactivation time
const RealVectorValue _start_posn
Initial position of front.
const Real _false_value
false value to return
Function & _distance
The front&#39;s distance from start_posn (along the normal direction)
const Real _true_value
true value to return
const Real _active_length
active length
RealVectorValue _front_normal
front unit normal

Member Data Documentation

const Real MovingPlanarFront::_activation_time
protected

activation time

Definition at line 55 of file MovingPlanarFront.h.

Referenced by value().

const Real MovingPlanarFront::_active_length
protected

active length

Definition at line 46 of file MovingPlanarFront.h.

Referenced by value().

const Real MovingPlanarFront::_deactivation_time
protected

deactivation time

Definition at line 58 of file MovingPlanarFront.h.

Referenced by value().

Function& MovingPlanarFront::_distance
protected

The front's distance from start_posn (along the normal direction)

Definition at line 43 of file MovingPlanarFront.h.

Referenced by value().

const RealVectorValue MovingPlanarFront::_end_posn
protected

Final position of the front: together with start_posn this defines the front's normal.

Definition at line 40 of file MovingPlanarFront.h.

const Real MovingPlanarFront::_false_value
protected

false value to return

Definition at line 52 of file MovingPlanarFront.h.

Referenced by value().

RealVectorValue MovingPlanarFront::_front_normal
protected

front unit normal

Definition at line 61 of file MovingPlanarFront.h.

Referenced by MovingPlanarFront(), and value().

const RealVectorValue MovingPlanarFront::_start_posn
protected

Initial position of front.

Definition at line 37 of file MovingPlanarFront.h.

Referenced by value().

const Real MovingPlanarFront::_true_value
protected

true value to return

Definition at line 49 of file MovingPlanarFront.h.

Referenced by value().


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