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
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
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
Mojtaba Abdolkhani
ogs
Commits
0ab9f75d
Commit
0ab9f75d
authored
1 year ago
by
wenqing
Browse files
Options
Downloads
Patches
Plain Diff
[UnitTest] Fixed a sanitizer error in TestLinearElasticTransverseIsotropic
parent
1ae50b0d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Tests/MaterialLib/SolidModels/TestLinearElasticTransverseIsotropic.cpp
+6
-7
6 additions, 7 deletions
...lLib/SolidModels/TestLinearElasticTransverseIsotropic.cpp
with
6 additions
and
7 deletions
Tests/MaterialLib/SolidModels/TestLinearElasticTransverseIsotropic.cpp
+
6
−
7
View file @
0ab9f75d
...
...
@@ -102,7 +102,7 @@ class LinearElasticTransverseIsotropic : public ::testing::Test
public:
template
<
int
Dim
>
void
compareWithElasticOrthotropic
(
ParameterLib
::
CoordinateSystem
const
&
coordinate_system
)
std
::
optional
<
ParameterLib
::
CoordinateSystem
>
const
&
coordinate_system
)
{
// Create a LinearElasticTransverseIsotropic instance:
auto
const
parameters_ti
=
...
...
@@ -152,13 +152,11 @@ public:
}
template
<
int
Dimension
>
void
compareWithLinearElasticIsotropic
()
void
compareWithLinearElasticIsotropic
(
std
::
optional
<
ParameterLib
::
CoordinateSystem
>
const
&
coordinate_system
)
{
// Create an isotropic elastic model by using
// LinearElasticTransverseIsotropic:
ParameterLib
::
ConstantParameter
<
double
>
const
line_direction
{
"e3"
,
{
1
,
0.0
,
0.0
}};
ParameterLib
::
CoordinateSystem
const
coordinate_system
{
line_direction
};
double
const
E
=
8.0e9
;
double
const
nu
=
0.25
;
double
const
Ga
=
0.5
*
E
/
(
1
+
nu
);
...
...
@@ -275,6 +273,7 @@ TEST_F(LinearElasticTransverseIsotropic,
TEST_F
(
LinearElasticTransverseIsotropic
,
test_agaist_LinearElasticIsotropic
)
{
compareWithLinearElasticIsotropic
<
2
>
();
compareWithLinearElasticIsotropic
<
3
>
();
std
::
optional
<
ParameterLib
::
CoordinateSystem
>
coordinate_system
=
{};
compareWithLinearElasticIsotropic
<
2
>
(
coordinate_system
);
compareWithLinearElasticIsotropic
<
3
>
(
coordinate_system
);
}
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