Skip to content

Commit a19580b

Browse files
Update docs, JSON Schema for new configuration file keywords
1 parent 7d2ab11 commit a19580b

File tree

3 files changed

+51
-34
lines changed

3 files changed

+51
-34
lines changed

docs/src/config/solver.md

+38-24
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
"Solver":
1010
{
1111
"Order": <int>,
12+
"PartialAssemblyOrder": <int>,
13+
"Device": <string>,
1214
"Eigenmode":
1315
{
1416
...
@@ -40,6 +42,16 @@ with
4042

4143
`"Order" [1]` : Finite element order (degree). Arbitrary high-order spaces are supported.
4244

45+
`"PartialAssemblyOrder" [100]` : Order at which to switch from full assembly of finite
46+
element operators to [partial assembly](https://mfem.org/howto/assembly_levels/). Setting
47+
this parameter equal to 1 will fully activate operator partial assembly on all levels.
48+
49+
`"Device" ["cpu"]` : The device configuration passed to [MFEM]
50+
(https://mfem.org/howto/assembly_levels/) in order to activate different backends at
51+
runtime. CPU-based partial assembly is supported by the `"cpu"` backend for tensor-product
52+
meshes using the native MFEM kernels and `"ceed-cpu"` backend for all mesh types using
53+
libCEED.
54+
4355
`"Eigenmode"` : Top-level object for configuring the eigenvalue solver for the eigenmode
4456
simulation type. Thus, this object is only relevant for
4557
[`config["Problem"]["Type"]: "Eigenmode"`](problem.md#config%5B%22Problem%22%5D).
@@ -299,13 +311,13 @@ directory specified by [`config["Problem"]["Output"]`]
299311
"Tol": <float>,
300312
"MaxIts": <int>,
301313
"MaxSize": <int>,
302-
"UsePCMatShifted": <bool>,
303-
"PCSide": <string>,
304-
"UseMultigrid": <bool>,
305-
"MGAuxiliarySmoother": <bool>,
314+
"MGMaxLevels": <int>,
315+
"MGCoarsenType": <string>,
306316
"MGCycleIts": <int>,
307317
"MGSmoothIts": <int>,
308318
"MGSmoothOrder": <int>,
319+
"PCMatShifted": <bool>,
320+
"PCSide": <string>,
309321
"DivFreeTol": <float>,
310322
"DivFreeMaxIts": <float>,
311323
"GSOrthogonalization": <string>
@@ -365,26 +377,15 @@ equations arising for each simulation type. The available options are:
365377
`"MaxSize" [0]` : Maximum Krylov space size for the GMRES and FGMRES solvers. A value less
366378
than 1 defaults to the value specified by `"MaxIts"`.
367379

368-
`"UsePCMatShifted" [false]` : When set to `true`, constructs the preconditioner for frequency
369-
domain problems using a real SPD approximation of the system matrix, which can help
370-
performance at high frequencies (relative to the lowest nonzero eigenfrequencies of the
371-
model).
372-
373-
`"PCSide" ["Default"]` : Side for preconditioning. Not all options are available for all
374-
iterative solver choices, and the default choice depends on the iterative solver used.
375-
376-
- `"Left"`
377-
- `"Right"`
378-
- `"Default"`
379-
380-
`"UseMultigrid" [true]` : Chose whether to enable [geometric multigrid preconditioning]
380+
`"MGMaxLevels" [100]` : Chose whether to enable [geometric multigrid preconditioning]
381381
(https://en.wikipedia.org/wiki/Multigrid_method) which uses p- and h-multigrid coarsening as
382382
available to construct the multigrid hierarchy. The solver specified by `"Type"` is used on
383383
the coarsest level. Relaxation on the fine levels is performed with Chebyshev smoothing.
384384

385-
`"MGAuxiliarySmoother"` : Activate hybrid smoothing from Hiptmair for multigrid levels when
386-
`"UseMultigrid"` is `true`. For non-singular problems involving curl-curl operators, this
387-
option is `true` by default.
385+
`"MGCoarsenType" ["Logarithmic"]` : Coarsening to create p-multigrid levels.
386+
387+
- `"Logarithmic"`
388+
- `"Linear"`
388389

389390
`"MGCycleIts" [1]` : Number of V-cycle iterations per preconditioner application for
390391
multigrid preconditioners (when `"UseMultigrid"` is `true` or `"Type"` is `"AMS"` or
@@ -396,6 +397,18 @@ preconditioners (when `"UseMultigrid"` is `true` or `"Type"` is `"AMS"` or `"Boo
396397
`"MGSmoothOrder" [3]` : Order of polynomial smoothing for geometric multigrid
397398
preconditioning (when `"UseMultigrid"` is `true`).
398399

400+
`"PCMatShifted" [false]` : When set to `true`, constructs the preconditioner for frequency
401+
domain problems using a real SPD approximation of the system matrix, which can help
402+
performance at high frequencies (relative to the lowest nonzero eigenfrequencies of the
403+
model).
404+
405+
`"PCSide" ["Default"]` : Side for preconditioning. Not all options are available for all
406+
iterative solver choices, and the default choice depends on the iterative solver used.
407+
408+
- `"Left"`
409+
- `"Right"`
410+
- `"Default"`
411+
399412
`"DivFreeTol" [1.0e-12]` : Relative tolerance for divergence-free cleaning used in the
400413
eigenmode simulation type.
401414

@@ -411,10 +424,11 @@ vectors in Krylov subspace methods or other parts of the code.
411424

412425
### Advanced linear solver options
413426

414-
- `"UseInitialGuess" [true]`
415-
- `"UsePartialAssembly" [false]`
416-
- `"UseLowOrderRefined" [false]`
417-
- `"Reordering" ["Default"]` : `"METIS"`, `"ParMETIS"`,`"Scotch"`, `"PTScotch"`,
427+
- `"InitialGuess" [true]`
428+
- `"MGLegacyTransfer" [false]`
429+
- `"MGAuxiliarySmoother" [true]`
430+
- `"PCLowOrderRefined" [false]`
431+
- `"ColumnOrdering" ["Default"]` : `"METIS"`, `"ParMETIS"`,`"Scotch"`, `"PTScotch"`,
418432
`"Default"`
419433
- `"STRUMPACKCompressionType" ["None"]` : `"None"`, `"BLR"`, `"HSS"`, `"HODLR"`, `"ZFP"`,
420434
`"BLR-HODLR"`, `"ZFP-BLR-HODLR"`

palace/utils/configfile.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1678,7 +1678,7 @@ void SolverData::SetUp(json &config)
16781678
return;
16791679
}
16801680
order = solver->value("Order", order);
1681-
pa_order_threshold = solver->value("PartialAssemblyThreshold", pa_order_threshold);
1681+
pa_order_threshold = solver->value("PartialAssemblyOrder", pa_order_threshold);
16821682
device = solver->value("Device", device);
16831683

16841684
driven.SetUp(*solver);
@@ -1690,7 +1690,7 @@ void SolverData::SetUp(json &config)
16901690

16911691
// Cleanup
16921692
solver->erase("Order");
1693-
solver->erase("PartialAssemblyThreshold");
1693+
solver->erase("PartialAssemblyOrder");
16941694
solver->erase("Device");
16951695

16961696
solver->erase("Driven");
@@ -1705,7 +1705,7 @@ void SolverData::SetUp(json &config)
17051705

17061706
// Debug
17071707
// std::cout << "Order: " << order << '\n';
1708-
// std::cout << "PartialAssemblyThreshold: " << pa_order_threshold << '\n';
1708+
// std::cout << "PartialAssemblyOrder: " << pa_order_threshold << '\n';
17091709
// std::cout << "Device: " << device << '\n';
17101710
}
17111711

scripts/schema/config/solver.json

+10-7
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
"properties":
88
{
99
"Order": { "type": "integer", "minimum": 1 },
10+
"PartialAssemblyOrder": { "type": "integer", "minimum": 1 },
11+
"Device": { "type": "string" },
1012
"Eigenmode":
1113
{
1214
"type": "object",
@@ -100,17 +102,18 @@
100102
"Tol": { "type": "number", "minimum": 0.0 },
101103
"MaxIts": { "type": "integer", "exclusiveMinimum": 0 },
102104
"MaxSize": { "type": "integer", "exclusiveMinimum": 0 },
103-
"UseInitialGuess": { "type": "boolean" },
104-
"UsePartialAssembly": { "type": "boolean" },
105-
"UseLowOrderRefined": { "type": "boolean" },
106-
"UsePCMatShifted": { "type": "boolean" },
107-
"PCSide": { "type": "string" },
108-
"UseMultigrid": { "type": "boolean" },
105+
"InitialGuess": { "type": "boolean" },
106+
"MGMaxLevels": { "type": "int", "minimum": 1 },
107+
"MGCoarsenType": { "type": "string" },
108+
"MGLegacyTransfer": { "type": "boolean" },
109109
"MGAuxiliarySmoother": { "type": "boolean" },
110110
"MGCycleIts": { "type": "integer", "exclusiveMinimum": 0 },
111111
"MGSmoothIts": { "type": "integer", "exclusiveMinimum": 0 },
112112
"MGSmoothOrder": { "type": "integer", "exclusiveMinimum": 0 },
113-
"Reordering": { "type": "string" },
113+
"PCLowOrderRefined": { "type": "boolean" },
114+
"PCMatShifted": { "type": "boolean" },
115+
"PCSide": { "type": "string" },
116+
"ColumnOrdering": { "type": "string" },
114117
"STRUMPACKCompressionType": { "type": "string" },
115118
"STRUMPACKCompressionTol": { "type": "number", "minimum": 0.0 },
116119
"STRUMPACKLossyPrecision": { "type": "integer", "minimum": 0 },

0 commit comments

Comments
 (0)