Hi, everyone) I don't want to set up a separate topic, so I'll leave a couple of sentences about Mesh.with_subdomains.
The current signature is:
def with_subdomains(self, subdomains: Dict[str, Callable[[ndarray], ndarray]]):
"""Return a copy of the mesh with named subdomains.
Parameters
----------
boundaries
A dictionary of lambda functions with the names of the subdomains
as keys. The midpoint of the element should return ``True`` for
the corresponding lambda function if the element belongs to the
subdomain.
"""
return replace(
self,
_subdomains={
**({} if self._subdomains is None else self._subdomains),
**{name: (self.elements_satisfying(test)
if callable(test) else test)
for name, test in subdomains.items()},
},
)
In the docstring, 'boundaries' should be replaced with 'subdomains'.
This function is similar to with_boundaries, so:
2.1 Perhaps the following signature should be defined:
Hi, everyone) I don't want to set up a separate topic, so I'll leave a couple of sentences about Mesh.with_subdomains.
The current signature is:
2.2 Make changes to the Parameters description: " Parameters
"
Originally posted by @valvikby in https://github.com/kinnala/scikit-fem/discussions/1093#discussioncomment-9781255