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
63917c5d
Commit
63917c5d
authored
Sep 19, 2013
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CouplingProblems extended
parent
f2548627
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
5 deletions
+30
-5
extensions/base_problems/BaseProblem.h
extensions/base_problems/BaseProblem.h
+2
-2
extensions/base_problems/CouplingBaseProblem.h
extensions/base_problems/CouplingBaseProblem.h
+10
-1
extensions/base_problems/CouplingBaseProblem2.h
extensions/base_problems/CouplingBaseProblem2.h
+8
-1
extensions/base_problems/CouplingBaseProblem2_cxx11.h
extensions/base_problems/CouplingBaseProblem2_cxx11.h
+10
-1
No files found.
extensions/base_problems/BaseProblem.h
View file @
63917c5d
...
...
@@ -63,10 +63,10 @@ public:
/// Initialisation of DOFVectors and AbstractFunctions,
/// is called in \ref initTimeInteface after feSpace and mesh are initialized
virtual
void
initData
()
{}
;
virtual
void
initData
()
{}
/// Method is called at the end of \ref initTimeInteface
virtual
void
finalizeData
()
{}
;
virtual
void
finalizeData
()
{}
/// calls \ref initData, \ref fillOperators and \ref fillBoundaryConditions in this ordering
virtual
void
initTimeInterface
()
...
...
extensions/base_problems/CouplingBaseProblem.h
View file @
63917c5d
...
...
@@ -34,7 +34,7 @@ public:
BaseProblemType
*
prob2_
=
NULL
,
BaseProblemType
*
prob3_
=
NULL
,
BaseProblemType
*
prob4_
=
NULL
)
:
CProblemStat
(
name_
)
:
CProblemStat
(
name_
)
,
name
(
name_
)
{
dow
=
Global
::
getGeo
(
WORLD
);
baseProblems
.
push_back
(
prob0_
);
...
...
@@ -66,6 +66,7 @@ public:
}
virtual
void
initData
()
{}
virtual
void
finalizeData
()
{}
virtual
void
initTimeInterface
()
{
...
...
@@ -80,6 +81,10 @@ public:
for
(
size_t
i
=
0
;
i
<
baseProblems
.
size
();
i
++
)
baseProblems
[
i
]
->
fillBoundaryConditions
();
fillCouplingBoundaryConditions
();
for
(
size_t
i
=
0
;
i
<
baseProblems
.
size
();
i
++
)
baseProblems
[
i
]
->
initData
();
finalizeData
();
}
...
...
@@ -103,12 +108,16 @@ public:
(
"Indices out of range!
\n
"
);
return
baseProblems
[
i
]
->
getFeSpace
(
j
);
}
std
::
string
getName
()
{
return
name
;
}
protected:
std
::
vector
<
BaseProblemType
*>
baseProblems
;
unsigned
dim
;
// dimension of the meshes
unsigned
dow
;
// dimension of the world
std
::
string
name
;
};
...
...
extensions/base_problems/CouplingBaseProblem2.h
View file @
63917c5d
...
...
@@ -57,6 +57,9 @@ namespace detail {
/// Functor for generic loops. Method initData() is called for each element in a sequence.
struct
InitData
{
template
<
typename
B
>
static
void
call
(
B
&
b
)
{
b
.
initData
();
}
};
/// Functor for generic loops. Method initData() is called for each element in a sequence.
struct
FinalizeData
{
template
<
typename
B
>
static
void
call
(
B
&
b
)
{
b
.
finalizeData
();
}
};
/// Functor for generic loops. Method fillOperators() is called for each element in a sequence.
struct
FillOperators
{
template
<
typename
B
>
static
void
call
(
B
&
b
)
{
b
.
fillOperators
();
}
};
...
...
@@ -126,7 +129,8 @@ public:
dim
=
CProblemStat
::
getMesh
(
0
)
->
getDim
();
}
virtual
void
initData
()
{}
virtual
void
initData
()
{}
virtual
void
finalizeData
()
{}
virtual
void
initTimeInterface
()
{
...
...
@@ -138,6 +142,9 @@ public:
tools
::
FOR_EACH
<
detail
::
FillBoundaryConditions
>::
loop
(
baseProblems
);
fillCouplingBoundaryConditions
();
tools
::
FOR_EACH
<
detail
::
FinalizeData
>::
loop
(
baseProblems
);
finalizeData
();
}
...
...
extensions/base_problems/CouplingBaseProblem2_cxx11.h
View file @
63917c5d
...
...
@@ -50,6 +50,12 @@ namespace detail {
static
void
call
(
BaseProblemType
&
baseProblem
)
{
baseProblem
.
initData
();
}
};
/// Functor for generic loops. Method initData() is called for each element in a sequence.
struct
FinalizeData
{
template
<
typename
BaseProblemType
>
static
void
call
(
BaseProblemType
&
baseProblem
)
{
baseProblem
.
finalizeData
();
}
};
/// Functor for generic loops. Method fillOperators() is called for each element in a sequence.
struct
FillOperators
{
template
<
typename
BaseProblemType
>
...
...
@@ -114,7 +120,7 @@ public:
}
virtual
void
initData
()
{}
virtual
void
finalizeData
()
{}
/**
* At first the initData method is called for all baseProblems, then
...
...
@@ -131,6 +137,9 @@ public:
tools
::
FOR_EACH
<
detail
::
FillBoundaryConditions
>::
loop
(
baseProblems
);
fillCouplingBoundaryConditions
();
tools
::
FOR_EACH
<
detail
::
FinalizeData
>::
loop
(
baseProblems
);
finalizeData
();
}
...
...
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