cratepy.online.crom.asca.ClusteringAdaptivityOutput

class ClusteringAdaptivityOutput(adapt_file_path, adapt_material_phases)[source]

Bases: object

Clustering adaptivity output.

_header

List containing the header of each column (str).

Type:

list[str]

_col_width

Output file column width.

Type:

int

init_adapt_file(self, crve)[source]

Open clustering adaptivity output file and write file header.

write_adapt_file(self, inc, adaptivity_manager, crve, mode='increment')[source]

Write clustering adaptivity output file.

rewind_file(self, rewind_inc)[source]

Rewind clustering adaptivity output file.

Constructor.

Parameters:
  • adapt_file_path (str) – Path of clustering adaptivity output file.

  • adapt_material_phases (list[str]) – RVE adaptive material phases labels (str).

List of Public Methods

init_adapt_file

Open clustering adaptivity output file and write file header.

rewind_file

Rewind clustering adaptivity output file.

write_adapt_file

Write clustering adaptivity output file.

Methods

__init__(adapt_file_path, adapt_material_phases)[source]

Constructor.

Parameters:
  • adapt_file_path (str) – Path of clustering adaptivity output file.

  • adapt_material_phases (list[str]) – RVE adaptive material phases labels (str).

init_adapt_file(crve)[source]

Open clustering adaptivity output file and write file header.

Parameters:

crve (CRVE) – Cluster-Reduced Representative Volume Element.

rewind_file(rewind_inc)[source]

Rewind clustering adaptivity output file.

Parameters:

rewind_inc (int) – Increment associated with the rewind state.

write_adapt_file(inc, adaptivity_manager, crve, mode='increment')[source]

Write clustering adaptivity output file.

Parameters:
  • inc (int) – Macroscale loading increment.

  • adaptivity_manager (AdaptivityManager) – CRVE clustering adaptivity manager.

  • crve (CRVE) – Cluster-Reduced Representative Volume Element.

  • mode ({'init', 'increment'}, default='increment') – Clustering adaptivity output mode. Mode init writes the file header and the increment 0 (base clustering), while increment appends the clustering adaptivity data associated with macroscale loading increment.