SpECTRE
v2021.02.08
Documentation
Introduction
Releases
Installation
User Tutorials
Dev Guide
Code of Conduct
Contributing Guide
Code Reference
Topics
Namespaces
Files
Bibliography
View on GitHub
src
ParallelAlgorithms
LinearSolver
Schwarz
SubdomainOperator.hpp
1
// Distributed under the MIT License.
2
// See LICENSE.txt for details.
3
4
#pragma once
5
6
#include <
cstddef
>
7
8
namespace
LinearSolver::Schwarz
{
9
10
/*!
11
* \brief Abstract base class for the subdomain operator, i.e. the linear
12
* operator restricted to an element-centered Schwarz subdomain
13
*
14
* A subdomain operator must implement these member function templates
15
* - `operator()`: Applies the operator to the element-centered subdomain data.
16
* It must take these arguments, in this order:
17
* - `gsl::not_null<LinearSolver::Schwarz::ElementCenteredSubdomainData*>`:
18
* The data where the result of the operator applied to the operand should
19
* be written to
20
* - `LinearSolver::Schwarz::ElementCenteredSubdomainData`: The operand data
21
* to which the operator should be applied
22
* - `db::DataBox`: The element's DataBox. Can be used to retrieve any data on
23
* the subdomain geometry and to access and mutate persistent memory
24
* buffers.
25
*
26
* Since the subdomain operator has access to the element's DataBox, it can
27
* retrieve any background data, i.e. data that does not depend on the variables
28
* it operates on. Background data on overlap regions with other elements can be
29
* either initialized in advance if possible or communicated with the
30
* `LinearSolver::Schwarz::Actions::SendOverlapFields` and
31
* `LinearSolver::Schwarz::Actions::ReceiveOverlapFields` actions. Note that
32
* such communication should not be necessary between iterations of the Schwarz
33
* solve, but only between successive solves, because background data should not
34
* change during the solve. All variable data is passed to the operator as the
35
* `operand` argument (see above).
36
*
37
* Here's an example of a subdomain operator that is the restriction of an
38
* explicit global matrix:
39
*
40
* \snippet Test_SchwarzAlgorithm.cpp subdomain_operator
41
*/
42
template
<
size_t
Dim>
43
class
SubdomainOperator
{
44
public
:
45
static
constexpr
size_t
volume_dim = Dim;
46
47
protected
:
48
SubdomainOperator
() =
default
;
49
};
50
51
}
// namespace LinearSolver::Schwarz
LinearSolver::Schwarz::SubdomainOperator
Abstract base class for the subdomain operator, i.e. the linear operator restricted to an element-cen...
Definition:
SubdomainOperator.hpp:43
LinearSolver::Schwarz
Items related to the Schwarz linear solver.
Definition:
CommunicateOverlapFields.hpp:36
cstddef
© Copyright 2017 - 2021
SXS Collaboration
,
Distributed under the
MIT License