| 5845 | } // laplace |
| 5846 | |
| 5847 | void |
| 5848 | PatchMathOps::vc_laplace(Pointer<SideData<NDIM, double>> dst, |
| 5849 | const double alpha, |
| 5850 | const double beta, |
| 5851 | const Pointer<NodeData<NDIM, double>> coef1, |
| 5852 | const Pointer<SideData<NDIM, double>> coef2, |
| 5853 | const Pointer<SideData<NDIM, double>> src1, |
| 5854 | const double gamma_in, |
| 5855 | const Pointer<SideData<NDIM, double>> src2_in, |
| 5856 | const Pointer<Patch<NDIM>> patch, |
| 5857 | const bool use_harmonic_interp, |
| 5858 | const int l, |
| 5859 | const int m, |
| 5860 | const int n) const |
| 5861 | { |
| 5862 | #if (NDIM == 2) |
| 5863 | const Pointer<CartesianPatchGeometry<NDIM>> pgeom = patch->getPatchGeometry(); |
| 5864 | const double* const dx = pgeom->getDx(); |
| 5865 | |
| 5866 | double* const f0 = dst->getPointer(0, l); |
| 5867 | double* const f1 = dst->getPointer(1, l); |
| 5868 | |
| 5869 | const int f_ghosts = (dst->getGhostCellWidth()).max(); |
| 5870 | |
| 5871 | const double* const mu = coef1->getPointer(); |
| 5872 | const int mu_ghosts = (coef1->getGhostCellWidth()).max(); |
| 5873 | |
| 5874 | const int rho_varying = !(coef2.isNull()); |
| 5875 | const double* rho0 = nullptr; |
| 5876 | const double* rho1 = nullptr; |
| 5877 | const int rho_ghosts = rho_varying ? (coef2->getGhostCellWidth()).max() : 0; |
| 5878 | if (rho_varying) |
| 5879 | { |
| 5880 | rho0 = coef2->getPointer(0, m); |
| 5881 | rho1 = coef2->getPointer(1, m); |
| 5882 | } |
| 5883 | |
| 5884 | const double* const u0 = src1->getPointer(0, m); |
| 5885 | const double* const u1 = src1->getPointer(1, m); |
| 5886 | const int u_ghosts = (src1->getGhostCellWidth()).max(); |
| 5887 | |
| 5888 | const double gamma = (src2_in ? gamma_in : 0.0); |
| 5889 | const Pointer<SideData<NDIM, double>> src2 = (src2_in ? src2_in : src1); |
| 5890 | const double* const v0 = src2->getPointer(0, n); |
| 5891 | const double* const v1 = src2->getPointer(1, n); |
| 5892 | const int v_ghosts = (src2->getGhostCellWidth()).max(); |
| 5893 | |
| 5894 | const Box<NDIM>& patch_box = patch->getBox(); |
| 5895 | |
| 5896 | #if !defined(NDEBUG) |
| 5897 | if (f_ghosts != (dst->getGhostCellWidth()).min()) |
| 5898 | { |
| 5899 | TBOX_ERROR("PatchMathOps::vc_laplace():\n" |
| 5900 | << " dst does not have uniform ghost cell widths" << std::endl); |
| 5901 | } |
| 5902 | |
| 5903 | if (mu_ghosts != (coef1->getGhostCellWidth()).min()) |
| 5904 | { |
no test coverage detected