Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Backofen, Rainer
amdis
Commits
1dba0d87
Commit
1dba0d87
authored
May 10, 2012
by
Praetorius, Simon
Browse files
Vector_FOT with factor
parent
80fd0375
Changes
1
Show whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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