MCPcopy Create free account
hub / github.com/IBAMR/IBAMR / computeHeavisideIntegrals3PhaseFlows

Function computeHeavisideIntegrals3PhaseFlows

src/level_set/LevelSetUtilities.cpp:442–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440} // computeHeavisideIntegrals2PhaseFlows
441
442std::vector<double>
443computeHeavisideIntegrals3PhaseFlows(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
463void
464setLSDataPatchHierarchy(int ls_idx,

Callers 1

mainFunction · 0.85

Calls 7

getInterfaceHalfWidthMethod · 0.80
getLevelSetVariableMethod · 0.80
getCurrentContextMethod · 0.80
getPatchHierarchyMethod · 0.45
getHierarchyMathOpsMethod · 0.45

Tested by

no test coverage detected