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
iwr
amdis
Commits
6c30ac09
Commit
6c30ac09
authored
Aug 26, 2013
by
Praetorius, Simon
Browse files
small changes in some baseProblems
parent
6059fd73
Changes
4
Hide whitespace changes
Inline
Side-by-side
extensions/base_problems/CahnHilliard.cc
View file @
6c30ac09
...
@@ -125,48 +125,48 @@ void CahnHilliard::fillOperators()
...
@@ -125,48 +125,48 @@ void CahnHilliard::fillOperators()
// c
// c
Operator
*
opChMnew
=
new
Operator
(
feSpace
,
feSpace
);
Operator
*
opChMnew
=
new
Operator
(
feSpace
,
feSpace
);
opChMnew
->
add
ZeroOrder
Term
(
new
Simple_ZOT
);
opChMnew
->
addTerm
(
new
Simple_ZOT
);
Operator
*
opChMold
=
new
Operator
(
feSpace
,
feSpace
);
Operator
*
opChMold
=
new
Operator
(
feSpace
,
feSpace
);
opChMold
->
add
ZeroOrder
Term
(
new
VecAtQP_ZOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
)));
opChMold
->
addTerm
(
new
VecAtQP_ZOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
)));
// -nabla*(grad(c))
// -nabla*(grad(c))
Operator
*
opChL
=
new
Operator
(
feSpace
,
feSpace
);
Operator
*
opChL
=
new
Operator
(
feSpace
,
feSpace
);
opChL
->
add
SecondOrder
Term
(
new
Simple_SOT
);
opChL
->
addTerm
(
new
Simple_SOT
);
// div(M(c)grad(mu)), with M(c)=gamma/4*(c^2-1)^2
// div(M(c)grad(mu)), with M(c)=gamma/4*(c^2-1)^2
Operator
*
opChLM
=
new
Operator
(
feSpace
,
feSpace
);
Operator
*
opChLM
=
new
Operator
(
feSpace
,
feSpace
);
if
(
useMobility
)
{
if
(
useMobility
)
{
if
(
doubleWell
==
0
)
if
(
doubleWell
==
0
)
opChLM
->
add
SecondOrder
Term
(
new
VecAtQP_SOT
(
opChLM
->
addTerm
(
new
VecAtQP_SOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
),
prob
->
getSolution
()
->
getDOFVector
(
0
),
new
MobilityCH0
(
gamma
,
degree
)));
new
MobilityCH0
(
gamma
,
degree
)));
else
else
opChLM
->
add
SecondOrder
Term
(
new
VecAtQP_SOT
(
opChLM
->
addTerm
(
new
VecAtQP_SOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
),
prob
->
getSolution
()
->
getDOFVector
(
0
),
new
MobilityCH1
(
gamma
,
degree
)));
new
MobilityCH1
(
gamma
,
degree
)));
}
else
}
else
opChLM
->
add
SecondOrder
Term
(
new
Simple_SOT
(
gamma
));
opChLM
->
addTerm
(
new
Simple_SOT
(
gamma
));
// -2*c_old^3 + 3/2*c_old^2
// -2*c_old^3 + 3/2*c_old^2
Operator
*
opChMPowExpl
=
new
Operator
(
feSpace
,
feSpace
);
Operator
*
opChMPowExpl
=
new
Operator
(
feSpace
,
feSpace
);
opChMPowExpl
->
add
ZeroOrder
Term
(
new
VecAtQP_ZOT
(
opChMPowExpl
->
addTerm
(
new
VecAtQP_ZOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
),
prob
->
getSolution
()
->
getDOFVector
(
0
),
new
AMDiS
::
Pow
<
3
>
(
-
2.0
,
3
*
degree
)));
new
AMDiS
::
Pow
<
3
>
(
-
2.0
,
3
*
degree
)));
if
(
doubleWell
==
0
)
{
if
(
doubleWell
==
0
)
{
opChMPowExpl
->
add
ZeroOrder
Term
(
new
VecAtQP_ZOT
(
opChMPowExpl
->
addTerm
(
new
VecAtQP_ZOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
),
prob
->
getSolution
()
->
getDOFVector
(
0
),
new
AMDiS
::
Pow
<
2
>
(
3.0
/
2.0
,
2
*
degree
)));
new
AMDiS
::
Pow
<
2
>
(
3.0
/
2.0
,
2
*
degree
)));
}
}
// -3*c_old^2 * c
// -3*c_old^2 * c
Operator
*
opChMPowImpl
=
new
Operator
(
feSpace
,
feSpace
);
Operator
*
opChMPowImpl
=
new
Operator
(
feSpace
,
feSpace
);
opChMPowImpl
->
add
ZeroOrder
Term
(
new
VecAtQP_ZOT
(
opChMPowImpl
->
addTerm
(
new
VecAtQP_ZOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
),
prob
->
getSolution
()
->
getDOFVector
(
0
),
new
AMDiS
::
Pow
<
2
>
(
-
3.0
,
2
*
degree
)));
new
AMDiS
::
Pow
<
2
>
(
-
3.0
,
2
*
degree
)));
if
(
doubleWell
==
0
)
{
if
(
doubleWell
==
0
)
{
opChMPowImpl
->
add
ZeroOrder
Term
(
new
VecAtQP_ZOT
(
opChMPowImpl
->
addTerm
(
new
VecAtQP_ZOT
(
prob
->
getSolution
()
->
getDOFVector
(
0
),
prob
->
getSolution
()
->
getDOFVector
(
0
),
NULL
,
3.0
));
NULL
,
3.0
));
opChMPowImpl
->
add
ZeroOrder
Term
(
new
Simple_ZOT
(
-
0.5
));
opChMPowImpl
->
addTerm
(
new
Simple_ZOT
(
-
0.5
));
}
else
{
}
else
{
opChMPowImpl
->
addZeroOrderTerm
(
new
Simple_ZOT
(
1.0
));
opChMPowImpl
->
addZeroOrderTerm
(
new
Simple_ZOT
(
1.0
));
}
}
...
...
extensions/base_problems/CoupledBaseProblem.h
View file @
6c30ac09
...
@@ -52,7 +52,7 @@ public:
...
@@ -52,7 +52,7 @@ public:
{
{
for
(
size_t
i
=
0
;
i
<
baseProblems
.
size
();
i
++
)
{
for
(
size_t
i
=
0
;
i
<
baseProblems
.
size
();
i
++
)
{
for
(
size_t
j
=
0
;
j
<
baseProblems
[
i
]
->
getNumProblems
();
j
++
)
for
(
size_t
j
=
0
;
j
<
baseProblems
[
i
]
->
getNumProblems
();
j
++
)
addProblem
(
dynamic_cast
<
ProblemType
*>
(
baseProblems
[
i
]
->
getProblem
(
j
)));
this
->
addProblem
(
dynamic_cast
<
ProblemType
*>
(
baseProblems
[
i
]
->
getProblem
(
j
)));
addIterationInterface
(
baseProblems
[
i
]);
addIterationInterface
(
baseProblems
[
i
]);
addTimeInterface
(
baseProblems
[
i
]);
addTimeInterface
(
baseProblems
[
i
]);
...
@@ -108,7 +108,7 @@ protected:
...
@@ -108,7 +108,7 @@ protected:
std
::
vector
<
BaseProblemType
*>
baseProblems
;
std
::
vector
<
BaseProblemType
*>
baseProblems
;
unsigned
dim
;
// dimension of the meshes
unsigned
dim
;
// dimension of the meshes
unsigned
dow
;
// dimension of the world
unsigned
dow
;
// dimension of the world
};
};
...
...
extensions/base_problems/NavierStokes_TH_MultiPhase.cc
View file @
6c30ac09
...
@@ -24,6 +24,7 @@ NavierStokes_TH_MultiPhase::NavierStokes_TH_MultiPhase(const std::string &name_,
...
@@ -24,6 +24,7 @@ NavierStokes_TH_MultiPhase::NavierStokes_TH_MultiPhase(const std::string &name_,
viscosity2
(
1.0
),
viscosity2
(
1.0
),
density1
(
1.0
),
density1
(
1.0
),
density2
(
1.0
),
density2
(
1.0
),
phaseFieldType
(
0
),
densityPhase
(
NULL
),
densityPhase
(
NULL
),
viscosityPhase
(
NULL
),
viscosityPhase
(
NULL
),
multiPhase
(
NULL
)
multiPhase
(
NULL
)
...
...
extensions/base_problems/NavierStokes_TaylorHood.h
View file @
6c30ac09
...
@@ -31,12 +31,12 @@ using namespace AMDiS;
...
@@ -31,12 +31,12 @@ using namespace AMDiS;
* Navier-Stokes problem, using Taylor Hood elements
* Navier-Stokes problem, using Taylor Hood elements
* and theta-scheme time-integration
* and theta-scheme time-integration
*/
*/
class
NavierStokes_TaylorHood
:
public
BaseProblem
<
Extended
ProblemStat
>
class
NavierStokes_TaylorHood
:
public
BaseProblem
<
ProblemStat
>
{
{
public:
// typedefs
public:
// typedefs
typedef
NavierStokes_TaylorHood
self
;
typedef
NavierStokes_TaylorHood
self
;
typedef
BaseProblem
<
Extended
ProblemStat
>
super
;
typedef
BaseProblem
<
ProblemStat
>
super
;
public:
// methods
public:
// methods
...
...
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