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

Method setDomain

SRC/domain/component/ElementStateParameter.cpp:82–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void
83ElementStateParameter::setDomain(Domain *theDomain)
84{
85 Parameter *theParameter = new Parameter(0, 0, 0, 0);
86
87 Element *theEle;
88 ElementIter &theEles = theDomain->getElements();
89
90 if (flag == 0) {
91
92 //
93 // setParameter on all ele in the domain
94 //
95
96 while (((theEle = theEles()) != 0)) {
97 int theResult = theEle->setParameter((const char **)argv, argc, *theParameter);
98 if (theResult != -1) {
99 theParameter->update(currentValue);
100 theParameter->clean();
101 }
102 }
103 } else if (flag == 1) {
104
105 //
106 // setParameter on all ele whose tags in theELeIDs
107 //
108
109 int numEle = theEleIDs->Size();
110 for (int i=0; i<numEle; i++) {
111 int eleTag = (*theEleIDs)(i);
112 theEle = theDomain->getElement(eleTag);
113 if (theEle != 0) {
114 int theResult = theEle->setParameter((const char **)argv, argc, *theParameter);
115 if (theResult != -1) {
116 theParameter->update(currentValue);
117 theParameter->clean();
118 }
119 }
120 }
121 } else {
122
123 //
124 // setParameter on all ele whose tags in range given by 2 tags in theEleIDs
125 //
126
127 int startEle = (*theEleIDs)(0);
128 int endEle = (*theEleIDs)(1);
129 while (((theEle = theEles()) != 0)) {
130 int eleTag = theEle->getTag();
131 if (eleTag >= startEle && eleTag <= endEle) {
132 int theResult = theEle->setParameter((const char **)argv, argc, *theParameter);
133 if (theResult != -1) {
134 theParameter->update(currentValue);
135 theParameter->clean();
136 }
137 }
138 }
139 }

Callers

nothing calls this directly

Calls 7

getElementsMethod · 0.45
setParameterMethod · 0.45
updateMethod · 0.45
cleanMethod · 0.45
SizeMethod · 0.45
getElementMethod · 0.45
getTagMethod · 0.45

Tested by

no test coverage detected