MCPcopy Create free account
hub / github.com/Kitware/ParaView / UpdateFields

Method UpdateFields

Examples/Catalyst/CxxFullExample/FEDataStructures.cxx:116–129  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116void Attributes::UpdateFields(double time)
117{
118 size_t numPoints = this->GridPtr->GetNumberOfPoints();
119 this->Velocity.resize(numPoints * 3);
120 for (size_t pt = 0; pt < numPoints; pt++)
121 {
122 double* coord = this->GridPtr->GetPoint(pt);
123 this->Velocity[pt] = coord[1] * time;
124 }
125 std::fill(this->Velocity.begin() + numPoints, this->Velocity.end(), 0.);
126 size_t numCells = this->GridPtr->GetNumberOfCells();
127 this->Pressure.resize(numCells);
128 std::fill(this->Pressure.begin(), this->Pressure.end(), 1.f);
129}
130
131double* Attributes::GetVelocityArray()
132{

Callers 1

mainFunction · 0.45

Calls 6

GetNumberOfPointsMethod · 0.45
resizeMethod · 0.45
GetPointMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
GetNumberOfCellsMethod · 0.45

Tested by

no test coverage detected