https://mooseframework.inl.gov
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ExpressionBuilder::EBLogPlogSubstitution Class Reference

Substitution rule to replace all occurences of log(x) with plog(x, epsilon) with a user defined term for epsilon. More...

#include <ExpressionBuilder.h>

Inheritance diagram for ExpressionBuilder::EBLogPlogSubstitution:
[legend]

Public Member Functions

 EBLogPlogSubstitution (const EBTerm &epsilon)
 
virtual ~EBLogPlogSubstitution ()
 
virtual EBTermNodeapply (const EBTermNode *) const
 

Protected Member Functions

virtual EBTermNodesubstitute (const EBUnaryFuncTermNode &) const
 

Protected Attributes

EBTermNode_epsilon
 

Detailed Description

Substitution rule to replace all occurences of log(x) with plog(x, epsilon) with a user defined term for epsilon.

Definition at line 340 of file ExpressionBuilder.h.

Constructor & Destructor Documentation

◆ EBLogPlogSubstitution()

ExpressionBuilder::EBLogPlogSubstitution::EBLogPlogSubstitution ( const EBTerm epsilon)
inline

Definition at line 343 of file ExpressionBuilder.h.

343  : _epsilon(epsilon.cloneRoot())
344  {
345  mooseAssert(_epsilon != NULL, "Epsilon must not be an empty term in EBLogPlogSubstitution");
346  }

◆ ~EBLogPlogSubstitution()

virtual ExpressionBuilder::EBLogPlogSubstitution::~EBLogPlogSubstitution ( )
inlinevirtual

Definition at line 347 of file ExpressionBuilder.h.

Member Function Documentation

◆ apply()

Implements ExpressionBuilder::EBSubstitutionRule.

Definition at line 697 of file ExpressionBuilder.h.

699 {
700  const Node_T * match_node = dynamic_cast<const Node_T *>(node);
701  if (match_node == NULL)
702  return NULL;
703  else
704  return substitute(*match_node);
705 }
virtual EBTermNode * substitute(const EBUnaryFuncTermNode &) const=0

◆ substitute()

ExpressionBuilder::EBTermNode * ExpressionBuilder::EBLogPlogSubstitution::substitute ( const EBUnaryFuncTermNode node) const
protectedvirtual

Implements ExpressionBuilder::EBSubstitutionRuleTyped< EBUnaryFuncTermNode >.

Definition at line 471 of file ExpressionBuilder.C.

472 {
473  if (node._type == EBUnaryFuncTermNode::LOG)
474  return new EBBinaryFuncTermNode(
475  node.getSubnode()->clone(), _epsilon->clone(), EBBinaryFuncTermNode::PLOG);
476  else
477  return NULL;
478 }
virtual EBTermNode * clone() const =0

Member Data Documentation

◆ _epsilon

EBTermNode* ExpressionBuilder::EBLogPlogSubstitution::_epsilon
protected

Definition at line 351 of file ExpressionBuilder.h.


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