Hello, I have a question about commitState(). As you can see in the code below, "theMaterial" points to "commitState()", but what class does this "commitState()" belong to and why the name of class does not need to be stated? Thank you in advance!
------------------------------------------------
Truss2D::commitState()
{
return theMaterial->commitState();
}
Question about commitState()
Moderators: silvia, selimgunay, Moderators
-
- Posts: 93
- Joined: Thu Feb 12, 2009 8:31 pm
- Location: The University of Tokyo
Re: Question about commitState()
theMaterial is a pointer to a uniaxial material object (in the header file there is the line UniaxialMaterial *theMaterial).
that uniaxial material object has a method commitState in it's interface (its defined for all uniaxial materials, see the UniaxialMaterial.h file).
what this line of code is thus doing is telling the material object that the pointer points to to invoke that commitState method.
that uniaxial material object has a method commitState in it's interface (its defined for all uniaxial materials, see the UniaxialMaterial.h file).
what this line of code is thus doing is telling the material object that the pointer points to to invoke that commitState method.