akantu: use f-strings (#40466)

Co-authored-by: Nicolas Richart <nrichart@users.noreply.github.com>
This commit is contained in:
Alec Scott 2023-10-26 23:12:20 -07:00 committed by GitHub
parent 8959d65577
commit feda52f800
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -65,10 +65,8 @@ def cmake_args(self):
"-DAKANTU_HEAT_TRANSFER:BOOL=ON",
"-DAKANTU_SOLID_MECHANICS:BOOL=ON",
"-DAKANTU_STRUCTURAL_MECHANICS:BOOL=OFF",
"-DAKANTU_PARALLEL:BOOL={0}".format("ON" if spec.satisfies("+mpi") else "OFF"),
"-DAKANTU_PYTHON_INTERFACE:BOOL={0}".format(
"ON" if spec.satisfies("+python") else "OFF"
),
f"-DAKANTU_PARALLEL:BOOL={'ON' if spec.satisfies('+mpi') else 'OFF'}",
f"-DAKANTU_PYTHON_INTERFACE:BOOL={'ON' if spec.satisfies('+python') else 'OFF'}",
]
if spec.satisfies("@:3.0"):
@ -84,14 +82,14 @@ def cmake_args(self):
solvers = []
if spec.satisfies("external_solvers=mumps"):
solvers.append("Mumps")
args.append("-DMUMPS_DIR:PATH=${0}".format(spec["mumps"].prefix))
args.append(f"-DMUMPS_DIR:PATH=${spec['mumps'].prefix}")
if spec.satisfies("external_solvers=petsc"):
solvers.append("PETSc")
if len(solvers) > 0:
args.extend(
[
"-DAKANTU_IMPLICIT_SOLVER:STRING={0}".format("+".join(solvers)),
f"-DAKANTU_IMPLICIT_SOLVER:STRING={'+'.join(solvers)}",
"-DAKANTU_IMPLICIT:BOOL=ON",
]
)