Closed riccardotosi closed 3 years ago
There are two things to comment in here.
There are two things to comment in here.
1. You are defining the materials twice (in the mdpa and in the materials.json). Hence the overwriting warning must be there in order to let the user know about which material parameters are to be used (the ones in the materials.json) since these could be different. 2. What I agree it that defining empty properties in the mdpa and then giving values in the materials.json is quite annoying. As this is always required in order to assign properties to elements in the preprocess, I'd only throw a warning if the properties in the mdpa are not empty.
+1
Hi @rubenzorrilla , I understand your point 1. However, setting empty properties does not change my issue, since the warnings appears in step 3.1. This is the sketch:
Please observe that in point 3. I am not reading again the mesh from file, but I am using the AMR model. Therefore, to the best of my understanding, the solution you propose in 2. does not work. Can you please elaborate your proposal?
Why do you re-read the properties? If you already defined them then re reading them will lead to warnings, which should be like that
Why do you re-read the properties? If you already defined them then re reading them will lead to warnings, which should be like that
Because in a Multilevel Monte Carlo algorithm you solve your problem on levels of different accuracy, namely multiple meshes. Then, you first run on the coarsest level, then you refine, then you solve the problem on the AMR mesh.
I agree that not re-reading properties would solve my issue, but I do not see this possibility in the solver I am using.
Then the solver should be modified accordingly I do not agree about removing the warnings, those were added for a reason and must be printed in the standard workflow
I do not agree about removing the warnings, those were added for a reason and must be printed in the standard workflow
Hi @philbucher, I am not commenting to remove the warnings from the core utility.
I am reporting an issue I have, and maybe some feature to solve my problem is already present in Kratos. If nothing is present in Kratos, also to me the easier solution is to modify the solvers of the applications I am using. But would this be a good solution?
Ah sorry then I misunderstood
no also to my knowledge there is nothing that you could directly use
Ok. If @rubenzorrilla and @loumalouomega agree, I will implement specific changes directly in the solver.
In structual it is already possible not to read materials if you leave the materials file name empty it will do nothing
I would use the same concept to have it consistent
Now that you mention, also the convection diffusion solver offers this possibility in here. I will try to use this feature!
Now that you mention, also the convection diffusion solver offers this possibility in here. I will try to use this feature!
for once copy-paste payed off :D
After discussing in #8336, the solution to remove warnings as
[WARNING] ReadMaterialsUtility: WARNING:: The properties ID: 0 in mesh ID: 0 is already defined. This will overwrite the existing values
is to use empty properties in the mdpa
and to define properties in the material file with different property Id.
As discussed in this issue, to remove warnings as
[WARNING] ReadMaterialsUtility: The properties ID: 1 already has CONDUCTIVITY.
Overwriting 1 with 1
[WARNING] ReadMaterialsUtility: The properties ID: 1 already has DENSITY.
Overwriting 1 with 1
[WARNING] ReadMaterialsUtility: The properties ID: 1 already has SPECIFIC_HEAT.
Overwriting 1 with 1
it is enough to use of ""
as materials filename.
The issue will be closed when #8335 is merged.
Description I am running the following case:
Starting from stage 3., many warnings as
appear. This becomes quite annoying for my application of interest, since the workflow is repeated multiple times. Is there a way to avoid the printing of such warnings?
I already know that I could set
but this does not work in my case.
I attach a zip folder with a simplified case. It only requires the
ConvectionDiffusionApplication
to be reproduced. As you may observe, when running the problem a second time (i.e. step 3.), the warnings appear. test_read_materials.zipScope Which areas of Kratos are involved E.g.