def setupPDE_vector_calculus(gridSize, equation): pde = PDE(gridSize, gridSize) pde.setEquationExpression(PDEExpressionType.VECTOR_CALCULUS, equation) pde.setVectorVariable("r", dimension=2) pde.configureGrid() return pde
def setupPDE_vector_calculus(): # 3. Equation as vector calculus without aux function eps pde = PDE(64.0, 64.0) pde.setEquationExpression(PDEExpressionType.VECTOR_CALCULUS, "div(grad( u(r) ))") pde.setVectorVariable("r", dimension=2) pde.configureGrid() return pde
def setupPDE_vector_calculus_with_eps(): # 4. Equation as vector calculus with aux function eps pde = PDE(64.0, 64.0) pde.setEquationExpression(PDEExpressionType.VECTOR_CALCULUS, "div(eps(r) * grad( u(r) ))") pde.setVectorVariable("r", dimension=2) pde.setAuxiliaryFunctions({'eps': eps}) pde.configureGrid() return pde