MCPcopy Create free account
hub / github.com/Kitware/VTK / FunctionValues

Method FunctionValues

Filters/FlowPaths/vtkLagrangianBasicIntegrationModel.cxx:230–256  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

228
229//------------------------------------------------------------------------------
230int vtkLagrangianBasicIntegrationModel::FunctionValues(double* x, double* f, void* userData)
231{
232 // Sanity check
233 if (this->DataSets->empty())
234 {
235 vtkErrorMacro(<< "Please add a dataset to the integration model before integrating.");
236 return 0;
237 }
238 vtkLagrangianParticle* particle = static_cast<vtkLagrangianParticle*>(userData);
239 if (!particle)
240 {
241 vtkErrorMacro(<< "Could not recover vtkLagrangianParticle");
242 return 0;
243 }
244 vtkAbstractCellLocator* loc;
245 vtkDataSet* ds;
246 vtkIdType cellId;
247 double* weights;
248 if (this->FindInLocators(x, particle, ds, cellId, loc, weights))
249 {
250 // Evaluate integration model velocity field with the found cell
251 return this->FunctionValues(particle, ds, cellId, weights, x, f);
252 }
253
254 // Can't evaluate
255 return 0;
256}
257
258//------------------------------------------------------------------------------
259void vtkLagrangianBasicIntegrationModel::SetLocator(vtkAbstractCellLocator* locator)

Callers

nothing calls this directly

Calls 2

FindInLocatorsMethod · 0.95
emptyMethod · 0.45

Tested by

no test coverage detected