field_gradient_scalar error
Posted: Fri Mar 23, 2018 12:08 pm
Hello,
I would like to add a source term (to a user defined scalar) being the gradient of a given quantity.
In the cs_user_source_terms.f90, I wrote:
Where "term_grad" is an additional field I created.
The compilation gives me the following error:
cs_user_source_terms.f90:(.text+0x3a7): undefined reference to `field_gradient_scalar_'
collect2: error: ld returned 1 exit status
Do you have any idea of the problem?
Many thanks in advance.
Best regards,
Daniele
I would like to add a source term (to a user defined scalar) being the gradient of a given quantity.
In the cs_user_source_terms.f90, I wrote:
Code: Select all
allocate(grad(3,ncelet))
allocate(wtest(ncel))
allocate(term(ncel))
do iel = 1, ncel
wtest(iel) = 0.1d0
term(iel) = cpro_crom(iel)*wtest(iel)
enddo
call field_get_val_s_by_name('term_grad', grad_term)
do iel = 1, ncel
grad_term(iel) = term(iel)
enddo
call field_get_id('term_grad',f_id)
inc = 1
iccocg = 1
call field_gradient_scalar(f_id, 0, imrgra, inc, iccocg, grad)
do iel = 1, ncel
crvexp(iel)=grad(1,iel)
enddo
deallocate...
The compilation gives me the following error:
cs_user_source_terms.f90:(.text+0x3a7): undefined reference to `field_gradient_scalar_'
collect2: error: ld returned 1 exit status
Do you have any idea of the problem?
Many thanks in advance.
Best regards,
Daniele