| 440 | } // computeHeavisideIntegrals2PhaseFlows |
| 441 | |
| 442 | std::vector<double> |
| 443 | computeHeavisideIntegrals3PhaseFlows(const LevelSetContainer& lsc) |
| 444 | { |
| 445 | const double ncells = lsc.getInterfaceHalfWidth(); |
| 446 | Pointer<AdvDiffHierarchyIntegrator> adv_diff_integrator = lsc.getAdvDiffHierarchyIntegrator(); |
| 447 | Pointer<PatchHierarchy<NDIM>> patch_hier = adv_diff_integrator->getPatchHierarchy(); |
| 448 | Pointer<HierarchyMathOps> hier_math_ops = adv_diff_integrator->getHierarchyMathOps(); |
| 449 | |
| 450 | // NOTE: In practice the level set mass is computed after integrating the hierarchy. Hence the application time |
| 451 | // would be the new time and the variable context would be the current context. |
| 452 | VariableDatabase<NDIM>* var_db = VariableDatabase<NDIM>::getDatabase(); |
| 453 | const int fluid_ls_idx = |
| 454 | var_db->mapVariableAndContextToIndex(lsc.getLevelSetVariable(0), adv_diff_integrator->getCurrentContext()); |
| 455 | const int solid_ls_idx = |
| 456 | var_db->mapVariableAndContextToIndex(lsc.getLevelSetVariable(1), adv_diff_integrator->getCurrentContext()); |
| 457 | |
| 458 | std::vector<double> integrals = compute_heaviside_integrals(hier_math_ops, fluid_ls_idx, solid_ls_idx, ncells); |
| 459 | |
| 460 | return integrals; |
| 461 | } // computeHeavisideIntegrals3PhaseFlows |
| 462 | |
| 463 | void |
| 464 | setLSDataPatchHierarchy(int ls_idx, |
no test coverage detected