Skip to main content

lumerical-fdtd

Use when connecting Codex to Ansys Lumerical FDTD, probing lumapi or fdtd-solutions.exe, normalizing FDTD solver environments, running LSF CLI sentinels, scripting FDTD object creation, reading monitor or Qanalysis results, handling sampled materials, or repairing FDTD automation failures.

소스 정보

저장소
wfy-op/codex-for-comsol-lumerical
최근 소스 활동
2026년 6월 1일 09:48
감지된 SKILL.md 언어
영어
스타
43
포크
3

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
6 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
lumerical-fdtd
description
Use when connecting Codex to Ansys Lumerical FDTD, probing lumapi or fdtd-solutions.exe, normalizing FDTD solver environments, running LSF CLI sentinels, scripting FDTD object creation, reading monitor or Qanalysis results, handling sampled materials, or repairing FDTD automation failures.
# Lumerical FDTD ## Overview Use this skill to operate Ansys Lumerical FDTD through local Python API sessions or the `fdtd-solutions.exe` LSF command-line fallback. Keep the scope to solver connection, environment setup, object creation, monitor/source/analysis scripting, result extraction, material data handling, and failure repair. ## Workflow 1. Detect the operating system first: - On Windows PowerShell, run the Python probe directly with `py -3` or a chosen Python. - On Git Bash for Windows, use `scripts/probe_lumerical.sh`; it detects `MINGW/MSYS/CYGWIN` and chooses `py -3` when available. - On Linux, use `scripts/probe_lumerical.sh`; it chooses `python3` and searches Linux FDTD install roots. 2. Decide whether to use Python API or CLI LSF: - Prefer Python API when `lumapi` imports and an FDTD session starts. - Use CLI LSF when Python API startup is blocked but `fdtd-solutions.exe` can run scripts. 3. Load only the needed reference: - FDTD Python API, LSF, object creation, monitors, Qanalysis, data extraction, far-field projection, or materials: `references/lumerical-fdtd-automation.md`. - Example profile structure: `references/solver-profiles.json`. 4. Probe before real work unless the same profile already passed in the current session. 5. Normalize the local solver environment before launching binaries. 6. Run the smallest viable operation first: import check, executable check, session start, or CLI sentinel. 7. Store raw stdout/stderr, generated scripts, result files, and probe JSON near the caller's job artifacts, not inside this skill. 8. If a solver call fails, classify the signature, propose the smallest patch, retry once when safe, then report the exact command and artifacts. ## Quick Commands ```powershell $skill = "C:\path\to\lumerical-fdtd" $out = ".\solver_probe_out\lumerical" py -3 "$skill\scripts\probe_lumerical.py" --dry-run --out-dir "$out" py -3 "$skill\scripts\probe_lumerical.py" --deep --out-dir "$out" py -3 "$skill\scripts\probe_lumerical.py" --cli --deep --out-dir "$out-cli" ``` If `py -3` is not the right interpreter, use a user-selected Python environment: ```powershell conda run -n <env> python "$skill\scripts\probe_lumerical.py" --dry-run --out-dir "$out" ``` Git Bash or Linux: ```bash skill="/path/to/lumerical-fdtd" out="./solver_probe_out/lumerical" bash "$skill/scripts/probe_lumerical.sh" --dry-run --out-dir "$out" bash "$skill/scripts/probe_lumerical.sh" --deep --out-dir "$out" bash "$skill/scripts/probe_lumerical.sh" --cli --deep --out-dir "$out-cli" ``` ## Defaults - Prefer `lumapi.FDTD()` after adding the local `api/python` directory to `sys.path`. - Set `ANSYSLMD_LICENSE_FILE` when session startup fails with license/session errors. - Prepend the FDTD `bin` and `licensingclient/winx64` directories to `PATH`. - Keep `fdtd-solutions.exe -run <script.lsf>` as a CLI fallback. - Use `.txt` as the safe LSF sentinel/export extension, then convert to JSON in Python if needed. ## Common Mistakes - Do not edit files inside the solver installation directory. - Do not assume a normal `python` command exists on Windows; prefer the discovered or user-specified Python. - Do not trust old solver syntax without a local probe. - Do not treat a solver exit code as enough; verify the expected sentinel, monitor data, or exported file exists. - Do not add unrelated solver-family guidance to this FDTD-only skill.
GitHub에서 보기