I first create a nested rectangles with a subdomain by using
# Create outer rectangle domain
domain = mesh.create_rectangle(
comm=MPI.COMM_WORLD,
points=((0.0, 0.0), (0.4, 0.4)),
n=(32, 32)
)
def inner_domain(x):
return np.logical_and(
np.logical_and(x[0] >= 0.1, x[0] <= 0.3),
np.logical_and(x[1] >= 0.15, x[1] <= 0.25)
)
dim = domain.topology.dim
domain.topology.create_entities(dim)
inner_cells = mesh.locate_entities(domain, dim, inner_domain)
# Create default values for all cells
num_cells = domain.topology.index_map(dim).size_local
markers_array = np.zeros(num_cells, dtype=np.int32)
# Set values for inner domain cells
markers_array[inner_cells] = 1
# Create MeshTags object
markers = mesh.meshtags(domain, dim, np.arange(num_cells), markers_array)
return domain, markers
then I want to define dx and dx_s on the whole domain and the subdomain, and I also want to create form contains the subtraction between the integral on the whole domain and the integral on the subdomain, could you please recommend some documents that contains such things