Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gmsh
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
Package registry
Model registry
Operate
Terraform modules
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Romin Tomasetti
gmsh
Commits
73086aa9
Commit
73086aa9
authored
7 years ago
by
Van Dung NGUYEN
Browse files
Options
Downloads
Patches
Plain Diff
add for adding equal tensor operations
parent
73a24ea6
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
Geo/STensor3.h
+2
-1
2 additions, 1 deletion
Geo/STensor3.h
Geo/SVector3.h
+6
-0
6 additions, 0 deletions
Geo/SVector3.h
Solver/STensor43.h
+6
-0
6 additions, 0 deletions
Solver/STensor43.h
Solver/STensor53.h
+9
-0
9 additions, 0 deletions
Solver/STensor53.h
Solver/STensor63.h
+10
-0
10 additions, 0 deletions
Solver/STensor63.h
with
33 additions
and
1 deletion
Geo/STensor3.h
+
2
−
1
View file @
73086aa9
...
...
@@ -281,8 +281,9 @@ class STensor3 {
return
ithis
;
}
void
operator
=
(
const
STensor3
&
other
){
STensor3
&
operator
=
(
const
STensor3
&
other
){
for
(
int
i
=
0
;
i
<
9
;
i
++
)
_val
[
i
]
=
other
.
_val
[
i
];
return
*
this
;
}
STensor3
operator
+
(
const
STensor3
&
other
)
const
...
...
This diff is collapsed.
Click to expand it.
Geo/SVector3.h
+
6
−
0
View file @
73086aa9
...
...
@@ -70,6 +70,12 @@ class SVector3 {
P
[
0
]
=
v
;
P
[
1
]
=
v
;
P
[
2
]
=
v
;
return
*
this
;
}
SVector3
&
operator
=
(
const
SVector3
&
a
)
{
P
[
0
]
=
a
[
0
];
P
[
1
]
=
a
[
1
];
P
[
2
]
=
a
[
2
];
return
*
this
;
}
operator
double
*
()
{
return
P
;
}
void
print
(
std
::
string
name
=
""
)
const
{
...
...
This diff is collapsed.
Click to expand it.
Solver/STensor43.h
+
6
−
0
View file @
73086aa9
...
...
@@ -83,11 +83,17 @@ class STensor43 {
for
(
int
i
=
0
;
i
<
81
;
i
++
)
_val
[
i
]
-=
other
.
_val
[
i
];
return
*
this
;
}
STensor43
&
operator
=
(
const
STensor43
&
other
)
{
for
(
int
i
=
0
;
i
<
81
;
i
++
)
_val
[
i
]
=
other
.
_val
[
i
];
return
*
this
;
}
STensor43
&
operator
*=
(
const
double
&
other
)
{
for
(
int
i
=
0
;
i
<
81
;
i
++
)
_val
[
i
]
*=
other
;
return
*
this
;
}
STensor43
transpose
(
int
n
,
int
m
)
const
{
STensor43
ithis
;
...
...
This diff is collapsed.
Click to expand it.
Solver/STensor53.h
+
9
−
0
View file @
73086aa9
...
...
@@ -18,6 +18,15 @@ class STensor53 {
inline
double
operator
()(
int
i
,
int
j
,
int
k
,
int
l
,
int
m
)
const
{
return
_val
[
i
][
j
][
k
][
l
][
m
];
};
STensor53
&
operator
=
(
const
STensor53
&
other
){
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
for
(
int
k
=
0
;
k
<
3
;
k
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
for
(
int
m
=
0
;
m
<
3
;
m
++
)
_val
[
i
][
j
][
k
][
l
][
m
]
=
other
.
_val
[
i
][
j
][
k
][
l
][
m
];
return
*
this
;
};
STensor53
&
operator
+=
(
const
STensor53
&
other
){
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
...
...
This diff is collapsed.
Click to expand it.
Solver/STensor63.h
+
10
−
0
View file @
73086aa9
...
...
@@ -18,6 +18,16 @@ class STensor63{
inline
double
operator
()(
int
i
,
int
j
,
int
k
,
int
l
,
int
m
,
int
n
)
const
{
return
_val
[
i
][
j
][
k
][
l
][
m
][
n
];
};
STensor63
&
operator
=
(
const
STensor63
&
other
){
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
for
(
int
k
=
0
;
k
<
3
;
k
++
)
for
(
int
l
=
0
;
l
<
3
;
l
++
)
for
(
int
m
=
0
;
m
<
3
;
m
++
)
for
(
int
n
=
0
;
n
<
3
;
n
++
)
_val
[
i
][
j
][
k
][
l
][
m
][
n
]
=
other
.
_val
[
i
][
j
][
k
][
l
][
m
][
n
];
return
*
this
;
};
STensor63
&
operator
+=
(
const
STensor63
&
other
){
for
(
int
i
=
0
;
i
<
3
;
i
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
...
...
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