Skip to content

Conversation

Crazy-Rich-Meghan
Copy link
Contributor

Summary: Partitioned heat conduction G+Smo (IsoGeometric Analysis) participant
NOTE: G+Smo adapter is a submodule of the G+Smo library, to run the tutorial you need to configure G+Smo main library.

  • Updated README.md file, which contains instructions on how to configure G+Smo library with preCICE adapter.
  • Added gismo-executable folder to contain the symbolic link for the G+Smo executable.

This PR is marked as a draft because the documentation for the G+Smo adapter requires updates.

@fsimonis fsimonis requested a review from uekerman December 9, 2024 12:50
@uekerman
Copy link
Member

Let's first iterate on #603 and then here, OK?

@MakisH
Copy link
Member

MakisH commented Jul 17, 2025

@Crazy-Rich-Meghan do you plan to continue this development? It seems to currently be in draft state. We are happy to help get it in a good state!

@Crazy-Rich-Meghan Crazy-Rich-Meghan marked this pull request as ready for review September 10, 2025 22:21
@Crazy-Rich-Meghan
Copy link
Contributor Author

Crazy-Rich-Meghan commented Sep 10, 2025

Hi everyone,

Sorry for the delay! I have updated the partitioned heat conduction example from our side, this version supports the direct mesh access feature. To run the benchmark you need to do the following:
1. Clone G+Smo
2. cmake .. -DCMAKE_BUILD_TYPE=Release -DGISMO_OPTIONAL="gsPreCICE"
3. cmake --build build --target partitioned-heat-conduction -j 8
4. Install this example systemwide make install partitioned-heat-conduction
5. Go to the neumann-gismo folder run the Neumann participant with the run script.
6. Go to the dirichlet-gismo folder run the Dirichlet participant with the run script.

Let me know if you get stuck somewhere!

@MakisH
Copy link
Member

MakisH commented Oct 7, 2025

Hi @Crazy-Rich-Meghan,

thanks for the updates! I am now trying to build on my system, based on the stable branch (Commit ef4c754785cf4949d3a89b916eed807b74b97a9b, October 2).

I do get a building error, though (g++ (Ubuntu 12.3.0-1ubuntu1~22.04.2) 12.3.0):

[ 97%] Building CXX object optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/partitioned-heat-conduction.cpp.o
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp: In function ‘int main(int, char**)’:
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:110:17: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  110 |     for (; domIt->good(); domIt->next(), k++ )
      |                 ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:110:32: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  110 |     for (; domIt->good(); domIt->next(), k++ )
      |                                ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:15: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )
      |               ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:31: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )
      |                               ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:120:46: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  120 |     for (domIt->reset(); domIt->good(); domIt->next(), k++ )
      |                                              ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:124:29: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  124 |         QuRule->mapTo( domIt->lowerCorner(), domIt->upperCorner(),
      |                             ^~
/home/gc/repos/misc/gismo/optional/gsPreCICE/examples/partitioned-heat-conduction.cpp:124:51: error: base operand of ‘->’ has non-pointer type ‘gismo::gsBasis<double>::domainIter’ {aka ‘gismo::gsDomainIteratorWrapper<double>’}
  124 |         QuRule->mapTo( domIt->lowerCorner(), domIt->upperCorner(),
      |                                                   ^~
gmake[3]: *** [optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/build.make:76: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/partitioned-heat-conduction.cpp.o] Error 1
gmake[2]: *** [CMakeFiles/Makefile2:1940: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:1947: optional/gsPreCICE/examples/CMakeFiles/partitioned-heat-conduction.dir/rule] Error 2
gmake: *** [Makefile:907: partitioned-heat-conduction] Error 2

By the way, I edited your instructions above to add a number next to the -j flag. Without a number, it will use as many threads as parallelizable build targets, which might fill the memory completely and make a system crash.

Comment on lines +7 to +17
# Remove precice-profiling directory
if [ -d "precice-profiling" ]; then
rm -rf precice-profiling
echo "Deleted 'precice-profiling' folder."
fi

# Remove precice-run directory
if [ -d "../precice-run" ]; then
rm -rf ../precice-run
echo "Deleted 'precice-run' folder."
fi
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should be handled by clean_precice_logs(), called by clean_gismo() (see https://github.com/precice/tutorials/blob/develop/tools/cleaning-tools.sh)

Comment on lines +20 to +24
# Remove files ending with .pvd, .vts, .vtp, .log, and .txt
for ext in pvd vts vtp log txt; do
find . -type f -name "*.$ext" -exec rm -f {} \;
echo "Deleted all *.$ext files."
done
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit too intrusive (especially for the .txt files). Better do a fine-grained extension of clean_gismo().

Same in the neumann-gismo directory.


* OpenFOAM. This case uses the custom [heatTransfer](https://github.com/precice/tutorials/blob/master/partitioned-heat-conduction/solver-openfoam/heatTransfer.C) solver (find it in `solver-openfoam` and build with `wmake`). Read more details in the [OpenFOAM adapter](https://precice.org/adapter-openfoam-overview.html).

* G+Smo. Inatsll [G+Smo](https://github.com/gismo/gismo).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* G+Smo. Inatsll [G+Smo](https://github.com/gismo/gismo).
* G+Smo. Install [G+Smo](https://github.com/gismo/gismo).

But we need a bit more details, or better link to the adapter documentation:

Suggested change
* G+Smo. Inatsll [G+Smo](https://github.com/gismo/gismo).
* G+Smo. Install the [G+Smo adapter](https://precice.org/adapter-gismo.html).

Comment on lines +78 to +108
The G+Smo-based version of the tutorial offers IsoGeometric Analysis discretization method. To run the example you need to follow the following steps:

- Download G+Smo and Create a Build Folder
```
git clone [email protected]:gismo/gismo.git
cd gismo
mkdir build
```
- Configure G+Smo
```
cmake .. -DGISMO_OPTIONAL="<other submodules>;gsPreCICE"
```
- Build the Example
```
make partitioned-heat-conduction -j <number of threads to use>
```
- Link the compiled executable to the gismo-executable folder within the tutorial directory
```
cd <Your preCICE tutorial folder>/partitioned-heat-conduction/gismo-executable
ln -sf <You G+Smo build folder>/bin/partitioned-heat-conduction ./gismo_executable`
```
- Open two terminals and run
```
cd dirichlet-gismo
./run.sh
```

```
cd neumann-gismo
./run.sh
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we move most of this content to the adapter documentation, and refer to that?

The path ./gismo_executable/gismo_executable is assumed by the run.sh, so it should probably be documented here. But we should better call that directory solver-gismo.


For Nutils, please use the files `Dirichlet-*.vtk` or `Neumann-*.vtk`. Please note that these files contain the temperature as well as the reference solution.

For G+Smo, please use the file `solution.pvd` in both dirichlet-gismo and neumann-gismo directories.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
For G+Smo, please use the file `solution.pvd` in both dirichlet-gismo and neumann-gismo directories.
For G+Smo, please use the generated `solution.pvd` files in the dirichlet-gismo and neumann-gismo directories.

(I thought this was a file in this PR for a moment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet referred to from the README.md. In principle, both FEniCS and G+Smo should give the same solution. If not, we should add the picture in the README.md together with a comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants