Skip to content

Commit

Permalink
dune-composites CI fix
Browse files Browse the repository at this point in the history
  • Loading branch information
annereinarz committed May 31, 2024
1 parent fef1021 commit 26d3e92
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion models/dune-composites/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ forward | Linear elasticity
### forward
Mapping | Dimensions | Description
---|---|---
input | [346000] | Coefficients of a Karhunen Loeve expansion of a wrinkle.
input | [346] | Coefficients of a Karhunen Loeve expansion of a wrinkle.
output | [1] | Maximum deflection of the composite part.

Feature | Supported
Expand Down
10 changes: 4 additions & 6 deletions models/dune-composites/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,17 @@ def __init__(self):
super().__init__("forward")

def get_input_sizes(self, config):
return [360000]
return [346]

def get_output_sizes(self, config):
return [1]

# Input consists of KL expansion of a wrinkle
def write_coeffs_to_file(self,filename, data):
row_size = 360
with open(filename, 'w') as file:
for i in range(0, len(data), row_size):
row = data[i:i + row_size]
row_str = ', '.join(f'{num:.6e}' for num in row)
file.write(row_str + ';\n')
row = data[0]
row_str = ', '.join(f'{num:.6e}' for num in row)
file.write(row_str + ';')

def __call__(self, parameters, config):

Expand Down

0 comments on commit 26d3e92

Please sign in to comment.