MBDyn-1.7.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups
Node2Scalar Class Reference

#include <node.h>

Inheritance diagram for Node2Scalar:
Collaboration diagram for Node2Scalar:

Public Member Functions

 Node2Scalar (const NodeDof &nd)
 
virtual ~Node2Scalar (void)
 
const NodeGetNode (void) const
 
virtual Node::Type GetNodeType (void) const
 
virtual std::ostream & Restart (std::ostream &out) const
 
virtual unsigned int iGetNumDof (void) const
 
virtual DofOrder::Order GetDofType (unsigned int i) const
 
virtual integer iGetFirstRowIndex (void) const
 
virtual integer iGetFirstColIndex (void) const
 
virtual const doublerealdGetDofValue (int iDof, int iOrder=0) const
 
virtual const doublerealdGetDofValuePrev (int iDof, int iOrder=0) const
 
virtual void SetDofValue (const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
 
virtual void SetX (const doublereal &d)
 
virtual const doublerealdGetX (void) const
 
virtual void SetXPrime (const doublereal &d)
 
virtual const doublerealdGetXPrime (void) const
 
- Public Member Functions inherited from ScalarNode
 ScalarNode (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~ScalarNode (void)
 
virtual void Output (OutputHandler &OH) const
 
virtual void AfterPredict (VectorHandler &X, VectorHandler &XP)
 
- Public Member Functions inherited from Node
 Node (unsigned int uL, const DofOwner *pDO, flag fOut)
 
virtual ~Node (void)
 
const NodeGetNode (void) const
 
virtual std::ostream & DescribeDof (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeDof (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual std::ostream & DescribeEq (std::ostream &out, const char *prefix="", bool bInitial=false) const
 
virtual void DescribeEq (std::vector< std::string > &desc, bool bInitial=false, int i=-1) const
 
virtual unsigned int iGetNumPrivData (void) const
 
virtual unsigned int iGetPrivDataIdx (const char *s) const
 
virtual doublereal dGetPrivData (unsigned int i) const
 
- Public Member Functions inherited from WithLabel
 WithLabel (unsigned int uL=0, const std::string &sN="")
 
virtual ~WithLabel (void)
 
void PutLabel (unsigned int uL)
 
void PutName (const std::string &sN)
 
unsigned int GetLabel (void) const
 
const std::string & GetName (void) const
 
- Public Member Functions inherited from SimulationEntity
 SimulationEntity (void)
 
virtual ~SimulationEntity (void)
 
virtual bool bIsValidIndex (unsigned int i) const
 
virtual DofOrder::Order GetEqType (unsigned int i) const
 
virtual void SetValue (DataManager *pDM, VectorHandler &X, VectorHandler &XP, SimulationEntity::Hints *h=0)
 
virtual HintParseHint (DataManager *pDM, const char *s) const
 
virtual void BeforePredict (VectorHandler &, VectorHandler &, VectorHandler &, VectorHandler &) const
 
virtual void Update (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void DerivativesUpdate (const VectorHandler &XCurr, const VectorHandler &XPrimeCurr)
 
virtual void Update (const VectorHandler &XCurr, InverseDynamics::Order iOrder)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP)
 
virtual void AfterConvergence (const VectorHandler &X, const VectorHandler &XP, const VectorHandler &XPP)
 
virtual std::ostream & OutputAppend (std::ostream &out) const
 
virtual void ReadInitialState (MBDynParser &HP)
 
- Public Member Functions inherited from DofOwnerOwner
 DofOwnerOwner (const DofOwner *pDO)
 
virtual ~DofOwnerOwner ()
 
virtual const DofOwnerpGetDofOwner (void) const
 
virtual integer iGetFirstIndex (void) const
 
virtual void SetInitialValue (VectorHandler &X)
 
- Public Member Functions inherited from ToBeOutput
 ToBeOutput (flag fOut=fDefaultOut)
 
virtual ~ToBeOutput (void)
 
virtual void OutputPrepare (OutputHandler &OH)
 
virtual void Output (OutputHandler &OH, const VectorHandler &X, const VectorHandler &XP) const
 
virtual flag fToBeOutput (void) const
 
virtual bool bToBeOutput (void) const
 
virtual void SetOutputFlag (flag f=flag(1))
 

Protected Attributes

NodeDof ND
 
- Protected Attributes inherited from WithLabel
unsigned int uLabel
 
std::string sName
 
- Protected Attributes inherited from ToBeOutput
flag fOutput
 

Additional Inherited Members

- Public Types inherited from Node
enum  Type {
  UNKNOWN = -1, ABSTRACT = 0, STRUCTURAL, ELECTRIC,
  THERMAL, PARAMETER, HYDRAULIC, LASTNODETYPE
}
 
- Public Types inherited from SimulationEntity
typedef std::vector< Hint * > Hints
 
- Public Types inherited from ToBeOutput
enum  { OUTPUT = 0x1U, OUTPUT_MASK = 0xFU, OUTPUT_PRIVATE = 0x10U, OUTPUT_PRIVATE_MASK = ~OUTPUT_MASK }
 
- Protected Member Functions inherited from ScalarNode
virtual std::ostream & Output (std::ostream &out) const
 

Detailed Description

Definition at line 598 of file node.h.

Constructor & Destructor Documentation

Node2Scalar::Node2Scalar ( const NodeDof nd)

Definition at line 595 of file node.cc.

References NO_OP.

596 : ScalarNode(nd.pNode->GetLabel(), nd.pNode->pGetDofOwner(), 0), ND(nd)
597 {
598  NO_OP;
599 }
#define NO_OP
Definition: myassert.h:74
virtual const DofOwner * pGetDofOwner(void) const
Definition: dofown.h:113
ScalarNode(unsigned int uL, const DofOwner *pDO, flag fOut)
Definition: node.cc:110
Node * pNode
Definition: node.h:582
unsigned int GetLabel(void) const
Definition: withlab.cc:62
NodeDof ND
Definition: node.h:601
Node2Scalar::~Node2Scalar ( void  )
virtual

Definition at line 601 of file node.cc.

References NO_OP.

602 {
603  NO_OP;
604 }
#define NO_OP
Definition: myassert.h:74

Member Function Documentation

const doublereal & Node2Scalar::dGetDofValue ( int  iDof,
int  iOrder = 0 
) const
virtual

Implements Node.

Definition at line 652 of file node.cc.

References Node::dGetDofValue(), NodeDof::iDofNumber, MBDYN_EXCEPT_ARGS, ND, and NodeDof::pNode.

Referenced by dGetX(), and dGetXPrime().

653 {
654  if (iDof != 1) {
656  }
657  return ND.pNode->dGetDofValue(ND.iDofNumber + 1, iOrder);
658 }
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const =0
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
int iDofNumber
Definition: node.h:580
Node * pNode
Definition: node.h:582
NodeDof ND
Definition: node.h:601

Here is the call graph for this function:

const doublereal & Node2Scalar::dGetDofValuePrev ( int  iDof,
int  iOrder = 0 
) const
virtual

Implements Node.

Definition at line 663 of file node.cc.

References Node::dGetDofValuePrev(), NodeDof::iDofNumber, MBDYN_EXCEPT_ARGS, ND, and NodeDof::pNode.

664 {
665  if (iDof != 1) {
667  }
668  return ND.pNode->dGetDofValuePrev(ND.iDofNumber + 1, iOrder);
669 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
virtual const doublereal & dGetDofValuePrev(int iDof, int iOrder=0) const =0
int iDofNumber
Definition: node.h:580
Node * pNode
Definition: node.h:582
NodeDof ND
Definition: node.h:601

Here is the call graph for this function:

const doublereal & Node2Scalar::dGetX ( void  ) const
inlinevirtual

Implements ScalarNode.

Definition at line 685 of file node.h.

References dGetDofValue().

686 {
687  return dGetDofValue(1, 0);
688 }
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const
Definition: node.cc:652

Here is the call graph for this function:

const doublereal & Node2Scalar::dGetXPrime ( void  ) const
inlinevirtual

Implements ScalarNode.

Definition at line 691 of file node.h.

References dGetDofValue().

692 {
693  return dGetDofValue(1, 1);
694 }
virtual const doublereal & dGetDofValue(int iDof, int iOrder=0) const
Definition: node.cc:652

Here is the call graph for this function:

DofOrder::Order Node2Scalar::GetDofType ( unsigned int  i) const
virtual

Implements SimulationEntity.

Definition at line 631 of file node.cc.

References ASSERT, DofOrder::DIFFERENTIAL, and iGetNumDof().

632 {
633  ASSERT(i < iGetNumDof());
634  return DofOrder::DIFFERENTIAL;
635 }
#define ASSERT(expression)
Definition: colamd.c:977
virtual unsigned int iGetNumDof(void) const
Definition: node.cc:622

Here is the call graph for this function:

const Node* Node2Scalar::GetNode ( void  ) const
inline

Definition at line 612 of file node.h.

References ND, and NodeDof::pNode.

612 { return ND.pNode; };
Node * pNode
Definition: node.h:582
NodeDof ND
Definition: node.h:601
Node::Type Node2Scalar::GetNodeType ( void  ) const
virtual

Implements Node.

Definition at line 608 of file node.cc.

References Node::GetNodeType(), ND, and NodeDof::pNode.

609 {
610  return ND.pNode->GetNodeType();
611 }
virtual Node::Type GetNodeType(void) const =0
Node * pNode
Definition: node.h:582
NodeDof ND
Definition: node.h:601

Here is the call graph for this function:

integer Node2Scalar::iGetFirstColIndex ( void  ) const
virtual

Reimplemented from Node.

Definition at line 644 of file node.cc.

References NodeDof::iDofNumber, Node::iGetFirstColIndex(), ND, and NodeDof::pNode.

645 {
646  return ND.pNode->iGetFirstColIndex() + ND.iDofNumber;
647 }
int iDofNumber
Definition: node.h:580
Node * pNode
Definition: node.h:582
NodeDof ND
Definition: node.h:601
virtual integer iGetFirstColIndex(void) const
Definition: node.cc:88

Here is the call graph for this function:

integer Node2Scalar::iGetFirstRowIndex ( void  ) const
virtual

Reimplemented from Node.

Definition at line 639 of file node.cc.

References NodeDof::iDofNumber, Node::iGetFirstRowIndex(), ND, and NodeDof::pNode.

640 {
641  return ND.pNode->iGetFirstRowIndex() + ND.iDofNumber;
642 }
virtual integer iGetFirstRowIndex(void) const
Definition: node.cc:82
int iDofNumber
Definition: node.h:580
Node * pNode
Definition: node.h:582
NodeDof ND
Definition: node.h:601

Here is the call graph for this function:

unsigned int Node2Scalar::iGetNumDof ( void  ) const
virtual

Reimplemented from ScalarNode.

Definition at line 622 of file node.cc.

Referenced by GetDofType().

623 {
624  return 1;
625 }
std::ostream & Node2Scalar::Restart ( std::ostream &  out) const
virtual

Implements Node.

Definition at line 615 of file node.cc.

616 {
617  out << "# Node2Scalar: warning, not implemented yet " << std::endl;
618  return out;
619 }
void Node2Scalar::SetDofValue ( const doublereal dValue,
unsigned int  iDof,
unsigned int  iOrder = 0 
)
virtual

Implements Node.

Definition at line 674 of file node.cc.

References ASSERT, NodeDof::iDofNumber, MBDYN_EXCEPT_ARGS, ND, and NodeDof::pNode.

Referenced by SetX(), and SetXPrime().

677 {
678  ASSERT(iDof == 1);
679  if (iDof == 1) {
680  dynamic_cast<Node*>(ND.pNode)->SetDofValue(dValue, ND.iDofNumber + 1, iOrder);
681  }
683 }
#define MBDYN_EXCEPT_ARGS
Definition: except.h:63
Definition: node.h:67
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
Definition: node.cc:674
#define ASSERT(expression)
Definition: colamd.c:977
int iDofNumber
Definition: node.h:580
Node * pNode
Definition: node.h:582
NodeDof ND
Definition: node.h:601
void Node2Scalar::SetX ( const doublereal d)
virtual

Implements ScalarNode.

Definition at line 689 of file node.cc.

References SetDofValue().

690 {
691  SetDofValue(d, 1, 0);
692 }
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
Definition: node.cc:674

Here is the call graph for this function:

void Node2Scalar::SetXPrime ( const doublereal d)
virtual

Implements ScalarNode.

Definition at line 696 of file node.cc.

References SetDofValue().

697 {
698  SetDofValue(d, 1, 1);
699 }
virtual void SetDofValue(const doublereal &dValue, unsigned int iDof, unsigned int iOrder=0)
Definition: node.cc:674

Here is the call graph for this function:

Member Data Documentation

NodeDof Node2Scalar::ND
protected

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