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

Method rot

ibtk/src/math/PatchMathOps.cpp:2146–2256  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2144} // curl
2145
2146void
2147PatchMathOps::rot(Pointer<SideData<NDIM, double>> dst,
2148 const Pointer<NodeData<NDIM, double>> src,
2149 const Pointer<Patch<NDIM>> patch,
2150 CartSideRobinPhysBdryOp* bc_op,
2151 const double fill_time) const
2152{
2153#if (NDIM != 2)
2154 TBOX_ERROR("PatchMathOps::rot():\n"
2155 << " not implemented for NDIM != 2" << std::endl);
2156 NULL_USE(dst);
2157 NULL_USE(src);
2158 NULL_USE(patch);
2159 NULL_USE(bc_op);
2160 NULL_USE(fill_time);
2161#endif
2162#if (NDIM == 2)
2163 const Pointer<CartesianPatchGeometry<NDIM>> pgeom = patch->getPatchGeometry();
2164 const double* const dx = pgeom->getDx();
2165
2166 double* const w0 = dst->getPointer(0);
2167 double* const w1 = dst->getPointer(1);
2168 const int w_ghosts = (dst->getGhostCellWidth()).max();
2169
2170 const double* const u0 = src->getPointer(0);
2171 const int u_ghosts = (src->getGhostCellWidth()).max();
2172
2173 const Box<NDIM>& patch_box = patch->getBox();
2174
2175#if !defined(NDEBUG)
2176 if (w_ghosts != (dst->getGhostCellWidth()).min())
2177 {
2178 TBOX_ERROR("PatchMathOps::rot():\n"
2179 << " dst does not have uniform ghost cell widths" << std::endl);
2180 }
2181
2182 if (u_ghosts != (src->getGhostCellWidth()).min())
2183 {
2184 TBOX_ERROR("PatchMathOps::rot():\n"
2185 << " src does not have uniform ghost cell widths" << std::endl);
2186 }
2187
2188 if (src == dst)
2189 {
2190 TBOX_ERROR("PatchMathOps::rot():\n"
2191 << " src == dst." << std::endl);
2192 }
2193
2194 if (patch_box != dst->getBox())
2195 {
2196 TBOX_ERROR("PatchMathOps::rot():\n"
2197 << " dst and src must live on the same patch" << std::endl);
2198 }
2199
2200 if (patch_box != src->getBox())
2201 {
2202 TBOX_ERROR("PatchMathOps::rot():\n"
2203 << " dst and src must live on the same patch" << std::endl);

Callers

nothing calls this directly

Calls 4

curlMethod · 0.95
getDepthMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected