Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
66331b04
Commit
66331b04
authored
6 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Plugged boundary condition handler
parent
111ad07b
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main.cpp
+37
-0
37 additions, 0 deletions
src/main.cpp
with
37 additions
and
0 deletions
src/main.cpp
+
37
−
0
View file @
66331b04
...
...
@@ -343,6 +343,17 @@ int main(int argc, char *argv[])
break
;
}
case
3
:
{
std
::
vector
<
std
::
string
>
sym_boundary_name_list
=
{
"XMIN"
,
"XMAX"
,
"YMIN"
,
"YMAX"
,
"ZMIN"
,
"ZMAX"
};
std
::
vector
<
std
::
shared_ptr
<
BoundaryConditionDescriptor
>>
bc_descriptor_list
;
for
(
const
auto
&
sym_boundary_name
:
sym_boundary_name_list
){
std
::
shared_ptr
<
BoundaryDescriptor
>
boudary_descriptor
=
std
::
shared_ptr
<
BoundaryDescriptor
>
(
new
NamedBoundaryDescriptor
(
sym_boundary_name
));
SymmetryBoundaryConditionDescriptor
*
sym_bc_descriptor
=
new
SymmetryBoundaryConditionDescriptor
(
boudary_descriptor
);
bc_descriptor_list
.
push_back
(
std
::
shared_ptr
<
BoundaryConditionDescriptor
>
(
sym_bc_descriptor
));
}
typedef
Connectivity3D
ConnectivityType
;
typedef
Mesh
<
ConnectivityType
>
MeshType
;
typedef
MeshData
<
MeshType
>
MeshDataType
;
...
...
@@ -355,6 +366,32 @@ int main(int argc, char *argv[])
MeshDataType
mesh_data
(
mesh
);
std
::
vector
<
BoundaryConditionHandler
>
bc_list
;
{
for
(
const
auto
&
bc_descriptor
:
bc_descriptor_list
)
{
switch
(
bc_descriptor
->
type
())
{
case
BoundaryConditionDescriptor
::
Type
::
symmetry
:
{
const
SymmetryBoundaryConditionDescriptor
&
sym_bc_descriptor
=
dynamic_cast
<
const
SymmetryBoundaryConditionDescriptor
&>
(
*
bc_descriptor
);
for
(
size_t
i_ref_face_list
=
0
;
i_ref_face_list
<
mesh
.
connectivity
().
numberOfRefFaceList
();
++
i_ref_face_list
)
{
const
RefFaceList
&
ref_face_list
=
mesh
.
connectivity
().
refFaceList
(
i_ref_face_list
);
const
RefId
&
ref
=
ref_face_list
.
refId
();
if
(
ref
==
sym_bc_descriptor
.
boundaryDescriptor
())
{
SymmetryBoundaryCondition
<
MeshType
::
dimension
>*
sym_bc
=
new
SymmetryBoundaryCondition
<
MeshType
::
dimension
>
(
MeshFlatNodeBoundary
<
MeshType
::
dimension
>
(
mesh
,
ref_face_list
));
std
::
shared_ptr
<
SymmetryBoundaryCondition
<
MeshType
::
dimension
>>
bc
(
sym_bc
);
bc_list
.
push_back
(
BoundaryConditionHandler
(
bc
));
}
}
break
;
}
default
:
{
std
::
cerr
<<
"Unknown BCDescription
\n
"
;
std
::
exit
(
1
);
}
}
}
}
UnknownsType
unknowns
(
mesh_data
);
...
...
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