Skip to content
Snippets Groups Projects
Commit 98513c53 authored by jonathan.froehlich's avatar jonathan.froehlich
Browse files

Updated geomtery conversion

parent c5e8eac6
No related branches found
No related tags found
1 merge request!219Resolve "Add Excitation to Biventricle"
Subproject commit a3c4968126e0655272d3b44dc5be15309eaa3c8d
Subproject commit 139039331c6ac7e937b8030e699dfa31310d132f
......@@ -59,7 +59,8 @@ int main(int argc, char **argv) {
return 0;
}
std::string geometryFile = loadFile(argv[1]);
std::string filename(argv[1]);
std::string geometryFile = loadFile("tools/geometries/vtk/" + filename + ".vtu");
std::string confName = "default";
strcpy(argv[1], confName.c_str());
......@@ -68,20 +69,33 @@ int main(int argc, char **argv) {
Config::SetConfigFileName("default.conf");
Mpp::initialize(&argc, argv);
auto lvPoints = pointsFromFile(Config::GetConfPath() + "../vtk/KovachevaBiventricleLV.csv");
auto rvPoints = pointsFromFile(Config::GetConfPath() + "../vtk/KovachevaBiventricleRV.csv");
auto outerPoints = pointsFromFile(Config::GetConfPath() + "../vtk/KovachevaBiventricleOuter.csv");
auto lvPoints = pointsFromFile(
std::string(ProjectSourceDir) + "/tools/geometries/vtk/" + filename + "LV.csv");
auto rvPoints = pointsFromFile(
std::string(ProjectSourceDir) + "/tools/geometries/vtk/" + filename + "RV.csv");
auto outerPoints = pointsFromFile(
std::string(ProjectSourceDir) + "/tools/geometries/vtk/" + filename + "Outer.csv");
VtuConverter converter(geometryFile);
const auto &M = converter.UseCellArrayAsSubdomain(0)
.UseArrayForCellData(1)
.UseArrayForCellData(2)
.UseArrayForCellData(3)
//.WithExcitationFromFile(0, 0.003, 30.0)
.WithExcitationFromFile(0, 0.003, 30.0)
.WithBoundaryFromData({230, 230}, std::move(lvPoints))
.WithBoundaryFromData({231, 231}, std::move(rvPoints))
.WithBoundaryFromData({330, 199}, std::move(outerPoints))
.WithBoundaryFromData({330, 331}, std::move(outerPoints))
.WithBoundarySmoothing({199, 330, 331})
.WithSubdomainConversion([](int sd) {
switch (sd) {
case 30:
return 1000;
case 31:
return 0;
default:
return (sd - 30) * 1000;
}
})
.Create();
smoothMeshData(M);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment