| 114 | } |
| 115 | |
| 116 | void 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 | |
| 131 | double* Attributes::GetVelocityArray() |
| 132 | { |
no test coverage detected