Skip to content

Adding polylog #4134

Open
Open
@cwangaw

Description

@cwangaw

Describe the current issue
According to Prof. Cotter, it is desired to add more special functions.

Describe the solution you'd like
So, it would be great if we can have the polylog function.

Describe alternatives you've considered
I am currently using the mpmath package

def polylog(s,u):
   '''
      usage: given a function u(x), it returns a function f = polylog(s,u(x)) 
             defined in the same finite element space
   '''
   V = u.function_space()
   eval = [float(np.real(mpmath.polylog(s,float(val)))) for val in u.dat.data[:]]
   f = Function(V)
   f.dat.data[:] = eval

   return f

Additional info
https://firedrakeproject.slack.com/archives/C1Q0Y6H8A/p1742408527898489

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions