Skip to content

Partitioned heat conduction (G+Smo participant)#604

Open
Crazy-Rich-Meghan wants to merge 15 commits intoprecice:developfrom
Crazy-Rich-Meghan:partitioned-heat-conduction
Open

Partitioned heat conduction (G+Smo participant)#604
Crazy-Rich-Meghan wants to merge 15 commits intoprecice:developfrom
Crazy-Rich-Meghan:partitioned-heat-conduction

Conversation

@Crazy-Rich-Meghan
Copy link
Copy Markdown
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
Copy Markdown
Member

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

@MakisH
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 thread partitioned-heat-conduction/dirichlet-gismo/clean.sh Outdated
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
Copy Markdown
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.

Comment thread partitioned-heat-conduction/README.md Outdated
Comment thread partitioned-heat-conduction/README.md Outdated
Comment thread partitioned-heat-conduction/README.md Outdated
Comment thread partitioned-heat-conduction/images/tutorial-partitioned-heat-conduction-gismo.gif Outdated
Crazy-Rich-Meghan and others added 3 commits October 16, 2025 08:45
Co-authored-by: Gerasimos Chourdakis <gerasimos.chourdakis@ipvs.uni-stuttgart.de>
Co-authored-by: Gerasimos Chourdakis <gerasimos.chourdakis@ipvs.uni-stuttgart.de>
@Crazy-Rich-Meghan
Copy link
Copy Markdown
Contributor Author

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.

Hi @makis, have you pulled the main Gismo? We couldn't replicate the issue (on both MacOS and Ubuntu).

Copy link
Copy Markdown
Member

@MakisH MakisH left a comment

Choose a reason for hiding this comment

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

@Crazy-Rich-Meghan I have not forgotten about this PR, and I see there are still some easy points to close. I added a log file with my building issue.

Comment thread partitioned-heat-conduction/README.md Outdated
```
- Configure G+Smo
```
cmake .. -DGISMO_OPTIONAL="<other submodules>;gsPreCICE"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do we need other modules for this tutorial? If not, let's remove. If yes, document.

But as I wrote in another comment, this looks like something to move to the adapter documentation.

Comment thread partitioned-heat-conduction/README.md Outdated
@Crazy-Rich-Meghan
Copy link
Copy Markdown
Contributor Author

Hi @MakisH,

The domIt->good() issue has been fixed in gsPreCICE (commit e557b51). Please update your gsPreCICE to the latest version:

rm -rf optional/gsPreCICE
cmake .. -DGISMO_OPTIONAL="gsPreCICE"

Comment thread partitioned-heat-conduction/README.md Outdated
@MakisH
Copy link
Copy Markdown
Member

MakisH commented Jan 20, 2026

Thanks, @Crazy-Rich-Meghan, this worked! The perpendicular-flap-vertex-gismo does not build for me anymore, but I will have another look.

If you have no objections, I will (later) push a few changes directly to this branch, to make the tutorial more consistent with https://precice.org/tutorials-perpendicular-flap-stress.html

@Crazy-Rich-Meghan
Copy link
Copy Markdown
Contributor Author

Hi @MakisH,

Thanks for the review! I've addressed your comments:

  • Updated clean.sh scripts to use the standard clean_gismo() function
  • Simplified the README.md, linking to the adapter documentation
  • Updated executable paths in run.sh scripts
  • Removed the redundant gismo.gif (same result as FEniCS)

Please let me know if there's anything else that needs to be changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants