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 350 of file ExpressionBuilder.h.

Constructor & Destructor Documentation

◆ EBLogPlogSubstitution()

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

Definition at line 353 of file ExpressionBuilder.h.

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

◆ ~EBLogPlogSubstitution()

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

Definition at line 357 of file ExpressionBuilder.h.

357{ delete _epsilon; }

Member Function Documentation

◆ apply()

Implements ExpressionBuilder::EBSubstitutionRule.

Definition at line 322 of file ExpressionBuilder.h.

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

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


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