Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move linear algebra package testing for the same problem into a single directory #251

Open
1 task done
ktbolt opened this issue Aug 26, 2024 · 0 comments
Open
1 task done
Labels
enhancement New feature or request

Comments

@ktbolt
Copy link
Collaborator

ktbolt commented Aug 26, 2024

Use Case

The current linear algebra package (e.g. PETSc) testing has a separate directory in test/cases for each package and preconditioner

pipe_RCR_3d/
pipe_RCR_3d_bj_trilinos/
pipe_RCR_3d_ilut_trilinos/
pipe_RCR_3d_petsc/
pipe_RCR_3d_trilinos_bj/
pipe_RCR_3d_trilinos_ilut/

Each case duplicates mesh and boundary condition data files. The XML input files are also duplicated so any change to that file must also be changed in five other locations.

It would be better to have all of the linear algebra packages tested in a single directory.

Problem

See above

Solution

Solution 1: Enable reading the XML Linear_algebra parameters from an XML file
Create a tril_ilut.xml file containing

<?xml version="1.0" encoding="UTF-8" ?>
<Linear_algebra type="trilinos" >
  <Preconditioner> trilinos-ilut </Preconditioner>
</Linear_algebra>

Then add a input_parameter attribute to the Linear_algebra keyword that would be used to read in the Linear_algebra parameter XML file

<Linear_algebra input_argument="linear_algebra_file" > </Linear_algebra>

The value of linear_algebra_file would be set as an argument to the svFSIplus command

svFSIplus solver.xml linear_algebra_file=tril_ilut.xml

This would require moderate code changes primarily to the Parameters class but is probably not in general very useful.

Solution 2: Create a Python script to generate variations ofLinear_algebra parameters from a solver input XML file.
For example, write a change-linear-algebra.py script that takes the package name and preconditioner, copies the file just substituting the Linear_algebra parameters.

change-linear-algebra.py svFSI.xml trilinos trilinos-ilut > svFSI-trilinos-ilut.xml

Run the script when the svFSI.xml file changes.

This script would be fairly simple to write.

Alternatives considered

see above

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct and Contributing Guidelines
@ktbolt ktbolt added the enhancement New feature or request label Aug 26, 2024
@github-staff github-staff deleted a comment from vineet1401 Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants
@ktbolt and others