Skip to content

Commit

Permalink
#81: Drop test.monitors; apply removestar
Browse files Browse the repository at this point in the history
  • Loading branch information
jwallwork23 committed Apr 23, 2024
1 parent 4acf8e6 commit 756e491
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 17 deletions.
15 changes: 0 additions & 15 deletions test/monitors.py

This file was deleted.

28 changes: 26 additions & 2 deletions test/test_monge_ampere.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,32 @@
import numpy as np
import pytest
from monitors import *
from firedrake import (
Constant,
DirichletBC,
File,
SpatialCoordinate,
UnitCubeMesh,
UnitSquareMesh,
assemble,
ds,
)
from ufl import as_vector, cosh, dot

from movement import *
from movement import MongeAmpereMover


def const_monitor(mesh):
return Constant(1.0)


def ring_monitor(mesh):
alpha = Constant(10.0) # amplitude
beta = Constant(200.0) # width
gamma = Constant(0.15) # radius
dim = mesh.geometric_dimension()
xyz = SpatialCoordinate(mesh) - as_vector([0.5] * dim)
r = dot(xyz, xyz)
return Constant(1.0) + alpha / cosh(beta * (r - gamma)) ** 2


@pytest.fixture(params=["relaxation", "quasi_newton"])
Expand Down

0 comments on commit 756e491

Please sign in to comment.