avail a user created field for post processing

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
sofenkumarjena
Posts: 35
Joined: Thu May 19, 2022 4:37 pm

avail a user created field for post processing

Post by sofenkumarjena »

I have created a field using the function cs_field_create("xyz", field_type, CS_MESH_LOCATION_CELLS, 6, has_previous); in cs_user_parameters.c file. I can able to access the field in cs_user_source_terms.c file and perform necessary computation. However at the end of the run, these fields are not available for post processing in para view. To avail these field for post processing, I used the following functions.

const int k_post = cs_field_key_id("xyz");
cs_field_t *f1 = cs_field_by_name("xyz");
cs_field_set_key_int_bits(f1, k_post, CS_POST_ON_LOCATION);

In which field I can use these function to avail the desired field for processioning ? A minimal working example will be helpful.

With Regards
Sofen
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: avail a user created field for post processing

Post by Yvan Fournier »

Hello,

Your value of k_post is wrong. You need to use an existing (and appropriate) key. So you need to use "post_vis".

I already provided an example to you in an answer on your previous thread.

Regards,

Yvan
Post Reply