| 2345 | } // midpointStep |
| 2346 | |
| 2347 | void |
| 2348 | ConstraintIBMethod::copyFluidVariable(int copy_from_idx, int copy_to_idx) |
| 2349 | { |
| 2350 | const int coarsest_ln = 0; |
| 2351 | const int finest_ln = d_hierarchy->getFinestLevelNumber(); |
| 2352 | |
| 2353 | for (int ln = coarsest_ln; ln <= finest_ln; ++ln) |
| 2354 | { |
| 2355 | Pointer<PatchLevel<NDIM>> level = d_hierarchy->getPatchLevel(ln); |
| 2356 | if (!level->checkAllocated(copy_to_idx)) level->allocatePatchData(copy_to_idx); |
| 2357 | } |
| 2358 | |
| 2359 | SAMRAIVectorReal<NDIM, double> u_from(d_object_name + "from", d_hierarchy, coarsest_ln, finest_ln); |
| 2360 | SAMRAIVectorReal<NDIM, double> u_to(d_object_name + "to", d_hierarchy, coarsest_ln, finest_ln); |
| 2361 | |
| 2362 | u_from.addComponent(d_u_fluidSolve_var, copy_from_idx, d_wgt_sc_idx); |
| 2363 | u_to.addComponent(d_u_fluidSolve_var, copy_to_idx, d_wgt_sc_idx); |
| 2364 | |
| 2365 | u_to.copyVector(Pointer<SAMRAIVectorReal<NDIM, double>>(&u_from, false)); |
| 2366 | |
| 2367 | using InterpolationTransactionComponent = IBTK::HierarchyGhostCellInterpolation::InterpolationTransactionComponent; |
| 2368 | std::vector<InterpolationTransactionComponent> transaction_comps; |
| 2369 | InterpolationTransactionComponent component(copy_to_idx, |
| 2370 | DATA_REFINE_TYPE, |
| 2371 | USE_CF_INTERPOLATION, |
| 2372 | SIDE_DATA_COARSEN_TYPE, |
| 2373 | BDRY_EXTRAP_TYPE, |
| 2374 | CONSISTENT_TYPE_2_BDRY, |
| 2375 | std::vector<SAMRAI::solv::RobinBcCoefStrategy<NDIM>*>(NDIM, nullptr), |
| 2376 | nullptr); |
| 2377 | transaction_comps.push_back(component); |
| 2378 | |
| 2379 | Pointer<HierarchyGhostCellInterpolation> hier_bdry_fill = new HierarchyGhostCellInterpolation(); |
| 2380 | hier_bdry_fill->initializeOperatorState(transaction_comps, d_hierarchy, coarsest_ln, finest_ln); |
| 2381 | const bool homogeneous_bc = true; |
| 2382 | hier_bdry_fill->setHomogeneousBc(homogeneous_bc); |
| 2383 | hier_bdry_fill->fillData(0.0); |
| 2384 | |
| 2385 | return; |
| 2386 | } // copyFluidVariable |
| 2387 | |
| 2388 | void |
| 2389 | ConstraintIBMethod::copyDensityVariable(int copy_from_idx, int copy_to_idx) |
nothing calls this directly
no test coverage detected