25 : NAME_DIVIDE_BY_AREA(
"divide-by-area"),
26 NAME_MULTIPLY_BY_AREA(
"multiply-by-area"),
27 NAME_SUMMATION(
"summation"),
28 NAME_PYTHON(
"python"),
29 NAME_RECORDER(
"recorder"),
30 TAG_SOURCE_DATA(
"source-data"),
31 TAG_TARGET_DATA(
"target-data"),
32 TAG_CONVERGENCE_TOLERANCE(
"convergence-tolerance"),
33 TAG_MAX_ITERATIONS(
"max-iterations"),
34 TAG_MODULE_PATH(
"path"),
35 TAG_MODULE_NAME(
"module"),
36 WRITE_MAPPING_POST(
"write-mapping-post"),
37 READ_MAPPING_POST(
"read-mapping-post"),
38 _meshConfig(
std::move(meshConfig))
42 tagSourceData.setDocumentation(
"Single data to read from. ");
43 XMLTag tagMultipleSourceData(*
this,
TAG_SOURCE_DATA, XMLTag::OCCUR_ONCE_OR_MORE);
44 tagMultipleSourceData.setDocumentation(
"Multiple data to read from.");
46 tagTargetData.setDocumentation(
"Data to read from and write to.");
48 auto attrName = XMLAttribute<std::string>(
ATTR_NAME).setDocumentation(
"Name of the data.");
49 tagSourceData.addAttribute(attrName);
50 tagMultipleSourceData.addAttribute(attrName);
51 tagTargetData.addAttribute(attrName);
54 XMLTag::Occurrence occ = XMLTag::OCCUR_ARBITRARY;
57 tag.setDocumentation(
"Multiplies data values with mesh area associated to vertex holding the value.");
58 tag.addSubtag(tagTargetData);
63 tag.setDocumentation(
"Divides data values by mesh area associated to vertex holding the value.");
64 tag.addSubtag(tagTargetData);
69 tag.setDocumentation(
"Sums up multiple source data values and writes the result into target data.");
70 tag.addSubtag(tagMultipleSourceData);
71 tag.addSubtag(tagTargetData);
76 tag.setDocumentation(
"Records action invocations for testing purposes.");
81 tag.setDocumentation(
"Calls Python script to execute action."
82 " See preCICE file \"src/action/PythonAction.py\" for an example.");
84 XMLTag tagModulePath(*
this,
TAG_MODULE_PATH, XMLTag::OCCUR_NOT_OR_ONCE);
85 tagModulePath.setDocumentation(
"Directory path to Python module, i.e. script file."
86 " If it doesn't occur, the current path is used");
87 tagModulePath.addAttribute(makeXMLAttribute(
ATTR_NAME,
"").setDocumentation(
"The path to the directory of the module."));
88 tag.addSubtag(tagModulePath);
91 tagModule.setDocumentation(
"Name of Python module, i.e. Python script file without file ending. "
92 "The module name has to differ from existing (library) modules, "
93 "otherwise, the existing module will be loaded instead of the user script.");
94 tagModule.addAttribute(attrName);
95 tag.addSubtag(tagModule);
97 XMLTag tagOptionalSourceData(*
this,
TAG_SOURCE_DATA, XMLTag::OCCUR_NOT_OR_ONCE);
98 tagOptionalSourceData.setDocumentation(
"Source data to be read is handed to the Python module."
99 " Can be omitted, if only a target data is needed.");
100 tagOptionalSourceData.addAttribute(attrName);
101 tag.addSubtag(tagOptionalSourceData);
103 XMLTag tagOptionalTargetData(*
this,
TAG_TARGET_DATA, XMLTag::OCCUR_NOT_OR_ONCE);
104 tagOptionalTargetData.setDocumentation(
"Target data to be read and written to is handed to the Python module."
105 " Can be omitted, if only source data is needed.");
106 tagOptionalTargetData.addAttribute(attrName);
107 tag.addSubtag(tagOptionalTargetData);
112 auto attrTiming = XMLAttribute<std::string>(
ATTR_TIMING)
113 .setDocumentation(
"Determines when (relative to advancing the coupling scheme and the data mappings) the action is executed.")
116 auto attrMesh = XMLAttribute<std::string>(
ATTR_MESH)
117 .setDocumentation(
"Determines mesh used in action.");
118 for (XMLTag &tag : tags) {
119 tag.addAttribute(attrTiming);
120 tag.addAttribute(attrMesh);
Tightly coupled to the parameters of Participant()