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
80ce300b
Commit
80ce300b
authored
Aug 26, 2013
by
Praetorius, Simon
Browse files
some compiler warnings removed
parent
f5c1cb21
Changes
53
Hide whitespace changes
Inline
Side-by-side
extensions/SingularDirichletBC.h
View file @
80ce300b
...
...
@@ -245,120 +245,123 @@ namespace details {
* of (singular/implicit) dirichlet boundary condition.
**/
struct
DirichletBcData
{
// init order:
// row, col, posType, valueType, pos, idx,
// signedDistFct, signedDistDOF, boundary_nr, meshIndicator, val0, val1, val2
// pos = WorldVector
DirichletBcData
(
int
i_
,
int
j_
,
WorldVector
<
double
>
pos_
,
double
val_
)
:
row
(
i_
),
col
(
j_
),
pos
(
pos_
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
),
pos
Type
(
0
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{}
:
row
(
i_
),
col
(
j_
),
pos
Type
(
0
),
valueType
(
0
),
pos
(
pos_
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
)
{}
DirichletBcData
(
int
i_
,
int
j_
,
WorldVector
<
double
>
pos_
,
DOFVector
<
double
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
pos
(
pos_
),
val1
(
&
val_
),
val0
(
0.0
),
val2
(
NULL
),
pos
Type
(
0
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{}
:
row
(
i_
),
col
(
j_
),
pos
Type
(
0
),
valueType
(
1
),
pos
(
pos_
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
)
{}
DirichletBcData
(
int
i_
,
int
j_
,
WorldVector
<
double
>
pos_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
pos
(
pos_
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
),
pos
Type
(
0
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{}
:
row
(
i_
),
col
(
j_
),
pos
Type
(
0
),
valueType
(
2
),
pos
(
pos_
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
)
{}
// pos = idx
DirichletBcData
(
int
i_
,
int
j_
,
DegreeOfFreedom
idx_
,
double
val_
)
:
row
(
i_
),
col
(
j_
),
idx
(
idx_
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
),
posType
(
1
),
valueType
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
1
),
valueType
(
0
),
idx
(
idx_
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
DegreeOfFreedom
idx_
,
DOFVector
<
double
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
idx
(
idx_
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
),
posType
(
1
),
valueType
(
1
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
1
),
valueType
(
1
),
idx
(
idx_
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
DegreeOfFreedom
idx_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
idx
(
idx_
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
),
posType
(
1
),
valueType
(
2
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
1
),
valueType
(
2
),
idx
(
idx_
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
)
{
pos
.
set
(
0.0
);
}
// pos = SignedDistFct
DirichletBcData
(
int
i_
,
int
j_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
*
SignedDistFct_
,
double
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistFct
(
SignedDistFct_
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
),
posType
(
2
),
valueType
(
0
),
idx
(
0
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
2
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
SignedDistFct_
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
*
SignedDistFct_
,
DOFVector
<
double
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistFct
(
SignedDistFct_
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
),
posType
(
2
),
valueType
(
1
),
idx
(
0
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
2
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
SignedDistFct_
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
*
SignedDistFct_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistFct
(
SignedDistFct_
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
),
posType
(
2
),
valueType
(
2
),
idx
(
0
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
2
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
SignedDistFct_
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
)
{
pos
.
set
(
0.0
);
}
// pos = SignedDistDOF
DirichletBcData
(
int
i_
,
int
j_
,
DOFVector
<
double
>
*
SignedDistDOF_
,
double
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
SignedDistDOF_
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
),
posType
(
3
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
3
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
SignedDistDOF_
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
DOFVector
<
double
>
*
SignedDistDOF_
,
DOFVector
<
double
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
SignedDistDOF_
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
),
posType
(
3
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
3
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
SignedDistDOF_
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
DOFVector
<
double
>
*
SignedDistDOF_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
SignedDistDOF_
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
),
posType
(
3
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
NULL
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
3
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
SignedDistDOF_
),
boundary_nr
(
0
),
meshIndicator
(
NULL
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
)
{
pos
.
set
(
0.0
);
}
// pos = meshindicator + boundary_nr
DirichletBcData
(
int
i_
,
int
j_
,
BoundaryType
nr
,
AbstractFunction
<
bool
,
WorldVector
<
double
>
>
*
meshIndicator_
,
double
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
NULL
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
),
posType
(
4
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
nr
),
meshIndicator
(
meshIndicator_
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
4
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
nr
),
meshIndicator
(
meshIndicator_
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
BoundaryType
nr
,
AbstractFunction
<
bool
,
WorldVector
<
double
>
>
*
meshIndicator_
,
DOFVector
<
double
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
NULL
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
),
posType
(
4
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
nr
),
meshIndicator
(
meshIndicator_
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
4
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
nr
),
meshIndicator
(
meshIndicator_
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
BoundaryType
nr
,
AbstractFunction
<
bool
,
WorldVector
<
double
>
>
*
meshIndicator_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
NULL
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
),
posType
(
4
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
nr
),
meshIndicator
(
meshIndicator
_
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
4
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
nr
),
meshIndicator
(
meshIndicator_
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val
_
)
{
pos
.
set
(
0.0
);
}
// pos = meshindicator
DirichletBcData
(
int
i_
,
int
j_
,
AbstractFunction
<
bool
,
WorldVector
<
double
>
>
*
meshIndicator_
,
double
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
NULL
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
),
posType
(
4
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
meshIndicator_
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
4
),
valueType
(
0
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
meshIndicator_
),
val0
(
val_
),
val1
(
NULL
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
AbstractFunction
<
bool
,
WorldVector
<
double
>
>
*
meshIndicator_
,
DOFVector
<
double
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
NULL
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
),
posType
(
4
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
meshIndicator_
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
4
),
valueType
(
1
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
meshIndicator_
),
val0
(
0.0
),
val1
(
&
val_
),
val2
(
NULL
)
{
pos
.
set
(
0.0
);
}
DirichletBcData
(
int
i_
,
int
j_
,
AbstractFunction
<
bool
,
WorldVector
<
double
>
>
*
meshIndicator_
,
AbstractFunction
<
double
,
WorldVector
<
double
>
>
&
val_
)
:
row
(
i_
),
col
(
j_
),
SignedDistDOF
(
NULL
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val_
),
posType
(
4
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
meshIndicator
_
)
{
pos
.
set
(
0.0
);
}
:
row
(
i_
),
col
(
j_
),
posType
(
4
),
valueType
(
2
),
idx
(
0
),
SignedDistFct
(
NULL
),
SignedDistDOF
(
NULL
),
boundary_nr
(
0
),
meshIndicator
(
meshIndicator_
),
val0
(
0.0
),
val1
(
NULL
),
val2
(
&
val
_
)
{
pos
.
set
(
0.0
);
}
void
addToList
(
const
FiniteElemSpace
*
feSpace
,
std
::
vector
<
SingularDirichletBC
>
&
list
)
{
...
...
extensions/VectorOperations.h
View file @
80ce300b
...
...
@@ -497,7 +497,6 @@ namespace vector_operations {
template
<
typename
Vector
>
void
getMin
(
const
Vector
&
v
,
typename
ValueType
<
Vector
>::
type
&
minVal
,
size_t
&
minIdx
)
{
typedef
typename
ValueType
<
Vector
>::
type
T
;
TEST_EXIT
(
num_rows
(
v
)
>
0
)(
"getMin of empty vector!
\n
"
);
minVal
=
v
[
0
];
...
...
@@ -513,7 +512,6 @@ namespace vector_operations {
template
<
typename
Vector
>
void
getMax
(
const
Vector
&
v
,
typename
ValueType
<
Vector
>::
type
&
maxVal
,
size_t
&
maxIdx
)
{
typedef
typename
ValueType
<
Vector
>::
type
T
;
TEST_EXIT
(
num_rows
(
v
)
>
0
)(
"getMax of empty vector!
\n
"
);
maxVal
=
v
[
0
];
...
...
extensions/base_problems/CahnHilliard_RB.cc
View file @
80ce300b
...
...
@@ -24,6 +24,7 @@ using namespace AMDiS;
CahnHilliard_RB
::
CahnHilliard_RB
(
const
std
::
string
&
name_
)
:
super
(
name_
),
reinit
(
NULL
),
useMobility
(
false
),
doubleWell
(
0
),
gamma
(
1.0
),
...
...
@@ -32,8 +33,7 @@ CahnHilliard_RB::CahnHilliard_RB(const std::string &name_) :
epsInv
(
10.0
),
minusEpsInv
(
-
10.0
),
epsSqr
(
0.01
),
minusEpsSqr
(
-
0.01
),
reinit
(
NULL
)
minusEpsSqr
(
-
0.01
)
{
// parameters for CH
Parameters
::
get
(
name
+
"->use mobility"
,
useMobility
);
// mobility
...
...
extensions/base_problems/LinearElasticityPhase.cc
View file @
80ce300b
...
...
@@ -31,8 +31,8 @@ LinearElasticityPhase::LinearElasticityPhase(const std::string &name_) :
displacement
(
NULL
),
phase
(
NULL
),
phaseOld
(
NULL
),
dirichletPhase
(
NULL
),
bcFct
(
NULL
)
bcFct
(
NULL
),
dirichletPhase
(
NULL
)
{
for
(
int
i
=
0
;
i
<
bcDOF
.
getSize
();
++
i
)
bcDOF
[
i
]
=
NULL
;
...
...
@@ -70,7 +70,7 @@ void LinearElasticityPhase::initData()
super
::
initData
();
dbc_factor
=
beta
/
pow
(
epsilon
,
alpha
);
MSG
_DBG
(
"dbc_factor = %f
\n
"
,
dbc_factor
);
MSG
(
"dbc_factor = %f
\n
"
,
dbc_factor
);
}
...
...
extensions/base_problems/NavierStokesCahnHilliard.cc
View file @
80ce300b
...
...
@@ -23,7 +23,20 @@ using namespace AMDiS;
NavierStokesCahnHilliard
::
NavierStokesCahnHilliard
(
const
std
::
string
&
name_
,
bool
createProblem
)
:
super
(
name_
,
createProblem
),
viscosity1
(
1.0
),
viscosity2
(
1.0
),
density1
(
1.0
),
density2
(
1.0
),
densityPhase
(
NULL
),
viscosityPhase
(
NULL
),
multiPhase
(
NULL
),
velocity
(
NULL
),
fileWriter
(
NULL
),
useMobility
(
false
),
refFunction
(
NULL
),
refinement
(
NULL
),
sigma
(
0.0
),
surfaceTension
(
0.0
),
doubleWell
(
0
),
gamma
(
1.0
),
eps
(
0.1
),
...
...
@@ -31,18 +44,7 @@ NavierStokesCahnHilliard::NavierStokesCahnHilliard(const std::string &name_, boo
epsInv
(
10.0
),
minusEpsInv
(
-
10.0
),
epsSqr
(
0.01
),
minusEpsSqr
(
-
0.01
),
multiPhase
(
NULL
),
densityPhase
(
NULL
),
viscosityPhase
(
NULL
),
viscosity1
(
1.0
),
viscosity2
(
1.0
),
density1
(
1.0
),
density2
(
1.0
),
refFunction
(
NULL
),
refinement
(
NULL
),
sigma
(
0.0
),
surfaceTension
(
0.0
)
minusEpsSqr
(
-
0.01
)
{
dow
=
Global
::
getGeo
(
WORLD
);
Initfile
::
get
(
name
+
"->viscosity1"
,
viscosity1
);
// viscosity of fluid 1
...
...
@@ -134,7 +136,7 @@ void NavierStokesCahnHilliard::initData()
//fileWriter = new FileVectorWriter(name + "->velocity->output", getFeSpace()->getMesh(), velocity);
super
::
initData
();
}
;
}
void
NavierStokesCahnHilliard
::
closeTimestep
(
AdaptInfo
*
adaptInfo
)
...
...
@@ -151,7 +153,7 @@ void NavierStokesCahnHilliard::initTimestep(AdaptInfo *adaptInfo)
LinearInterpolation1
vLI
(
viscosity1
,
viscosity2
);
transformDOF
(
prob
->
getSolution
()
->
getDOFVector
(
dow
+
2
),
densityPhase
,
&
dLI
);
transformDOF
(
prob
->
getSolution
()
->
getDOFVector
(
dow
+
2
),
viscosityPhase
,
&
vLI
);
}
;
}
...
...
@@ -324,7 +326,7 @@ void NavierStokesCahnHilliard::fillOperators()
/// Navier-Stokes part
int
degree_u
=
getFeSpace
(
0
)
->
getBasisFcts
()
->
getDegree
();
int
degree_p
=
getFeSpace
(
dow
)
->
getBasisFcts
()
->
getDegree
();
//
int degree_p = getFeSpace(dow)->getBasisFcts()->getDegree();
WorldVector
<
DOFVector
<
double
>*
>
vel
;
for
(
unsigned
i
=
0
;
i
<
dow
;
i
++
){
...
...
@@ -416,7 +418,7 @@ void NavierStokesCahnHilliard::fillOperators()
}
/**/
}
;
}
void
NavierStokesCahnHilliard
::
addLaplaceTerm
(
int
i
)
...
...
@@ -434,4 +436,4 @@ void NavierStokesCahnHilliard::addLaplaceTerm(int i)
/// < alpha*grad(u'_i) , grad(psi) >
}
;
}
extensions/base_problems/NavierStokesPhase_TaylorHood.cc
View file @
80ce300b
...
...
@@ -21,13 +21,13 @@ using namespace AMDiS;
NavierStokesPhase_TaylorHood
::
NavierStokesPhase_TaylorHood
(
const
std
::
string
&
name_
)
:
super
(
name_
),
phase
(
NULL
),
bcFct
(
NULL
),
beta
(
1.0
),
epsilon
(
1.e-1
),
alpha
(
3.0
),
fileWriterPhase
(
NULL
),
phaseOld
(
NULL
)
phase
(
NULL
),
phaseOld
(
NULL
),
bcFct
(
NULL
),
fileWriterPhase
(
NULL
)
{
for
(
int
i
=
0
;
i
<
bcDOF
.
getSize
();
++
i
)
bcDOF
[
i
]
=
NULL
;
...
...
@@ -58,7 +58,7 @@ void NavierStokesPhase_TaylorHood::initData()
phaseOld
=
new
DOFVector
<
double
>
(
getFeSpace
(
0
),
"phaseOld"
);
dbc_factor
=
beta
/
pow
(
epsilon
,
alpha
);
MSG
_DBG
(
"dbc_factor = %f
\n
"
,
dbc_factor
);
MSG
(
"dbc_factor = %f
\n
"
,
dbc_factor
);
}
...
...
extensions/base_problems/NavierStokes_TH_MultiPhase.cc
View file @
80ce300b
...
...
@@ -20,13 +20,13 @@ using namespace AMDiS;
NavierStokes_TH_MultiPhase
::
NavierStokes_TH_MultiPhase
(
const
std
::
string
&
name_
,
bool
createProblem
)
:
super
(
name_
,
createProblem
),
multiPhase
(
NULL
),
densityPhase
(
NULL
),
viscosityPhase
(
NULL
),
viscosity1
(
1.0
),
viscosity2
(
1.0
),
density1
(
1.0
),
density2
(
1.0
)
density2
(
1.0
),
densityPhase
(
NULL
),
viscosityPhase
(
NULL
),
multiPhase
(
NULL
)
{
FUNCNAME
(
"NavierStokes_TH_MultiPhase::_constructor()"
);
Initfile
::
get
(
name
+
"->viscosity1"
,
viscosity1
);
// viscosity of fluid 1
...
...
@@ -78,13 +78,13 @@ void NavierStokes_TH_MultiPhase::initTimestep(AdaptInfo *adaptInfo)
transformDOF
(
multiPhase
,
viscosityPhase
,
&
vLI
);
}
}
}
;
}
void
NavierStokes_TH_MultiPhase
::
fillOperators
()
{
int
degree_u
=
prob
->
getFeSpace
(
0
)
->
getBasisFcts
()
->
getDegree
();
int
degree_p
=
prob
->
getFeSpace
(
dow
)
->
getBasisFcts
()
->
getDegree
();
//
int degree_p = prob->getFeSpace(dow)->getBasisFcts()->getDegree();
WorldVector
<
DOFVector
<
double
>*
>
vel
;
for
(
unsigned
i
=
0
;
i
<
dow
;
i
++
){
...
...
extensions/base_problems/NavierStokes_TH_MultiPhase_RB.cc
View file @
80ce300b
...
...
@@ -21,13 +21,13 @@ using namespace AMDiS;
NavierStokes_TH_MultiPhase_RB
::
NavierStokes_TH_MultiPhase_RB
(
const
std
::
string
&
name_
,
bool
createProblem
)
:
super
(
name_
,
createProblem
),
multiPhase
(
NULL
),
densityPhase
(
NULL
),
viscosityPhase
(
NULL
),
viscosity1
(
-
1.0
),
viscosity2
(
1.0
),
density1
(
1.0
),
density2
(
1.0
)
density2
(
1.0
),
densityPhase
(
NULL
),
viscosityPhase
(
NULL
),
multiPhase
(
NULL
)
{
FUNCNAME
(
"NavierStokes_TH_MultiPhase_RB::_constructor()"
);
Initfile
::
get
(
name
+
"->viscosity1"
,
viscosity1
);
// viscosity of fluid 1
...
...
@@ -78,7 +78,7 @@ void NavierStokes_TH_MultiPhase_RB::initTimestep(AdaptInfo *adaptInfo)
void
NavierStokes_TH_MultiPhase_RB
::
fillOperators
()
{
int
degree_u
=
prob
->
getFeSpace
(
0
)
->
getBasisFcts
()
->
getDegree
();
int
degree_p
=
prob
->
getFeSpace
(
dow
)
->
getBasisFcts
()
->
getDegree
();
//
int degree_p = prob->getFeSpace(dow)->getBasisFcts()->getDegree();
WorldVector
<
DOFVector
<
double
>*
>
vel
;
for
(
unsigned
i
=
0
;
i
<
dow
;
i
++
)
...
...
extensions/base_problems/NavierStokes_TaylorHood.cc
View file @
80ce300b
...
...
@@ -20,6 +20,7 @@ using namespace AMDiS;
NavierStokes_TaylorHood
::
NavierStokes_TaylorHood
(
const
std
::
string
&
name_
,
bool
createProblem
)
:
super
(
name_
,
createProblem
),
velocity
(
NULL
),
laplaceType
(
0
),
nonLinTerm
(
2
),
oldTimestep
(
0.0
),
...
...
@@ -29,7 +30,6 @@ NavierStokes_TaylorHood::NavierStokes_TaylorHood(const std::string &name_, bool
theta
(
0.5
+
1.e-2
),
theta1
(
1
-
theta
),
minusTheta1
(
-
theta1
),
velocity
(
NULL
),
fileWriter
(
NULL
)
{
// fluid viscosity
...
...
extensions/base_problems/NavierStokes_TaylorHood_RB.cc
View file @
80ce300b
...
...
@@ -20,10 +20,10 @@ using namespace AMDiS;
NavierStokes_TaylorHood_RB
::
NavierStokes_TaylorHood_RB
(
const
std
::
string
&
name_
,
bool
createProblem
)
:
super
(
name_
,
createProblem
),
velocity
(
NULL
),
laplaceType
(
0
),
oldTimestep
(
0.0
),
viscosity
(
1.0
),
velocity
(
NULL
),
fileWriter
(
NULL
)
{
// fluid viscosity
...
...
@@ -81,8 +81,8 @@ void NavierStokes_TaylorHood_RB::fillOperators()
U
[
i
]
=
prob
->
getStageSolution
(
i
);
U_old
[
i
]
=
prob
->
getUnVec
(
i
);
}
DOFVector
<
double
>
*
p
=
prob
->
getStageSolution
(
dow
)
,
*
p_old
=
prob
->
getUnVec
(
dow
);
DOFVector
<
double
>
*
p
=
prob
->
getStageSolution
(
dow
)
;
//
*p_old = prob->getUnVec(dow);
// fill operators for prob
for
(
unsigned
i
=
0
;
i
<
dow
;
++
i
)
{
...
...
extensions/base_problems/PhaseFieldCrystal_Phase.cc
View file @
80ce300b
...
...
@@ -23,7 +23,7 @@ PhaseFieldCrystal_Phase::PhaseFieldCrystal_Phase(const std::string &name_) :
PhaseFieldCrystal
(
name_
),
phase
(
NULL
),
phaseDisturbed
(
NULL
)
{}
;
{}
PhaseFieldCrystal_Phase
::~
PhaseFieldCrystal_Phase
()
...
...
@@ -37,12 +37,11 @@ void PhaseFieldCrystal_Phase::initTimeInterface()
{
FUNCNAME
(
"PhaseFieldCrystal_Phase::initTimeInterface()"
);
PhaseFieldCrystal
::
initTimeInterface
();
}
;
}
void
PhaseFieldCrystal_Phase
::
fillOperators
()
{
FUNCNAME
(
"PhaseFieldCrystal_Phase::fillOperators()"
);
MSG_DBG
(
"PhaseFieldCrystal_Phase::fillOperators()
\n
"
);
int
degree
=
prob
->
getFeSpace
(
0
)
->
getBasisFcts
()
->
getDegree
();
...
...
@@ -98,4 +97,4 @@ void PhaseFieldCrystal_Phase::fillOperators()
// prob.addMatrixOperator(opMnew,2,2,&minus2);
// . . . vectorOperators . . . . . . . . . . . . . . .
prob
->
addVectorOperator
(
opMPowExpl
,
2
);
// -2*phi^old*rho_old^3
}
;
}
extensions/base_problems/PhaseFieldCrystal_RB.cc
View file @
80ce300b
...
...
@@ -35,7 +35,7 @@ PhaseFieldCrystal_RB::PhaseFieldCrystal_RB(const std::string &name_, bool create
Parameters
::
get
(
name
+
"->density"
,
density
);
Parameters
::
get
(
name
+
"->use mobility"
,
useMobility
);
tempParameter
=
-
(
1.0
+
r
);
}
;
}
void
PhaseFieldCrystal_RB
::
fillOperators
()
...
...
@@ -124,9 +124,9 @@ void PhaseFieldCrystal_RB::fillOperators()
// . . . nonlinear terms . . . . . . . . . . . . . . .
prob
->
addMatrixOperator
(
opMPowImpl
,
2
,
0
);
// 3*rho*rho_old^2
prob
->
addVectorOperator
(
opMPowExpl
,
2
);
// -rho'^3
}
;
}
void
PhaseFieldCrystal_RB
::
fillBoundaryConditions
()
{
FUNCNAME
(
"PhaseFieldCrystal_RB::fillBoundaryConditions()"
);
}
;
}
extensions/time/ExtendedRosenbrockStationary.h
View file @
80ce300b
...
...
@@ -62,10 +62,10 @@ using namespace AMDiS;
ExtendedRosenbrockStationary
(
std
::
string
name
,
int
componentShift_
=
0
)
:
super
(
name
),
componentShift
(
componentShift_
),
order
(
0
),
first
(
true
),
fixedTimestep
(
false
),
enforceAsmMat
(
false
),
order
(
0
),
minusOne
(
-
1.0
),
invTauGamma
(
1.0
),
stageTime
(
0.0
),
...
...
Prev
1
2
3
Next
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