------------------------------------------------------------------------------
| 28 | |
| 29 | //------------------------------------------------------------------------------ |
| 30 | void vtkInitialValueProblemSolver::SetFunctionSet(vtkFunctionSet* fset) |
| 31 | { |
| 32 | if (this->FunctionSet != fset) |
| 33 | { |
| 34 | if (this->FunctionSet != nullptr) |
| 35 | { |
| 36 | this->FunctionSet->UnRegister(this); |
| 37 | } |
| 38 | if (fset != nullptr && |
| 39 | (fset->GetNumberOfFunctions() != fset->GetNumberOfIndependentVariables() - 1)) |
| 40 | { |
| 41 | vtkErrorMacro("Invalid function set!"); |
| 42 | this->FunctionSet = nullptr; |
| 43 | return; |
| 44 | } |
| 45 | this->FunctionSet = fset; |
| 46 | if (this->FunctionSet != nullptr) |
| 47 | { |
| 48 | this->FunctionSet->Register(this); |
| 49 | } |
| 50 | this->Modified(); |
| 51 | } |
| 52 | this->Initialize(); |
| 53 | } |
| 54 | |
| 55 | //------------------------------------------------------------------------------ |
| 56 | void vtkInitialValueProblemSolver::PrintSelf(ostream& os, vtkIndent indent) |
no test coverage detected