Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Backofen, Rainer
amdis
Commits
660a5876
Commit
660a5876
authored
Jun 08, 2010
by
Thomas Witkowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix for usage of rhs operators with different basis function degrees.
parent
5d5e8dbb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
20 deletions
+16
-20
AMDiS/src/Assembler.cc
AMDiS/src/Assembler.cc
+3
-5
AMDiS/src/MeshStructure.h
AMDiS/src/MeshStructure.h
+4
-2
AMDiS/src/time/RosenbrockStationary.cc
AMDiS/src/time/RosenbrockStationary.cc
+8
-10
AMDiS/src/time/RosenbrockStationary.h
AMDiS/src/time/RosenbrockStationary.h
+1
-3
No files found.
AMDiS/src/Assembler.cc
View file @
660a5876
...
...
@@ -292,9 +292,9 @@ namespace AMDiS {
FUNCNAME
(
"Assembler::matVecAssemble()"
);
Element
*
el
=
elInfo
->
getElement
();
double
*
uhOldLoc
=
new
double
[
nRow
]
;
std
::
vector
<
double
>
uhOldLoc
(
operat
->
uhOld
->
getFeSpace
()
==
rowFeSpace
?
nRow
:
nCol
)
;
operat
->
uhOld
->
getLocalVector
(
el
,
uhOldLoc
);
operat
->
uhOld
->
getLocalVector
(
el
,
&
(
uhOldLoc
[
0
])
);
if
(
el
!=
lastMatEl
)
{
set_to_zero
(
elementMatrix
);
...
...
@@ -303,13 +303,11 @@ namespace AMDiS {
for
(
int
i
=
0
;
i
<
nRow
;
i
++
)
{
double
val
=
0.0
;
for
(
int
j
=
0
;
j
<
n
Row
;
j
++
)
for
(
int
j
=
0
;
j
<
n
Col
;
j
++
)
val
+=
elementMatrix
[
i
][
j
]
*
uhOldLoc
[
j
];
vec
[
i
]
+=
val
;
}
delete
[]
uhOldLoc
;
}
...
...
AMDiS/src/MeshStructure.h
View file @
660a5876
...
...
@@ -19,8 +19,8 @@
/** \file MeshStructure.h */
#ifndef AMDIS_MESHSTRUCTURE_H
#define AMDIS_MESHSTRUCTURE_H
#ifndef AMDIS_MESH
_
STRUCTURE_H
#define AMDIS_MESH
_
STRUCTURE_H
#include <vector>
#include "AMDiS_fwd.h"
...
...
@@ -166,6 +166,7 @@ namespace AMDiS {
MeshStructure
*
result
);
protected:
/// Mesh structure code.
std
::
vector
<
unsigned
long
int
>
code
;
int
currentIndex
;
...
...
@@ -178,6 +179,7 @@ namespace AMDiS {
int
nElements
;
/// If true, some output is printed to screen during mesh structure code generation.
bool
debugMode
;
static
const
int
unsignedLongSize
;
...
...
AMDiS/src/time/RosenbrockStationary.cc
View file @
660a5876
...
...
@@ -15,16 +15,14 @@ namespace AMDiS {
{
stageSolution
=
new
SystemVector
(
*
solution
);
unVec
=
new
SystemVector
(
*
solution
);
timeRhsVec
=
new
SystemVector
(
*
solution
);
newUn
=
new
SystemVector
(
*
solution
);
tmp
=
new
SystemVector
(
*
solution
);
lowSol
=
new
SystemVector
(
*
solution
);
lowSol
=
new
SystemVector
(
*
solution
);
stageSolutions
.
resize
(
rm
->
getStages
());
for
(
int
i
=
0
;
i
<
rm
->
getStages
();
i
++
)
stageSolutions
[
i
]
=
new
SystemVector
(
*
solution
);
phiSum
=
new
DOFVector
<
double
>
(
feSpaces
[
0
],
"phiSum"
);
tmpDof
=
new
DOFVector
<
double
>
(
feSpaces
[
0
],
"phiSum"
);
stageSolutions
[
i
]
=
new
SystemVector
(
*
solution
);
}
...
...
@@ -51,11 +49,11 @@ namespace AMDiS {
*
stageSolution
+=
*
tmp
;
}
phiSum
->
set
(
0.0
);
timeRhsVec
->
set
(
0.0
);
for
(
int
j
=
0
;
j
<
i
;
j
++
)
{
*
tmp
Dof
=
*
(
stageSolutions
[
j
]
->
getDOFVector
(
0
)
);
*
tmp
Dof
*=
(
rm
->
getC
(
i
,
j
)
/
*
tauPtr
);
*
phiSum
+=
*
tmp
Dof
;
*
tmp
=
*
(
stageSolutions
[
j
]);
*
tmp
*=
(
rm
->
getC
(
i
,
j
)
/
*
tauPtr
);
*
timeRhsVec
+=
*
tmp
;
}
ProblemVec
::
buildAfterCoarsen
(
adaptInfo
,
flag
,
(
i
==
0
),
asmVector
);
...
...
@@ -119,7 +117,7 @@ namespace AMDiS {
ProblemVec
::
addMatrixOperator
(
op
,
row
,
col
,
tauGamma
,
tauGamma
);
Operator
*
opRhs
=
new
Operator
(
componentSpaces
[
row
]);
opRhs
->
addZeroOrderTerm
(
new
VecAtQP_ZOT
(
phiSum
,
new
IdFunc
()));
opRhs
->
addZeroOrderTerm
(
new
VecAtQP_ZOT
(
timeRhsVec
->
getDOFVector
(
col
)
,
new
IdFunc
()));
ProblemVec
::
addVectorOperator
(
opRhs
,
row
,
&
minusOne
,
&
minusOne
);
}
...
...
AMDiS/src/time/RosenbrockStationary.h
View file @
660a5876
...
...
@@ -101,12 +101,10 @@ namespace AMDiS {
protected:
RosenbrockMethod
*
rm
;
SystemVector
*
stageSolution
,
*
unVec
,
*
newUn
,
*
tmp
,
*
lowSol
;
SystemVector
*
stageSolution
,
*
unVec
,
*
timeRhsVec
,
*
newUn
,
*
tmp
,
*
lowSol
;
std
::
vector
<
SystemVector
*>
stageSolutions
;
DOFVector
<
double
>
*
phiSum
,
*
tmpDof
;
bool
first
;
double
minusOne
;
...
...
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