Skip to content

Commit

Permalink
Not check dimensions for bool
Browse files Browse the repository at this point in the history
  • Loading branch information
danielandresarcones committed Feb 1, 2024
1 parent d799cbf commit 4347af5
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/fenicsxconcrete/finite_element_problem/base_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ def __init__(
keys_set_default.append(key)
else:
# check if units are compatible
dim_given = parameters[key].dimensionality
dim_default = default_p[key].dimensionality
if dim_given != dim_default:
raise ValueError(
f"given units for {key} are not compatible with default units: {dim_given} != {dim_default}"
)
if not isinstance(parameters[key], bool):
dim_given = parameters[key].dimensionality
dim_default = default_p[key].dimensionality
if dim_given != dim_default:
raise ValueError(
f"given units for {key} are not compatible with default units: {dim_given} != {dim_default}"
)
self.logger.info(f"for the following parameters, the default values are used: {keys_set_default}")

# set parameters as attribute
Expand Down

0 comments on commit 4347af5

Please sign in to comment.