Skip to content
Snippets Groups Projects
Commit 8b34e232 authored by Martin Bauer's avatar Martin Bauer
Browse files

Phasefield

- simpler function to init N phase model
parent 6010bc43
Branches
Tags
No related merge requests found
......@@ -274,6 +274,12 @@ class PhaseFieldStep:
for i in range(phi.shape[-1]):
b[self.phi_field_name][..., i] = phi[i]
def set_single_concentration(self, slice_obj, phase_idx, value=1):
num_phases = self.concentration[:, :, :].shape[-1]
zeros = [0] * num_phases
zeros[phase_idx] = value
self.set_concentration(slice_obj, zeros)
def set_density(self, slice_obj, value):
for b in self.data_handling.iterate(slice_obj):
for i in range(self.num_order_parameters):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment