akantu: use f-strings (#40466)
Co-authored-by: Nicolas Richart <nrichart@users.noreply.github.com>
This commit is contained in:
parent
8959d65577
commit
feda52f800
1 changed files with 4 additions and 6 deletions
|
@ -65,10 +65,8 @@ def cmake_args(self):
|
||||||
"-DAKANTU_HEAT_TRANSFER:BOOL=ON",
|
"-DAKANTU_HEAT_TRANSFER:BOOL=ON",
|
||||||
"-DAKANTU_SOLID_MECHANICS:BOOL=ON",
|
"-DAKANTU_SOLID_MECHANICS:BOOL=ON",
|
||||||
"-DAKANTU_STRUCTURAL_MECHANICS:BOOL=OFF",
|
"-DAKANTU_STRUCTURAL_MECHANICS:BOOL=OFF",
|
||||||
"-DAKANTU_PARALLEL:BOOL={0}".format("ON" if spec.satisfies("+mpi") else "OFF"),
|
f"-DAKANTU_PARALLEL:BOOL={'ON' if spec.satisfies('+mpi') else 'OFF'}",
|
||||||
"-DAKANTU_PYTHON_INTERFACE:BOOL={0}".format(
|
f"-DAKANTU_PYTHON_INTERFACE:BOOL={'ON' if spec.satisfies('+python') else 'OFF'}",
|
||||||
"ON" if spec.satisfies("+python") else "OFF"
|
|
||||||
),
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if spec.satisfies("@:3.0"):
|
if spec.satisfies("@:3.0"):
|
||||||
|
@ -84,14 +82,14 @@ def cmake_args(self):
|
||||||
solvers = []
|
solvers = []
|
||||||
if spec.satisfies("external_solvers=mumps"):
|
if spec.satisfies("external_solvers=mumps"):
|
||||||
solvers.append("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"):
|
if spec.satisfies("external_solvers=petsc"):
|
||||||
solvers.append("PETSc")
|
solvers.append("PETSc")
|
||||||
|
|
||||||
if len(solvers) > 0:
|
if len(solvers) > 0:
|
||||||
args.extend(
|
args.extend(
|
||||||
[
|
[
|
||||||
"-DAKANTU_IMPLICIT_SOLVER:STRING={0}".format("+".join(solvers)),
|
f"-DAKANTU_IMPLICIT_SOLVER:STRING={'+'.join(solvers)}",
|
||||||
"-DAKANTU_IMPLICIT:BOOL=ON",
|
"-DAKANTU_IMPLICIT:BOOL=ON",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue