Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
1dba0d87
Commit
1dba0d87
authored
May 10, 2012
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Vector_FOT with factor
parent
80fd0375
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
AMDiS/src/FirstOrderTerm.h
AMDiS/src/FirstOrderTerm.h
+11
-8
No files found.
AMDiS/src/FirstOrderTerm.h
View file @
1dba0d87
...
...
@@ -203,13 +203,13 @@ namespace AMDiS {
{
public:
/// Constructor.
Vector_FOT
(
WorldVector
<
double
>
*
wv
)
:
FirstOrderTerm
(
0
),
b
(
wv
)
Vector_FOT
(
WorldVector
<
double
>
*
wv
,
double
fac_
=
1.0
)
:
FirstOrderTerm
(
0
),
b
(
wv
)
,
fac
(
fac_
)
{}
/// Constructor.
Vector_FOT
(
int
bIdx
)
:
FirstOrderTerm
(
0
)
Vector_FOT
(
int
bIdx
,
double
fac_
=
1.0
)
:
FirstOrderTerm
(
0
)
,
fac
(
fac_
)
{
bOne
=
bIdx
;
}
...
...
@@ -223,10 +223,10 @@ namespace AMDiS {
if
(
bOne
>
-
1
)
{
for
(
int
iq
=
0
;
iq
<
nPoints
;
iq
++
)
lb_one
(
grdLambda
,
Lb
[
iq
],
1.0
);
lb_one
(
grdLambda
,
Lb
[
iq
],
fac
);
}
else
{
for
(
int
iq
=
0
;
iq
<
nPoints
;
iq
++
)
lb
(
grdLambda
,
*
b
,
Lb
[
iq
],
1.0
);
lb
(
grdLambda
,
*
b
,
Lb
[
iq
],
fac
);
}
}
...
...
@@ -238,14 +238,17 @@ namespace AMDiS {
mtl
::
dense_vector
<
double
>&
result
,
double
factor
)
{
if
(
num_rows
(
grdUhAtQP
)
>
0
)
if
(
num_rows
(
grdUhAtQP
)
>
0
)
{
double
factor_
=
factor
*
fac
;
for
(
int
iq
=
0
;
iq
<
nPoints
;
iq
++
)
result
[
iq
]
+=
*
b
*
grdUhAtQP
[
iq
]
*
factor
;
result
[
iq
]
+=
*
b
*
grdUhAtQP
[
iq
]
*
factor_
;
}
}
protected:
/// Vector which is multiplied with \f$ \nabla u(\vec{x}) \f$
WorldVector
<
double
>
*
b
;
double
fac
;
};
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment