Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CardMech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
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
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
KIT
Mpp
CardMech
Commits
1acea447
Commit
1acea447
authored
1 year ago
by
Laura Stengel
Browse files
Options
Downloads
Patches
Plain Diff
fixed boundary plot for EG (is like Lagrange plot)
parent
12a9e4fa
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/elasticity/assemble/EGElasticity.cpp
+46
-22
46 additions, 22 deletions
src/elasticity/assemble/EGElasticity.cpp
src/elasticity/assemble/EGElasticity.hpp
+1
-1
1 addition, 1 deletion
src/elasticity/assemble/EGElasticity.hpp
with
47 additions
and
23 deletions
src/elasticity/assemble/EGElasticity.cpp
+
46
−
22
View file @
1acea447
...
...
@@ -927,30 +927,54 @@ void EGElasticity::GetInvariant(const Vector &displacement, Vector &iota4) const
iota4
.
Collect
();
}
/*
void EGElasticity::PlotBoundary(const Vector &U, const Vector &scal) const {
if (vtkplot < 1) return;
Vector bnd(
0.0, U.GetDisc()
);
auto &plot = mpp::plot("Boundary"
);
for (cell c = U.cells(); c != U.cells_end(); c++) {
MixedEGVectorFieldElement E(U, *c
);
RowBndValues u_c(bnd, *c);
if (!u_c.onBnd()) continue
;
for (int face = 0; face < c.Faces(); ++face) {
MixedEGVectorFieldFaceElement FE(U, *c, face)
;
int shape_size = FE.dimension()-1;
int bc = u_c.bc(face);
for (
int i =
0; i < shape_size; ++i) {
bnd(c(), i) = max(bnd(c(), i), (double) bc);
}
void
EGElasticity
::
PlotBoundary
(
const
Vector
&
U
,
const
Vector
&
scal
)
const
{
if
(
vtkplot
<
1
)
return
;
Vector
bnd
(
scal
);
bnd
.
Clear
();
Vector
count
(
bnd
);
count
.
Clear
();
auto
&
plot
=
mpp
::
plot
(
"Boundary"
);
for
(
cell
c
=
U
.
cells
();
c
!=
U
.
cells_end
();
c
++
)
{
RowBndValues
u_c
(
bnd
,
*
c
)
;
RowBndValues
u_count
(
count
,
*
c
);
if
(
!
u_c
.
onBnd
())
continue
;
for
(
int
i
=
0
;
i
<
c
.
Faces
();
++
i
)
{
for
(
int
j
=
0
;
j
<
U
.
NumberOfNodalPointsOnFace
(
*
c
,
i
);
++
j
)
{
int
i
d
=
U
.
IdOfNodalPointOnFace
(
*
c
,
i
,
j
);
if
(
u_c
.
bc
(
i
)
>
u_c
(
id
,
0
))
{
u_c
(
id
,
0
)
=
(
double
)
u_c
.
bc
(
i
);
u_count
(
id
,
0
)
=
1
;
}
}
}
plot.AddData("Boundary", bnd);
plot.PlotFile("Boundary");
}*/
}
bnd
.
Accumulate
();
count
.
Accumulate
();
for
(
size_t
i
=
0
;
i
<
count
.
size
();
i
++
)
{
if
(
count
[
i
]
>
0
)
{
bnd
[
i
]
/=
count
[
i
];
}
}
plot
.
AddData
(
"Boundary"
,
bnd
,
0
);
bnd
=
0
;
for
(
cell
c
=
U
.
cells
();
c
!=
U
.
cells_end
();
c
++
)
{
RowBndValues
u_c
(
bnd
,
*
c
);
if
(
!
u_c
.
onBnd
())
continue
;
for
(
int
i
=
0
;
i
<
c
.
Faces
();
++
i
)
{
for
(
int
j
=
0
;
j
<
U
.
NumberOfNodalPointsOnFace
(
*
c
,
i
);
++
j
)
{
int
id
=
U
.
IdOfNodalPointOnFace
(
*
c
,
i
,
j
);
u_c
(
id
,
0
)
=
max
(
u_c
(
id
,
0
),
u_c
.
bc
(
i
)
==
199
?
1.0
:
0.0
);
}
}
}
plot
.
AddData
(
"Fixation"
,
bnd
);
plot
.
PlotFile
(
"Boundary"
);
}
void
EGElasticity
::
SetDisplacement
(
Vector
&
U
)
const
{
for
(
row
r
=
U
.
rows
();
r
!=
U
.
rows_end
();
++
r
)
{
...
...
This diff is collapsed.
Click to expand it.
src/elasticity/assemble/EGElasticity.hpp
+
1
−
1
View file @
1acea447
...
...
@@ -92,7 +92,7 @@ public:
double
NormPrestress
();
/*
void PlotBoundary(const Vector &U, const Vector &scal) const override;
*/
void
PlotBoundary
(
const
Vector
&
U
,
const
Vector
&
scal
)
const
override
;
/*std::array<double, 4> CalculateVolume(const Vector &U) const override;*/
...
...
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