HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SOP_LinearSolver.proto.h
Go to the documentation of this file.
1 /* Automagically Generated by generate_proto.py
2  * Do not Edit
3  */
4 #pragma once
5 
6 #include <SOP/SOP_API.h>
7 #include <SOP/SOP_NodeVerb.h>
8 #include <SOP/SOP_GraphProxy.h>
9 
10 #include <OP/OP_Utils.h>
11 #include <PRM/PRM_Parm.h>
12 #include <UT/UT_IStream.h>
13 #include <UT/UT_NTStreamUtil.h>
14 #include <UT/UT_Ramp.h>
15 #include <UT/UT_SharedPtr.h>
16 #include <UT/UT_StringHolder.h>
17 #include <UT/UT_StringStream.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <UT/UT_EnvControl.h>
20 #include <SYS/SYS_Types.h>
21 
22 class DEP_MicroNode;
23 namespace SOP_LinearSolverEnums
24 {
25  enum class Mode
26  {
28  DECOMPOSE,
30  MULTIPLY
31  };
32 
34  getToken(Mode enum_value)
35  {
36  using namespace UT::Literal;
37  switch (enum_value) {
38  case Mode::LINEARSYSTEMSOLVE: return "linearsystemsolve"_sh;
39  case Mode::DECOMPOSE: return "decompose"_sh;
40  case Mode::SOLVEWITHDECOMPOSITION: return "solvewithdecomposition"_sh;
41  case Mode::MULTIPLY: return "multiply"_sh;
42  default: UT_ASSERT(false); return ""_sh;
43  }
44  }
45 
46  enum class Precision
47  {
48  AUTO = 0,
49  _32,
50  _64
51  };
52 
54  getToken(Precision enum_value)
55  {
56  using namespace UT::Literal;
57  switch (enum_value) {
58  case Precision::AUTO: return "auto"_sh;
59  case Precision::_32: return "32"_sh;
60  case Precision::_64: return "64"_sh;
61  default: UT_ASSERT(false); return ""_sh;
62  }
63  }
64 
65  enum class DenseDirectSolver
66  {
67  PARTIALPIVLU = 0,
68  FULLPIVLU,
73  LLT,
74  LDLT,
75  BDCSVD,
76  JACOBISVD,
79  };
80 
83  {
84  using namespace UT::Literal;
85  switch (enum_value) {
86  case DenseDirectSolver::PARTIALPIVLU: return "partialpivlu"_sh;
87  case DenseDirectSolver::FULLPIVLU: return "fullpivlu"_sh;
88  case DenseDirectSolver::HOUSEHOLDERQR: return "householderqr"_sh;
89  case DenseDirectSolver::COLPIVHOUSEHOLDERQR: return "colpivhouseholderqr"_sh;
90  case DenseDirectSolver::FULLPIVHOUSEHOLDERQR: return "fullpivhouseholderqr"_sh;
91  case DenseDirectSolver::COMPLETEORTHOGONALDECOMPOSITION: return "completeorthogonaldecomposition"_sh;
92  case DenseDirectSolver::LLT: return "llt"_sh;
93  case DenseDirectSolver::LDLT: return "ldlt"_sh;
94  case DenseDirectSolver::BDCSVD: return "bdcsvd"_sh;
95  case DenseDirectSolver::JACOBISVD: return "jacobisvd"_sh;
96  case DenseDirectSolver::EIGENSOLVER: return "eigensolver"_sh;
97  case DenseDirectSolver::SELFADJOINTEIGENSOLVER: return "selfadjointeigensolver"_sh;
98  default: UT_ASSERT(false); return ""_sh;
99  }
100  }
101 
103  {
104  LLT = 0,
105  LDLT,
106  LU,
107  QR
108  };
109 
112  {
113  using namespace UT::Literal;
114  switch (enum_value) {
115  case SparseDirectSolver::LLT: return "llt"_sh;
116  case SparseDirectSolver::LDLT: return "ldlt"_sh;
117  case SparseDirectSolver::LU: return "lu"_sh;
118  case SparseDirectSolver::QR: return "qr"_sh;
119  default: UT_ASSERT(false); return ""_sh;
120  }
121  }
122 
124  {
125  PARDISOACCELERATE = 0,
126  EIGEN
127  };
128 
131  {
132  using namespace UT::Literal;
133  switch (enum_value) {
134  case SparseDirectSolverBackend::PARDISOACCELERATE: return "pardisoaccelerate"_sh;
135  case SparseDirectSolverBackend::EIGEN: return "eigen"_sh;
136  default: UT_ASSERT(false); return ""_sh;
137  }
138  }
139 
140  enum class IterativeSolver
141  {
142  GMRES = 0,
143  DGMRES,
144  MINRES,
147  BICGSTAB,
148  IDRS
149  };
150 
153  {
154  using namespace UT::Literal;
155  switch (enum_value) {
156  case IterativeSolver::GMRES: return "gmres"_sh;
157  case IterativeSolver::DGMRES: return "dgmres"_sh;
158  case IterativeSolver::MINRES: return "minres"_sh;
159  case IterativeSolver::CONJUGATEGRADIENT: return "conjugategradient"_sh;
160  case IterativeSolver::LEASTSQUARESCONJUGATEGRADIENT: return "leastsquaresconjugategradient"_sh;
161  case IterativeSolver::BICGSTAB: return "bicgstab"_sh;
162  case IterativeSolver::IDRS: return "idrs"_sh;
163  default: UT_ASSERT(false); return ""_sh;
164  }
165  }
166 
168  {
169  IDENTITY = 0,
170  DIAGONAL
171  };
172 
175  {
176  using namespace UT::Literal;
177  switch (enum_value) {
178  case DensePreconditioner::IDENTITY: return "identity"_sh;
179  case DensePreconditioner::DIAGONAL: return "diagonal"_sh;
180  default: UT_ASSERT(false); return ""_sh;
181  }
182  }
183 
185  {
186  IDENTITY = 0,
187  DIAGONAL,
190  };
191 
194  {
195  using namespace UT::Literal;
196  switch (enum_value) {
197  case SparsePreconditioner::IDENTITY: return "identity"_sh;
198  case SparsePreconditioner::DIAGONAL: return "diagonal"_sh;
199  case SparsePreconditioner::INCOMPLETELUT: return "incompletelut"_sh;
200  case SparsePreconditioner::INCOMPLETECHOLESKY: return "incompletecholesky"_sh;
201  default: UT_ASSERT(false); return ""_sh;
202  }
203  }
204 
206  {
207  GENEIGSSOLVER = 0,
211  };
212 
215  {
216  using namespace UT::Literal;
217  switch (enum_value) {
218  case SpectraEigensolver::GENEIGSSOLVER: return "geneigssolver"_sh;
219  case SpectraEigensolver::SYMEIGSSOLVER: return "symeigssolver"_sh;
220  case SpectraEigensolver::GENEIGSREALSHIFTSOLVER: return "geneigsrealshiftsolver"_sh;
221  case SpectraEigensolver::SYMEIGSSHIFTSOLVER: return "symeigsshiftsolver"_sh;
222  default: UT_ASSERT(false); return ""_sh;
223  }
224  }
225 
226  enum class MatrixStorage
227  {
228  VOLUME = 0,
229  POINTS,
230  PRIMITIVES,
231  DETAIL
232  };
233 
235  getToken(MatrixStorage enum_value)
236  {
237  using namespace UT::Literal;
238  switch (enum_value) {
239  case MatrixStorage::VOLUME: return "volume"_sh;
240  case MatrixStorage::POINTS: return "points"_sh;
241  case MatrixStorage::PRIMITIVES: return "primitives"_sh;
242  case MatrixStorage::DETAIL: return "detail"_sh;
243  default: UT_ASSERT(false); return ""_sh;
244  }
245  }
246 
247  enum class VolumeEncoding
248  {
249  DENSECOL = 0,
250  DENSEROW
251  };
252 
255  {
256  using namespace UT::Literal;
257  switch (enum_value) {
258  case VolumeEncoding::DENSECOL: return "densecol"_sh;
259  case VolumeEncoding::DENSEROW: return "denserow"_sh;
260  default: UT_ASSERT(false); return ""_sh;
261  }
262  }
263 
265  {
266  DENSECOL = 0,
267  DENSEROW,
268  COO,
269  LILCOL,
270  LILROW
271  };
272 
275  {
276  using namespace UT::Literal;
277  switch (enum_value) {
278  case PointsPrimsEncoding::DENSECOL: return "densecol"_sh;
279  case PointsPrimsEncoding::DENSEROW: return "denserow"_sh;
280  case PointsPrimsEncoding::COO: return "coo"_sh;
281  case PointsPrimsEncoding::LILCOL: return "lilcol"_sh;
282  case PointsPrimsEncoding::LILROW: return "lilrow"_sh;
283  default: UT_ASSERT(false); return ""_sh;
284  }
285  }
286 
287  enum class DetailEncoding
288  {
289  DENSECOL = 0,
290  DENSEROW,
291  COO
292  };
293 
296  {
297  using namespace UT::Literal;
298  switch (enum_value) {
299  case DetailEncoding::DENSECOL: return "densecol"_sh;
300  case DetailEncoding::DENSEROW: return "denserow"_sh;
301  case DetailEncoding::COO: return "coo"_sh;
302  default: UT_ASSERT(false); return ""_sh;
303  }
304  }
305 
306  enum class VectorSrcStorage
307  {
308  POINTS = 0,
309  PRIMITIVES,
310  DETAIL
311  };
312 
315  {
316  using namespace UT::Literal;
317  switch (enum_value) {
318  case VectorSrcStorage::POINTS: return "points"_sh;
319  case VectorSrcStorage::PRIMITIVES: return "primitives"_sh;
320  case VectorSrcStorage::DETAIL: return "detail"_sh;
321  default: UT_ASSERT(false); return ""_sh;
322  }
323  }
324 
325  enum class VectorDstStorage
326  {
327  POINTS = 0,
328  PRIMITIVES,
329  DETAIL
330  };
331 
334  {
335  using namespace UT::Literal;
336  switch (enum_value) {
337  case VectorDstStorage::POINTS: return "points"_sh;
338  case VectorDstStorage::PRIMITIVES: return "primitives"_sh;
339  case VectorDstStorage::DETAIL: return "detail"_sh;
340  default: UT_ASSERT(false); return ""_sh;
341  }
342  }
343 
344 }
345 
346 
348 {
349 public:
350  static int version() { return 1; }
351 
353  {
354  myMode = 0;
355  myCookInplace = false;
356  myPrecision = 0;
357  myUseIterativeSolver = false;
358  myIterativeSolver = 5;
359  mySolveWithGuess = false;
360  myUseEigensolver = false;
361  mySpectraEigensolver = 0;
362  myNumEigenpairs = 0;
363  myShift = -0.001;
364  mySolverTolerance = 1e-4;
365  myMatrixStorage = 0;
366  myVolumeEncoding = 0;
367  myPointsPrimsEncoding = 0;
368  myDetailEncoding = 0;
369  mySquareMatrix = false;
370  myRows = 512;
371  myCols = 512;
372  myRowAttribute = "row"_UTsh;
373  myColAttribute = "col"_UTsh;
374  myMatrixValueAttribute = "value"_UTsh;
375  myVectorSrcStorage = 0;
376  myVectorSrcAttribute = "known"_UTsh;
377  myVectorDstStorage = 0;
378  myVectorDstAttribute = "unknown"_UTsh;
379  myPinnedGroup = ""_UTsh;
380  myReduceRows = true;
381  myScale = 1;
382  myAccumulateResult = false;
383  myDenseDirectSolver = 0;
384  mySparseDirectSolver = 1;
385  mySparseDirectSolverBackend = 0;
386  myDensePreconditioner = 1;
387  mySparsePreconditioner = 1;
388 
389  }
390 
391  explicit SOP_LinearSolverParms(const SOP_LinearSolverParms &) = default;
393  SOP_LinearSolverParms(SOP_LinearSolverParms &&) noexcept = default;
394  SOP_LinearSolverParms &operator=(SOP_LinearSolverParms &&) noexcept = default;
395 
396  ~SOP_LinearSolverParms() override {}
397 
399  {
400  if (myMode != src.myMode) return false;
401  if (myCookInplace != src.myCookInplace) return false;
402  if (myPrecision != src.myPrecision) return false;
403  if (myUseIterativeSolver != src.myUseIterativeSolver) return false;
404  if (myIterativeSolver != src.myIterativeSolver) return false;
405  if (mySolveWithGuess != src.mySolveWithGuess) return false;
406  if (myUseEigensolver != src.myUseEigensolver) return false;
407  if (mySpectraEigensolver != src.mySpectraEigensolver) return false;
408  if (myNumEigenpairs != src.myNumEigenpairs) return false;
409  if (myShift != src.myShift) return false;
410  if (mySolverTolerance != src.mySolverTolerance) return false;
411  if (myMatrixStorage != src.myMatrixStorage) return false;
412  if (myVolumeEncoding != src.myVolumeEncoding) return false;
413  if (myPointsPrimsEncoding != src.myPointsPrimsEncoding) return false;
414  if (myDetailEncoding != src.myDetailEncoding) return false;
415  if (mySquareMatrix != src.mySquareMatrix) return false;
416  if (myRows != src.myRows) return false;
417  if (myCols != src.myCols) return false;
418  if (myRowAttribute != src.myRowAttribute) return false;
419  if (myColAttribute != src.myColAttribute) return false;
420  if (myMatrixValueAttribute != src.myMatrixValueAttribute) return false;
421  if (myVectorSrcStorage != src.myVectorSrcStorage) return false;
422  if (myVectorSrcAttribute != src.myVectorSrcAttribute) return false;
423  if (myVectorDstStorage != src.myVectorDstStorage) return false;
424  if (myVectorDstAttribute != src.myVectorDstAttribute) return false;
425  if (myPinnedGroup != src.myPinnedGroup) return false;
426  if (myReduceRows != src.myReduceRows) return false;
427  if (myScale != src.myScale) return false;
428  if (myAccumulateResult != src.myAccumulateResult) return false;
429  if (myDenseDirectSolver != src.myDenseDirectSolver) return false;
430  if (mySparseDirectSolver != src.mySparseDirectSolver) return false;
431  if (mySparseDirectSolverBackend != src.mySparseDirectSolverBackend) return false;
432  if (myDensePreconditioner != src.myDensePreconditioner) return false;
433  if (mySparsePreconditioner != src.mySparsePreconditioner) return false;
434 
435  return true;
436  }
438  {
439  return !operator==(src);
440  }
456 
457 
458 
459  void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
460  {
461  myMode = 0;
462  if (true)
463  graph->evalOpParm(myMode, nodeidx, "mode", time, 0);
464  myCookInplace = false;
465  if (true)
466  graph->evalOpParm(myCookInplace, nodeidx, "cookinplace", time, 0);
467  myPrecision = 0;
468  if (true)
469  graph->evalOpParm(myPrecision, nodeidx, "precision", time, 0);
470  myUseIterativeSolver = false;
471  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())==1)))) ) )
472  graph->evalOpParm(myUseIterativeSolver, nodeidx, "useiterativesolver", time, 0);
473  myIterativeSolver = 5;
474  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0)))) ) )
475  graph->evalOpParm(myIterativeSolver, nodeidx, "iterativesolver", time, 0);
476  mySolveWithGuess = false;
477  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0)))) ) )
478  graph->evalOpParm(mySolveWithGuess, nodeidx, "solvewithguess", time, 0);
479  myUseEigensolver = false;
480  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())!=1)))) ) )
481  graph->evalOpParm(myUseEigensolver, nodeidx, "useeigensolver", time, 0);
482  mySpectraEigensolver = 0;
483  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseEigensolver()==0))||((int64(getMode())!=1)))) ) )
484  graph->evalOpParm(mySpectraEigensolver, nodeidx, "spectraeigensolver", time, 0);
485  myNumEigenpairs = 0;
486  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseEigensolver()==0))||((int64(getMode())!=1)))) ) )
487  graph->evalOpParm(myNumEigenpairs, nodeidx, "numeigenpairs", time, 0);
488  myShift = -0.001;
489  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseEigensolver()==0))||((int64(getSpectraEigensolver())!=2)&&(int64(getSpectraEigensolver())!=3))||((int64(getMode())!=1)))) ) )
490  graph->evalOpParm(myShift, nodeidx, "shift", time, 0);
491  mySolverTolerance = 1e-4;
492  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0)&&(getUseEigensolver()==0)))) ) )
493  graph->evalOpParm(mySolverTolerance, nodeidx, "solvertolerance", time, 0);
494  myMatrixStorage = 0;
495  if (true && ( (true&&!(((int64(getMode())==2)))) ) )
496  graph->evalOpParm(myMatrixStorage, nodeidx, "matrixstorage", time, 0);
497  myVolumeEncoding = 0;
498  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())!=0)))) ) )
499  graph->evalOpParm(myVolumeEncoding, nodeidx, "volumeencoding", time, 0);
500  myPointsPrimsEncoding = 0;
501  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())!=1)&&(int64(getMatrixStorage())!=2)))) ) )
502  graph->evalOpParm(myPointsPrimsEncoding, nodeidx, "pointsprimsencoding", time, 0);
503  myDetailEncoding = 0;
504  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())!=3)))) ) )
505  graph->evalOpParm(myDetailEncoding, nodeidx, "detailencoding", time, 0);
506  mySquareMatrix = false;
507  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1)))) ) )
508  graph->evalOpParm(mySquareMatrix, nodeidx, "squarematrix", time, 0);
509  myRows = 512;
510  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=3)&&(int64(getPointsPrimsEncoding())!=2))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=3)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())!=2)))) ) )
511  graph->evalOpParm(myRows, nodeidx, "rows", time, 0);
512  myCols = 512;
513  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=4)&&(int64(getPointsPrimsEncoding())!=2))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=4)&&(int64(getPointsPrimsEncoding())!=2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==1))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==2))||((getSquareMatrix()==1)&&(int64(getMatrixStorage())==3)))) ) )
514  graph->evalOpParm(myCols, nodeidx, "cols", time, 0);
515  myRowAttribute = "row"_UTsh;
516  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==4))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==4))||((int64(getMatrixStorage())==3))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
517  graph->evalOpParm(myRowAttribute, nodeidx, "rowattr", time, 0);
518  myColAttribute = "col"_UTsh;
519  if (true && ( (true&&!(((int64(getMode())==2))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==3))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==3))||((int64(getMatrixStorage())==3))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
520  graph->evalOpParm(myColAttribute, nodeidx, "colattr", time, 0);
521  myMatrixValueAttribute = "value"_UTsh;
522  if (true && ( (true&&!(((int64(getMode())==2)))) ) )
523  graph->evalOpParm(myMatrixValueAttribute, nodeidx, "matrixvalueattr", time, 0);
524  myVectorSrcStorage = 0;
525  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
526  graph->evalOpParm(myVectorSrcStorage, nodeidx, "vectorsrcstorage", time, 0);
527  myVectorSrcAttribute = "known"_UTsh;
528  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
529  graph->evalOpParm(myVectorSrcAttribute, nodeidx, "vectorsrcattr", time, 0);
530  myVectorDstStorage = 0;
531  if (true)
532  graph->evalOpParm(myVectorDstStorage, nodeidx, "vectordststorage", time, 0);
533  myVectorDstAttribute = "unknown"_UTsh;
534  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
535  graph->evalOpParm(myVectorDstAttribute, nodeidx, "vectordstattr", time, 0);
536  myPinnedGroup = ""_UTsh;
537  if (true && ( (true&&!(((int64(getVectorDstStorage())==2))||((int64(getMode())==3)))) ) )
538  graph->evalOpParm(myPinnedGroup, nodeidx, "pinnedgroup", time, 0);
539  myReduceRows = true;
540  if (true && ( (true&&!(((int64(getVectorDstStorage())==2))||((int64(getMode())==3))||((getPinnedGroup()=="")))) ) )
541  graph->evalOpParm(myReduceRows, nodeidx, "reducerows", time, 0);
542  myScale = 1;
543  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
544  graph->evalOpParm(myScale, nodeidx, "scale", time, 0);
545  myAccumulateResult = false;
546  if (true && ( (true&&!(((int64(getMode())==1)))) ) )
547  graph->evalOpParm(myAccumulateResult, nodeidx, "accumulateresult", time, 0);
548  myDenseDirectSolver = 0;
549  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())==0)&&(getUseIterativeSolver()==1))||((int64(getMode())==1)&&(getUseEigensolver()==1))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())!=0)&&(int64(getDetailEncoding())!=1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1)))) ) )
550  graph->evalOpParm(myDenseDirectSolver, nodeidx, "densedirectsolver", time, 0);
551  mySparseDirectSolver = 1;
552  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==1))||((getUseEigensolver()==1))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
553  graph->evalOpParm(mySparseDirectSolver, nodeidx, "sparsedirectsolver", time, 0);
554  mySparseDirectSolverBackend = 0;
555  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((int64(getMode())==0)&&(getUseIterativeSolver()==1))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMode())==1)))) ) )
556  graph->evalOpParm(mySparseDirectSolverBackend, nodeidx, "sparsedirectsolverbackend", time, 0);
557  myDensePreconditioner = 1;
558  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())!=0)&&(int64(getDetailEncoding())!=1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())!=0)&&(int64(getPointsPrimsEncoding())!=1)))) ) )
559  graph->evalOpParm(myDensePreconditioner, nodeidx, "densepreconditioner", time, 0);
560  mySparsePreconditioner = 1;
561  if (true && ( (true&&!(((int64(getMode())==3))||((int64(getMode())==2))||((getUseIterativeSolver()==0))||((int64(getMode())!=0))||((int64(getMatrixStorage())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==0))||((int64(getMatrixStorage())==3)&&(int64(getDetailEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==1))||((int64(getMatrixStorage())==1)&&(int64(getPointsPrimsEncoding())==0))||((int64(getMatrixStorage())==2)&&(int64(getPointsPrimsEncoding())==0)))) ) )
562  graph->evalOpParm(mySparsePreconditioner, nodeidx, "sparsepreconditioner", time, 0);
563 
564  }
565 
566 
567  void loadFromOpSubclass(const LoadParms &loadparms) override
568  {
569  buildFromOp(loadparms.graph(), loadparms.nodeIdx(), loadparms.context().getTime(), loadparms.depnode());
570  }
571 
572 
573  void copyFrom(const OP_NodeParms *src) override
574  {
575  *this = *((const SOP_LinearSolverParms *)src);
576  }
577 
578  template <typename T>
579  void
580  doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
581  {
582  if (idx.size() < 1)
583  return;
584  UT_ASSERT(idx.size() == instance.size()+1);
585  if (idx.size() != instance.size()+1)
586  return;
587  switch (idx[0])
588  {
589  case 0:
590  coerceValue(value, myMode);
591  break;
592  case 1:
593  coerceValue(value, myCookInplace);
594  break;
595  case 2:
596  coerceValue(value, myPrecision);
597  break;
598  case 3:
599  coerceValue(value, myUseIterativeSolver);
600  break;
601  case 4:
602  coerceValue(value, myIterativeSolver);
603  break;
604  case 5:
605  coerceValue(value, mySolveWithGuess);
606  break;
607  case 6:
608  coerceValue(value, myUseEigensolver);
609  break;
610  case 7:
611  coerceValue(value, mySpectraEigensolver);
612  break;
613  case 8:
614  coerceValue(value, myNumEigenpairs);
615  break;
616  case 9:
617  coerceValue(value, myShift);
618  break;
619  case 10:
620  coerceValue(value, mySolverTolerance);
621  break;
622  case 11:
623  coerceValue(value, myMatrixStorage);
624  break;
625  case 12:
626  coerceValue(value, myVolumeEncoding);
627  break;
628  case 13:
629  coerceValue(value, myPointsPrimsEncoding);
630  break;
631  case 14:
632  coerceValue(value, myDetailEncoding);
633  break;
634  case 15:
635  coerceValue(value, mySquareMatrix);
636  break;
637  case 16:
638  coerceValue(value, myRows);
639  break;
640  case 17:
641  coerceValue(value, myCols);
642  break;
643  case 18:
644  coerceValue(value, myRowAttribute);
645  break;
646  case 19:
647  coerceValue(value, myColAttribute);
648  break;
649  case 20:
650  coerceValue(value, myMatrixValueAttribute);
651  break;
652  case 21:
653  coerceValue(value, myVectorSrcStorage);
654  break;
655  case 22:
656  coerceValue(value, myVectorSrcAttribute);
657  break;
658  case 23:
659  coerceValue(value, myVectorDstStorage);
660  break;
661  case 24:
662  coerceValue(value, myVectorDstAttribute);
663  break;
664  case 25:
665  coerceValue(value, myPinnedGroup);
666  break;
667  case 26:
668  coerceValue(value, myReduceRows);
669  break;
670  case 27:
671  coerceValue(value, myScale);
672  break;
673  case 28:
674  coerceValue(value, myAccumulateResult);
675  break;
676  case 29:
677  coerceValue(value, myDenseDirectSolver);
678  break;
679  case 30:
680  coerceValue(value, mySparseDirectSolver);
681  break;
682  case 31:
683  coerceValue(value, mySparseDirectSolverBackend);
684  break;
685  case 32:
686  coerceValue(value, myDensePreconditioner);
687  break;
688  case 33:
689  coerceValue(value, mySparsePreconditioner);
690  break;
691 
692  }
693  }
694 
695  bool isParmColorRamp(exint idx) const override
696  {
697  switch (idx)
698  {
699 
700  }
701  return false;
702  }
703 
704  void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
705  { doGetParmValue(idx, instance, value); }
706  void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
707  { doGetParmValue(idx, instance, value); }
708  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
709  { doGetParmValue(idx, instance, value); }
710  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
711  { doGetParmValue(idx, instance, value); }
712  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
713  { doGetParmValue(idx, instance, value); }
714  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
715  { doGetParmValue(idx, instance, value); }
716  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
717  { doGetParmValue(idx, instance, value); }
718  void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
719  { doGetParmValue(idx, instance, value); }
720  void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
721  { doGetParmValue(idx, instance, value); }
722  void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr<UT_Ramp> &value) const override
723  { doGetParmValue(idx, instance, value); }
724  void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
725  { doGetParmValue(idx, instance, value); }
726 
727  template <typename T>
728  void
729  doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
730  {
731  if (idx.size() < 1)
732  return;
733  UT_ASSERT(idx.size() == instance.size()+1);
734  if (idx.size() != instance.size()+1)
735  return;
736  switch (idx[0])
737  {
738  case 0:
739  coerceValue(myMode, clampMinValue(0, clampMaxValue(3, value ) ));
740  break;
741  case 1:
742  coerceValue(myCookInplace, ( ( value ) ));
743  break;
744  case 2:
745  coerceValue(myPrecision, clampMinValue(0, clampMaxValue(2, value ) ));
746  break;
747  case 3:
748  coerceValue(myUseIterativeSolver, ( ( value ) ));
749  break;
750  case 4:
751  coerceValue(myIterativeSolver, clampMinValue(0, clampMaxValue(6, value ) ));
752  break;
753  case 5:
754  coerceValue(mySolveWithGuess, ( ( value ) ));
755  break;
756  case 6:
757  coerceValue(myUseEigensolver, ( ( value ) ));
758  break;
759  case 7:
760  coerceValue(mySpectraEigensolver, clampMinValue(0, clampMaxValue(3, value ) ));
761  break;
762  case 8:
763  coerceValue(myNumEigenpairs, clampMinValue(1, ( value ) ));
764  break;
765  case 9:
766  coerceValue(myShift, ( ( value ) ));
767  break;
768  case 10:
769  coerceValue(mySolverTolerance, clampMinValue(0, ( value ) ));
770  break;
771  case 11:
772  coerceValue(myMatrixStorage, clampMinValue(0, clampMaxValue(3, value ) ));
773  break;
774  case 12:
775  coerceValue(myVolumeEncoding, clampMinValue(0, clampMaxValue(1, value ) ));
776  break;
777  case 13:
778  coerceValue(myPointsPrimsEncoding, clampMinValue(0, clampMaxValue(4, value ) ));
779  break;
780  case 14:
781  coerceValue(myDetailEncoding, clampMinValue(0, clampMaxValue(2, value ) ));
782  break;
783  case 15:
784  coerceValue(mySquareMatrix, ( ( value ) ));
785  break;
786  case 16:
787  coerceValue(myRows, clampMinValue(1, ( value ) ));
788  break;
789  case 17:
790  coerceValue(myCols, clampMinValue(1, ( value ) ));
791  break;
792  case 18:
793  coerceValue(myRowAttribute, ( ( value ) ));
794  break;
795  case 19:
796  coerceValue(myColAttribute, ( ( value ) ));
797  break;
798  case 20:
799  coerceValue(myMatrixValueAttribute, ( ( value ) ));
800  break;
801  case 21:
802  coerceValue(myVectorSrcStorage, clampMinValue(0, clampMaxValue(2, value ) ));
803  break;
804  case 22:
805  coerceValue(myVectorSrcAttribute, ( ( value ) ));
806  break;
807  case 23:
808  coerceValue(myVectorDstStorage, clampMinValue(0, clampMaxValue(2, value ) ));
809  break;
810  case 24:
811  coerceValue(myVectorDstAttribute, ( ( value ) ));
812  break;
813  case 25:
814  coerceValue(myPinnedGroup, ( ( value ) ));
815  break;
816  case 26:
817  coerceValue(myReduceRows, ( ( value ) ));
818  break;
819  case 27:
820  coerceValue(myScale, ( ( value ) ));
821  break;
822  case 28:
823  coerceValue(myAccumulateResult, ( ( value ) ));
824  break;
825  case 29:
826  coerceValue(myDenseDirectSolver, clampMinValue(0, clampMaxValue(11, value ) ));
827  break;
828  case 30:
829  coerceValue(mySparseDirectSolver, clampMinValue(0, clampMaxValue(3, value ) ));
830  break;
831  case 31:
832  coerceValue(mySparseDirectSolverBackend, clampMinValue(0, clampMaxValue(1, value ) ));
833  break;
834  case 32:
835  coerceValue(myDensePreconditioner, clampMinValue(0, clampMaxValue(1, value ) ));
836  break;
837  case 33:
838  coerceValue(mySparsePreconditioner, clampMinValue(0, clampMaxValue(3, value ) ));
839  break;
840 
841  }
842  }
843 
844  void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
845  { doSetParmValue(idx, instance, value); }
846  void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
847  { doSetParmValue(idx, instance, value); }
848  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
849  { doSetParmValue(idx, instance, value); }
850  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
851  { doSetParmValue(idx, instance, value); }
852  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
853  { doSetParmValue(idx, instance, value); }
854  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
855  { doSetParmValue(idx, instance, value); }
856  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
857  { doSetParmValue(idx, instance, value); }
858  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
859  { doSetParmValue(idx, instance, value); }
860  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
861  { doSetParmValue(idx, instance, value); }
862  void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr<UT_Ramp> &value) override
863  { doSetParmValue(idx, instance, value); }
864  void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
865  { doSetParmValue(idx, instance, value); }
866 
867  exint getNestNumParms(TempIndex idx) const override
868  {
869  if (idx.size() == 0)
870  return 34;
871  switch (idx[0])
872  {
873 
874  }
875  // Invalid
876  return 0;
877  }
878 
879  const char *getNestParmName(TempIndex fieldnum) const override
880  {
881  if (fieldnum.size() < 1)
882  return 0;
883  switch (fieldnum[0])
884  {
885  case 0:
886  return "mode";
887  case 1:
888  return "cookinplace";
889  case 2:
890  return "precision";
891  case 3:
892  return "useiterativesolver";
893  case 4:
894  return "iterativesolver";
895  case 5:
896  return "solvewithguess";
897  case 6:
898  return "useeigensolver";
899  case 7:
900  return "spectraeigensolver";
901  case 8:
902  return "numeigenpairs";
903  case 9:
904  return "shift";
905  case 10:
906  return "solvertolerance";
907  case 11:
908  return "matrixstorage";
909  case 12:
910  return "volumeencoding";
911  case 13:
912  return "pointsprimsencoding";
913  case 14:
914  return "detailencoding";
915  case 15:
916  return "squarematrix";
917  case 16:
918  return "rows";
919  case 17:
920  return "cols";
921  case 18:
922  return "rowattr";
923  case 19:
924  return "colattr";
925  case 20:
926  return "matrixvalueattr";
927  case 21:
928  return "vectorsrcstorage";
929  case 22:
930  return "vectorsrcattr";
931  case 23:
932  return "vectordststorage";
933  case 24:
934  return "vectordstattr";
935  case 25:
936  return "pinnedgroup";
937  case 26:
938  return "reducerows";
939  case 27:
940  return "scale";
941  case 28:
942  return "accumulateresult";
943  case 29:
944  return "densedirectsolver";
945  case 30:
946  return "sparsedirectsolver";
947  case 31:
948  return "sparsedirectsolverbackend";
949  case 32:
950  return "densepreconditioner";
951  case 33:
952  return "sparsepreconditioner";
953 
954  }
955  return 0;
956  }
957 
958  ParmType getNestParmType(TempIndex fieldnum) const override
959  {
960  if (fieldnum.size() < 1)
961  return PARM_UNSUPPORTED;
962  switch (fieldnum[0])
963  {
964  case 0:
965  return PARM_INTEGER;
966  case 1:
967  return PARM_INTEGER;
968  case 2:
969  return PARM_INTEGER;
970  case 3:
971  return PARM_INTEGER;
972  case 4:
973  return PARM_INTEGER;
974  case 5:
975  return PARM_INTEGER;
976  case 6:
977  return PARM_INTEGER;
978  case 7:
979  return PARM_INTEGER;
980  case 8:
981  return PARM_INTEGER;
982  case 9:
983  return PARM_FLOAT;
984  case 10:
985  return PARM_FLOAT;
986  case 11:
987  return PARM_INTEGER;
988  case 12:
989  return PARM_INTEGER;
990  case 13:
991  return PARM_INTEGER;
992  case 14:
993  return PARM_INTEGER;
994  case 15:
995  return PARM_INTEGER;
996  case 16:
997  return PARM_INTEGER;
998  case 17:
999  return PARM_INTEGER;
1000  case 18:
1001  return PARM_STRING;
1002  case 19:
1003  return PARM_STRING;
1004  case 20:
1005  return PARM_STRING;
1006  case 21:
1007  return PARM_INTEGER;
1008  case 22:
1009  return PARM_STRING;
1010  case 23:
1011  return PARM_INTEGER;
1012  case 24:
1013  return PARM_STRING;
1014  case 25:
1015  return PARM_STRING;
1016  case 26:
1017  return PARM_INTEGER;
1018  case 27:
1019  return PARM_FLOAT;
1020  case 28:
1021  return PARM_INTEGER;
1022  case 29:
1023  return PARM_INTEGER;
1024  case 30:
1025  return PARM_INTEGER;
1026  case 31:
1027  return PARM_INTEGER;
1028  case 32:
1029  return PARM_INTEGER;
1030  case 33:
1031  return PARM_INTEGER;
1032 
1033  }
1034  return PARM_UNSUPPORTED;
1035  }
1036 
1037  // Boiler plate to load individual types.
1038  static void loadData(UT_IStream &is, int64 &v)
1039  { is.bread(&v, 1); }
1040  static void loadData(UT_IStream &is, bool &v)
1041  { int64 iv; is.bread(&iv, 1); v = iv; }
1042  static void loadData(UT_IStream &is, fpreal64 &v)
1043  { is.bread<fpreal64>(&v, 1); }
1044  static void loadData(UT_IStream &is, UT_Vector2D &v)
1045  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1); }
1046  static void loadData(UT_IStream &is, UT_Vector3D &v)
1047  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1048  is.bread<fpreal64>(&v.z(), 1); }
1049  static void loadData(UT_IStream &is, UT_Vector4D &v)
1050  { is.bread<fpreal64>(&v.x(), 1); is.bread<fpreal64>(&v.y(), 1);
1051  is.bread<fpreal64>(&v.z(), 1); is.bread<fpreal64>(&v.w(), 1); }
1052  static void loadData(UT_IStream &is, UT_Matrix2D &v)
1053  { for (int r = 0; r < 2; r++) for (int c = 0; c < 2; c++) is.bread<fpreal64>(&v(r, c), 1); }
1054  static void loadData(UT_IStream &is, UT_Matrix3D &v)
1055  { for (int r = 0; r < 3; r++) for (int c = 0; c < 3; c++) is.bread<fpreal64>(&v(r, c), 1); }
1056  static void loadData(UT_IStream &is, UT_Matrix4D &v)
1057  { for (int r = 0; r < 4; r++) for (int c = 0; c < 4; c++) is.bread<fpreal64>(&v(r, c), 1); }
1058  static void loadData(UT_IStream &is, UT_Vector2I &v)
1059  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1); }
1060  static void loadData(UT_IStream &is, UT_Vector3I &v)
1061  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1062  is.bread<int64>(&v.z(), 1); }
1063  static void loadData(UT_IStream &is, UT_Vector4I &v)
1064  { is.bread<int64>(&v.x(), 1); is.bread<int64>(&v.y(), 1);
1065  is.bread<int64>(&v.z(), 1); is.bread<int64>(&v.w(), 1); }
1067  { is.bread(v); }
1069  { UT_StringHolder rampdata;
1070  loadData(is, rampdata);
1071  if (rampdata.isstring())
1072  {
1073  v.reset(new UT_Ramp());
1074  UT_IStream istr((const char *) rampdata, rampdata.length(), UT_ISTREAM_ASCII);
1075  v->load(istr);
1076  }
1077  else v.reset();
1078  }
1081  loadData(is, data);
1082  if (data.isstring())
1083  {
1084  // Find the data type.
1085  const char *colon = UT_StringWrap(data).findChar(':');
1086  if (colon)
1087  {
1088  int typelen = colon - data.buffer();
1090  type.strncpy(data.buffer(), typelen);
1091  UT_IStream istr(((const char *) data) + typelen + 1, data.length() - (typelen + 1), UT_ISTREAM_BINARY);
1092 
1093  v = PRM_DataFactory::parseBinary(type.buffer(), istr);
1094  }
1095  }
1096  else v.reset();
1097  }
1098 
1099  static void saveData(std::ostream &os, int64 v)
1100  { UTwrite(os, &v); }
1101  static void saveData(std::ostream &os, bool v)
1102  { int64 iv = v; UTwrite(os, &iv); }
1103  static void saveData(std::ostream &os, fpreal64 v)
1104  { UTwrite<fpreal64>(os, &v); }
1105  static void saveData(std::ostream &os, UT_Vector2D v)
1106  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y()); }
1107  static void saveData(std::ostream &os, UT_Vector3D v)
1108  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1109  UTwrite<fpreal64>(os, &v.z()); }
1110  static void saveData(std::ostream &os, UT_Vector4D v)
1111  { UTwrite<fpreal64>(os, &v.x()); UTwrite<fpreal64>(os, &v.y());
1112  UTwrite<fpreal64>(os, &v.z()); UTwrite<fpreal64>(os, &v.w()); }
1113  static void saveData(std::ostream &os, UT_Matrix2D v)
1115  static void saveData(std::ostream &os, UT_Matrix3D v)
1117  static void saveData(std::ostream &os, UT_Matrix4D v)
1119  static void saveData(std::ostream &os, UT_StringHolder s)
1120  { UT_StringWrap(s).saveBinary(os); }
1121  static void saveData(std::ostream &os, UT_SharedPtr<UT_Ramp> s)
1123  UT_OStringStream ostr;
1124  if (s) s->save(ostr);
1125  result = ostr.str();
1126  saveData(os, result);
1127  }
1128  static void saveData(std::ostream &os, PRM_DataItemHandle s)
1130  UT_OStringStream ostr;
1131  if (s)
1132  {
1133  ostr << s->getDataTypeToken();
1134  ostr << ":";
1135  s->saveBinary(ostr);
1136  }
1137  result = ostr.str();
1138  saveData(os, result);
1139  }
1140 
1141 
1142  void save(std::ostream &os) const
1143  {
1144  int32 v = version();
1145  UTwrite(os, &v);
1146  saveData(os, myMode);
1147  saveData(os, myCookInplace);
1148  saveData(os, myPrecision);
1149  saveData(os, myUseIterativeSolver);
1150  saveData(os, myIterativeSolver);
1151  saveData(os, mySolveWithGuess);
1152  saveData(os, myUseEigensolver);
1153  saveData(os, mySpectraEigensolver);
1154  saveData(os, myNumEigenpairs);
1155  saveData(os, myShift);
1156  saveData(os, mySolverTolerance);
1157  saveData(os, myMatrixStorage);
1158  saveData(os, myVolumeEncoding);
1159  saveData(os, myPointsPrimsEncoding);
1160  saveData(os, myDetailEncoding);
1161  saveData(os, mySquareMatrix);
1162  saveData(os, myRows);
1163  saveData(os, myCols);
1164  saveData(os, myRowAttribute);
1165  saveData(os, myColAttribute);
1166  saveData(os, myMatrixValueAttribute);
1167  saveData(os, myVectorSrcStorage);
1168  saveData(os, myVectorSrcAttribute);
1169  saveData(os, myVectorDstStorage);
1170  saveData(os, myVectorDstAttribute);
1171  saveData(os, myPinnedGroup);
1172  saveData(os, myReduceRows);
1173  saveData(os, myScale);
1174  saveData(os, myAccumulateResult);
1175  saveData(os, myDenseDirectSolver);
1176  saveData(os, mySparseDirectSolver);
1177  saveData(os, mySparseDirectSolverBackend);
1178  saveData(os, myDensePreconditioner);
1179  saveData(os, mySparsePreconditioner);
1180 
1181  }
1182 
1183  bool load(UT_IStream &is)
1184  {
1185  int32 v;
1186  is.bread(&v, 1);
1187  if (version() != v)
1188  {
1189  // Fail incompatible versions
1190  return false;
1191  }
1192  loadData(is, myMode);
1193  loadData(is, myCookInplace);
1194  loadData(is, myPrecision);
1195  loadData(is, myUseIterativeSolver);
1196  loadData(is, myIterativeSolver);
1197  loadData(is, mySolveWithGuess);
1198  loadData(is, myUseEigensolver);
1199  loadData(is, mySpectraEigensolver);
1200  loadData(is, myNumEigenpairs);
1201  loadData(is, myShift);
1202  loadData(is, mySolverTolerance);
1203  loadData(is, myMatrixStorage);
1204  loadData(is, myVolumeEncoding);
1205  loadData(is, myPointsPrimsEncoding);
1206  loadData(is, myDetailEncoding);
1207  loadData(is, mySquareMatrix);
1208  loadData(is, myRows);
1209  loadData(is, myCols);
1210  loadData(is, myRowAttribute);
1211  loadData(is, myColAttribute);
1212  loadData(is, myMatrixValueAttribute);
1213  loadData(is, myVectorSrcStorage);
1214  loadData(is, myVectorSrcAttribute);
1215  loadData(is, myVectorDstStorage);
1216  loadData(is, myVectorDstAttribute);
1217  loadData(is, myPinnedGroup);
1218  loadData(is, myReduceRows);
1219  loadData(is, myScale);
1220  loadData(is, myAccumulateResult);
1221  loadData(is, myDenseDirectSolver);
1222  loadData(is, mySparseDirectSolver);
1223  loadData(is, mySparseDirectSolverBackend);
1224  loadData(is, myDensePreconditioner);
1225  loadData(is, mySparsePreconditioner);
1226 
1227  return true;
1228  }
1229 
1230  Mode getMode() const { return Mode(myMode); }
1231  void setMode(Mode val) { myMode = int64(val); }
1232  Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
1233  {
1234  SOP_Node *thissop = cookparms.getNode();
1235  if (!thissop) return getMode();
1236  int64 result;
1237  OP_Utils::evalOpParm(result, thissop, "mode", cookparms.getCookTime(), 0);
1238  return Mode(result);
1239  }
1240  bool getCookInplace() const { return myCookInplace; }
1241  void setCookInplace(bool val) { myCookInplace = val; }
1242  bool opCookInplace(const SOP_NodeVerb::CookParms &cookparms) const
1243  {
1244  SOP_Node *thissop = cookparms.getNode();
1245  if (!thissop) return getCookInplace();
1246  bool result;
1247  OP_Utils::evalOpParm(result, thissop, "cookinplace", cookparms.getCookTime(), 0);
1248  return result;
1249  }
1250  Precision getPrecision() const { return Precision(myPrecision); }
1251  void setPrecision(Precision val) { myPrecision = int64(val); }
1253  {
1254  SOP_Node *thissop = cookparms.getNode();
1255  if (!thissop) return getPrecision();
1256  int64 result;
1257  OP_Utils::evalOpParm(result, thissop, "precision", cookparms.getCookTime(), 0);
1258  return Precision(result);
1259  }
1260  bool getUseIterativeSolver() const { return myUseIterativeSolver; }
1261  void setUseIterativeSolver(bool val) { myUseIterativeSolver = val; }
1262  bool opUseIterativeSolver(const SOP_NodeVerb::CookParms &cookparms) const
1263  {
1264  SOP_Node *thissop = cookparms.getNode();
1265  if (!thissop) return getUseIterativeSolver();
1266  bool result;
1267  OP_Utils::evalOpParm(result, thissop, "useiterativesolver", cookparms.getCookTime(), 0);
1268  return result;
1269  }
1270  IterativeSolver getIterativeSolver() const { return IterativeSolver(myIterativeSolver); }
1271  void setIterativeSolver(IterativeSolver val) { myIterativeSolver = int64(val); }
1273  {
1274  SOP_Node *thissop = cookparms.getNode();
1275  if (!thissop) return getIterativeSolver();
1276  int64 result;
1277  OP_Utils::evalOpParm(result, thissop, "iterativesolver", cookparms.getCookTime(), 0);
1278  return IterativeSolver(result);
1279  }
1280  bool getSolveWithGuess() const { return mySolveWithGuess; }
1281  void setSolveWithGuess(bool val) { mySolveWithGuess = val; }
1282  bool opSolveWithGuess(const SOP_NodeVerb::CookParms &cookparms) const
1283  {
1284  SOP_Node *thissop = cookparms.getNode();
1285  if (!thissop) return getSolveWithGuess();
1286  bool result;
1287  OP_Utils::evalOpParm(result, thissop, "solvewithguess", cookparms.getCookTime(), 0);
1288  return result;
1289  }
1290  bool getUseEigensolver() const { return myUseEigensolver; }
1291  void setUseEigensolver(bool val) { myUseEigensolver = val; }
1292  bool opUseEigensolver(const SOP_NodeVerb::CookParms &cookparms) const
1293  {
1294  SOP_Node *thissop = cookparms.getNode();
1295  if (!thissop) return getUseEigensolver();
1296  bool result;
1297  OP_Utils::evalOpParm(result, thissop, "useeigensolver", cookparms.getCookTime(), 0);
1298  return result;
1299  }
1300  SpectraEigensolver getSpectraEigensolver() const { return SpectraEigensolver(mySpectraEigensolver); }
1301  void setSpectraEigensolver(SpectraEigensolver val) { mySpectraEigensolver = int64(val); }
1303  {
1304  SOP_Node *thissop = cookparms.getNode();
1305  if (!thissop) return getSpectraEigensolver();
1306  int64 result;
1307  OP_Utils::evalOpParm(result, thissop, "spectraeigensolver", cookparms.getCookTime(), 0);
1308  return SpectraEigensolver(result);
1309  }
1310  int64 getNumEigenpairs() const { return myNumEigenpairs; }
1311  void setNumEigenpairs(int64 val) { myNumEigenpairs = val; }
1313  {
1314  SOP_Node *thissop = cookparms.getNode();
1315  if (!thissop) return getNumEigenpairs();
1316  int64 result;
1317  OP_Utils::evalOpParm(result, thissop, "numeigenpairs", cookparms.getCookTime(), 0);
1318  return result;
1319  }
1320  fpreal64 getShift() const { return myShift; }
1321  void setShift(fpreal64 val) { myShift = val; }
1322  fpreal64 opShift(const SOP_NodeVerb::CookParms &cookparms) const
1323  {
1324  SOP_Node *thissop = cookparms.getNode();
1325  if (!thissop) return getShift();
1326  fpreal64 result;
1327  OP_Utils::evalOpParm(result, thissop, "shift", cookparms.getCookTime(), 0);
1328  return result;
1329  }
1330  fpreal64 getSolverTolerance() const { return mySolverTolerance; }
1331  void setSolverTolerance(fpreal64 val) { mySolverTolerance = val; }
1333  {
1334  SOP_Node *thissop = cookparms.getNode();
1335  if (!thissop) return getSolverTolerance();
1336  fpreal64 result;
1337  OP_Utils::evalOpParm(result, thissop, "solvertolerance", cookparms.getCookTime(), 0);
1338  return result;
1339  }
1340  MatrixStorage getMatrixStorage() const { return MatrixStorage(myMatrixStorage); }
1341  void setMatrixStorage(MatrixStorage val) { myMatrixStorage = int64(val); }
1343  {
1344  SOP_Node *thissop = cookparms.getNode();
1345  if (!thissop) return getMatrixStorage();
1346  int64 result;
1347  OP_Utils::evalOpParm(result, thissop, "matrixstorage", cookparms.getCookTime(), 0);
1348  return MatrixStorage(result);
1349  }
1350  VolumeEncoding getVolumeEncoding() const { return VolumeEncoding(myVolumeEncoding); }
1351  void setVolumeEncoding(VolumeEncoding val) { myVolumeEncoding = int64(val); }
1353  {
1354  SOP_Node *thissop = cookparms.getNode();
1355  if (!thissop) return getVolumeEncoding();
1356  int64 result;
1357  OP_Utils::evalOpParm(result, thissop, "volumeencoding", cookparms.getCookTime(), 0);
1358  return VolumeEncoding(result);
1359  }
1360  PointsPrimsEncoding getPointsPrimsEncoding() const { return PointsPrimsEncoding(myPointsPrimsEncoding); }
1361  void setPointsPrimsEncoding(PointsPrimsEncoding val) { myPointsPrimsEncoding = int64(val); }
1363  {
1364  SOP_Node *thissop = cookparms.getNode();
1365  if (!thissop) return getPointsPrimsEncoding();
1366  int64 result;
1367  OP_Utils::evalOpParm(result, thissop, "pointsprimsencoding", cookparms.getCookTime(), 0);
1368  return PointsPrimsEncoding(result);
1369  }
1370  DetailEncoding getDetailEncoding() const { return DetailEncoding(myDetailEncoding); }
1371  void setDetailEncoding(DetailEncoding val) { myDetailEncoding = int64(val); }
1373  {
1374  SOP_Node *thissop = cookparms.getNode();
1375  if (!thissop) return getDetailEncoding();
1376  int64 result;
1377  OP_Utils::evalOpParm(result, thissop, "detailencoding", cookparms.getCookTime(), 0);
1378  return DetailEncoding(result);
1379  }
1380  bool getSquareMatrix() const { return mySquareMatrix; }
1381  void setSquareMatrix(bool val) { mySquareMatrix = val; }
1382  bool opSquareMatrix(const SOP_NodeVerb::CookParms &cookparms) const
1383  {
1384  SOP_Node *thissop = cookparms.getNode();
1385  if (!thissop) return getSquareMatrix();
1386  bool result;
1387  OP_Utils::evalOpParm(result, thissop, "squarematrix", cookparms.getCookTime(), 0);
1388  return result;
1389  }
1390  int64 getRows() const { return myRows; }
1391  void setRows(int64 val) { myRows = val; }
1392  int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
1393  {
1394  SOP_Node *thissop = cookparms.getNode();
1395  if (!thissop) return getRows();
1396  int64 result;
1397  OP_Utils::evalOpParm(result, thissop, "rows", cookparms.getCookTime(), 0);
1398  return result;
1399  }
1400  int64 getCols() const { return myCols; }
1401  void setCols(int64 val) { myCols = val; }
1402  int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
1403  {
1404  SOP_Node *thissop = cookparms.getNode();
1405  if (!thissop) return getCols();
1406  int64 result;
1407  OP_Utils::evalOpParm(result, thissop, "cols", cookparms.getCookTime(), 0);
1408  return result;
1409  }
1410  const UT_StringHolder & getRowAttribute() const { return myRowAttribute; }
1411  void setRowAttribute(const UT_StringHolder & val) { myRowAttribute = val; }
1413  {
1414  SOP_Node *thissop = cookparms.getNode();
1415  if (!thissop) return getRowAttribute();
1417  OP_Utils::evalOpParm(result, thissop, "rowattr", cookparms.getCookTime(), 0);
1418  return result;
1419  }
1420  const UT_StringHolder & getColAttribute() const { return myColAttribute; }
1421  void setColAttribute(const UT_StringHolder & val) { myColAttribute = val; }
1423  {
1424  SOP_Node *thissop = cookparms.getNode();
1425  if (!thissop) return getColAttribute();
1427  OP_Utils::evalOpParm(result, thissop, "colattr", cookparms.getCookTime(), 0);
1428  return result;
1429  }
1430  const UT_StringHolder & getMatrixValueAttribute() const { return myMatrixValueAttribute; }
1431  void setMatrixValueAttribute(const UT_StringHolder & val) { myMatrixValueAttribute = val; }
1433  {
1434  SOP_Node *thissop = cookparms.getNode();
1435  if (!thissop) return getMatrixValueAttribute();
1437  OP_Utils::evalOpParm(result, thissop, "matrixvalueattr", cookparms.getCookTime(), 0);
1438  return result;
1439  }
1440  VectorSrcStorage getVectorSrcStorage() const { return VectorSrcStorage(myVectorSrcStorage); }
1441  void setVectorSrcStorage(VectorSrcStorage val) { myVectorSrcStorage = int64(val); }
1443  {
1444  SOP_Node *thissop = cookparms.getNode();
1445  if (!thissop) return getVectorSrcStorage();
1446  int64 result;
1447  OP_Utils::evalOpParm(result, thissop, "vectorsrcstorage", cookparms.getCookTime(), 0);
1448  return VectorSrcStorage(result);
1449  }
1450  const UT_StringHolder & getVectorSrcAttribute() const { return myVectorSrcAttribute; }
1451  void setVectorSrcAttribute(const UT_StringHolder & val) { myVectorSrcAttribute = val; }
1453  {
1454  SOP_Node *thissop = cookparms.getNode();
1455  if (!thissop) return getVectorSrcAttribute();
1457  OP_Utils::evalOpParm(result, thissop, "vectorsrcattr", cookparms.getCookTime(), 0);
1458  return result;
1459  }
1460  VectorDstStorage getVectorDstStorage() const { return VectorDstStorage(myVectorDstStorage); }
1461  void setVectorDstStorage(VectorDstStorage val) { myVectorDstStorage = int64(val); }
1463  {
1464  SOP_Node *thissop = cookparms.getNode();
1465  if (!thissop) return getVectorDstStorage();
1466  int64 result;
1467  OP_Utils::evalOpParm(result, thissop, "vectordststorage", cookparms.getCookTime(), 0);
1468  return VectorDstStorage(result);
1469  }
1470  const UT_StringHolder & getVectorDstAttribute() const { return myVectorDstAttribute; }
1471  void setVectorDstAttribute(const UT_StringHolder & val) { myVectorDstAttribute = val; }
1473  {
1474  SOP_Node *thissop = cookparms.getNode();
1475  if (!thissop) return getVectorDstAttribute();
1477  OP_Utils::evalOpParm(result, thissop, "vectordstattr", cookparms.getCookTime(), 0);
1478  return result;
1479  }
1480  const UT_StringHolder & getPinnedGroup() const { return myPinnedGroup; }
1481  void setPinnedGroup(const UT_StringHolder & val) { myPinnedGroup = val; }
1483  {
1484  SOP_Node *thissop = cookparms.getNode();
1485  if (!thissop) return getPinnedGroup();
1487  OP_Utils::evalOpParm(result, thissop, "pinnedgroup", cookparms.getCookTime(), 0);
1488  return result;
1489  }
1490  bool getReduceRows() const { return myReduceRows; }
1491  void setReduceRows(bool val) { myReduceRows = val; }
1492  bool opReduceRows(const SOP_NodeVerb::CookParms &cookparms) const
1493  {
1494  SOP_Node *thissop = cookparms.getNode();
1495  if (!thissop) return getReduceRows();
1496  bool result;
1497  OP_Utils::evalOpParm(result, thissop, "reducerows", cookparms.getCookTime(), 0);
1498  return result;
1499  }
1500  fpreal64 getScale() const { return myScale; }
1501  void setScale(fpreal64 val) { myScale = val; }
1502  fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
1503  {
1504  SOP_Node *thissop = cookparms.getNode();
1505  if (!thissop) return getScale();
1506  fpreal64 result;
1507  OP_Utils::evalOpParm(result, thissop, "scale", cookparms.getCookTime(), 0);
1508  return result;
1509  }
1510  bool getAccumulateResult() const { return myAccumulateResult; }
1511  void setAccumulateResult(bool val) { myAccumulateResult = val; }
1512  bool opAccumulateResult(const SOP_NodeVerb::CookParms &cookparms) const
1513  {
1514  SOP_Node *thissop = cookparms.getNode();
1515  if (!thissop) return getAccumulateResult();
1516  bool result;
1517  OP_Utils::evalOpParm(result, thissop, "accumulateresult", cookparms.getCookTime(), 0);
1518  return result;
1519  }
1520  DenseDirectSolver getDenseDirectSolver() const { return DenseDirectSolver(myDenseDirectSolver); }
1521  void setDenseDirectSolver(DenseDirectSolver val) { myDenseDirectSolver = int64(val); }
1523  {
1524  SOP_Node *thissop = cookparms.getNode();
1525  if (!thissop) return getDenseDirectSolver();
1526  int64 result;
1527  OP_Utils::evalOpParm(result, thissop, "densedirectsolver", cookparms.getCookTime(), 0);
1528  return DenseDirectSolver(result);
1529  }
1530  SparseDirectSolver getSparseDirectSolver() const { return SparseDirectSolver(mySparseDirectSolver); }
1531  void setSparseDirectSolver(SparseDirectSolver val) { mySparseDirectSolver = int64(val); }
1533  {
1534  SOP_Node *thissop = cookparms.getNode();
1535  if (!thissop) return getSparseDirectSolver();
1536  int64 result;
1537  OP_Utils::evalOpParm(result, thissop, "sparsedirectsolver", cookparms.getCookTime(), 0);
1538  return SparseDirectSolver(result);
1539  }
1541  void setSparseDirectSolverBackend(SparseDirectSolverBackend val) { mySparseDirectSolverBackend = int64(val); }
1543  {
1544  SOP_Node *thissop = cookparms.getNode();
1545  if (!thissop) return getSparseDirectSolverBackend();
1546  int64 result;
1547  OP_Utils::evalOpParm(result, thissop, "sparsedirectsolverbackend", cookparms.getCookTime(), 0);
1548  return SparseDirectSolverBackend(result);
1549  }
1550  DensePreconditioner getDensePreconditioner() const { return DensePreconditioner(myDensePreconditioner); }
1551  void setDensePreconditioner(DensePreconditioner val) { myDensePreconditioner = int64(val); }
1553  {
1554  SOP_Node *thissop = cookparms.getNode();
1555  if (!thissop) return getDensePreconditioner();
1556  int64 result;
1557  OP_Utils::evalOpParm(result, thissop, "densepreconditioner", cookparms.getCookTime(), 0);
1558  return DensePreconditioner(result);
1559  }
1560  SparsePreconditioner getSparsePreconditioner() const { return SparsePreconditioner(mySparsePreconditioner); }
1561  void setSparsePreconditioner(SparsePreconditioner val) { mySparsePreconditioner = int64(val); }
1563  {
1564  SOP_Node *thissop = cookparms.getNode();
1565  if (!thissop) return getSparsePreconditioner();
1566  int64 result;
1567  OP_Utils::evalOpParm(result, thissop, "sparsepreconditioner", cookparms.getCookTime(), 0);
1568  return SparsePreconditioner(result);
1569  }
1570 
1571 private:
1572  int64 myMode;
1573  bool myCookInplace;
1574  int64 myPrecision;
1575  bool myUseIterativeSolver;
1576  int64 myIterativeSolver;
1577  bool mySolveWithGuess;
1578  bool myUseEigensolver;
1579  int64 mySpectraEigensolver;
1580  int64 myNumEigenpairs;
1581  fpreal64 myShift;
1582  fpreal64 mySolverTolerance;
1583  int64 myMatrixStorage;
1584  int64 myVolumeEncoding;
1585  int64 myPointsPrimsEncoding;
1586  int64 myDetailEncoding;
1587  bool mySquareMatrix;
1588  int64 myRows;
1589  int64 myCols;
1590  UT_StringHolder myRowAttribute;
1591  UT_StringHolder myColAttribute;
1592  UT_StringHolder myMatrixValueAttribute;
1593  int64 myVectorSrcStorage;
1594  UT_StringHolder myVectorSrcAttribute;
1595  int64 myVectorDstStorage;
1596  UT_StringHolder myVectorDstAttribute;
1597  UT_StringHolder myPinnedGroup;
1598  bool myReduceRows;
1599  fpreal64 myScale;
1600  bool myAccumulateResult;
1601  int64 myDenseDirectSolver;
1602  int64 mySparseDirectSolver;
1603  int64 mySparseDirectSolverBackend;
1604  int64 myDensePreconditioner;
1605  int64 mySparsePreconditioner;
1606 
1607 };
Precision opPrecision(const SOP_NodeVerb::CookParms &cookparms) const
void setPointsPrimsEncoding(PointsPrimsEncoding val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix2D &value) const override
UT_StringHolder opMatrixValueAttribute(const SOP_NodeVerb::CookParms &cookparms) const
SparseDirectSolverBackend opSparseDirectSolverBackend(const SOP_NodeVerb::CookParms &cookparms) const
VectorDstStorage getVectorDstStorage() const
static void loadData(UT_IStream &is, UT_Vector3I &v)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector3D &value) const override
static void loadData(UT_IStream &is, int64 &v)
int int32
Definition: SYS_Types.h:39
SOP_Node * getNode() const
Definition: SOP_NodeVerb.h:347
const char * getNestParmName(TempIndex fieldnum) const override
static void saveData(std::ostream &os, UT_Vector3D v)
void setDensePreconditioner(DensePreconditioner val)
SpectraEigensolver getSpectraEigensolver() const
static void loadData(UT_IStream &is, UT_Vector2D &v)
static void loadData(UT_IStream &is, UT_Vector4I &v)
void setIterativeSolver(IterativeSolver val)
fpreal64 getSolverTolerance() const
bool opCookInplace(const SOP_NodeVerb::CookParms &cookparms) const
exint bread(int32 *buffer, exint asize=1)
GLboolean * data
Definition: glcorearb.h:131
GT_API const UT_StringHolder time
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector4.h:493
const GLdouble * v
Definition: glcorearb.h:837
fpreal getTime() const
Definition: OP_Context.h:62
SparseDirectSolver opSparseDirectSolver(const SOP_NodeVerb::CookParms &cookparms) const
int64 opNumEigenpairs(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix3D &value) override
static void loadData(UT_IStream &is, UT_Matrix4D &v)
void doGetParmValue(TempIndex idx, TempIndex instance, T &value) const
const OP_Context & context() const
Definition: OP_NodeParms.h:97
void setPrecision(Precision val)
DensePreconditioner opDensePreconditioner(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector3.h:667
int64 exint
Definition: SYS_Types.h:125
SYS_FORCE_INLINE const char * buffer() const
static void saveData(std::ostream &os, bool v)
DensePreconditioner getDensePreconditioner() const
static void saveData(std::ostream &os, PRM_DataItemHandle s)
static void saveData(std::ostream &os, fpreal64 v)
GLdouble s
Definition: glad.h:3009
void setVectorSrcStorage(VectorSrcStorage val)
VolumeEncoding getVolumeEncoding() const
void setNestParmValue(TempIndex idx, TempIndex instance, const fpreal &value) override
An output stream object that owns its own string buffer storage.
DenseDirectSolver getDenseDirectSolver() const
static void saveData(std::ostream &os, int64 v)
**But if you need a result
Definition: thread.h:613
void setSolverTolerance(fpreal64 val)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_SharedPtr< UT_Ramp > &value) const override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector2D &value) override
const UT_StringHolder & getMatrixValueAttribute() const
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector4D &value) const override
static void saveData(std::ostream &os, UT_SharedPtr< UT_Ramp > s)
void getNestParmValue(TempIndex idx, TempIndex instance, UT_StringHolder &value) const override
SpectraEigensolver opSpectraEigensolver(const SOP_NodeVerb::CookParms &cookparms) const
void setSpectraEigensolver(SpectraEigensolver val)
exint nodeIdx() const
Definition: OP_NodeParms.h:95
static PRM_DataItemHandle parseBinary(const char *type, UT_IStream &is)
void setDenseDirectSolver(DenseDirectSolver val)
const UT_WorkBuffer & str()
Returns a read-only reference to the underlying UT_WorkBuffer.
void getNestParmValue(TempIndex idx, TempIndex instance, PRM_DataItemHandle &value) const override
IterativeSolver getIterativeSolver() const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector4.h:491
SYS_FORCE_INLINE UT_StringHolder getToken(Mode enum_value)
IterativeSolver opIterativeSolver(const SOP_NodeVerb::CookParms &cookparms) const
SparseDirectSolver getSparseDirectSolver() const
void setPinnedGroup(const UT_StringHolder &val)
VectorDstStorage opVectorDstStorage(const SOP_NodeVerb::CookParms &cookparms) const
double fpreal64
Definition: SYS_Types.h:201
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector2.h:423
bool isParmColorRamp(exint idx) const override
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
DenseDirectSolver opDenseDirectSolver(const SOP_NodeVerb::CookParms &cookparms) const
int64 opCols(const SOP_NodeVerb::CookParms &cookparms) const
void loadFromOpSubclass(const LoadParms &loadparms) override
static void loadData(UT_IStream &is, UT_Vector4D &v)
void getNestParmValue(TempIndex idx, TempIndex instance, exint &value) const override
static void loadData(UT_IStream &is, UT_Vector3D &v)
fpreal64 opSolverTolerance(const SOP_NodeVerb::CookParms &cookparms) const
exint length() const
bool opSolveWithGuess(const SOP_NodeVerb::CookParms &cookparms) const
const UT_StringHolder & getPinnedGroup() const
SYS_FORCE_INLINE const char * buffer() const
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
Definition: UT_SharedPtr.h:36
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix4D &value) const override
constexpr SYS_FORCE_INLINE T & z() noexcept
Definition: UT_Vector4.h:495
static void saveData(std::ostream &os, UT_Vector4D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_StringHolder &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const exint &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector4D &value) override
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix2D &value) override
const OP_GraphProxy * graph() const
Definition: OP_NodeParms.h:94
UT_StringHolder opVectorDstAttribute(const SOP_NodeVerb::CookParms &cookparms) const
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
SparsePreconditioner opSparsePreconditioner(const SOP_NodeVerb::CookParms &cookparms) const
fpreal64 opScale(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Vector3D &value) override
DetailEncoding opDetailEncoding(const SOP_NodeVerb::CookParms &cookparms) const
PointsPrimsEncoding opPointsPrimsEncoding(const SOP_NodeVerb::CookParms &cookparms) const
void save(std::ostream &os) const
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_Matrix4D &value) override
exint getNestNumParms(TempIndex idx) const override
MatrixStorage opMatrixStorage(const SOP_NodeVerb::CookParms &cookparms) const
void setVectorSrcAttribute(const UT_StringHolder &val)
void getNestParmValue(TempIndex idx, TempIndex instance, fpreal &value) const override
long long int64
Definition: SYS_Types.h:116
UT_StringHolder opVectorSrcAttribute(const SOP_NodeVerb::CookParms &cookparms) const
VectorSrcStorage getVectorSrcStorage() const
static void loadData(UT_IStream &is, UT_StringHolder &v)
Precision getPrecision() const
const UT_StringHolder & getVectorDstAttribute() const
const UT_StringHolder & getColAttribute() const
static void loadData(UT_IStream &is, PRM_DataItemHandle &v)
SparseDirectSolverBackend getSparseDirectSolverBackend() const
const UT_StringHolder & getRowAttribute() const
bool opReduceRows(const SOP_NodeVerb::CookParms &cookparms) const
void setVectorDstStorage(VectorDstStorage val)
virtual void evalOpParm(int64 &v, NodeIdx node, const char *parmname, fpreal time, DEP_MicroNode *depnode) const =0
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Matrix3D &value) const override
static void saveData(std::ostream &os, UT_Vector2D v)
void setNestParmValue(TempIndex idx, TempIndex instance, const UT_SharedPtr< UT_Ramp > &value) override
static void saveData(std::ostream &os, UT_Matrix2D v)
VectorSrcStorage opVectorSrcStorage(const SOP_NodeVerb::CookParms &cookparms) const
void setNestParmValue(TempIndex idx, TempIndex instance, const PRM_DataItemHandle &value) override
void saveBinary(std::ostream &os) const
Save string to binary stream.
Definition: UT_String.h:296
PointsPrimsEncoding getPointsPrimsEncoding() const
void setRowAttribute(const UT_StringHolder &val)
GT_API const UT_StringHolder version
void setVolumeEncoding(VolumeEncoding val)
static void loadData(UT_IStream &is, bool &v)
bool operator!=(const SOP_LinearSolverParms &src) const
bool operator==(const SOP_LinearSolverParms &src) const
bool opUseIterativeSolver(const SOP_NodeVerb::CookParms &cookparms) const
bool opAccumulateResult(const SOP_NodeVerb::CookParms &cookparms) const
void setDetailEncoding(DetailEncoding val)
UT_StringHolder opPinnedGroup(const SOP_NodeVerb::CookParms &cookparms) const
void setSparseDirectSolver(SparseDirectSolver val)
fpreal64 fpreal
Definition: SYS_Types.h:277
DEP_MicroNode * depnode() const
Definition: OP_NodeParms.h:99
LeafData & operator=(const LeafData &)=delete
void setSparsePreconditioner(SparsePreconditioner val)
Utility class for containing a color ramp.
Definition: UT_Ramp.h:92
void getNestParmValue(TempIndex idx, TempIndex instance, UT_Vector2D &value) const override
constexpr SYS_FORCE_INLINE T & w() noexcept
Definition: UT_Vector4.h:497
void setVectorDstAttribute(const UT_StringHolder &val)
GLuint GLfloat * val
Definition: glcorearb.h:1608
Vec3< typename MatType::value_type > getScale(const MatType &mat)
Return a Vec3 representing the lengths of the passed matrix's upper 3×3's rows.
Definition: Mat.h:633
static void saveData(std::ostream &os, UT_StringHolder s)
fpreal64 opShift(const SOP_NodeVerb::CookParms &cookparms) const
#define SOP_API
Definition: SOP_API.h:10
static void loadData(UT_IStream &is, fpreal64 &v)
DetailEncoding getDetailEncoding() const
fpreal getCookTime() const
Definition: SOP_NodeVerb.h:361
bool opUseEigensolver(const SOP_NodeVerb::CookParms &cookparms) const
MatrixStorage getMatrixStorage() const
static void saveData(std::ostream &os, UT_Matrix3D v)
const char * findChar(int c) const
Definition: UT_String.h:1395
#define UT_ASSERT(ZZ)
Definition: UT_Assert.h:156
Definition: core.h:1131
const UT_StringHolder & getVectorSrcAttribute() const
void setColAttribute(const UT_StringHolder &val)
bool opSquareMatrix(const SOP_NodeVerb::CookParms &cookparms) const
GLboolean r
Definition: glcorearb.h:1222
static void loadData(UT_IStream &is, UT_Matrix2D &v)
UT_StringHolder opColAttribute(const SOP_NodeVerb::CookParms &cookparms) const
void buildFromOp(const OP_GraphProxy *graph, exint nodeidx, fpreal time, DEP_MicroNode *depnode)
UT_StringHolder opRowAttribute(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_SharedPtr< UT_Ramp > &v)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector3.h:665
type
Definition: core.h:1059
void copyFrom(const OP_NodeParms *src) override
void setMatrixValueAttribute(const UT_StringHolder &val)
int64 opRows(const SOP_NodeVerb::CookParms &cookparms) const
SparsePreconditioner getSparsePreconditioner() const
ParmType getNestParmType(TempIndex fieldnum) const override
void doSetParmValue(TempIndex idx, TempIndex instance, const T &value)
Mode opMode(const SOP_NodeVerb::CookParms &cookparms) const
static void loadData(UT_IStream &is, UT_Matrix3D &v)
static void saveData(std::ostream &os, UT_Matrix4D v)
UT_SharedPtr< const PRM_DataItem > PRM_DataItemHandle
Definition: PRM_Parm.h:97
void setSparseDirectSolverBackend(SparseDirectSolverBackend val)
constexpr SYS_FORCE_INLINE T & y() noexcept
Definition: UT_Vector2.h:425
SYS_FORCE_INLINE bool isstring() const
SYS_FORCE_INLINE void strncpy(const char *src, exint maxlen)
GLenum src
Definition: glcorearb.h:1793
VolumeEncoding opVolumeEncoding(const SOP_NodeVerb::CookParms &cookparms) const
constexpr SYS_FORCE_INLINE T & x() noexcept
Definition: UT_Vector3.h:663
static void loadData(UT_IStream &is, UT_Vector2I &v)
void setMatrixStorage(MatrixStorage val)