MCPcopy Create free account
hub / github.com/OpenSees/OpenSees / Parameter

Method Parameter

SRC/domain/component/Parameter.cpp:29–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27#include <DomainComponent.h>
28
29Parameter::Parameter(int passedTag,
30 DomainComponent *parentObject,
31 const char **argv, int argc)
32 :TaggedObject(passedTag), MovableObject(PARAMETER_TAG_Parameter),
33 parameterID(0), theObjects(0), numObjects(0), maxNumObjects(0),
34 theComponents(0), numComponents(0), maxNumComponents(0),
35 gradIndex(-1)
36{
37 theInfo.theDouble = 1.0;
38 int ok = -1;
39
40 maxNumObjects = initialSize;
41 maxNumComponents = initialSize;
42
43 theComponents = new DomainComponent *[maxNumComponents];
44
45 theObjects = new MovableObject *[maxNumObjects];
46
47 parameterID = new int[maxNumObjects];
48
49 for (int i =0; i < maxNumObjects; i++) {
50 theObjects[i] = 0;
51 parameterID[i] = 0;
52 }
53
54 if (parentObject != 0) {
55 ok = parentObject->setParameter(argv, argc, *this);
56 theComponents[0] = parentObject;
57 numComponents = 1;
58 }
59 else {
60 ok = 0; // Created a blank parameter but don't want a warning below
61 }
62
63 if (ok < 0) {
64 opserr << "Parameter::Parameter "<< this->getTag() <<" -- error encountered while attempting to identify parameter" << endln;
65 for (int i = 0; i < argc; i++)
66 opserr << argv[i] << ' ';
67 opserr << endln;
68 }
69}
70
71Parameter::Parameter(const Parameter &param):
72 TaggedObject(param.getTag()), MovableObject(PARAMETER_TAG_Parameter),

Callers

nothing calls this directly

Calls 2

setParameterMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected