https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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 348 of file ExpressionBuilder.h.

Constructor & Destructor Documentation

◆ EBLogPlogSubstitution()

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

Definition at line 351 of file ExpressionBuilder.h.

351 : _epsilon(epsilon.cloneRoot())
352 {
353 mooseAssert(_epsilon != NULL, "Epsilon must not be an empty term in EBLogPlogSubstitution");
354 }

◆ ~EBLogPlogSubstitution()

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

Definition at line 355 of file ExpressionBuilder.h.

355{ delete _epsilon; }

Member Function Documentation

◆ apply()

Implements ExpressionBuilder::EBSubstitutionRule.

Definition at line 320 of file ExpressionBuilder.h.

710{
711 const Node_T * match_node = dynamic_cast<const Node_T *>(node);
712 if (match_node == NULL)
713 return NULL;
714 else
715 return substitute(*match_node);
716}
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 359 of file ExpressionBuilder.h.

Referenced by EBLogPlogSubstitution(), and ~EBLogPlogSubstitution().


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