1 #ifndef _GAS_ProjectNonDivergentAdaptive_
2 #define _GAS_ProjectNonDivergentAdaptive_
28 static constexpr
int FLUID_CELL = 0;
29 static constexpr
int UNASSIGNED_CELL = -1;
31 static constexpr
int INVALID_FACE = 0;
32 static constexpr
int VALID_FACE = 1;
84 "GAS Project Non Divergent Adaptive", getDopDescription());
88 enforceVolumeLimitBoundaries,
96 void enforceVolumeLimitBoundariesPartial(
SIM_RawField &boundary_weights,
106 classifyRegularLiquidCells,
112 const fpreal, extrapolation)
114 void classifyRegularLiquidCellsPartial(
SIM_RawIndexField ®ular_liquid_cell_labels,
119 const fpreal extrapolation,
123 checkForFineLiquidCells(
const SIM_RawIndexField ®ular_liquid_cell_labels)
const;
131 setFineCellMaskInterior,
157 old_cell_list.size() > 1000,
158 loadNextOutsideFineCellLayer,
171 old_cell_list.size() > 1000,
172 loadNextInsideFineCellLayer,
189 const int inside_fine_width,
190 const int outside_fine_width)
const;
197 octree_labels.numTiles() > 100,
198 classifyOctreeLiquidCells,
217 findFreeSurfacePerRegion,
223 void findFreeSurfacePerRegionPartial(
UT_Array<bool> ®ion_has_free_surface,
231 computeDivergencePerRegion,
249 removeAverageDivergence,
264 octree_labels.numTiles() > 100,
265 buildOccupiedOctreeFaceTiles,
271 void buildOccupiedOctreeFaceTilesPartial(
UT_Array<bool> &occupied_tile_list,
278 occupied_tile_list.entries() > 20,
289 classifyValidOctreeFaces,
297 void classifyValidOctreeFacesPartial(
SIM_RawField &valid_faces,
302 const int axis,
const int level,
313 regular_liquid_cell_labels.field()->numTiles() > 100,
314 findOccupiedRegularGridFaceTiles,
320 void findOccupiedRegularGridFaceTilesPartial(
UT_Array<bool> &occupied_tile_list,
328 classifyValidRegularGridFaces,
334 void classifyValidRegularGridFacesPartial(
SIM_RawField &valid_faces,
346 buildFineCutCellDivergence,
352 const bool, use_cutcell_boundaries)
359 const bool use_cutcell_boundaries,
364 buildCoarseDivergence,
375 liquid_cell_indices.shouldMultiThread(),
377 Vector &, rhs_vector,
381 void buildRHSPartial(Vector &rhs_vector,
382 const SIM_RawField &divergence,
383 const SIM_RawIndexField &liquid_cell_indices,
387 valid_faces.shouldMultiThread(),
388 integrateSurfacePressure,
389 SIM_RawField &, velocity,
390 const SIM_RawField &, valid_faces,
391 const SIM_RawField &, surface_pressure,
393 const SIM_RawField &, density,
394 const SIM_RawIndexField &, regular_liquid_cell_labels,
399 void integrateSurfacePressurePartial(SIM_RawField &velocity,
400 const SIM_RawField &valid_faces,
401 const SIM_RawField &surface_pressure,
402 const SIM_RawField &surface,
403 const SIM_RawField &density,
404 const SIM_RawIndexField ®ular_liquid_cell_labels,
405 const SIM_VectorField *surface_weights,
411 source_pressure.shouldMultiThread(),
413 SIM_RawField &, adaptive_pressure,
414 const SIM_RawField &, source_pressure,
415 const SIM_RawIndexField &, regular_liquid_cell_labels)
417 void buildFinePressurePartial(SIM_RawField &adaptive_pressure,
418 const SIM_RawField &source_pressure,
419 const SIM_RawIndexField ®ular_liquid_cell_labels,
423 pressure_pyramid[level].shouldMultiThread(),
425 UT_Array<SIM_RawField> &, pressure_pyramid,
429 void buildCoarsePressurePartial(
UT_Array<SIM_RawField> &pressure_pyramid,
430 const UT_FaceGradedOctreeLabels &octree_labels,
435 pressure.shouldMultiThread(),
437 Vector &, solution_vector,
438 const SIM_RawField &, pressure,
439 const SIM_RawIndexField &, liquid_cell_indices)
441 void applyWarmStartPartial(Vector &solution_vector,
442 const SIM_RawField &pressure,
443 const SIM_RawIndexField &liquid_cell_indices,
447 struct OctreeSystemParms
449 OctreeSystemParms(
const SIM_RawField **cutcell_weights,
450 const SIM_RawField *boundary_weights,
451 const SIM_RawField &density,
452 const SIM_RawField &surface,
453 const SIM_VectorField *surface_weights)
454 : m_cutcell_weights(cutcell_weights)
455 , m_boundary_weights(boundary_weights)
458 , m_surface_weights(surface_weights)
461 const SIM_RawField **m_cutcell_weights;
462 const SIM_RawField *m_boundary_weights;
463 const SIM_RawField &m_density;
464 const SIM_RawField &m_surface;
465 const SIM_VectorField *m_surface_weights;
469 liquid_cell_indices[
level].shouldMultiThread(),
470 buildOctreePressureSystem,
475 const OctreeSystemParms &, octree_parms,
482 const OctreeSystemParms &octree_parms,
487 const Vector &solution_vector,
492 const
int level) const;
495 pressure.shouldMultiThread(),
496 dampedJacobiSmoother,
498 const SIM_RawField &, temp_pressure,
502 void dampedJacobiSmootherPartial(SIM_RawField &pressure,
503 const SIM_RawField &temp_pressure,
504 const SIM_RawField &divergence,
508 void tiledGaussSeidelSmoother(SIM_RawField &pressure,
509 const SIM_RawField &divergence,
511 const
bool apply_odd_tiles,
512 const
bool apply_forward_iteration) const;
514 void applyOutputPressure(SIM_RawField &pressure,
515 const SIM_RawField &source_pressure,
519 valid_faces.shouldMultiThread(),
520 applyRegularGridPressure,
521 SIM_RawField &, velocity,
522 const SIM_RawField &, pressure,
523 const SIM_RawField &, valid_faces,
525 const SIM_RawField & ,density,
527 const SIM_RawField *, boundary_weights,
531 void applyRegularGridPressurePartial(SIM_RawField &velocity,
532 const SIM_RawField &pressure,
533 const SIM_RawField &valid_faces,
534 const SIM_RawField &surface,
535 const SIM_RawField &density,
536 const SIM_RawIndexField ®ular_liquid_cell_labels,
537 const SIM_RawField *boundary_weights,
538 const SIM_VectorField *surface_weights,
#define DECLARE_STANDARD_GETCASTTOTYPE()
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
#define THREADED_METHOD4_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4)
#define SIM_NAME_TOLERANCE
#define THREADED_METHOD9_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6, PARMTYPE7, PARMNAME7, PARMTYPE8, PARMNAME8, PARMTYPE9, PARMNAME9)
#define GET_DATA_FUNC_V3(DataName, FuncName)
GT_API const UT_StringHolder time
#define GAS_NAME_USETIMESTEP
virtual bool solveGasSubclass(SIM_Engine &engine, SIM_Object *obj, SIM_Time time, SIM_Time timestep)=0
#define THREADED_METHOD5_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5)
#define DECLARE_DATAFACTORY(DataClass, SuperClass, Description, DopParms)
#define GET_DATA_FUNC_I(DataName, FuncName)
#define THREADED_METHOD7_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3, PARMTYPE4, PARMNAME4, PARMTYPE5, PARMNAME5, PARMTYPE6, PARMNAME6, PARMTYPE7, PARMNAME7)
#define THREADED_METHOD2_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2)
#define GET_DATA_FUNC_B(DataName, FuncName)
THREADED_METHOD6_CONST(GAS_SubSolver, gdp->getNumPoints() > 2048, applyForces, GU_Detail *, gdp, const GA_PointGroup *, ptgrp, SIM_Time, timestep, bool, densityscale, bool, doorient, bool, updatepos) void applyForcesPartial(GU_Detail *gdp
#define GET_DATA_FUNC_F(DataName, FuncName)
This class holds a three dimensional scalar field.
#define GAS_NAME_TIMESCALE
#define THREADED_METHOD3_CONST(CLASSNAME, DOMULTI, METHOD, PARMTYPE1, PARMNAME1, PARMTYPE2, PARMNAME2, PARMTYPE3, PARMNAME3)
This class holds a three dimensional vector field.
bool shouldMultiThread(const SIM_RawField *field) const
UT_VoxelArrayF UT_VoxelArrayF & field