Download task/single-software-execution/cli/fenics/task-06/task-06.json from HongchengGao/EngiWorld-Tasks: direct link, hf CLI and curl.
- Browser
- Download file 2.47 kB
-
https://huggingface.co/datasets/HongchengGao/EngiWorld-Tasks/resolve/main/task/single-software-execution/cli/fenics/task-06/task-06.json
- Command line
-
hf download hf://datasets/HongchengGao/EngiWorld-Tasks/task/single-software-execution/cli/fenics/task-06/task-06.json
-
curl -L -o task-06.json https://huggingface.co/datasets/HongchengGao/EngiWorld-Tasks/resolve/main/task/single-software-execution/cli/fenics/task-06/task-06.json
2.47 kB
| { | |
| "id": "single-software-execution--cli--fenics--task-06--ubuntu", | |
| "snapshot": "FEniCS", | |
| "instruction": "Treat a legacy FEniCS/DOLFIN nonlinear Poisson-equation template `/home/user/Desktop/nonlinear_base.py` as the starting point. Run with the legacy `dolfin` API used by the template (for example, FEniCS/DOLFIN 2019.1.0), not DOLFINx. On this machine, run legacy FEniCS with `/home/user/miniconda3/bin/conda run --no-capture-output --prefix /home/user/miniconda3/envs/fenics-legacy python` when working on `nonlinear_base.py`.\n\nComplete the following: 1. Modify and generate `/home/user/Desktop/nonlinear.py`: - Define nonlinear residual: `F = (1 + u**2)*inner(grad(u), grad(v))*dx - f*v*dx`, with `f=Constant(1.0)` - Define its Jacobian with `J = derivative(F, u, du)`, where `du = TrialFunction(V)`, and use `NonlinearVariationalProblem(F, u, bc, J)` - Set: `solver.parameters['newton_solver']['relative_tolerance'] = 1e-6` - Solve 2. Extract the value at center `(0.5, 0.5)` and the global maximum; for this symmetric mesh the center is the maximum up to numerical tolerance - Save to `/home/user/Desktop/summary.txt` in this format: `center_value, max_value`", | |
| "source": "https://olddocs.fenicsproject.org/dolfin/2019.1.0/python/", | |
| "config": [ | |
| { | |
| "type": "upload_file", | |
| "parameters": { | |
| "files": [ | |
| { | |
| "local_path": "task-06/init_file/nonlinear_base.py", | |
| "path": "/home/user/Desktop/nonlinear_base.py" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "trajectory": "trajectories/", | |
| "related_apps": [ | |
| "fenics" | |
| ], | |
| "artifact_paths": [ | |
| "/home/user/Desktop/nonlinear.py", | |
| "/home/user/Desktop/summary.txt" | |
| ], | |
| "evaluator": { | |
| "postconfig": [ | |
| { | |
| "type": "upload_file", | |
| "parameters": { | |
| "files": [ | |
| { | |
| "local_path": "task-06/eval.py", | |
| "path": "/home/user/Desktop/eval.py" | |
| } | |
| ] | |
| } | |
| } | |
| ], | |
| "func": "exact_match", | |
| "result": { | |
| "type": "vm_command_line", | |
| "command": "/home/user/miniconda3/bin/conda run --no-capture-output --prefix /home/user/miniconda3/envs/fenics-legacy /home/user/miniconda3/envs/fenics-legacy/bin/python /home/user/Desktop/eval.py", | |
| "shell": "true" | |
| }, | |
| "expected": { | |
| "type": "rule", | |
| "rules": { | |
| "expected": "True\n" | |
| } | |
| } | |
| }, | |
| "proxy": false, | |
| "fixed_ip": false, | |
| "possibility_of_env_change": "low" | |
| } | |