Description
I need help setting the user-parameters for mapping between matching meshes.
Scope
I need to do a mapping between perfectly matching meshes (they are the same mesh). Using a json like:
mapper_parameters = KratosMultiphysics.Parameters("""{
"mapper_type": "nearest_neighbor",
"echo_level" : 0
}""")
the computed radius is really high (around 37), and the process seems hanging indefinitely. I guess I have a search radius really high since my maximum mesh size is around 15. On the other hand, my minimal mesh size is 0.002. The mesh has around 25k nodes and its dimensions are 275x150.
On the other hand, if I use
mapper_parameters = KratosMultiphysics.Parameters("""{
"mapper_type": "nearest_neighbor",
"echo_level" : 0,
"search_radius" : 1.0
}""")
the process is quite fast.
I was wondering if, having perfectly matching meshes, it is safe reducing the search radius. Is it possible to reduce it even more? What else can I reduce (approximation_tolerance, search_iterations,etc.)?
I also noted that such parameters (search_radius,search_iterations,etc.) are not present in the new README, and also some flags (that I use in another project) are missing: TO_NON_HISTORICAL,FROM_NON_HISTORICAL. Is there any reason?
Additional info
I have looked in the README and I have not found the answers. Thanks for your help.
I assign @philbucher since I think you are the main developer of the MappingApplication. Please assign someone else if you think it is needed.
Hi @riccardotosi ,
Thanks for the input.
first some general info:
Let me answer your questions one by one:
InverseMap is not working properly :sweat_smile: I just created #7241 to make it visible for others what I am planning with the app in the near future
please let me know if you have further questions
Hi @philbucher.
Is it possible that you have only nodes in your mesh? If so then the computed search radius will be much (much!) larger in order to find everything. You would get a warning with higher echo levels
Running with echo_level=3 the only output messages are
Mapper: Main ModelPart used for origin-ModelPart
Mapper: Main ModelPart used for destination-ModelPart
If you have a matching mesh then you can make the search radius very small
Thanks, I will reduce the search_radius.
Is there any other parameter you suggest to play with?
Hi @riccardotosi
Ok if you don't get any messages saying that some neighbors were not found then you are good, then the only parameter to play is to reduce the search_radius
I will tag you once I have new developments in this direction for testing :)
Thanks @philbucher!
@riccardotosi could you share your mdpa files?
I would like to take a closer look to see what is hapening
Here you have it.
thx!
@riccardotosi which Modelparts did you use for the mapper?
I use the main model part.
I checked now in detail, the relation largest to smallest element edge is 25000! => I.e. it is extremely heterogenous.
I will think of a way to improve the computation of the search radius, but this is in any case not trivial :sweat_smile: