Read tables at initial stage (Time=0) #11037
mnabideltares
started this conversation in
General
Replies: 1 comment
-
Hello, unfortunately tables are not automatic (this is an eternal discussion), doing that implies a penalty in performance. So you need to check that the table is defined and then retrieve values from the table. Example: double temp = 275;
if (rModelPart.GetProperties(0).HasTable(TEMPERATURE, DENSITY)) {
auto& r_table = rModelPart.GetProperties(0).GetTable(TEMPERATURE, DENSITY);
return r_table.GetValue(temp)
} else {
return rModelPart.GetProperties(0)[DENSITY];
} Related with #10916 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have tables in the MDPA file and I need to read them. It is required to my implementation to access the initial values of that tables, namely at time=0 before I start the time steps. I used the following statement in the "Initialize" stage, but it returned only zero's
I tried to read them during the first time step in "InitializeSolutionStep"
However, I still get zero's, and it seems the values are totally not read at time=0.
Do you have any suggestion how to read the values from a table at time=0?
Thank you very much.
Beta Was this translation helpful? Give feedback.
All reactions