Skip to content

Commit

Permalink
Rename XML element for rbc templates from "cells" to "templates"
Browse files Browse the repository at this point in the history
  • Loading branch information
rupertnash committed May 20, 2024
1 parent 462e85c commit af08256
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Code/configuration/SimConfigReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ namespace hemelb::configuration {
auto controllerNode = rbcEl.PopChildOrThrow("controller");
ans.boxSize = PopDimensionalValue<LatticeDistance>(*controllerNode->PopChildOrThrow("boxsize"), "lattice");

if (auto cellsEl = rbcEl.PopChildOrNull("cells"))
if (auto cellsEl = rbcEl.PopChildOrNull("templates"))
ans.meshes = readTemplateCells(*cellsEl);

// Now we can check that the cell inserters only refer to templates that exist
Expand Down
6 changes: 3 additions & 3 deletions Code/tests/redblood/CellIOTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ namespace hemelb::tests
" </outlet>"
" </outlets>"
" <redbloodcells>"
" <cells>"
" <templates>"
" <cell>"
" <shape mesh_path=\"red_blood_cell.txt\" mesh_format=\"Krueger\" />"
" <scale units=\"m\" value=\"0.6\"/>"
Expand All @@ -155,13 +155,13 @@ namespace hemelb::tests
" <shape mesh_path=\"red_blood_cell.txt\" mesh_format=\"Krueger\" />"
" <scale units=\"m\" value=\"0.5\"/>"
" </cell>"
" </cells>"
" </templates>"
" </redbloodcells>"
"</parent>";
io::xml::Document document;
document.LoadString(xml_text);
auto root = document.GetRoot();
auto cellsEl = root.GetChildOrThrow("redbloodcells").GetChildOrThrow("cells");
auto cellsEl = root.GetChildOrThrow("redbloodcells").GetChildOrThrow("templates");
auto tc_conf = reader.readTemplateCells(cellsEl);
configuration::GlobalSimInfo sim_info;
auto in_conf = reader.DoIOForInOutlets(sim_info, root.GetChildOrThrow("inlets"));
Expand Down
2 changes: 1 addition & 1 deletion Code/tests/redblood/LoadDeformedCellTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace hemelb::tests
DeleteXMLInput("large_cylinder_rbc.xml", { "inlets", "inlet", "insertcell" });
DeleteXMLInput("large_cylinder_rbc.xml", { "inlets", "inlet", "flowextension" });
DeleteXMLInput("large_cylinder_rbc.xml", { "outlets", "outlet", "flowextension" });
DeleteXMLInput("large_cylinder_rbc.xml", { "redbloodcells", "cells" });
DeleteXMLInput("large_cylinder_rbc.xml", { "redbloodcells", "templates" });

int constexpr argc = 3;
char const * argv[argc] = {
Expand Down
2 changes: 1 addition & 1 deletion Code/tests/redblood/MulticellBenchmarkTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace hemelb::tests
{ "redbloodcells", "controller", "stencil" },
"two");
ModifyXMLInput("large_cylinder_rbc.xml", { "redbloodcells",
"cells",
"templates",
"cell",
"shape",
"mesh_path" },
Expand Down
4 changes: 2 additions & 2 deletions Code/tests/redblood/SadCellIntegrationTests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace hemelb::tests

ModifyXMLInput("large_cylinder_rbc.xml", { "simulation", "steps", "value" }, 10000);
ModifyXMLInput("large_cylinder_rbc.xml", { "redbloodcells",
"cells",
"templates",
"cell",
"shape",
"mesh_path" },
Expand All @@ -46,7 +46,7 @@ namespace hemelb::tests
"mean",
"value" },
0);
DeleteXMLInput("large_cylinder_rbc.xml", { "redbloodcells", "cells" });
DeleteXMLInput("large_cylinder_rbc.xml", { "redbloodcells", "templates" });
DeleteXMLInput("large_cylinder_rbc.xml", { "inlets", "inlet", "flowextension" });
DeleteXMLInput("large_cylinder_rbc.xml", { "outlets", "outlet", "flowextension" });

Expand Down
4 changes: 2 additions & 2 deletions Code/tests/resources/cyl_l100_r5.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
<cutoffdistance units="lattice" value="1.0" />
<exponent value="2"/>
</cell2Wall>
<cells>
<templates>
<cell name="default">
<moduli>
<bending units="lattice" value="0.002087" />
Expand All @@ -86,7 +86,7 @@
<shape mesh_path="rbc_ico_2880.msh" mesh_format="Krueger" />
<scale units="m" value="4e-06" />
</cell>
</cells>
</templates>
<output>
<vtk>
<period units="lattice" value="500" />
Expand Down
4 changes: 2 additions & 2 deletions Code/tests/resources/fedosov1c.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<cutoffdistance units="lattice" value="1.0" />
<exponent value="2"/>
</cell2Wall>
<cells>
<templates>
<cell name="default">
<moduli>
<surface units="lattice" value="1" />
Expand All @@ -96,7 +96,7 @@
<shape mesh_path="rbc_ico_1280.msh" mesh_format="Krueger" />
<scale units="m" value="4.1e-06" />
</cell>
</cells>
</templates>
<output>
<vtk>
<period units="lattice" value="1000" />
Expand Down
4 changes: 2 additions & 2 deletions Code/tests/resources/large_cylinder_rbc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<cutoffdistance units="lattice" value="1.0" />
<exponent value="2"/>
</cell2Wall>
<cells>
<templates>
<cell name="default">
<moduli>
<bending units="Nm" value="2e-19" />
Expand All @@ -99,7 +99,7 @@
<shape mesh_path="red_blood_cell.txt" mesh_format="Krueger" />
<scale units="m" value="8e-06" />
</cell>
</cells>
</templates>
<output>
<vtk>
<period units="lattice" value="100" />
Expand Down

0 comments on commit af08256

Please sign in to comment.