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
Aland, Sebastian
amdis
Commits
0e305139
Commit
0e305139
authored
Sep 05, 2013
by
Praetorius, Simon
Browse files
CouplingBaseProblem added
parent
276a067a
Changes
4
Hide whitespace changes
Inline
Side-by-side
extensions/base_problems/CouplingBaseProblem.h
View file @
0e305139
/** \file Coupl
ed
BaseProblem.h */
/** \file Coupl
ing
BaseProblem.h */
#ifndef COUPL
ED
_BASE_PROBLEM_H
#define COUPL
ED
_BASE_PROBLEM_H
#ifndef COUPL
ING
_BASE_PROBLEM_H
#define COUPL
ING
_BASE_PROBLEM_H
#include
"AMDiS.h"
...
...
@@ -21,14 +21,14 @@ using namespace AMDiS;
* \brief
*/
template
<
class
ProblemType
=
ProblemStat
,
class
BaseProblemType
=
BaseProblem
<
ProblemStat
>
>
class
Coupl
ed
BaseProblem
:
public
CouplingIterationInterface
,
class
Coupl
ing
BaseProblem
:
public
CouplingIterationInterface
,
public
CouplingTimeInterface
,
public
CouplingProblemStatImpl
<
ProblemType
>
{
public:
typedef
CouplingProblemStatImpl
<
ProblemType
>
CProblemStat
;
Coupl
ed
BaseProblem
(
std
::
string
name_
,
Coupl
ing
BaseProblem
(
std
::
string
name_
,
BaseProblemType
*
prob0_
,
BaseProblemType
*
prob1_
=
NULL
,
BaseProblemType
*
prob2_
=
NULL
,
...
...
@@ -44,7 +44,7 @@ public:
if
(
prob4_
)
baseProblems
.
push_back
(
prob4_
);
}
~
Coupl
ed
BaseProblem
()
{
}
~
Coupl
ing
BaseProblem
()
{
}
virtual
void
initialize
(
Flag
initFlag
,
ProblemStat
*
adoptProblem
=
NULL
,
...
...
@@ -89,7 +89,7 @@ public:
/// get the j-th solution-vector of the i-th problem
DOFVector
<
double
>
*
getSolution
(
int
i
,
int
j
)
{
FUNCNAME
(
"Coupl
ed
BaseProblem::getSolution(i,j)"
);
{
FUNCNAME
(
"Coupl
ing
BaseProblem::getSolution(i,j)"
);
TEST_EXIT
(
0
<=
i
&&
0
<=
j
&&
i
<
baseProblems
.
size
()
&&
j
<=
baseProblems
[
i
]
->
getNumComponents
())
(
"Indices out of range!
\n
"
);
return
baseProblems
[
i
]
->
getSolution
()
->
getDOFVector
(
j
);
...
...
@@ -98,7 +98,7 @@ public:
/// pointer to the j-th feSpace of the i-th problem
inline
const
FiniteElemSpace
*
getFeSpace
(
int
i
,
int
j
=
0
)
{
FUNCNAME
(
"Coupl
ed
BaseProblem::getFeSpace(i,j)"
);
{
FUNCNAME
(
"Coupl
ing
BaseProblem::getFeSpace(i,j)"
);
TEST_EXIT
(
0
<=
i
&&
0
<=
j
&&
i
<
baseProblems
.
size
()
&&
j
<=
baseProblems
[
i
]
->
getNumComponents
())
(
"Indices out of range!
\n
"
);
return
baseProblems
[
i
]
->
getFeSpace
(
j
);
...
...
@@ -112,4 +112,4 @@ protected:
};
#endif // COUPL
ED
_BASE_PROBLEM_H
#endif // COUPL
ING
_BASE_PROBLEM_H
extensions/base_problems/CouplingBaseProblem2.h
View file @
0e305139
/** \file Coupl
ed
BaseProblem.h */
/** \file Coupl
ing
BaseProblem.h */
#ifndef COUPL
ED
_BASE_PROBLEM_H
#define COUPL
ED
_BASE_PROBLEM_H
#ifndef COUPL
ING
_BASE_PROBLEM_H
#define COUPL
ING
_BASE_PROBLEM_H
#include
"AMDiS.h"
...
...
@@ -72,7 +72,7 @@ namespace detail {
*/
template
<
class
ProblemType
=
ProblemStat
,
BOOST_PP_ENUM_PARAMS_WITH_A_DEFAULT
(
MAX_NUM_COUPLED_PROBLEMS
,
class
BaseProblemType
,
void
)
>
class
Coupl
ed
BaseProblem
:
public
CouplingIterationInterface
,
class
Coupl
ing
BaseProblem
:
public
CouplingIterationInterface
,
public
CouplingTimeInterface
,
public
CouplingProblemStatImpl
<
ProblemType
>
{
...
...
@@ -86,7 +86,7 @@ public:
#define COUPLED_BASEPROBLEM_CONSTRUCTOR(z, n, text) \
template<BOOST_PP_ENUM(BOOST_PP_INC(n), BASEPROBLEM_TYPES, BaseProblemType)> \
Coupl
ed
BaseProblem(std::string name_, \
Coupl
ing
BaseProblem(std::string name_, \
BOOST_PP_REPEAT_ ## z(BOOST_PP_INC(n), BASEPROBLEM_ARGS, nil) ) \
: CProblemStat(name_),\
baseProblems( BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), prob) ), name(name_) \
...
...
@@ -97,7 +97,7 @@ public:
#define COUPLED_BASEPROBLEM_CONSTRUCTOR2(z, n, text) \
template<BOOST_PP_ENUM(BOOST_PP_INC(n), BASEPROBLEM_TYPES, BaseProblemType)> \
Coupl
ed
BaseProblem(std::string name_, \
Coupl
ing
BaseProblem(std::string name_, \
BOOST_PP_REPEAT_ ## z(BOOST_PP_INC(n), BASEPROBLEM_ARGS2, nil) ) \
: CProblemStat(name_),\
baseProblems( BOOST_PP_ENUM_PARAMS_Z(z, BOOST_PP_INC(n), *prob) ), name(name_) \
...
...
@@ -107,7 +107,7 @@ public:
BOOST_PP_REPEAT
(
MAX_NUM_COUPLED_PROBLEMS
,
COUPLED_BASEPROBLEM_CONSTRUCTOR2
,
nil
)
~
Coupl
ed
BaseProblem
()
{
}
~
Coupl
ing
BaseProblem
()
{
}
void
initialize
(
Flag
initFlag
,
ProblemStat
*
adoptProblem
=
NULL
,
...
...
@@ -146,7 +146,7 @@ public:
/// get the j-th solution-vector of the i-th problem
template
<
int
i
>
DOFVector
<
double
>
*
getSolution
(
int
j
)
{
FUNCNAME
(
"Coupl
ed
BaseProblem::getSolution<i>(j)"
);
{
FUNCNAME
(
"Coupl
ing
BaseProblem::getSolution<i>(j)"
);
BOOST_STATIC_ASSERT_MSG
(
0
<=
i
&&
i
<
_LENGTH_
<
BaseProblemsTupleType
>::
value
,
"BaseProblem-index out of range"
);
TEST_EXIT
(
0
<=
j
&&
j
<=
_GET_
<
i
>
(
baseProblems
).
getNumComponents
())(
"Indices out of range!
\n
"
);
...
...
@@ -157,7 +157,7 @@ public:
/// pointer to the j-th feSpace of the i-th problem
template
<
int
i
>
inline
const
FiniteElemSpace
*
getFeSpace
(
int
j
=
0
)
{
FUNCNAME
(
"Coupl
ed
BaseProblem::getFeSpace<i>(j)"
);
{
FUNCNAME
(
"Coupl
ing
BaseProblem::getFeSpace<i>(j)"
);
BOOST_STATIC_ASSERT_MSG
(
0
<=
i
&&
i
<
_LENGTH_
<
BaseProblemsTupleType
>::
value
,
"BaseProblem index out of range"
);
TEST_EXIT
(
0
<=
j
&&
j
<=
_GET_
<
i
>
(
baseProblems
).
getNumComponents
())(
"Indices out of range!
\n
"
);
...
...
@@ -177,4 +177,4 @@ protected:
}
// end namespace AMDiS
#endif // COUPL
ED
_BASE_PROBLEM_H
#endif // COUPL
ING
_BASE_PROBLEM_H
extensions/base_problems/CouplingBaseProblem2_cxx11.h
View file @
0e305139
/** \file Coupl
ed
BaseProblem.h */
/** \file Coupl
ing
BaseProblem.h */
#ifndef COUPL
ED
_BASE_PROBLEM_H
#define COUPL
ED
_BASE_PROBLEM_H
#ifndef COUPL
ING
_BASE_PROBLEM_H
#define COUPL
ING
_BASE_PROBLEM_H
#include
"AMDiS.h"
...
...
@@ -70,7 +70,7 @@ namespace detail {
* \brief Structur to couple BaseProblems of variouse types
*/
template
<
typename
ProblemType
=
ProblemStat
,
typename
...
BaseProblemTypes
>
class
Coupl
ed
BaseProblem
:
public
CouplingIterationInterface
,
class
Coupl
ing
BaseProblem
:
public
CouplingIterationInterface
,
public
CouplingTimeInterface
,
public
CouplingProblemStatImpl
<
ProblemType
>
{
...
...
@@ -79,7 +79,7 @@ public:
typedef
std
::
tuple
<
BaseProblemTypes
&
...
>
BaseProblemsTupleType
;
template
<
typename
...
BaseProblemTypes_
>
Coupl
ed
BaseProblem
(
std
::
string
name_
,
BaseProblemTypes_
&&
...
baseProblems_
)
Coupl
ing
BaseProblem
(
std
::
string
name_
,
BaseProblemTypes_
&&
...
baseProblems_
)
:
CProblemStat
(
name_
),
baseProblems
(
baseProblems_
...),
name
(
name_
)
...
...
@@ -87,7 +87,7 @@ public:
dow
=
Global
::
getGeo
(
WORLD
);
}
~
Coupl
ed
BaseProblem
()
{
}
~
Coupl
ing
BaseProblem
()
{
}
void
initialize
(
Flag
initFlag
,
ProblemStat
*
adoptProblem
=
NULL
,
...
...
@@ -126,7 +126,7 @@ public:
/// get the j-th solution-vector of the i-th problem
template
<
int
i
>
DOFVector
<
double
>
*
getSolution
(
int
j
)
{
FUNCNAME
(
"Coupl
ed
BaseProblem::getSolution<i>(j)"
);
{
FUNCNAME
(
"Coupl
ing
BaseProblem::getSolution<i>(j)"
);
BOOST_STATIC_ASSERT_MSG
(
0
<=
i
&&
i
<
_LENGTH_
<
BaseProblemsTupleType
>::
value
,
"BaseProblem-index out of range"
);
TEST_EXIT
(
0
<=
j
&&
j
<=
_GET_
<
i
>
(
baseProblems
).
getNumComponents
())(
"Indices out of range!
\n
"
);
...
...
@@ -137,7 +137,7 @@ public:
/// pointer to the j-th feSpace of the i-th problem
template
<
int
i
>
inline
const
FiniteElemSpace
*
getFeSpace
(
int
j
=
0
)
{
FUNCNAME
(
"Coupl
ed
BaseProblem::getFeSpace<i>(j)"
);
{
FUNCNAME
(
"Coupl
ing
BaseProblem::getFeSpace<i>(j)"
);
BOOST_STATIC_ASSERT_MSG
(
0
<=
i
&&
i
<
_LENGTH_
<
BaseProblemsTupleType
>::
value
,
"BaseProblem index out of range"
);
TEST_EXIT
(
0
<=
j
&&
j
<=
_GET_
<
i
>
(
baseProblems
).
getNumComponents
())(
"Indices out of range!
\n
"
);
...
...
@@ -157,4 +157,4 @@ protected:
}
// end namespace AMDiS
#endif // COUPL
ED
_BASE_PROBLEM_H
#endif // COUPL
ING
_BASE_PROBLEM_H
extensions/base_problems/Coupl
ed
BaseProblem_RB.h
→
extensions/base_problems/Coupl
ing
BaseProblem_RB.h
View file @
0e305139
...
...
@@ -10,7 +10,7 @@
#include
"CouplingTimeInterface.h"
#include
"CouplingProblemStat.h"
#include
"BaseProblem_RB.h"
#include
"Coupl
ed
BaseProblem.h"
#include
"Coupl
ing
BaseProblem.h"
#include
"time/ExtendedRosenbrockStationary.h"
using
namespace
AMDiS
;
...
...
@@ -21,10 +21,10 @@ using namespace AMDiS;
*
* \brief
*/
class
Coupl
ed
BaseProblem_RB
:
public
Coupl
ed
BaseProblem
<
ExtendedRosenbrockStationary
,
BaseProblem_RB
>
class
Coupl
ing
BaseProblem_RB
:
public
Coupl
ing
BaseProblem
<
ExtendedRosenbrockStationary
,
BaseProblem_RB
>
{
public:
typedef
Coupl
ed
BaseProblem
<
ExtendedRosenbrockStationary
,
BaseProblem_RB
>
super
;
typedef
Coupl
ing
BaseProblem
<
ExtendedRosenbrockStationary
,
BaseProblem_RB
>
super
;
typedef
BaseProblem_RB
BaseProblemType
;
typedef
CouplingProblemStatImpl
<
ExtendedRosenbrockStationary
>
CProblemStat
;
...
...
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