# Path: discretize/tests.py
# def setup_mesh(mesh_type, nC, nDim):
#         def function(cell):
#     def setupMesh(self, nC):
#     def getError(self):
#     def orderTest(self):
# def rosenbrock(x, return_g=True, return_H=True):
# def check_derivative(
#     fctn,
#     x0,
#     num=7,
#     plotIt=True,
#     dx=None,
#     expectedOrder=2,
#     tolerance=0.85,
#     eps=1e-10,
#     ax=None,
# ):
#     def l2norm(x):
#     def plot_it(ax):
# def get_quadratic(A, b, c=0):
#     def Quadratic(x, return_g=True, return_H=True):
#             X, Y = example_curvilinear_grid([nC, nC], kwrd)
#             X, Y, Z = example_curvilinear_grid([nC, nC, nC], kwrd)
#     H = sp.csr_matrix(
#         np.array(
#             [[-400 * x[1] + 1200 * x[0] ** 2 + 2, -400 * x[0]], [-400 * x[0], 200]]
#         )
#     )
#     E0 = np.ones(h.shape)
#     E1 = np.ones(h.shape)
#             H = A
# class OrderTest(unittest.TestCase):


import discretize
import numpy as np
import sympy
import unittest
import scipy.sparse as sp
from discretize import tests
from sympy.abc import r, t, z
        print(
            " Analytic: {analytic}, Numeric: {numeric}, "
            "ratio (num/ana): {ratio}".format(
                analytic=ans, numeric=numeric_ans, ratio=float(numeric_ans) / ans
            )
        )
        assert np.abs(ans - numeric_ans) < TOL

    def test_EdgeInnerProductDiagAnisotropic(self):
        # Here we will make up some j vectors that vary in space
        # h = [h_t] - to test edge inner products

        fcts = EdgeInnerProductFunctionsDiagAnisotropic()

        sig, hv = fcts.vectors(self.mesh)
        MeSig = self.mesh.getEdgeInnerProduct(sig)
        numeric_ans = hv.T.dot(MeSig.dot(hv))

        ans = fcts.sol()

        print("------ Testing Edge Inner Product Anisotropic -----------")
        print(
            " Analytic: {analytic}, Numeric: {numeric}, "
            "ratio (num/ana): {ratio}".format(
                analytic=ans, numeric=numeric_ans, ratio=float(numeric_ans) / ans
            )
        )
        assert np.abs(ans - numeric_ans) < TOL



# Path: discretize/tests.py
# def setup_mesh(mesh_type, nC, nDim):
#         def function(cell):
#     def setupMesh(self, nC):
#     def getError(self):
#     def orderTest(self):
# def rosenbrock(x, return_g=True, return_H=True):
# def check_derivative(
#     fctn,
#     x0,
#     num=7,
#     plotIt=True,
#     dx=None,
#     expectedOrder=2,
#     tolerance=0.85,
#     eps=1e-10,
#     ax=None,
# ):
#     def l2norm(x):
#     def plot_it(ax):
# def get_quadratic(A, b, c=0):
#     def Quadratic(x, return_g=True, return_H=True):
#             X, Y = example_curvilinear_grid([nC, nC], kwrd)
#             X, Y, Z = example_curvilinear_grid([nC, nC, nC], kwrd)
#     H = sp.csr_matrix(
#         np.array(
#             [[-400 * x[1] + 1200 * x[0] ** 2 + 2, -400 * x[0]], [-400 * x[0], 200]]
#         )
#     )
#     E0 = np.ones(h.shape)
#     E1 = np.ones(h.shape)
#             H = A
# class OrderTest(unittest.TestCase):


# Path: tests/cyl/test_cyl_innerproducts.py
import discretize
import numpy as np
import sympy
import unittest
import scipy.sparse as sp
from discretize import tests
from sympy.abc import r, t, z

        print(
            " Analytic: {analytic}, Numeric: {numeric}, "
            "ratio (num/ana): {ratio}".format(
                analytic=ans, numeric=numeric_ans, ratio=float(numeric_ans) / ans
            )
        )
        assert np.abs(ans - numeric_ans) < TOL

    def test_EdgeInnerProductDiagAnisotropic(self):
        # Here we will make up some j vectors that vary in space
        # h = [h_t] - to test edge inner products

        fcts = EdgeInnerProductFunctionsDiagAnisotropic()

        sig, hv = fcts.vectors(self.mesh)
        MeSig = self.mesh.getEdgeInnerProduct(sig)
        numeric_ans = hv.T.dot(MeSig.dot(hv))

        ans = fcts.sol()

        print("------ Testing Edge Inner Product Anisotropic -----------")
        print(
            " Analytic: {analytic}, Numeric: {numeric}, "
            "ratio (num/ana): {ratio}".format(
                analytic=ans, numeric=numeric_ans, ratio=float(numeric_ans) / ans
            )
        )
        assert np.abs(ans - numeric_ans) < TOL



class TestCylFaceInnerProducts_Order(tests.OrderTest):