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
iwr
amdis
Commits
b295fec5
Commit
b295fec5
authored
Jul 04, 2017
by
Praetorius, Simon
Browse files
coupling-baseproblem made a base-problem
parent
0ee52c8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
extensions/base_problems/CouplingBaseProblem2_cxx11.h
View file @
b295fec5
...
...
@@ -103,27 +103,28 @@ namespace extensions {
*
* \brief Structur to couple BaseProblems of variouse types
*/
template
<
typename
ProblemType
=
ProblemStat
,
typename
...
BaseProblemTypes
>
class
CouplingBaseProblem
:
public
CouplingIterationInterface
,
public
CouplingTimeInterface
,
public
AMDiS
::
detail
::
CouplingProblemStat
<
ProblemType
>
template
<
typename
ProblemType
=
ProblemStat
,
typename
...
BaseProblemTypes
>
class
CouplingBaseProblem
:
public
CouplingIterationInterface
,
public
CouplingTimeInterface
,
public
AMDiS
::
detail
::
CouplingProblemStat
<
ProblemType
>
{
public:
typedef
AMDiS
::
detail
::
CouplingProblemStat
<
ProblemType
>
CProblemStat
;
typedef
std
::
tuple
<
BaseProblemTypes
&
...
>
BaseProblemsTupleType
;
template
<
typename
...
BaseProblemTypes_
>
CouplingBaseProblem
(
std
::
string
name_
,
BaseProblemTypes
_
&
&
...
baseProblems_
)
:
ProblemIterationInterface
()
,
// virtual base class constructor
ProblemTimeInterface
()
,
// virtual base class constructor
CProblemStat
(
name_
)
,
baseProblems
(
baseProblems_
...)
,
name
(
name_
)
public:
CouplingBaseProblem
(
std
::
string
name_
,
BaseProblemTypes
&
...
baseProblems_
)
:
ProblemIterationInterface
()
// virtual base class constructor
,
ProblemTimeInterface
()
// virtual base class constructor
,
CProblemStat
(
name_
)
,
baseProblems
(
baseProblems_
...)
,
name
(
name_
)
{
dow
=
Global
::
getGeo
(
WORLD
);
Parameters
::
get
(
name_
+
"->dim"
,
dim
);
}
~
CouplingBaseProblem
()
{
}
virtual
~
CouplingBaseProblem
()
{
}
/**
* Add the problems to the iterationInterface, timeInterface and couplingProblemStat.
...
...
@@ -144,13 +145,17 @@ public:
// initialize all ProblemStat
CProblemStat
::
initialize
(
initFlag
,
adoptProblem
,
adoptFlag
);
}
// set mesh dimension
dim
=
CProblemStat
::
getMesh
(
0
)
->
getDim
();
virtual
void
initData
()
{
tools
::
FOR_EACH
<
detail
::
InitData
>::
loop
(
baseProblems
);
}
virtual
void
initData
()
{}
virtual
void
finalizeData
()
{}
virtual
void
finalizeData
()
{
tools
::
FOR_EACH
<
detail
::
FinalizeData
>::
loop
(
baseProblems
);
}
/**
* At first the initData method is called for all baseProblems, then
...
...
@@ -159,16 +164,9 @@ public:
**/
virtual
void
initTimeInterface
()
{
tools
::
FOR_EACH
<
detail
::
InitData
>::
loop
(
baseProblems
);
initData
();
tools
::
FOR_EACH
<
detail
::
FillOperators
>::
loop
(
baseProblems
);
fillCouplingOperators
();
tools
::
FOR_EACH
<
detail
::
FillBoundaryConditions
>::
loop
(
baseProblems
);
fillCouplingBoundaryConditions
();
tools
::
FOR_EACH
<
detail
::
FinalizeData
>::
loop
(
baseProblems
);
fillOperators
();
fillBoundaryConditions
();
finalizeData
();
}
...
...
@@ -176,6 +174,17 @@ public:
virtual
void
fillCouplingOperators
()
{}
virtual
void
fillCouplingBoundaryConditions
()
{}
virtual
void
fillOperators
()
{
tools
::
FOR_EACH
<
detail
::
FillOperators
>::
loop
(
baseProblems
);
fillCouplingOperators
();
}
virtual
void
fillBoundaryConditions
()
{
tools
::
FOR_EACH
<
detail
::
FillBoundaryConditions
>::
loop
(
baseProblems
);
fillCouplingBoundaryConditions
();
}
/// get the j-th solution-vector of the i-th problem
template
<
int
i
>
...
...
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