Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wenqing
ogs
Commits
3b1358fc
Commit
3b1358fc
authored
6 years ago
by
Dmitri Naumov
Browse files
Options
Downloads
Patches
Plain Diff
PM; Add partitioning tool extention for BC meshes.
parent
66b4cbf9
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp
+28
-2
28 additions, 2 deletions
...ns/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp
with
28 additions
and
2 deletions
Applications/Utils/ModelPreparation/PartitionMesh/PartitionMesh.cpp
+
28
−
2
View file @
3b1358fc
...
...
@@ -27,8 +27,8 @@
#include
"MeshLib/IO/readMeshFromFile.h"
#include
"NodeWiseMeshPartitioner.h"
#include
"Metis.h"
#include
"NodeWiseMeshPartitioner.h"
using
namespace
ApplicationUtils
;
...
...
@@ -80,6 +80,12 @@ int main(int argc, char* argv[])
TCLAP
::
SwitchArg
ascii_flag
(
"a"
,
"ascii"
,
"Enable ASCII output."
,
false
);
cmd
.
add
(
ascii_flag
);
// All the remaining arguments are used as file names for boundary/subdomain
// meshes.
TCLAP
::
UnlabeledMultiArg
<
std
::
string
>
other_meshes_filenames_arg
(
"other_meshes_filenames"
,
"mesh file names."
,
false
,
"file"
);
cmd
.
add
(
other_meshes_filenames_arg
);
cmd
.
parse
(
argc
,
argv
);
BaseLib
::
RunTime
run_timer
;
...
...
@@ -155,7 +161,27 @@ int main(int argc, char* argv[])
removeMetisPartitioningFiles
(
input_file_name_wo_extension
,
num_partitions
);
INFO
(
"Partitioning the mesh in the node wise way ..."
);
mesh_partitioner
.
partitionByMETIS
(
lh_elems_flag
.
getValue
());
bool
const
is_mixed_high_order_linear_elems
=
lh_elems_flag
.
getValue
();
mesh_partitioner
.
partitionByMETIS
(
is_mixed_high_order_linear_elems
);
INFO
(
"Partitioning other meshes according to the main mesh partitions."
);
for
(
auto
const
&
filename
:
other_meshes_filenames_arg
.
getValue
())
{
std
::
unique_ptr
<
MeshLib
::
Mesh
>
mesh
(
MeshLib
::
IO
::
readMeshFromFile
(
filename
));
INFO
(
"Mesh read: %d nodes, %d elements."
,
mesh
->
getNumberOfNodes
(),
mesh
->
getNumberOfElements
());
std
::
string
const
output_file_name_wo_extension
=
BaseLib
::
joinPaths
(
output_directory_arg
.
getValue
(),
BaseLib
::
extractBaseNameWithoutExtension
(
filename
));
auto
const
partitions
=
mesh_partitioner
.
partitionOtherMesh
(
*
mesh
,
is_mixed_high_order_linear_elems
);
mesh_partitioner
.
writeOtherMesh
(
output_file_name_wo_extension
,
partitions
);
}
if
(
ascii_flag
.
getValue
())
{
INFO
(
"Write the data of partitions into ASCII files ..."
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment