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
Phillip Lino Rall
UGBlocks_V3
Commits
35fb0910
Commit
35fb0910
authored
Mar 12, 2020
by
Phillip Lino Rall
Browse files
added phillip changes
parent
81774387
Changes
28
Expand all
Hide whitespace changes
Inline
Side-by-side
program/source/extemp/cellvar.h
View file @
35fb0910
This diff is collapsed.
Click to expand it.
program/source/extemp/co_fu.h
View file @
35fb0910
...
...
@@ -59,7 +59,7 @@ class X_coordinate : public Expr<X_coordinate> {
Blockgrid
*
Give_blockgrid
()
const
{
return
blockgrid
;
};
stencil_typ
Give_stencil_typ
()
const
{
return
no_stencil
;
}
bool
totalCalcNotPossible
()
const
{
return
true
;
}
control_typ
Give_control_typ
()
const
{
return
thread_save
;
}
typedef
double
Result
;
...
...
@@ -71,8 +71,7 @@ class X_coordinate : public Expr<X_coordinate> {
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{}
double
Give_fromTotal
(
int
i
)
const
{
assert
(
false
);
return
0.0
;
}
private:
Blockgrid
*
blockgrid
;
};
...
...
@@ -121,7 +120,6 @@ class Y_coordinate : public Expr<Y_coordinate> {
Blockgrid
*
Give_blockgrid
()
const
{
return
blockgrid
;
};
stencil_typ
Give_stencil_typ
()
const
{
return
no_stencil
;
}
bool
totalCalcNotPossible
()
const
{
return
true
;
}
control_typ
Give_control_typ
()
const
{
return
thread_save
;
}
typedef
double
Result
;
...
...
@@ -133,7 +131,7 @@ class Y_coordinate : public Expr<Y_coordinate> {
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{}
double
Give_fromTotal
(
int
i
)
const
{
assert
(
false
);
return
0.0
;
}
private:
Blockgrid
*
blockgrid
;
};
...
...
@@ -181,7 +179,6 @@ class Z_coordinate : public Expr<Z_coordinate> {
Blockgrid
*
Give_blockgrid
()
const
{
return
blockgrid
;
};
stencil_typ
Give_stencil_typ
()
const
{
return
no_stencil
;
}
bool
totalCalcNotPossible
()
const
{
return
true
;
}
control_typ
Give_control_typ
()
const
{
return
thread_save
;
}
typedef
double
Result
;
...
...
@@ -193,7 +190,7 @@ class Z_coordinate : public Expr<Z_coordinate> {
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{}
double
Give_fromTotal
(
int
i
)
const
{
assert
(
false
);
return
0.0
;
}
private:
Blockgrid
*
blockgrid
;
};
...
...
@@ -404,8 +401,8 @@ class Exp_Function1 : public Expr<Exp_Function1<A, DTyp, DTyp_Result> > {
inline
Exp_Function1
(
const
A
&
a
,
DTyp_Result
(
*
Formula
)
(
DTyp
x
),
control_typ
funCtrTyp
)
:
a_
(
a
),
Formula_
(
Formula
),
funCtrTyp_
(
funCtrTyp
)
{}
stencil_typ
Give_stencil_typ
()
const
{
return
a_
.
Give
_stencil
_typ
();
}
bool
totalCalcNotPossible
()
const
{
return
a_
.
totalCalcNotPossible
();
}
stencil_typ
Give_stencil_typ
()
const
{
return
no
_stencil
;
}
control_typ
Give_control_typ
()
const
{
return
funCtrTyp_
;
}
typedef
DTyp_Result
Result
;
...
...
@@ -416,11 +413,9 @@ class Exp_Function1 : public Expr<Exp_Function1<A, DTyp, DTyp_Result> > {
inline
DTyp_Result
Give_cell_hexahedra
(
params_in_cell
)
const
;
inline
DTyp_Result
Give_matrix_hexahedra
(
params_in_loc_matrix
)
const
;
inline
Result
Give_fromTotal
(
int
i
)
const
;
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{
a_
.
template
Update
<
TYP_EL
>
(
id
);
a_
.
template
Update
<
TYP_EL
>
(
id
);
}
template
<
class
VType
>
...
...
@@ -430,22 +425,17 @@ class Exp_Function1 : public Expr<Exp_Function1<A, DTyp, DTyp_Result> > {
template
<
class
A
,
class
DTyp
,
class
DTyp_Result
>
template
<
elementTyp
TYP_EL
>
inline
DTyp_Result
Exp_Function1
<
A
,
DTyp
,
DTyp_Result
>::
Give_data
(
params_in
)
const
{
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
}
template
<
class
A
,
class
DTyp
,
class
DTyp_Result
>
inline
DTyp_Result
Exp_Function1
<
A
,
DTyp
,
DTyp_Result
>::
Give_cell_hexahedra
(
params_in_cell
)
const
{
return
Formula_
(
a_
.
Give_cell_hexahedra
(
params_out_cell
)
);
return
Formula_
(
a_
.
template
Give_cell_hexahedra
(
params_out_cell
)
);
}
template
<
class
A
,
class
DTyp
,
class
DTyp_Result
>
inline
DTyp_Result
Exp_Function1
<
A
,
DTyp
,
DTyp_Result
>::
Give_matrix_hexahedra
(
params_in_loc_matrix
)
const
{
return
Formula_
(
a_
.
Give_matrix_hexahedra
(
params_out_loc_matrix
)
);
}
template
<
class
A
,
class
DTyp
,
class
DTyp_Result
>
inline
DTyp_Result
Exp_Function1
<
A
,
DTyp
,
DTyp_Result
>::
Give_fromTotal
(
int
i
)
const
{
return
Formula_
(
a_
.
Give_fromTotal
(
i
));
return
Formula_
(
a_
.
template
Give_matrix_hexahedra
(
params_out_loc_matrix
)
);
}
template
<
class
DTyp_Result
,
class
DTyp
>
...
...
@@ -456,7 +446,7 @@ class Function1 {
template
<
class
A
>
inline
Exp_Function1
<
A
,
DTyp
,
DTyp_Result
>
operator
()
(
const
Expr
<
A
>&
a
)
const
{
return
Exp_Function1
<
A
,
DTyp
,
DTyp_Result
>
(
a
,
Formula
,
funCtrTyp_
);
}
{
return
Exp_Function1
<
A
,
DTyp
,
DTyp_Result
>
(
a
,
Formula
,
funCtrTyp_
);
}
private:
DTyp_Result
(
*
Formula
)
(
DTyp
x
);
...
...
@@ -478,15 +468,7 @@ class Exp_Function2 : public Expr<Exp_Function2<A, B, DTyp> > {
inline
Exp_Function2
(
const
A
&
a
,
const
B
&
b
,
DTyp
(
*
Formula
)
(
DTyp
x
,
DTyp
y
),
control_typ
funCtrTyp
)
:
a_
(
a
),
b_
(
b
),
Formula_
(
Formula
),
funCtrTyp_
(
funCtrTyp
)
{}
stencil_typ
Give_stencil_typ
()
const
{
if
(
a_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
return
b_
.
Give_stencil_typ
();
};
bool
totalCalcNotPossible
()
const
{
if
(
a_
.
totalCalcNotPossible
())
return
true
;
return
b_
.
totalCalcNotPossible
();
};
stencil_typ
Give_stencil_typ
()
const
{
return
no_stencil
;
}
control_typ
Give_control_typ
()
const
{
return
funCtrTyp_
;
}
...
...
@@ -496,20 +478,19 @@ class Exp_Function2 : public Expr<Exp_Function2<A, B, DTyp> > {
inline
DTyp
Give_data
(
params_in
)
const
;
inline
DTyp
Give_cell_hexahedra
(
params_in_cell
)
const
;
inline
Result
Give_fromTotal
(
int
i
)
const
;
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{
a_
.
template
Update
<
TYP_EL
>
(
id
);
a_
.
template
Update
<
TYP_EL
>
(
id
);
b_
.
template
Update
<
TYP_EL
>
(
id
);
}
};
template
<
class
A
,
class
B
,
class
DTyp
>
template
<
elementTyp
TYP_EL
>
inline
DTyp
Exp_Function2
<
A
,
B
,
DTyp
>::
Give_data
(
params_in
)
const
{
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
}
template
<
class
A
,
class
B
,
class
DTyp
>
...
...
@@ -518,12 +499,6 @@ inline DTyp Exp_Function2<A, B, DTyp>::Give_cell_hexahedra ( params_in_cell ) co
b_
.
Give_cell_hexahedra
(
params_out_cell
)
);
}
template
<
class
A
,
class
B
,
class
DTyp
>
inline
DTyp
Exp_Function2
<
A
,
B
,
DTyp
>::
Give_fromTotal
(
int
i
)
const
{
return
Formula_
(
a_
.
Give_fromTotal
(
i
),
b_
.
Give_fromTotal
(
i
)
);
}
template
<
class
DTyp
>
class
Function2
{
...
...
@@ -557,18 +532,7 @@ class Exp_Function3 : public Expr<Exp_Function3<A, B, C, DTyp> > {
inline
Exp_Function3
(
const
A
&
a
,
const
B
&
b
,
const
C
&
c
,
DTyp
(
*
Formula
)
(
DTyp
x
,
DTyp
y
,
DTyp
z
),
control_typ
funCtrTyp
)
:
a_
(
a
),
b_
(
b
),
c_
(
c
),
Formula_
(
Formula
),
funCtrTyp_
(
funCtrTyp
)
{}
stencil_typ
Give_stencil_typ
()
const
{
if
(
a_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
if
(
b_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
return
c_
.
Give_stencil_typ
();
};
bool
totalCalcNotPossible
()
const
{
if
(
a_
.
totalCalcNotPossible
())
return
true
;
if
(
b_
.
totalCalcNotPossible
())
return
true
;
return
c_
.
totalCalcNotPossible
();
};
stencil_typ
Give_stencil_typ
()
const
{
return
no_stencil
;
}
control_typ
Give_control_typ
()
const
{
return
funCtrTyp_
;
}
...
...
@@ -576,39 +540,31 @@ class Exp_Function3 : public Expr<Exp_Function3<A, B, C, DTyp> > {
template
<
elementTyp
TYP_EL
>
inline
DTyp
Give_data
(
params_in
)
const
;
inline
DTyp
Give_cell_hexahedra
(
params_in_cell
)
const
;
inline
Result
Give_fromTotal
(
int
i
)
const
;
inline
DTyp
Give_cell_hexahedra
(
params_in_cell
)
const
;
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{
a_
.
template
Update
<
TYP_EL
>
(
id
);
a_
.
template
Update
<
TYP_EL
>
(
id
);
b_
.
template
Update
<
TYP_EL
>
(
id
);
c
_
.
template
Update
<
TYP_EL
>
(
id
);
b
_
.
template
Update
<
TYP_EL
>
(
id
);
}
};
template
<
class
A
,
class
B
,
class
C
,
class
DTyp
>
template
<
elementTyp
TYP_EL
>
inline
DTyp
Exp_Function3
<
A
,
B
,
C
,
DTyp
>::
Give_data
(
params_in
)
const
{
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
c_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
c_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
}
template
<
class
A
,
class
B
,
class
C
,
class
DTyp
>
inline
DTyp
Exp_Function3
<
A
,
B
,
C
,
DTyp
>::
Give_cell_hexahedra
(
params_in_cell
)
const
{
return
Formula_
(
a_
.
Give_cell_hexahedra
(
params_out_cell
),
b_
.
Give_cell_hexahedra
(
params_out_cell
),
c_
.
Give_cell_hexahedra
(
params_out_cell
)
);
}
template
<
class
A
,
class
B
,
class
C
,
class
DTyp
>
inline
DTyp
Exp_Function3
<
A
,
B
,
C
,
DTyp
>::
Give_fromTotal
(
int
i
)
const
{
return
Formula_
(
a_
.
Give_fromTotal
(
i
),
b_
.
Give_fromTotal
(
i
),
c_
.
Give_fromTotal
(
i
)
);
return
Formula_
(
a_
.
template
Give_cell_hexahedra
(
params_out_cell
),
b_
.
template
Give_cell_hexahedra
(
params_out_cell
),
c_
.
template
Give_cell_hexahedra
(
params_out_cell
)
);
}
template
<
class
DTyp
>
...
...
@@ -645,19 +601,8 @@ class Exp_Function4 : public Expr<Exp_Function4<A, B, C, D, DTyp,DTyp_Result> >
inline
Exp_Function4
(
const
A
&
a
,
const
B
&
b
,
const
C
&
c
,
const
D
&
d
,
DTyp_Result
(
*
Formula
)
(
DTyp
x
,
DTyp
y
,
DTyp
z
,
DTyp
z2
),
control_typ
funCtrTyp
)
:
a_
(
a
),
b_
(
b
),
c_
(
c
),
d_
(
d
),
Formula_
(
Formula
),
funCtrTyp_
(
funCtrTyp
)
{}
stencil_typ
Give_stencil_typ
()
const
{
if
(
a_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
if
(
b_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
if
(
c_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
return
d_
.
Give_stencil_typ
();
};
bool
totalCalcNotPossible
()
const
{
if
(
a_
.
totalCalcNotPossible
())
return
true
;
if
(
b_
.
totalCalcNotPossible
())
return
true
;
if
(
c_
.
totalCalcNotPossible
())
return
true
;
return
d_
.
totalCalcNotPossible
();
};
stencil_typ
Give_stencil_typ
()
const
{
return
no_stencil
;
}
control_typ
Give_control_typ
()
const
{
return
funCtrTyp_
;
}
typedef
DTyp
Result
;
...
...
@@ -667,14 +612,13 @@ class Exp_Function4 : public Expr<Exp_Function4<A, B, C, D, DTyp,DTyp_Result> >
inline
DTyp_Result
Give_cell_hexahedra
(
params_in_cell
)
const
;
inline
DTyp_Result
Give_fromTotal
(
int
i
)
const
;
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{
a_
.
template
Update
<
TYP_EL
>
(
id
);
b_
.
template
Update
<
TYP_EL
>
(
id
);
c_
.
template
Update
<
TYP_EL
>
(
id
);
d_
.
template
Update
<
TYP_EL
>
(
id
);
a_
.
Update
<
TYP_EL
>
(
id
);
b_
.
Update
<
TYP_EL
>
(
id
);
c_
.
Update
<
TYP_EL
>
(
id
);
d_
.
Update
<
TYP_EL
>
(
id
);
}
template
<
class
VType
>
...
...
@@ -683,29 +627,21 @@ class Exp_Function4 : public Expr<Exp_Function4<A, B, C, D, DTyp,DTyp_Result> >
template
<
class
A
,
class
B
,
class
C
,
class
D
,
class
DTyp
,
class
DTyp_Result
>
template
<
elementTyp
TYP_EL
>
inline
DTyp_Result
Exp_Function4
<
A
,
B
,
C
,
D
,
DTyp
,
DTyp_Result
>::
Give_data
(
params_in
)
const
{
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
c_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
d_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
inline
DTyp_Result
Exp_Function4
<
A
,
B
,
C
,
D
,
DTyp
,
DTyp_Result
>::
Give_data
(
params_in
)
const
{
return
Formula_
(
a_
.
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
Give_data
<
TYP_EL
>
(
params_out
),
c_
.
Give_data
<
TYP_EL
>
(
params_out
),
d_
.
Give_data
<
TYP_EL
>
(
params_out
)
);
}
template
<
class
A
,
class
B
,
class
C
,
class
D
,
class
DTyp
,
class
DTyp_Result
>
inline
DTyp_Result
Exp_Function4
<
A
,
B
,
C
,
D
,
DTyp
,
DTyp_Result
>::
Give_cell_hexahedra
(
params_in_cell
)
const
{
inline
DTyp_Result
Exp_Function4
<
A
,
B
,
C
,
D
,
DTyp
,
DTyp_Result
>::
Give_cell_hexahedra
(
params_in_cell
)
const
{
return
Formula_
(
a_
.
Give_cell_hexahedra
(
params_out_cell
),
b_
.
Give_cell_hexahedra
(
params_out_cell
),
c_
.
Give_cell_hexahedra
(
params_out_cell
),
d_
.
Give_cell_hexahedra
(
params_out_cell
)
);
}
template
<
class
A
,
class
B
,
class
C
,
class
D
,
class
DTyp
,
class
DTyp_Result
>
inline
DTyp_Result
Exp_Function4
<
A
,
B
,
C
,
D
,
DTyp
,
DTyp_Result
>::
Give_fromTotal
(
int
i
)
const
{
return
Formula_
(
a_
.
Give_fromTotal
(
i
),
b_
.
Give_fromTotal
(
i
),
c_
.
Give_fromTotal
(
i
),
d_
.
Give_fromTotal
(
i
)
);
}
template
<
class
DTyp
,
class
DTyp_Result
>
class
Function4
{
...
...
@@ -745,17 +681,7 @@ class Exp_Function3R : public Expr<Exp_Function3R<A, B, C, DTyp, DTyp_Result> >
inline
Exp_Function3R
(
const
A
&
a
,
const
B
&
b
,
const
C
&
c
,
DTyp_Result
(
*
Formula
)
(
DTyp
x
,
DTyp
y
,
DTyp
z
),
control_typ
funCtrTyp
)
:
a_
(
a
),
b_
(
b
),
c_
(
c
),
Formula_
(
Formula
),
funCtrTyp_
(
funCtrTyp
)
{}
stencil_typ
Give_stencil_typ
()
const
{
if
(
a_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
if
(
b_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
return
c_
.
Give_stencil_typ
();
};
bool
totalCalcNotPossible
()
const
{
if
(
a_
.
totalCalcNotPossible
())
return
true
;
if
(
b_
.
totalCalcNotPossible
())
return
true
;
return
c_
.
totalCalcNotPossible
();
};
stencil_typ
Give_stencil_typ
()
const
{
return
no_stencil
;
}
control_typ
Give_control_typ
()
const
{
return
funCtrTyp_
;
}
...
...
@@ -766,22 +692,21 @@ class Exp_Function3R : public Expr<Exp_Function3R<A, B, C, DTyp, DTyp_Result> >
inline
DTyp_Result
Give_cell_hexahedra
(
params_in_cell
)
const
;
inline
DTyp_Result
Give_fromTotal
(
int
i
)
const
;
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{
a_
.
template
Update
<
TYP_EL
>
(
id
);
b_
.
template
Update
<
TYP_EL
>
(
id
);
c_
.
template
Update
<
TYP_EL
>
(
id
);
a_
.
Update
<
TYP_EL
>
(
id
);
b_
.
Update
<
TYP_EL
>
(
id
);
c_
.
Update
<
TYP_EL
>
(
id
);
}
};
template
<
class
A
,
class
B
,
class
C
,
class
DTyp
,
class
DTyp_Result
>
template
<
elementTyp
TYP_EL
>
inline
DTyp_Result
Exp_Function3R
<
A
,
B
,
C
,
DTyp
,
DTyp_Result
>::
Give_data
(
params_in
)
const
{
return
Formula_
(
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
template
Give_data
<
TYP_EL
>
(
params_out
),
c_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
);
return
Formula_
(
a_
.
Give_data
<
TYP_EL
>
(
params_out
),
b_
.
Give_data
<
TYP_EL
>
(
params_out
),
c_
.
Give_data
<
TYP_EL
>
(
params_out
)
);
}
template
<
class
A
,
class
B
,
class
C
,
class
DTyp
,
class
DTyp_Result
>
...
...
@@ -791,12 +716,7 @@ inline DTyp_Result Exp_Function3R<A, B, C, DTyp, DTyp_Result>::Give_cell_hexahed
c_
.
Give_cell_hexahedra
(
params_out_cell
)
);
}
template
<
class
A
,
class
B
,
class
C
,
class
DTyp
,
class
DTyp_Result
>
inline
DTyp_Result
Exp_Function3R
<
A
,
B
,
C
,
DTyp
,
DTyp_Result
>::
Give_fromTotal
(
int
i
)
const
{
return
Formula_
(
a_
.
Give_fromTotal
(
i
),
b_
.
Give_fromTotal
(
i
),
c_
.
Give_fromTotal
(
i
)
);
}
template
<
class
DTyp_Result
,
class
DTyp
>
class
Function3R
{
...
...
program/source/extemp/extemp.h
View file @
35fb0910
...
...
@@ -16,9 +16,8 @@
* limitations under the License.
**********************************************************************************/
//#include "../../../linAlgExptemp/source/linAlg.h"
#include
"../../../common_source/extemp_type.h"
#include
"../../../linAlgExptemp/source/linAlg.h"
#include
"../../../linAlgExptemp/source/extemp/extemp_type.h"
#ifndef EXTEMP_H
#define EXTEMP_H
...
...
@@ -40,28 +39,22 @@ class Add : public Expr<Add<A, B> > {
inline
Add
(
const
A
&
a
,
const
B
&
b
)
:
a_
(
a
),
b_
(
b
)
{}
Blockgrid
*
Give_blockgrid
()
const
{
if
(
a_
.
Give_blockgrid
()
==
NULL
)
return
b_
.
Give_blockgrid
();
if
(
a_
.
template
Give_blockgrid
()
==
NULL
)
return
b_
.
template
Give_blockgrid
();
return
a_
.
Give_blockgrid
();
return
a_
.
template
Give_blockgrid
();
};
stencil_typ
Give_stencil_typ
()
const
{
if
(
a_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
return
b_
.
Give_stencil_typ
();
};
bool
totalCalcNotPossible
()
const
{
if
(
a_
.
totalCalcNotPossible
())
return
true
;
return
b_
.
totalCalcNotPossible
();
if
(
a_
.
template
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
return
b_
.
template
Give_stencil_typ
();
};
int
getTotalNumberData
()
const
{
return
a_
.
getTotalNumberData
();
}
control_typ
Give_control_typ
()
const
{
if
(
a_
.
Give_control_typ
()
==
not_thread_save
)
return
not_thread_save
;
if
(
a_
.
template
Give_control_typ
()
==
not_thread_save
)
return
not_thread_save
;
return
b_
.
Give_control_typ
();
return
b_
.
template
Give_control_typ
();
};
...
...
@@ -78,7 +71,8 @@ class Add : public Expr<Add<A, B> > {
return
a_
.
template
Give_data_sten
<
TYP_EL
>
(
params_out_sten
)
+
b_
.
template
Give_data_sten
<
TYP_EL
>
(
params_out_sten
);
}
/*
template <elementTyp TYP_EL>
inline Result Give_matrix(params_in_loc_matrix) const
...
...
@@ -88,18 +82,13 @@ class Add : public Expr<Add<A, B> > {
}
*/
inline
Result
Give_matrix_hexahedra
(
params_in_loc_matrix
)
const
{
return
a_
.
Give_matrix_hexahedra
(
params_out_loc_matrix
)
+
b_
.
Give_matrix_hexahedra
(
params_out_loc_matrix
);
return
a_
.
template
Give_matrix_hexahedra
(
params_out_loc_matrix
)
+
b_
.
template
Give_matrix_hexahedra
(
params_out_loc_matrix
);
}
inline
Result
Give_cell_hexahedra
(
params_in_cell
)
const
{
return
a_
.
Give_cell_hexahedra
(
params_out_cell
)
+
b_
.
Give_cell_hexahedra
(
params_out_cell
);
}
inline
Result
Give_fromTotal
(
int
i
)
const
{
return
a_
.
Give_fromTotal
(
i
)
+
b_
.
Give_fromTotal
(
i
);
return
a_
.
template
Give_cell_hexahedra
(
params_out_cell
)
+
b_
.
template
Give_cell_hexahedra
(
params_out_cell
);
}
template
<
elementTyp
TYP_EL
>
...
...
@@ -125,46 +114,36 @@ class CAdd : public Expr<CAdd<A, TYPE> > {
inline
CAdd
(
const
A
&
a
,
TYPE
b
)
:
a_
(
a
),
b_
(
b
)
{}
Blockgrid
*
Give_blockgrid
()
const
{
return
a_
.
Give_blockgrid
();
return
a_
.
template
Give_blockgrid
();
}
stencil_typ
Give_stencil_typ
()
const
{
return
a_
.
Give_stencil_typ
();
return
a_
.
template
Give_stencil_typ
();
}
bool
totalCalcNotPossible
()
const
{
return
a_
.
totalCalcNotPossible
();
};
int
getTotalNumberData
()
const
{
return
a_
.
getTotalNumberData
();
}
control_typ
Give_control_typ
()
const
{
return
a_
.
Give_control_typ
();
return
a_
.
template
Give_control_typ
();
};
typedef
_TypeOf1_
(
A
,
TYPE
)
Result
;
template
<
elementTyp
TYP_EL
>
inline
Result
Give_data
(
params_in
)
const
{
return
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
+
b_
;
return
a_
.
template
Give_data
<
TYP_EL
>
(
params_out
)
+
b_
;
}
template
<
sten_part_typ
TYP_EL
>
inline
Result
Give_data_sten
(
params_in_sten
)
const
{
return
a_
.
Give_data_sten
<
TYP_EL
>
(
params_out_sten
)
+
b_
;
return
a_
.
template
Give_data_sten
<
TYP_EL
>
(
params_out_sten
)
+
b_
;
}
inline
Result
Give_matrix_hexahedra
(
params_in_loc_matrix
)
const
{
return
a_
.
Give_matrix_hexahedra
(
params_out_loc_matrix
)
+
b_
;
return
a_
.
template
Give_matrix_hexahedra
(
params_out_loc_matrix
)
+
b_
;
}
inline
Result
Give_cell_hexahedra
(
params_in_cell
)
const
{
return
a_
.
Give_cell_hexahedra
(
params_out_cell
)
+
b_
;
}
inline
Result
Give_fromTotal
(
int
i
)
const
{
return
a_
.
Give_fromTotal
(
i
)
+
b_
;
return
a_
.
template
Give_cell_hexahedra
(
params_out_cell
)
+
b_
;
}
template
<
elementTyp
TYP_EL
>
...
...
@@ -226,28 +205,24 @@ class Sub : public Expr<Sub<A, B> > {
inline
Sub
(
const
A
&
a
,
const
B
&
b
)
:
a_
(
a
),
b_
(
b
)
{}
Blockgrid
*
Give_blockgrid
()
const
{
if
(
a_
.
Give_blockgrid
()
==
NULL
)
return
b_
.
Give_blockgrid
();
if
(
a_
.
template
Give_blockgrid
()
==
NULL
)
return
b_
.
template
Give_blockgrid
();
return
a_
.
Give_blockgrid
();
return
a_
.
template
Give_blockgrid
();
};
stencil_typ
Give_stencil_typ
()
const
{
if
(
a_
.
Give_stencil_typ
()
==
yes_stencil
)
return
yes_stencil
;
return
b_
.
Give_stencil_typ
();
if
(
a_
.
template
Give_stencil_typ
()
==
yes_stencil
)
{
return
yes_stencil
;
}
return
b_
.
template
Give_stencil_typ
();
}
bool
totalCalcNotPossible
()
const
{
if
(
a_
.
totalCalcNotPossible
())
return
true
;
return
b_
.
totalCalcNotPossible
();
};
int
getTotalNumberData
()
const
{
return
a_
.
getTotalNumberData
();
}
control_typ
Give_control_typ
()
const
{
if
(
a_
.
Give_control_typ
()
==
not_thread_save
)
return
not_thread_save
;
if
(
a_
.
template
Give_control_typ
()
==
not_thread_save
)
return
not_thread_save
;
return
b_
.
Give_control_typ
();
return
b_
.
template
Give_control_typ
();
};
typedef
_TypeOf2_
(
A
,
B
)
Result
;
...
...
@@ -274,12 +249,6 @@ class Sub : public Expr<Sub<A, B> > {
b_
.
Give_cell_hexahedra
(
params_out_cell
);
}
inline
Result
Give_fromTotal
(
int
i
)
const
{
return
a_
.
Give_fromTotal
(
i
)
-
b_
.
Give_fromTotal
(
i
);
}
template
<
elementTyp
TYP_EL
>
void
Update
(
int
id
)
const
{
a_
.
template
Update
<
TYP_EL
>
(
id
);
...
...
@@ -304,21 +273,14 @@ class CSub : public Expr<CSub<TYPE, B> > {
inline
CSub
(
TYPE
a
,
const
B
&
b
)
:
a_
(
a
),
b_
(
b
)
{}
Blockgrid
*
Give_blockgrid
()
const
{
return
b_
.
Give_blockgrid
();
return
b_
.
template
Give_blockgrid
();
}
stencil_typ
Give_stencil_typ
()
const
{
return
b_
.
Give_stencil_typ
();
return
b_
.
template
Give_stencil_typ
();
}
bool
totalCalcNotPossible
()
const
{
return
b_
.
totalCalcNotPossible
();
};
int
getTotalNumberData
()
const
{
return
b_
.
getTotalNumberData
();
}
control_typ
Give_control_typ
()
const
{
return
b_
.
Give_control_typ
();
return
b_
.
template
Give_control_typ
();
}
typedef
_TypeOf1_
(
B
,
TYPE
)
Result
;
...
...
@@ -330,22 +292,17 @@ class CSub : public Expr<CSub<TYPE, B> > {
template
<
sten_part_typ
TYP_EL
>
inline
Result
Give_data_sten
(
params_in_sten
)
const
{
return
a_
-
b_
.
template
Give_data_sten
<
TYP_EL
>
(
params_out_sten
);
return
a_
-
b_
.
template
Give_data_sten
<
TYP_EL
>
(
params_out_sten
);
}
inline
Result
Give_matrix_hexahedra
(
params_in_loc_matrix
)
const
{
return
a_
-
b_
.
Give_matrix_hexahedra
(
params_out_loc_matrix
);
return
a_
-
b_
.
template
Give_matrix_hexahedra
(
params_out_loc_matrix
);
}
inline
Result
Give_cell_hexahedra
(
params_in_cell
)
const
{
return
a_
-
b_
.
Give_cell_hexahedra
(
params_out_cell
);
}