Hello,
I could like to compute scalar Laplacian, so a divergence of a gradient of a scalar field (div(grad(X))).
I found a way to compute the gradient with field_gradient_scalar subroutine.
But I can't found the way to compute a divergence or directly a laplacian.
Is there someone who can give me tips about it?
Best regards
Camille Barnaud.
Divergence of a gradient
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Divergence of a gradient
Hello,
In the sources, in src/alge, you will find some functions that may help in cs_divergence.c/h.
You may see how it is used for example in src/turb/cs_les_balance.c. (which also includes a _les_balance_laplacian function).
Hoping it helps. I am not an expert in those parts of the code (I simply have an idea of what to search for using "grep").
Best regards,
Yvan
In the sources, in src/alge, you will find some functions that may help in cs_divergence.c/h.
You may see how it is used for example in src/turb/cs_les_balance.c. (which also includes a _les_balance_laplacian function).
Hoping it helps. I am not an expert in those parts of the code (I simply have an idea of what to search for using "grep").
Best regards,
Yvan
Re: Divergence of a gradient
Hello,
Thank you for your answer.
I'm sorry but the file src/turb/cs_les_balance.c doesn't exist on my version (CS 6.0.0), so neither the laplacian function.
I used the grep tip and I got the file cs_divergence.c/h too but the use of theses functions didn't fit my needs (if I trust Doxygen's documentation).
Thank you for trying to help me, I will find another way to compute my equation.
Best regards,
Camille Barnaud.
Thank you for your answer.
I'm sorry but the file src/turb/cs_les_balance.c doesn't exist on my version (CS 6.0.0), so neither the laplacian function.
I used the grep tip and I got the file cs_divergence.c/h too but the use of theses functions didn't fit my needs (if I trust Doxygen's documentation).
Thank you for trying to help me, I will find another way to compute my equation.
Best regards,
Camille Barnaud.