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
87a761fb
Commit
87a761fb
authored
Sep 04, 2015
by
Praetorius, Simon
Browse files
small changes as preparation for the workshop
parent
84cdef04
Changes
8
Hide whitespace changes
Inline
Side-by-side
AMDiS/src/DOFIterator.h
View file @
87a761fb
...
...
@@ -247,15 +247,21 @@ namespace AMDiS {
public:
/// Constructs a DOFIterator for cont of type t
DOFIterator
(
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
)
DOFIterator
(
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
dynamic_cast
<
DOFAdmin
*>
(
obj
->
getFeSpace
()
->
getAdmin
()),
t
),
iteratedObject
(
obj
)
{}
/// Constructs a DOFIterator for cont of type t
DOFIterator
(
DOFIndexed
<
T
>&
obj
,
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
dynamic_cast
<
DOFAdmin
*>
(
obj
.
getFeSpace
()
->
getAdmin
()),
t
),
iteratedObject
(
&
obj
)
{}
/// Constructs a DOFIterator for cont of type t
DOFIterator
(
DOFAdmin
*
admin
,
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
)
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
admin
,
t
),
iteratedObject
(
obj
)
{}
...
...
@@ -332,15 +338,21 @@ namespace AMDiS {
{
public:
/// Constructs a DOFIterator for cont of type t
DOFConstIterator
(
const
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
)
DOFConstIterator
(
const
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
dynamic_cast
<
DOFAdmin
*>
(
obj
->
getFeSpace
()
->
getAdmin
()),
t
),
iteratedObject
(
obj
)
{}
/// Constructs a DOFIterator for cont of type t
DOFConstIterator
(
const
DOFIndexed
<
T
>&
obj
,
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
dynamic_cast
<
DOFAdmin
*>
(
obj
.
getFeSpace
()
->
getAdmin
()),
t
),
iteratedObject
(
&
obj
)
{}
/// Constructs a DOFIterator for cont of type t
DOFConstIterator
(
DOFAdmin
*
admin
,
const
DOFIndexed
<
T
>
*
obj
,
DOFIteratorType
t
)
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
admin
,
t
),
iteratedObject
(
obj
)
{}
...
...
@@ -419,7 +431,7 @@ namespace AMDiS {
typedef
typename
std
::
vector
<
T
>::
iterator
VectorIterator
;
/// Constructs a DOFIterator for cont of type t
DOFVectorIterator
(
std
::
vector
<
DOFVector
<
T
>*>
&
obj
,
DOFIteratorType
t
)
DOFVectorIterator
(
std
::
vector
<
DOFVector
<
T
>*>
&
obj
,
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
dynamic_cast
<
DOFAdmin
*>
(
obj
[
0
]
->
getFeSpace
()
->
getAdmin
()),
t
),
iteratedObject
(
obj
)
{
...
...
@@ -430,7 +442,7 @@ namespace AMDiS {
/// Constructs a DOFIterator for cont of type t
DOFVectorIterator
(
DOFAdmin
*
admin
,
std
::
vector
<
DOFVector
<
T
>*>
&
obj
,
DOFIteratorType
t
)
DOFIteratorType
t
=
USED_DOFS
)
:
DOFIteratorBase
(
admin
,
t
),
iteratedObject
(
obj
)
{
...
...
AMDiS/src/DOFVector.cc
View file @
87a761fb
...
...
@@ -89,7 +89,7 @@ namespace AMDiS {
template
<
>
double
DOFVector
<
double
>::
evalAtPoint
(
WorldVector
<
double
>
&
p
,
double
DOFVector
<
double
>::
evalAtPoint
(
WorldVector
<
double
>
const
&
p
,
ElInfo
*
oldElInfo
)
const
{
Mesh
*
mesh
=
feSpace
->
getMesh
();
...
...
@@ -140,7 +140,7 @@ namespace AMDiS {
template
<
>
WorldVector
<
double
>
DOFVector
<
WorldVector
<
double
>
>::
evalAtPoint
(
WorldVector
<
double
>
&
p
,
WorldVector
<
double
>
DOFVector
<
WorldVector
<
double
>
>::
evalAtPoint
(
WorldVector
<
double
>
const
&
p
,
ElInfo
*
oldElInfo
)
const
{
Mesh
*
mesh
=
feSpace
->
getMesh
();
...
...
@@ -380,7 +380,7 @@ namespace AMDiS {
D2Tmp
[
k
][
l
]
=
0.0
;
for
(
int
i
=
0
;
i
<
nBasFcts
;
i
++
)
{
WARNING
(
"not tested after index correction
\n
"
);
//
WARNING("not tested after index correction\n");
(
*
(
basFcts
->
getD2Phi
(
i
)))(
quad
->
getLambda
(
iq
),
D2Phi
);
for
(
int
k
=
0
;
k
<
parts
;
k
++
)
...
...
AMDiS/src/DOFVector.h
View file @
87a761fb
...
...
@@ -577,12 +577,17 @@ namespace AMDiS {
/// Eval DOFVector at given point p. If oldElInfo != NULL the search for
/// the element, where p is inside, starts from oldElInfo. implemented for:
/// double, WorldVector< double >
T
evalAtPoint
(
WorldVector
<
double
>
&
p
,
T
evalAtPoint
(
WorldVector
<
double
>
const
&
p
,
ElInfo
*
oldElInfo
=
NULL
)
const
{
FUNCNAME
(
"DOFVector::evalAtPoint())"
);
TEST_EXIT
(
false
)(
"Please implement your evaluation
\n
"
);
}
T
operator
()(
WorldVector
<
double
>
const
&
p
)
const
{
return
evalAtPoint
(
p
);
}
/// Determine the DegreeOfFreedom that has coords with minimal euclidean
/// distance to WorldVector p. return true if DOF is found, and false
...
...
@@ -651,11 +656,11 @@ namespace AMDiS {
BoundaryType
boundaryType
,
Quadrature
*
q
)
const
;
template
<
>
double
DOFVector
<
double
>::
evalAtPoint
(
WorldVector
<
double
>
&
p
,
double
DOFVector
<
double
>::
evalAtPoint
(
WorldVector
<
double
>
const
&
p
,
ElInfo
*
oldElInfo
)
const
;
template
<
>
WorldVector
<
double
>
DOFVector
<
WorldVector
<
double
>
>::
evalAtPoint
(
WorldVector
<
double
>
&
p
,
WorldVector
<
double
>
DOFVector
<
WorldVector
<
double
>
>::
evalAtPoint
(
WorldVector
<
double
>
const
&
p
,
ElInfo
*
oldElInfo
)
const
;
template
<
>
...
...
AMDiS/src/Expressions.h
View file @
87a761fb
...
...
@@ -795,6 +795,13 @@ operator<<(DOFVector<T>& result, const Term& term)
return
result
;
}
template
<
typename
T
>
DOFVector
<
T
>&
operator
<<
(
DOFVector
<
T
>&
result
,
T
value
)
{
result
.
set
(
value
);
return
result
;
}
/// Assign a constant value to a DOFVector
// template<typename T, typename S>
...
...
AMDiS/src/Mesh.h
View file @
87a761fb
...
...
@@ -496,6 +496,10 @@ namespace AMDiS {
* @param[out] coords DOF vector that stores the coordinates to each DOF.
*/
void
getDofIndexCoords
(
DOFVector
<
WorldVector
<
double
>
>&
coords
);
void
getDofCoords
(
DOFVector
<
WorldVector
<
double
>
>&
coords
)
{
getDofIndexCoords
(
coords
);
}
/** \brief
...
...
AMDiS/src/expressions/cmath_expr.hpp
View file @
87a761fb
...
...
@@ -590,6 +590,13 @@ namespace AMDiS
expressions
::
Abs
<
Term
>
>::
type
abs_
(
const
Term
&
t
)
{
return
expressions
::
Abs
<
Term
>
(
t
);
}
// TODO: Funktionsnamen ohne Unterstrich
// absolute value of a term
template
<
typename
Term
>
inline
typename
boost
::
enable_if
<
typename
traits
::
is_expr
<
Term
>::
type
,
expressions
::
Abs
<
Term
>
>::
type
absolute
(
const
Term
&
t
)
{
return
expressions
::
Abs
<
Term
>
(
t
);
}
// TODO: Funktionsnamen ohne Unterstrich
// signum of a term
template
<
typename
Term
>
inline
typename
boost
::
enable_if
<
...
...
AMDiS/src/expressions/hessianOf.hpp
View file @
87a761fb
...
...
@@ -68,9 +68,10 @@ namespace AMDiS
if
(
ot
&&
subAssembler
)
{
ERROR_EXIT
(
"Hessian expression not yet implemented for operator-terms!
\n
"
);
}
else
if
(
quad
)
}
else
if
(
quad
)
{
ERROR_EXIT
(
"Hessian expression not yet implemented for quadrature!
\n
"
);
vecDV
->
getD2AtQPs
(
elInfo
,
quad
,
NULL
,
vec
);
else
if
(
basisFct
)
{
}
else
if
(
basisFct
)
{
const
BasisFunction
*
localBasisFct
=
vecDV
->
getFeSpace
()
->
getBasisFcts
();
// get coefficients of DOFVector
...
...
@@ -140,7 +141,9 @@ namespace AMDiS
if
(
ot
&&
subAssembler
)
{
ERROR_EXIT
(
"Laplacian expression not yet implemented for operator-terms!
\n
"
);
}
else
if
(
quad
)
{
ERROR_EXIT
(
"Laplacian expression not yet implemented for quadrature!
\n
"
);
vecDV
->
getD2AtQPs
(
elInfo
,
quad
,
NULL
,
vec_tmp
);
vec
.
change_dim
(
size
(
vec_tmp
));
for
(
size_t
i
=
0
;
i
<
size
(
vec_tmp
);
i
++
)
{
vec
[
i
]
=
vec_tmp
[
i
][
0
][
0
];
for
(
int
j
=
1
;
j
<
Global
::
getGeo
(
WORLD
);
j
++
)
...
...
AMDiS/src/expressions/value_expr.hpp
View file @
87a761fb
...
...
@@ -292,6 +292,12 @@ namespace AMDiS
template
<
typename
T
>
inline
expressions
::
Reference
<
T
>
ref_
(
T
*
value
)
{
return
expressions
::
Reference
<
T
>
(
value
);
}
template
<
typename
T
>
inline
expressions
::
Reference
<
T
>
var
(
T
&
value
)
{
return
expressions
::
Reference
<
T
>
(
value
);
}
template
<
typename
T
>
inline
expressions
::
Reference
<
T
>
var
(
T
*
value
)
{
return
expressions
::
Reference
<
T
>
(
value
);
}
// unit vectors
template
<
int
I
>
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment