Config-Visualizer for a unidirectional coupling


I have installed the config-visualizer and it works fine for the config files provided in the preCICE examples. However, when I want to display a modified config file of a unidirectional coupling (FSI), I get an error.

Specifically, I have modified a config file according to these instructions: How to configure one-way coupling - #2 by Makis
My config file now looks like this

<?xml version="1.0" encoding="UTF-8" ?>
<mesh name="Fluid-Mesh-Faces">
  <use-data name="Force" />

<mesh name="Solid-Mesh">
  <use-data name="Force" />

<participant name="Fluid">
  <use-mesh name="Solid-Mesh" from="Solid" />
  <use-mesh name="Fluid-Mesh-Faces" provide="yes" />
  <write-data name="Force" mesh="Fluid-Mesh-Faces" />
    constraint="conservative" />

<participant name="Solid">
  <use-mesh name="Solid-Mesh" provide="yes" />
  <use-mesh name="Fluid-Mesh-Faces" from="Fluid" />
  <read-data name="Force" mesh="Solid-Mesh" />
  <watch-point mesh="Solid-Mesh" name="flap-midpoint" coordinate="118.917;6.79;9.067" />
  <watch-integral mesh="Solid-Mesh" name="flap-integral" scale-with-connectivity="no"/>

<m2n:sockets from="Fluid" to="Solid" exchange-directory=".." />

  <time-window-size value="0.001" />
  <max-time value="10" />
  <participants first="Fluid" second="Solid" />
  <exchange data="Force" mesh="Solid-Mesh" from="Fluid" to="Solid" />

After using the command

precice-config-visualizer-gui precice-config.xml

I get this terminal output

UnboundLocalError: local variable ‘read’ referenced before assignment

Any idea how to fix this?


I think you have to define the data field additionally with something like

<data:scalar name="{string}"/>


<data:vector name="{string}"/>

see XML reference. You can also have a look at the example (at the bottom) from the tutorial.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.