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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
94549bec
Commit
94549bec
authored
2 years ago
by
Axelle Drouard
Browse files
Options
Downloads
Patches
Plain Diff
Change the construction of the boundary values at the angles
parent
ac39934b
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/scheme/ScalarNodalScheme.cpp
+28
-9
28 additions, 9 deletions
src/scheme/ScalarNodalScheme.cpp
with
28 additions
and
9 deletions
src/scheme/ScalarNodalScheme.cpp
+
28
−
9
View file @
94549bec
...
...
@@ -489,16 +489,30 @@ class ScalarNodalSchemeHandler::ScalarNodalScheme : public ScalarNodalSchemeHand
for
(
NodeId
node_id
=
0
;
node_id
<
mesh
->
numberOfNodes
();
++
node_id
)
{
if
(
node_is_angle
[
node_id
])
{
const
auto
&
node_to_face
=
node_to_face_matrix
[
node_id
];
TinyMatrix
<
Dimension
>
A
=
zero
;
TinyMatrix
<
Dimension
>
A
;
A
(
0
,
0
)
=
1000
;
A
(
0
,
1
)
=
1000
;
A
(
1
,
0
)
=
1000
;
A
(
1
,
1
)
=
1000
;
for
(
size_t
i_face
=
0
;
i_face
<
node_to_face
.
size
();
++
i_face
)
{
const
FaceId
face_id
=
node_to_face
[
i_face
];
if
(
is_boundary_face
[
face_id
])
{
if
(
A
(
0
,
0
)
==
0
)
{
if
(
A
(
0
,
0
)
==
1000
)
{
if
(
dot
(
nl
[
face_id
],
exterior_normal
[
node_id
])
>=
0
)
{
A
(
0
,
0
)
=
nl
[
face_id
][
0
]
*
mes_l
[
face_id
];
A
(
0
,
1
)
=
nl
[
face_id
][
1
]
*
mes_l
[
face_id
];
A
(
1
,
0
)
=
nl
[
face_id
][
1
]
*
mes_l
[
face_id
];
}
else
{
A
(
1
,
0
)
=
nl
[
face_id
][
0
]
*
mes_l
[
face_id
];
A
(
0
,
0
)
=
-
nl
[
face_id
][
0
]
*
mes_l
[
face_id
];
A
(
1
,
0
)
=
-
nl
[
face_id
][
1
]
*
mes_l
[
face_id
];
}
}
else
{
if
(
dot
(
nl
[
face_id
],
exterior_normal
[
node_id
])
>=
0
)
{
A
(
0
,
1
)
=
nl
[
face_id
][
0
]
*
mes_l
[
face_id
];
A
(
1
,
1
)
=
nl
[
face_id
][
1
]
*
mes_l
[
face_id
];
}
else
{
A
(
0
,
1
)
=
-
nl
[
face_id
][
0
]
*
mes_l
[
face_id
];
A
(
1
,
1
)
=
-
nl
[
face_id
][
1
]
*
mes_l
[
face_id
];
}
}
}
}
...
...
@@ -528,9 +542,14 @@ class ScalarNodalSchemeHandler::ScalarNodalScheme : public ScalarNodalSchemeHand
const
NodeId
node_id
=
face_nodes
[
i_node
];
if
(
not
node_is_dirichlet
[
node_id
])
{
if
(
node_is_angle
[
node_id
])
{
const
auto
&
node_to_face
=
node_to_face_matrix
[
node_id
];
for
(
size_t
i_face_node
=
0
;
i_face_node
<
node_to_face
.
size
();
++
i_face_node
)
{
const
FaceId
face_node_id
=
node_to_face
[
i_face_node
];
if
(
face_id
==
face_node_id
)
{
compute_node_boundary_values
[
node_id
]
+=
value_list
[
i_face
]
*
std
::
abs
(
dot
(
nl
[
face_id
],
exterior_normal
[
node_id
]));
value_list
[
i_face
]
*
mes_l
[
face_id
]
*
normal_base
[
node_id
][
i_face_node
];
}
}
}
else
{
compute_node_boundary_values
[
node_id
]
+=
value_list
[
i_face
]
*
mes_l
[
face_id
];
sum_mes_l
[
node_id
]
+=
mes_l
[
face_id
];
...
...
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