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

Function computeHeavisideIntegrals2PhaseFlows

src/level_set/LevelSetUtilities.cpp:422–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

420} // fixMassLoss3PhaseFlows
421
422std::vector<double>
423computeHeavisideIntegrals2PhaseFlows(const LevelSetContainer& lsc)
424{
425 const double ncells = lsc.getInterfaceHalfWidth();
426 Pointer<AdvDiffHierarchyIntegrator> adv_diff_integrator = lsc.getAdvDiffHierarchyIntegrator();
427 Pointer<PatchHierarchy<NDIM>> patch_hier = adv_diff_integrator->getPatchHierarchy();
428 Pointer<HierarchyMathOps> hier_math_ops = adv_diff_integrator->getHierarchyMathOps();
429
430 // NOTE: In practice the level set mass is computed after integrating the hierarchy. Hence the application time
431 // would be the new time and the variable context would be the current context.
432 VariableDatabase<NDIM>* var_db = VariableDatabase<NDIM>::getDatabase();
433 const int ls_idx =
434 var_db->mapVariableAndContextToIndex(lsc.getLevelSetVariable(), adv_diff_integrator->getCurrentContext());
435
436 std::vector<double> integrals = compute_heaviside_integrals(hier_math_ops, ls_idx, ncells);
437
438 return integrals;
439
440} // computeHeavisideIntegrals2PhaseFlows
441
442std::vector<double>
443computeHeavisideIntegrals3PhaseFlows(const LevelSetContainer& lsc)

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected