tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Nutils code in prependicular-flap/fluid-nutils does not work for Nutils v7.0

Open IshaanDesai opened this issue 3 years ago • 9 comments

  • Tutorials state (last commit / release): https://github.com/precice/tutorials/tree/d2c70c09e6ae50c2a586edfe9008730902ebb980
  • Versions of solvers and adapters used: Nutils v7.0a0
  • preCICE version: v2.2.1

The Nutils code in perpendicular-flap/fluid-nutils does not work and produces the following error:

Traceback (most recent call last):
  File "fluid.py", line 13, in <module>
    @function.replace
AttributeError: module 'nutils.function' has no attribute 'replace'

Nutils was installed by cloning the repository from GitHub and running python3 -m pip install --user .

IshaanDesai avatar Jun 08 '21 10:06 IshaanDesai

The tutorial only works with the latest Nutils release, v6. For Nutils develop (v7), the tutorial needs some updating.

python3 -m pip install --user https://github.com/evalf/nutils/archive/master.zip

uekerman avatar Jun 08 '21 11:06 uekerman

he tutorial only works with the latest Nutils release, v6. For Nutils develop (v7), the tutorial needs some updating.

Okay, that explains it. I will take care of the update as the new release comes in.

IshaanDesai avatar Jun 08 '21 11:06 IshaanDesai

Nutils v7.0 has been released and hence this issue is now relevant

IshaanDesai avatar Jan 02 '22 16:01 IshaanDesai

Some comment @gertjanvanzwieten wrote to me a while back

Actually, in master we extended to solver methods to accept multiple targets & residuals, which means we don't have to chain anymore, which also means dofs don't need to be vectors anymore; instead we can define u_i = basis_n ?udofs_ni, which simplifies things considerably. As soon as we release v7, I propose to rework this example to the new form so it becomes insensitive to things like dof ordering that really shouldn't reach the surface at any point.

uekerman avatar Jan 04 '22 21:01 uekerman

Let's document which tutorials version requires which Nutils version on https://precice.org/adapter-nutils.html

uekerman avatar Jan 04 '22 21:01 uekerman

I'd be happy to help port things over to Nutils 7 if that's welcome.

gertjanvanzwieten avatar Jan 05 '22 11:01 gertjanvanzwieten

Any help would be much appreciated :hugs:

Relevant codes are:

uekerman avatar Jan 05 '22 12:01 uekerman

Cool, I'll try to look into it this week still

gertjanvanzwieten avatar Jan 05 '22 12:01 gertjanvanzwieten

I added an overview of the current support state in https://github.com/precice/precice.github.io/pull/228. The main script we still need to port is https://github.com/precice/tutorials/blob/develop/perpendicular-flap/fluid-nutils/fluid.py

(thanks for all the help already in the other scripts! :hugs:)

MakisH avatar Nov 21 '22 19:11 MakisH

I think that we can close this, now that we install Nutils separately for each tutorial.

MakisH avatar Apr 16 '24 12:04 MakisH