Incoherent Summing with Custom Layers#
This is an example of using incoherent summing (‘domains’) from custom layers models. The sample is a simple two layer of permalloy/gold, with up/down domains
The domain custom model is similar to a normal custom models, except that the input (function arguments) of the custom function contains an additional ‘domains’ parameter as described in Custom Models with Domains.
This parameter tells the function which is the current domain, so the appropriate layer stack can be generated.
This example can be run as a script or interactively using the instructions below.
Note
The custom model used is a MATLAB model - examples/domains/customLayers/alloyDomains.m.
Run Script:
root = getappdata(0, 'root');
cd(fullfile(root, 'examples', 'domains', 'customLayers'));
domainsCustomXYScript
Run Interactively:
root = getappdata(0, 'root');
cd(fullfile(root, 'examples', 'domains', 'customLayers'));
edit domainsCustomXYSheet.mlx
Note
The custom model used is a Python model - RATapi.examples.domains.alloy_domains.py.
Run Script:
python RATapi.examples.domains.domains_custom_layers.py
Run as Function:
import RATapi as RAT
problem, results = RATapi.examples.domains.domains_custom_layers()
Run Interactively:
jupyter notebook RATapi.examples.domains.domains_custom_layers.ipynb