Skip to content

Commit d63c87f

Browse files
committed
docs(cookbook): Add SPDX headers and tidy functional_field_ops.md
Add REUSE-compliant SPDX headers and fix formatting: - add SPDX-FileCopyrightText and SPDX-License-Identifier HTML comments - fix heading spacing: 'Functional Field Operations (IC / BC)' - correct heading format: '## Gaussian pulse' (not '## #Gaussian') - clean up code fences: proper cpp language tags and indentation - fix 'Time-varying boundary-like pattern' heading Motivation: pass REUSE license compliance checks and improve markdown formatting for consistency.
1 parent 79cca81 commit d63c87f

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

docs/getting_started/functional_field_ops.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#Functional Field Operations(IC / BC)
1+
<!-- SPDX-FileCopyrightText: 2025 VTT Technical Research Centre of Finland Ltd -->
2+
<!-- SPDX-License-Identifier: AGPL-3.0-or-later -->
3+
4+
# Functional Field Operations (IC / BC)
25

36
This page shows how to use the new coordinate-space functional API to set initial and boundary conditions without writing manual nested loops.
47

@@ -16,19 +19,19 @@ using namespace pfc;
1619
field::apply(model, "psi", [](const Real3 &) { return 0.5; });
1720
```
1821
19-
## #Gaussian pulse
22+
## Gaussian pulse
2023
21-
```cpp field::apply(model, "psi", [](const Real3 &x) {
22-
const double r2 = x[0] * x[0] + x[1] * x[1] + x[2] * x[2];
23-
return std::exp(-r2 / 2.0);
24-
});
24+
```cpp
25+
field::apply(model, "psi", [](const Real3 &x) {
26+
const double r2 = x[0] * x[0] + x[1] * x[1] + x[2] * x[2];
27+
return std::exp(-r2 / 2.0);
28+
});
2529
```
2630

27-
## #Time -
28-
varying boundary -
29-
like pattern
31+
## Time-varying boundary-like pattern
3032

31-
```cpp const double freq = 1.0;
33+
```cpp
34+
const double freq = 1.0;
3235
field::apply_with_time(model, "psi", t, [freq](const Real3 &x, double tt) {
3336
return std::sin(2.0 * M_PI * freq * tt) * (x[0] > 10.0 ? 1.0 : 0.0);
3437
});

0 commit comments

Comments
 (0)