Creation of mesh groups

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
deandrade87
Posts: 13
Joined: Wed Sep 17, 2014 4:12 pm

Creation of mesh groups

Post by deandrade87 »

Hello,


is it possible to create mesh groups within the fortran part of the code? If not, is there a simple user example that explains how to build a C/fortran binding?


Thanks



Jacopo
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Creation of mesh groups

Post by Yvan Fournier »

Hello Jacopo,

No, there is no simple way to do it. Even in C, it is not trivial to do, as you need to change the indexed mesh group descriptions, then change element family numbers in the main cs_mesh_t structure.

Modifying existing group names, or merging groups is very easy to do (cs_user_mesh.c), splitting groups or building groups based on geometry is much more complicated.

In any case, you can use selection criteria with a mix of geometry and group names, but saving this as groups is more difficult.

Regards,

Yvan
deandrade87
Posts: 13
Joined: Wed Sep 17, 2014 4:12 pm

Re: Creation of mesh groups

Post by deandrade87 »

Hi Yvan,


in the fortran part of the code I have some lists of cells and I would like to postprocess them separately: basically I would like to have a writer for each list. Would it be possible without defining new groups? I fear the answer is no, but you are more expert than me and maybe you have already encountered the problem in the past.


Thank you again for your prompt answer



Jacopo
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Creation of mesh groups

Post by Yvan Fournier »

Hello Jacopo,

Yes, this is actually simple: define one postprocessing mesh for each list.
Then either assign them to a single writer and use "extract blocks" to switch betwen them, or create a separate writer for each list, and associate the mesh to its writer.

Regards,

Yvan
Post Reply