Skip to content
GitLab
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
745701c4
Commit
745701c4
authored
Aug 29, 2008
by
Thomas Witkowski
Browse files
* Exact error computation added
* ::std:: -> std::
parent
4a775f34
Changes
193
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/AdaptBase.h
View file @
745701c4
...
...
@@ -43,7 +43,7 @@ namespace AMDiS {
/** \brief
* Constructor
*/
AdaptBase
(
const
::
std
::
string
&
name
,
AdaptBase
(
const
std
::
string
&
name
,
ProblemIterationInterface
*
problemIteration
,
AdaptInfo
*
adaptInfo
,
ProblemTimeInterface
*
problemTime
=
NULL
,
...
...
@@ -69,7 +69,7 @@ namespace AMDiS {
/** \brief
* Returns \ref name_
*/
inline
const
::
std
::
string
&
getName
()
const
{
inline
const
std
::
string
&
getName
()
const
{
return
name_
;
};
...
...
@@ -113,7 +113,7 @@ namespace AMDiS {
/** \brief
* Name of the adaption loop
*/
::
std
::
string
name_
;
std
::
string
name_
;
/** \brief
* Problem iteration interface
...
...
AMDiS/src/AdaptInstationary.h
View file @
745701c4
...
...
@@ -88,12 +88,12 @@ namespace AMDiS {
/** \brief
* serialization
*/
virtual
void
serialize
(
::
std
::
ostream
&
out
);
virtual
void
serialize
(
std
::
ostream
&
out
);
/** \brief
* deserialization
*/
virtual
void
deserialize
(
::
std
::
istream
&
in
);
virtual
void
deserialize
(
std
::
istream
&
in
);
protected:
...
...
@@ -111,7 +111,7 @@ namespace AMDiS {
/** \brief
* Initialisation of this AdaptInstationary object
*/
void
initialize
(
const
::
std
::
string
&
aName
);
void
initialize
(
const
std
::
string
&
aName
);
/** \brief
* Implements the explit time strategy. Used by \ref oneTimestep().
...
...
@@ -169,7 +169,7 @@ namespace AMDiS {
/** \brief
* Name of the file used to automatically serialize the problem.
*/
::
std
::
string
queueSerializationFilename_
;
std
::
string
queueSerializationFilename_
;
/** \brief
* Timestamp at the beginning of all calculations. It is used to calculate the overall
...
...
@@ -186,7 +186,7 @@ namespace AMDiS {
/** \brief
* Stores the runtime (in seconds) of some last timestep iterations.
*/
::
std
::
queue
<
int
>
lastIterationsDuration_
;
std
::
queue
<
int
>
lastIterationsDuration_
;
};
}
...
...
AMDiS/src/Assembler.cc
View file @
745701c4
...
...
@@ -11,15 +11,15 @@
namespace
AMDiS
{
::
std
::
vector
<
SubAssembler
*>
ZeroOrderAssembler
::
optimizedSubAssemblers
;
::
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
optimizedSubAssemblersGrdPhi
;
::
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
optimizedSubAssemblersGrdPsi
;
::
std
::
vector
<
SubAssembler
*>
SecondOrderAssembler
::
optimizedSubAssemblers
;
std
::
vector
<
SubAssembler
*>
ZeroOrderAssembler
::
optimizedSubAssemblers
;
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
optimizedSubAssemblersGrdPhi
;
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
optimizedSubAssemblersGrdPsi
;
std
::
vector
<
SubAssembler
*>
SecondOrderAssembler
::
optimizedSubAssemblers
;
::
std
::
vector
<
SubAssembler
*>
ZeroOrderAssembler
::
standardSubAssemblers
;
::
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
standardSubAssemblersGrdPhi
;
::
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
standardSubAssemblersGrdPsi
;
::
std
::
vector
<
SubAssembler
*>
SecondOrderAssembler
::
standardSubAssemblers
;
std
::
vector
<
SubAssembler
*>
ZeroOrderAssembler
::
standardSubAssemblers
;
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
standardSubAssemblersGrdPhi
;
std
::
vector
<
SubAssembler
*>
FirstOrderAssembler
::
standardSubAssemblersGrdPsi
;
std
::
vector
<
SubAssembler
*>
SecondOrderAssembler
::
standardSubAssemblers
;
SubAssembler
::
SubAssembler
(
Operator
*
op
,
Assembler
*
assembler
,
...
...
@@ -98,20 +98,20 @@ namespace AMDiS {
coordsValid
=
false
;
// set values at QPs invalid
::
std
::
map
<
const
DOFVectorBase
<
double
>*
,
ValuesAtQPs
*>::
iterator
it1
;
std
::
map
<
const
DOFVectorBase
<
double
>*
,
ValuesAtQPs
*>::
iterator
it1
;
for
(
it1
=
valuesAtQPs
.
begin
();
it1
!=
valuesAtQPs
.
end
();
++
it1
)
{
((
*
it1
).
second
)
->
valid
=
false
;
}
// set gradients at QPs invalid
::
std
::
map
<
const
DOFVectorBase
<
double
>*
,
GradientsAtQPs
*>::
iterator
it2
;
std
::
map
<
const
DOFVectorBase
<
double
>*
,
GradientsAtQPs
*>::
iterator
it2
;
for
(
it2
=
gradientsAtQPs
.
begin
();
it2
!=
gradientsAtQPs
.
end
();
++
it2
)
{
((
*
it2
).
second
)
->
valid
=
false
;
}
int
myRank
=
omp_get_thread_num
();
// calls initElement of each term
::
std
::
vector
<
OperatorTerm
*>::
iterator
it
;
std
::
vector
<
OperatorTerm
*>::
iterator
it
;
for
(
it
=
terms
[
myRank
].
begin
();
it
!=
terms
[
myRank
].
end
();
++
it
)
{
(
*
it
)
->
initElement
(
elInfo
,
this
,
quad
);
}
...
...
@@ -298,20 +298,20 @@ namespace AMDiS {
ZeroOrderAssembler
*
newAssembler
;
::
std
::
vector
<
SubAssembler
*>
*
subAssemblers
=
std
::
vector
<
SubAssembler
*>
*
subAssemblers
=
optimized
?
&
optimizedSubAssemblers
:
&
standardSubAssemblers
;
int
myRank
=
omp_get_thread_num
();
::
std
::
vector
<
OperatorTerm
*>
opTerms
=
op
->
zeroOrder
[
myRank
];
std
::
vector
<
OperatorTerm
*>
opTerms
=
op
->
zeroOrder
[
myRank
];
sort
(
opTerms
.
begin
(),
opTerms
.
end
());
// check if a new assembler is needed
if
(
quad
)
{
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
subAssemblers
->
size
());
i
++
)
{
::
std
::
vector
<
OperatorTerm
*>
assTerms
=
*
((
*
subAssemblers
)[
i
]
->
getTerms
());
std
::
vector
<
OperatorTerm
*>
assTerms
=
*
((
*
subAssemblers
)[
i
]
->
getTerms
());
sort
(
assTerms
.
begin
(),
assTerms
.
end
());
...
...
@@ -354,7 +354,7 @@ namespace AMDiS {
FirstOrderType
type
,
bool
optimized
)
{
::
std
::
vector
<
SubAssembler
*>
*
subAssemblers
=
std
::
vector
<
SubAssembler
*>
*
subAssemblers
=
optimized
?
(
type
==
GRD_PSI
?
&
optimizedSubAssemblersGrdPsi
:
...
...
@@ -364,7 +364,7 @@ namespace AMDiS {
&
standardSubAssemblersGrdPhi
);
int
myRank
=
omp_get_thread_num
();
::
std
::
vector
<
OperatorTerm
*>
opTerms
std
::
vector
<
OperatorTerm
*>
opTerms
=
(
type
==
GRD_PSI
)
?
op
->
firstOrderGrdPsi
[
myRank
]
:
op
->
firstOrderGrdPhi
[
myRank
];
...
...
@@ -381,7 +381,7 @@ namespace AMDiS {
// check if a new assembler is needed
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
subAssemblers
->
size
());
i
++
)
{
::
std
::
vector
<
OperatorTerm
*>
assTerms
=
*
((
*
subAssemblers
)[
i
]
->
getTerms
());
std
::
vector
<
OperatorTerm
*>
assTerms
=
*
((
*
subAssemblers
)[
i
]
->
getTerms
());
sort
(
assTerms
.
begin
(),
assTerms
.
end
());
...
...
@@ -440,18 +440,18 @@ namespace AMDiS {
SecondOrderAssembler
*
newAssembler
;
::
std
::
vector
<
SubAssembler
*>
*
subAssemblers
=
std
::
vector
<
SubAssembler
*>
*
subAssemblers
=
optimized
?
&
optimizedSubAssemblers
:
&
standardSubAssemblers
;
::
std
::
vector
<
OperatorTerm
*>
opTerms
=
op
->
zeroOrder
[
myRank
];
std
::
vector
<
OperatorTerm
*>
opTerms
=
op
->
zeroOrder
[
myRank
];
sort
(
opTerms
.
begin
(),
opTerms
.
end
());
// check if a new assembler is needed
for
(
int
i
=
0
;
i
<
static_cast
<
int
>
(
subAssemblers
->
size
());
i
++
)
{
::
std
::
vector
<
OperatorTerm
*>
assTerms
=
*
((
*
subAssemblers
)[
i
]
->
getTerms
());
std
::
vector
<
OperatorTerm
*>
assTerms
=
*
((
*
subAssemblers
)[
i
]
->
getTerms
());
sort
(
assTerms
.
begin
(),
assTerms
.
end
());
...
...
@@ -508,7 +508,7 @@ namespace AMDiS {
}
int
myRank
=
omp_get_thread_num
();
::
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
for
(
termIt
=
terms
[
myRank
].
begin
();
termIt
!=
terms
[
myRank
].
end
();
++
termIt
)
{
(
static_cast
<
ZeroOrderTerm
*>
((
*
termIt
)))
->
getC
(
elInfo
,
nPoints
,
c
);
}
...
...
@@ -565,7 +565,7 @@ namespace AMDiS {
}
int
myRank
=
omp_get_thread_num
();
::
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
for
(
termIt
=
terms
[
myRank
].
begin
();
termIt
!=
terms
[
myRank
].
end
();
++
termIt
)
{
(
static_cast
<
ZeroOrderTerm
*>
((
*
termIt
)))
->
getC
(
elInfo
,
nPoints
,
c
);
}
...
...
@@ -615,7 +615,7 @@ namespace AMDiS {
c
[
iq
]
=
0.0
;
}
::
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
for
(
termIt
=
terms
[
myRank
].
begin
();
termIt
!=
terms
[
myRank
].
end
();
++
termIt
)
{
(
static_cast
<
ZeroOrderTerm
*>
((
*
termIt
)))
->
getC
(
elInfo
,
nPoints
,
c
);
}
...
...
@@ -668,7 +668,7 @@ namespace AMDiS {
}
int
myRank
=
omp_get_thread_num
();
::
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
for
(
termIt
=
terms
[
myRank
].
begin
();
termIt
!=
terms
[
myRank
].
end
();
++
termIt
)
{
(
static_cast
<
ZeroOrderTerm
*>
((
*
termIt
)))
->
getC
(
elInfo
,
nPoints
,
c
);
}
...
...
@@ -738,7 +738,7 @@ namespace AMDiS {
firstCall
=
false
;
}
::
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
std
::
vector
<
OperatorTerm
*>::
iterator
termIt
;
int
myRank
=
omp_get_thread_num
();
double
c
=
0.0
;
...
...
AMDiS/src/BFGS_Precond.cc
View file @
745701c4
...
...
@@ -40,7 +40,7 @@ namespace AMDiS
double
beta
;
double
*
alpha
=
GET_MEMORY
(
double
,
k
);
::
std
::
deque
<
BFGS_Vectors
>::
iterator
pairsIterator
(
pairsVec
.
begin
());
std
::
deque
<
BFGS_Vectors
>::
iterator
pairsIterator
(
pairsVec
.
begin
());
while
(
pairsIterator
!=
pairsVec
.
end
())
{
alpha
[
i
]
=
pairsIterator
->
s
*
*
vec
;
...
...
AMDiS/src/BasisFunction.cc
View file @
745701c4
...
...
@@ -15,7 +15,7 @@ namespace AMDiS {
/* are those corresponding to these barycentric coordinates. */
/****************************************************************************/
BasisFunction
::
BasisFunction
(
const
::
std
::
string
&
name_
,
int
dim_
,
int
degree_
)
BasisFunction
::
BasisFunction
(
const
std
::
string
&
name_
,
int
dim_
,
int
degree_
)
:
name
(
name_
),
degree
(
degree_
),
dim
(
dim_
)
...
...
AMDiS/src/BasisFunction.h
View file @
745701c4
...
...
@@ -131,7 +131,7 @@ namespace AMDiS {
/** \brief
* Creates a BasisFunction object of given dim and degree
*/
BasisFunction
(
const
::
std
::
string
&
name_
,
int
dim_
,
int
degree_
);
BasisFunction
(
const
std
::
string
&
name_
,
int
dim_
,
int
degree_
);
/** \brief
* destructor
...
...
@@ -214,7 +214,7 @@ namespace AMDiS {
/** \brief
* Returns \ref name of BasisFunction
*/
inline
const
::
std
::
string
&
getName
()
const
{
inline
const
std
::
string
&
getName
()
const
{
return
name
;
};
...
...
@@ -415,7 +415,7 @@ namespace AMDiS {
/** \brief
* Textual description
*/
::
std
::
string
name
;
std
::
string
name
;
/** \brief
* Number of basisfunctions on one Element
...
...
@@ -445,30 +445,30 @@ namespace AMDiS {
/** \brief
* Vector of the local functions
*/
::
std
::
vector
<
BasFctType
*>
*
phi
;
std
::
vector
<
BasFctType
*>
*
phi
;
/** \brief
* Vector of gradients
*/
::
std
::
vector
<
GrdBasFctType
*>
*
grdPhi
;
std
::
vector
<
GrdBasFctType
*>
*
grdPhi
;
/** \brief
* Vector of second derivatives
*/
::
std
::
vector
<
D2BasFctType
*>
*
d2Phi
;
std
::
vector
<
D2BasFctType
*>
*
d2Phi
;
/** \brief
* Is used by function evalGrdUh. To make it thread safe, we need a
* temporary DimVec for every thread.
*/
::
std
::
vector
<
DimVec
<
double
>*
>
grdTmpVec1
;
std
::
vector
<
DimVec
<
double
>*
>
grdTmpVec1
;
/** \brief
* Is used by function evalGrdUh. To make it thread safe, we need a
* temporary DimVec for every thread.
*/
::
std
::
vector
<
DimVec
<
double
>*
>
grdTmpVec2
;
std
::
vector
<
DimVec
<
double
>*
>
grdTmpVec2
;
};
}
...
...
AMDiS/src/BiCGSolver.h
View file @
745701c4
...
...
@@ -66,7 +66,7 @@ namespace AMDiS {
/** \brief
* constructor
*/
BiCGSolver
(
::
std
::
string
name
);
BiCGSolver
(
std
::
string
name
);
/** \brief
* destructor
...
...
AMDiS/src/BiCGSolver.hh
View file @
745701c4
...
...
@@ -3,7 +3,7 @@
namespace
AMDiS
{
template
<
typename
VectorType
>
BiCGSolver
<
VectorType
>::
BiCGSolver
(
::
std
::
string
name
)
BiCGSolver
<
VectorType
>::
BiCGSolver
(
std
::
string
name
)
:
OEMSolver
<
VectorType
>
(
name
),
rstar
(
NULL
),
d
(
NULL
),
s
(
NULL
),
CAd
(
NULL
),
h
(
NULL
)
{
...
...
AMDiS/src/BiCGStab.h
View file @
745701c4
...
...
@@ -68,7 +68,7 @@ namespace AMDiS
/** \brief
* constructor
*/
BiCGStab
(
::
std
::
string
name
);
BiCGStab
(
std
::
string
name
);
/** \brief
* destructor
...
...
AMDiS/src/BiCGStab.hh
View file @
745701c4
...
...
@@ -4,7 +4,7 @@ namespace AMDiS
{
template
<
typename
VectorType
>
BiCGStab
<
VectorType
>::
BiCGStab
(
::
std
::
string
name
)
BiCGStab
<
VectorType
>::
BiCGStab
(
std
::
string
name
)
:
OEMSolver
<
VectorType
>
(
name
),
r
(
NULL
),
rstar
(
NULL
),
...
...
AMDiS/src/BiCGStab2.h
View file @
745701c4
...
...
@@ -67,7 +67,7 @@ namespace AMDiS
/** \brief
* constructor
*/
BiCGStab2
(
::
std
::
string
name
);
BiCGStab2
(
std
::
string
name
);
/** \brief
* destructor
...
...
AMDiS/src/BiCGStab2.hh
View file @
745701c4
...
...
@@ -4,7 +4,7 @@ namespace AMDiS
{
template
<
typename
VectorType
>
BiCGStab2
<
VectorType
>::
BiCGStab2
(
::
std
::
string
name
)
BiCGStab2
<
VectorType
>::
BiCGStab2
(
std
::
string
name
)
:
OEMSolver
<
VectorType
>
(
name
),
r
(
NULL
),
rstar
(
NULL
),
u
(
NULL
),
v
(
NULL
),
s
(
NULL
),
w
(
NULL
),
t
(
NULL
),
xmin
(
NULL
)
...
...
AMDiS/src/BiCGStab_M.h
View file @
745701c4
...
...
@@ -63,7 +63,7 @@ namespace AMDiS {
/** \brief
* constructor
*/
BiCGStab_M
(
::
std
::
string
name
);
BiCGStab_M
(
std
::
string
name
);
/** \brief
* destructor
...
...
AMDiS/src/BiCGStab_M.hh
View file @
745701c4
namespace
AMDiS
{
template
<
typename
VectorType
>
BiCGStab_M
<
VectorType
>::
BiCGStab_M
(
::
std
::
string
name
)
:
OEMSolver
<
VectorType
>
(
name
)
{}
BiCGStab_M
<
VectorType
>::
BiCGStab_M
(
std
::
string
name
)
:
OEMSolver
<
VectorType
>
(
name
)
{}
template
<
typename
VectorType
>
BiCGStab_M
<
VectorType
>::~
BiCGStab_M
()
{}
...
...
AMDiS/src/BoundaryManager.cc
View file @
745701c4
...
...
@@ -14,7 +14,7 @@ namespace AMDiS {
const
DOFVectorBase
<
double
>
*
dv
)
{
double
result
=
0
;
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
for
(
it
=
localBCs
.
begin
();
it
!=
localBCs
.
end
();
++
it
)
{
if
((
*
it
).
second
)
result
+=
(
*
it
).
second
->
boundResidual
(
elInfo
,
matrix
,
dv
);
...
...
@@ -32,7 +32,7 @@ namespace AMDiS {
int
nBasFcts
=
basisFcts
->
getNumber
();
DOFAdmin
*
admin
=
feSpace
->
getAdmin
();
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
if
(
localBCs
.
size
()
>
0
)
{
...
...
@@ -75,7 +75,7 @@ namespace AMDiS {
int
nBasFcts
=
basisFcts
->
getNumber
();
DOFAdmin
*
admin
=
feSpace
->
getAdmin
();
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
if
(
localBCs
.
size
()
>
0
)
{
// get boundaries of all DOFs
...
...
@@ -105,7 +105,7 @@ namespace AMDiS {
void
BoundaryManager
::
initMatrix
(
DOFMatrix
*
matrix
)
{
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
for
(
it
=
localBCs
.
begin
();
it
!=
localBCs
.
end
();
++
it
)
{
if
((
*
it
).
second
)
{
...
...
@@ -125,7 +125,7 @@ namespace AMDiS {
void
BoundaryManager
::
exitMatrix
(
DOFMatrix
*
matrix
)
{
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
for
(
it
=
localBCs
.
begin
();
it
!=
localBCs
.
end
();
++
it
)
{
if
((
*
it
).
second
)
{
if
(
!
(
*
it
).
second
->
isDirichlet
())
{
...
...
@@ -144,7 +144,7 @@ namespace AMDiS {
void
BoundaryManager
::
initVector
(
DOFVectorBase
<
double
>
*
vector
)
{
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
for
(
it
=
localBCs
.
begin
();
it
!=
localBCs
.
end
();
++
it
)
{
if
((
*
it
).
second
)
{
if
(
!
(
*
it
).
second
->
isDirichlet
())
{
...
...
@@ -163,7 +163,7 @@ namespace AMDiS {
void
BoundaryManager
::
exitVector
(
DOFVectorBase
<
double
>
*
vector
)
{
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>::
iterator
it
;
for
(
it
=
localBCs
.
begin
();
it
!=
localBCs
.
end
();
++
it
)
{
if
((
*
it
).
second
)
{
if
(
!
(
*
it
).
second
->
isDirichlet
())
{
...
...
AMDiS/src/BoundaryManager.h
View file @
745701c4
...
...
@@ -97,11 +97,11 @@ namespace AMDiS {
// */
// void fillGlobalBoundVector(DOFVectorBase<BoundaryType> *bound);
const
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>&
getBoundaryConditionMap
()
{
const
std
::
map
<
BoundaryType
,
BoundaryCondition
*>&
getBoundaryConditionMap
()
{
return
localBCs
;
};
void
setBoundaryConditionMap
(
const
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>&
bcs
)
{
void
setBoundaryConditionMap
(
const
std
::
map
<
BoundaryType
,
BoundaryCondition
*>&
bcs
)
{
localBCs
=
bcs
;
};
...
...
@@ -109,7 +109,7 @@ namespace AMDiS {
/** \brief
* Map of managed local boundary conditions.
*/
::
std
::
map
<
BoundaryType
,
BoundaryCondition
*>
localBCs
;
std
::
map
<
BoundaryType
,
BoundaryCondition
*>
localBCs
;
};
}
...
...
AMDiS/src/BoundaryManager.hh
View file @
745701c4
...
...
@@ -13,7 +13,7 @@ namespace AMDiS {
double
BoundaryManager
<
T
>::
boundResidual
(
ElInfo
*
elInfo
,
Estimator
<
T
>
*
estimator
)
{
double
result
=
0
;
typename
::
std
::
list
<
LocalBC
<
T
>*>::
iterator
it
;
typename
std
::
list
<
LocalBC
<
T
>*>::
iterator
it
;
for
(
it
=
localBCs
.
begin
();
it
!=
localBCs
.
end
();
++
it
)
{
result
+=
(
*
it
)
->
boundResidual
(
elInfo
,
estimator
);
}
...
...
@@ -75,7 +75,7 @@ namespace AMDiS {
LocalBC
<
T
>
*
localBC
;
DOFAdmin
*
admin
=
feSpace
->
getAdmin
();
typename
::
std
::
list
<
LocalBC
<
T
>*>::
iterator
it
;
typename
std
::
list
<
LocalBC
<
T
>*>::
iterator
it
;
if
(
localBCs
.
size
()
>
0
)
{
...
...
@@ -109,7 +109,7 @@ namespace AMDiS {
LocalBC
<
T
>
*
localBC
;
DOFAdmin
*
admin
=
feSpace
->
getAdmin
();
typename
::
std
::
list
<
LocalBC
<
T
>*>::
iterator
it
;
typename
std
::
list
<
LocalBC
<
T
>*>::
iterator
it
;
if
(
localBCs
.
size
()
>
0
)
{
...
...
AMDiS/src/BoxSmoother.h
View file @
745701c4
...
...
@@ -17,7 +17,7 @@ namespace AMDiS {
class
BoxSmoother
:
public
SmootherBase
<
Matrix
<
DOFMatrix
*>
,
Vector
<
SparseVector
<
double
>*>
,
Vector
<
::
std
::
set
<
DegreeOfFreedom
>*>
>
Vector
<
std
::
set
<
DegreeOfFreedom
>*>
>
{
public:
MEMORY_MANAGED
(
BoxSmoother
);
...
...
@@ -25,23 +25,23 @@ namespace AMDiS {
class
Creator
:
public
SmootherCreator
<
Matrix
<
DOFMatrix
*>
,
Vector
<
SparseVector
<
double
>*>
,
Vector
<
::
std
::
set
<
DegreeOfFreedom
>*>
>
Vector
<
std
::
set
<
DegreeOfFreedom
>*>
>
{
public:
MEMORY_MANAGED
(
Creator
);
SmootherBase
<
Matrix
<
DOFMatrix
*>
,
Vector
<
SparseVector
<
double
>*>
,
Vector
<
::
std
::
set
<
DegreeOfFreedom
>*>
>*
Vector
<
std
::
set
<
DegreeOfFreedom
>*>
>*
create
()
{
return
NEW
BoxSmoother
(
this
->
name
);
};
};
BoxSmoother
(
::
std
::
string
name
)
BoxSmoother
(
std
::
string
name
)
:
SmootherBase
<
Matrix
<
DOFMatrix
*>
,
Vector
<
SparseVector
<
double
>*>
,
Vector
<
::
std
::
set
<
DegreeOfFreedom
>*>
>
(
name
),
Vector
<
std
::
set
<
DegreeOfFreedom
>*>
>
(
name
),
boxMatrix_
(
NULL
),
boxSolution_
(
NULL
),
boxRHS_
(
NULL
),
...
...
@@ -64,7 +64,7 @@ namespace AMDiS {
Vector
<
SparseVector
<
double
>*>
*
solution
,
Vector
<
SparseVector
<
double
>*>
*
rhs
,
int
iterations
,
const
Vector
<
::
std
::
set
<
DegreeOfFreedom
>*>
&
dofSet
)
const
Vector
<
std
::
set
<
DegreeOfFreedom
>*>
&
dofSet
)
{
FUNCNAME
(
"BoxSmoother::smooth()"
);
...
...
@@ -87,10 +87,10 @@ namespace AMDiS {
// create local equation system
int
boxSize
=
0
;
::
std
::
vector
<
int
>
offset
(
numComponents_
,
0
);
::
std
::
vector
<
::
std
::
map
<
DegreeOfFreedom
,
int
>
>
indexOfDOF
(
numComponents_
);
::
std
::
set
<
DegreeOfFreedom
>::
const_iterator
dofIt
,
dofBegin
,
dofEnd
;
::
std
::
vector
<
MatEntry
>::
iterator
rowIt
,
rowBegin
,
rowEnd
;
std
::
vector
<
int
>
offset
(
numComponents_
,
0
);
std
::
vector
<
std
::
map
<
DegreeOfFreedom
,
int
>
>
indexOfDOF
(
numComponents_
);
std
::
set
<
DegreeOfFreedom
>::
const_iterator
dofIt
,
dofBegin
,
dofEnd
;
std
::
vector
<
MatEntry
>::
iterator
rowIt
,
rowBegin
,
rowEnd
;
int
pos
;
for
(
i
=
0
;
i
<
numComponents_
;
i
++
)
{
...
...
@@ -218,7 +218,7 @@ namespace AMDiS {
Vector
<
double
>
*
boxSolution_
;
Vector
<
double
>
*
boxRHS_
;
int
numComponents_
;
::
std
::
vector
<
int
>
numDOFs_
;
std
::
vector
<
int
>
numDOFs_
;
int
sumDOFs_
;
DirectSolverInterface
<
Matrix
<
double
>
,
Vector
<
double
>
>
*
directSolver_
;
};
...
...
AMDiS/src/CGSolver.h
View file @
745701c4
...
...
@@ -71,7 +71,7 @@ namespace AMDiS {
/** \brief
* constructor
*/
CGSolver
(
::
std
::
string
name
);
CGSolver
(
std
::
string
name
);
/** \brief
* destructor
...
...
AMDiS/src/CGSolver.hh
View file @
745701c4
...
...
@@ -7,7 +7,7 @@
namespace
AMDiS
{
template
<
typename
VectorType
>
CGSolver
<
VectorType
>::
CGSolver
(
::
std
::
string
name
)
CGSolver
<
VectorType
>::
CGSolver
(
std
::
string
name
)
:
OEMSolver
<
VectorType
>
(
name
)
{}
...
...
@@ -22,7 +22,7 @@ namespace AMDiS {
const
double
TOL
=
1.e-30
;
//
::
std::cout << "b: " <<
::
std::endl;
// std::cout << "b: " << std::endl;
// print(b);
// If norm of b is smaller than the tolarance, we can assume b to be zero.
...
...
@@ -35,7 +35,7 @@ namespace AMDiS {
return
(
0
);
}
//
::
std::cout << "x: " <<
::
std::endl;
// std::cout << "x: " << std::endl;
// print(x);
// p is temporaly used to calculate -x.
...
...
@@ -44,11 +44,11 @@ namespace AMDiS {
// r = b - Ax
matVec
->
matVec
(
NoTranspose
,
*
p
,
*
r
);
//
::
std::cout << "-Ax: " <<
::
std::endl;
// std::cout << "-Ax: " << std::endl;
// print(r);
*
r
+=
*
b
;