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
amdis
amdis-core
Commits
0faff253
Commit
0faff253
authored
Mar 13, 2019
by
Praetorius, Simon
Browse files
renamed template parameters, to shorten error messages and symbols
parent
68c1eb6d
Changes
47
Hide whitespace changes
Inline
Side-by-side
src/amdis/Assembler.hpp
View file @
0faff253
...
@@ -15,11 +15,14 @@
...
@@ -15,11 +15,14 @@
namespace
AMDiS
namespace
AMDiS
{
{
/// Implementation of interface \ref AssemblerBase
/// Implementation of interface \ref AssemblerBase
template
<
class
LocalContext
,
class
Operator
,
class
...
Nodes
>
/**
* \tparam LC LocalContext
**/
template
<
class
LC
,
class
Operator
,
class
...
Nodes
>
class
Assembler
class
Assembler
:
public
AssemblerInterface
<
L
ocalContext
,
Nodes
...
>
:
public
AssemblerInterface
<
L
C
,
Nodes
...
>
{
{
using
Super
=
AssemblerInterface
<
L
ocalContext
,
Nodes
...
>
;
using
Super
=
AssemblerInterface
<
L
C
,
Nodes
...
>
;
private:
private:
...
@@ -74,12 +77,11 @@ namespace AMDiS
...
@@ -74,12 +77,11 @@ namespace AMDiS
* \ref calculateElementVector or \ref calculateElementMatrix on the
* \ref calculateElementVector or \ref calculateElementMatrix on the
* vector or matrix operator, respectively.
* vector or matrix operator, respectively.
**/
**/
void
assemble
(
LocalContext
const
&
localContext
,
void
assemble
(
LC
const
&
localContext
,
Nodes
const
&
...
nodes
,
Nodes
const
&
...
nodes
,
ElementMatrixVector
&
elementMatrixVector
)
final
ElementMatrixVector
&
elementMatrixVector
)
final
{
{
ContextGeometry
<
L
ocalContext
>
context
{
localContext
,
element
(),
geometry
()};
ContextGeometry
<
L
C
>
context
Geo
{
localContext
,
element
(),
geometry
()};
assembleImpl
(
context
,
nodes
...,
elementMatrixVector
);
assembleImpl
(
context
Geo
,
nodes
...,
elementMatrixVector
);
}
}
...
@@ -88,21 +90,17 @@ namespace AMDiS
...
@@ -88,21 +90,17 @@ namespace AMDiS
protected:
// implementation detail
protected:
// implementation detail
// matrix assembling
// matrix assembling
template
<
class
Context
,
class
RowNode
,
class
ColNode
,
class
ElementMatrix
>
template
<
class
CG
,
class
RN
,
class
CN
,
class
Mat
>
void
assembleImpl
(
Context
const
&
context
,
void
assembleImpl
(
CG
const
&
contextGeo
,
RN
const
&
rowNode
,
CN
const
&
colNode
,
Mat
&
elementMatrix
)
RowNode
const
&
rowNode
,
ColNode
const
&
colNode
,
ElementMatrix
&
elementMatrix
)
{
{
op_
->
calculateElementMatrix
(
context
,
rowNode
,
colNode
,
elementMatrix
);
op_
->
calculateElementMatrix
(
context
Geo
,
rowNode
,
colNode
,
elementMatrix
);
}
}
// vector assembling
// vector assembling
template
<
class
Context
,
class
Node
,
class
ElementVector
>
template
<
class
CG
,
class
Node
,
class
Vec
>
void
assembleImpl
(
Context
const
&
context
,
void
assembleImpl
(
CG
const
&
contextGeo
,
Node
const
&
node
,
Vec
&
elementVector
)
Node
const
&
node
,
ElementVector
&
elementVector
)
{
{
op_
->
calculateElementVector
(
context
,
node
,
elementVector
);
op_
->
calculateElementVector
(
context
Geo
,
node
,
elementVector
);
}
}
#endif // DOXYGEN
#endif // DOXYGEN
...
@@ -134,11 +132,11 @@ namespace AMDiS
...
@@ -134,11 +132,11 @@ namespace AMDiS
};
};
/// Generate a \ref Assembler on a given
`
LocalContext` (element or intersection)
/// Generate a \ref Assembler on a given LocalContext
`LC
` (element or intersection)
template
<
class
L
ocalContext
,
class
Operator
,
class
...
Nodes
>
template
<
class
L
C
,
class
Operator
,
class
...
Nodes
>
auto
makeAssembler
(
Operator
&&
op
,
Nodes
const
&
...)
auto
makeAssembler
(
Operator
&&
op
,
Nodes
const
&
...)
{
{
return
Assembler
<
L
ocalContext
,
Underlying_t
<
Operator
>
,
Nodes
...
>
{
FWD
(
op
)};
return
Assembler
<
L
C
,
Underlying_t
<
Operator
>
,
Nodes
...
>
{
FWD
(
op
)};
}
}
}
// end namespace AMDiS
}
// end namespace AMDiS
src/amdis/DataTransfer.inc.hpp
View file @
0faff253
...
@@ -128,8 +128,8 @@ namespace AMDiS
...
@@ -128,8 +128,8 @@ namespace AMDiS
NodeDataTransferContainer
nodeDataTransfer_
;
NodeDataTransferContainer
nodeDataTransfer_
;
};
};
template
<
class
C
ontainer
,
class
B
asis
>
template
<
class
C
,
class
B
>
void
DataTransfer
<
C
ontainer
,
Basis
>::
preAdapt
(
C
ontainer
const
&
coeff
,
bool
mightCoarsen
)
void
DataTransfer
<
C
,
B
>::
preAdapt
(
C
const
&
coeff
,
bool
mightCoarsen
)
{
{
auto
gv
=
basis_
->
gridView
();
auto
gv
=
basis_
->
gridView
();
auto
lv
=
basis_
->
localView
();
auto
lv
=
basis_
->
localView
();
...
@@ -217,8 +217,8 @@ namespace AMDiS
...
@@ -217,8 +217,8 @@ namespace AMDiS
}
}
}
}
template
<
class
C
ontainer
,
class
B
asis
>
template
<
class
C
,
class
B
>
void
DataTransfer
<
C
ontainer
,
Basis
>::
postAdapt
(
C
ontainer
&
coeff
,
bool
refined
)
void
DataTransfer
<
C
,
B
>::
postAdapt
(
C
&
coeff
,
bool
refined
)
{
{
coeff
.
resize
(
*
basis_
);
coeff
.
resize
(
*
basis_
);
auto
gv
=
basis_
->
gridView
();
auto
gv
=
basis_
->
gridView
();
...
@@ -370,9 +370,9 @@ namespace AMDiS
...
@@ -370,9 +370,9 @@ namespace AMDiS
NodeElementData
fatherDOFsTemp_
;
NodeElementData
fatherDOFsTemp_
;
};
};
template
<
class
Node
,
class
C
ontainer
,
class
B
asis
>
template
<
class
Node
,
class
C
,
class
B
>
template
<
class
Trafo
>
template
<
class
Trafo
>
bool
NodeDataTransfer
<
Node
,
Container
,
Basis
>::
bool
NodeDataTransfer
<
Node
,
C
,
B
>::
restrictLocal
(
Element
const
&
father
,
NodeElementData
&
fatherDOFs
,
Trafo
const
&
trafo
,
restrictLocal
(
Element
const
&
father
,
NodeElementData
&
fatherDOFs
,
Trafo
const
&
trafo
,
NodeElementData
const
&
childDOFs
,
bool
init
)
NodeElementData
const
&
childDOFs
,
bool
init
)
{
{
...
@@ -426,9 +426,9 @@ namespace AMDiS
...
@@ -426,9 +426,9 @@ namespace AMDiS
std
::
logical_and
<
bool
>
());
std
::
logical_and
<
bool
>
());
}
}
template
<
class
Node
,
class
C
ontainer
,
class
B
asis
>
template
<
class
Node
,
class
C
,
class
B
>
template
<
class
Trafo
>
template
<
class
Trafo
>
void
NodeDataTransfer
<
Node
,
Container
,
Basis
>::
void
NodeDataTransfer
<
Node
,
C
,
B
>::
prolongLocal
(
Element
const
&
father
,
NodeElementData
const
&
fatherDOFs
,
prolongLocal
(
Element
const
&
father
,
NodeElementData
const
&
fatherDOFs
,
Trafo
const
&
trafo
,
bool
init
)
Trafo
const
&
trafo
,
bool
init
)
{
{
...
...
src/amdis/DirichletBC.hpp
View file @
0faff253
...
@@ -53,22 +53,28 @@ namespace AMDiS
...
@@ -53,22 +53,28 @@ namespace AMDiS
,
values_
(
FWD
(
values
))
,
values_
(
FWD
(
values
))
{}
{}
template
<
class
I
ntersection
>
template
<
class
I
S
>
bool
onBoundary
(
I
ntersection
const
&
intersection
)
const
bool
onBoundary
(
I
S
const
&
intersection
)
const
{
{
return
predicate_
?
(
*
predicate_
)(
intersection
.
geometry
().
center
())
return
predicate_
?
(
*
predicate_
)(
intersection
.
geometry
().
center
())
:
Super
::
onBoundary
(
intersection
);
:
Super
::
onBoundary
(
intersection
);
}
}
// fill \ref dirichletNodes_ with 1 or 0 whether DOF corresponds to the boundary or not.
// fill \ref dirichletNodes_ with 1 or 0 whether DOF corresponds to the boundary or not.
template
<
class
R
owBasis
,
class
C
olBasis
>
template
<
class
R
B
,
class
C
B
>
void
init
(
R
owBasis
const
&
rowBasis
,
C
olBasis
const
&
colBasis
);
void
init
(
R
B
const
&
rowBasis
,
C
B
const
&
colBasis
);
/// \brief Apply dirichlet BC to matrix and vector, i.e., add a unit-row
/// \brief Apply dirichlet BC to matrix and vector, i.e., add a unit-row
/// to the matrix and optionally delete the corresponding matrix-column.
/// to the matrix and optionally delete the corresponding matrix-column.
template
<
class
Matrix
,
class
VectorX
,
class
VectorB
,
class
RowNode
,
class
ColNode
>
/**
void
fillBoundaryCondition
(
Matrix
&
matrix
,
VectorX
&
solution
,
VectorB
&
rhs
,
* \tparam Mat Matrix
RowNode
const
&
rowNode
,
ColNode
const
&
colNode
);
* \tparam Sol Vector of solution
* \tparam Rhs Vector of rhs
* \tparam RN RowNode
* \tparam CN ColNode
**/
template
<
class
Mat
,
class
Sol
,
class
Rhs
,
class
RN
,
class
CN
>
void
fillBoundaryCondition
(
Mat
&
matrix
,
Sol
&
solution
,
Rhs
&
rhs
,
RN
const
&
rowNode
,
CN
const
&
colNode
);
private:
private:
Dune
::
Std
::
optional
<
std
::
function
<
bool
(
Domain
)
>>
predicate_
;
Dune
::
Std
::
optional
<
std
::
function
<
bool
(
Domain
)
>>
predicate_
;
...
@@ -82,8 +88,8 @@ namespace AMDiS
...
@@ -82,8 +88,8 @@ namespace AMDiS
{
{
using
WorldVector
=
typename
Basis
::
GridView
::
template
Codim
<
0
>
::
Geometry
::
GlobalCoordinate
;
using
WorldVector
=
typename
Basis
::
GridView
::
template
Codim
<
0
>
::
Geometry
::
GlobalCoordinate
;
template
<
class
R
owNode
,
class
C
olNode
>
template
<
class
R
N
,
class
C
N
>
using
type
=
std
::
list
<
std
::
shared_ptr
<
DirichletBC
<
WorldVector
,
RangeType_t
<
R
owNode
>>>
>
;
using
type
=
std
::
list
<
std
::
shared_ptr
<
DirichletBC
<
WorldVector
,
RangeType_t
<
R
N
>>>
>
;
};
};
template
<
class
RowBasis
,
class
ColBasis
>
template
<
class
RowBasis
,
class
ColBasis
>
...
...
src/amdis/DirichletBC.inc.hpp
View file @
0faff253
...
@@ -13,29 +13,28 @@
...
@@ -13,29 +13,28 @@
namespace
AMDiS
{
namespace
AMDiS
{
template
<
class
D
,
class
R
>
template
<
class
D
,
class
R
>
template
<
class
R
owBasis
,
class
C
olBasis
>
template
<
class
R
B
,
class
C
B
>
void
DirichletBC
<
D
,
R
>::
void
DirichletBC
<
D
,
R
>::
init
(
R
owBasis
const
&
rowBasis
,
C
olBasis
const
&
colBasis
)
init
(
R
B
const
&
rowBasis
,
C
B
const
&
colBasis
)
{
{
using
Dune
::
Functions
::
forEachBoundaryDOF
;
using
Dune
::
Functions
::
forEachBoundaryDOF
;
using
LV
=
typename
C
olBasis
::
LocalView
;
using
LV
=
typename
C
B
::
LocalView
;
using
I
=
typename
C
olBasis
::
GridView
::
Intersection
;
using
I
S
=
typename
C
B
::
GridView
::
Intersection
;
dirichletNodes_
.
resize
(
colBasis
.
dimension
());
dirichletNodes_
.
resize
(
colBasis
.
dimension
());
forEachBoundaryDOF
(
colBasis
,
[
&
](
int
localIndex
,
LV
const
&
localView
,
I
const
&
intersection
)
{
forEachBoundaryDOF
(
colBasis
,
[
&
](
int
localIndex
,
LV
const
&
localView
,
I
S
const
&
intersection
)
{
dirichletNodes_
[
localView
.
index
(
localIndex
)]
=
onBoundary
(
intersection
);
dirichletNodes_
[
localView
.
index
(
localIndex
)]
=
onBoundary
(
intersection
);
});
});
}
}
template
<
class
D
,
class
R
>
template
<
class
D
,
class
R
>
template
<
class
Mat
rix
,
class
VectorX
,
class
VectorB
,
class
R
owNode
,
class
C
olNode
>
template
<
class
Mat
,
class
Sol
,
class
Rhs
,
class
R
N
,
class
C
N
>
void
DirichletBC
<
D
,
R
>::
void
DirichletBC
<
D
,
R
>::
fillBoundaryCondition
(
Matrix
&
matrix
,
VectorX
&
solution
,
VectorB
&
rhs
,
fillBoundaryCondition
(
Mat
&
matrix
,
Sol
&
solution
,
Rhs
&
rhs
,
RN
const
&
rowNode
,
CN
const
&
colNode
)
RowNode
const
&
rowNode
,
ColNode
const
&
colNode
)
{
{
auto
columns
=
Constraints
<
Mat
rix
>::
dirichletBC
(
matrix
,
dirichletNodes_
);
auto
columns
=
Constraints
<
Mat
>::
dirichletBC
(
matrix
,
dirichletNodes_
);
Dune
::
Hybrid
::
ifElse
(
std
::
is_same
<
RangeType_t
<
R
owNode
>
,
R
>
{},
Dune
::
Hybrid
::
ifElse
(
std
::
is_same
<
RangeType_t
<
R
N
>
,
R
>
{},
[
&
](
auto
id
)
{
[
&
](
auto
id
)
{
auto
subBasis
=
Dune
::
Functions
::
subspaceBasis
(
rhs
.
basis
(),
rowNode
.
treePath
());
auto
subBasis
=
Dune
::
Functions
::
subspaceBasis
(
rhs
.
basis
(),
rowNode
.
treePath
());
Dune
::
Functions
::
interpolate
(
subBasis
,
rhs
,
values_
,
dirichletNodes_
);
Dune
::
Functions
::
interpolate
(
subBasis
,
rhs
,
values_
,
dirichletNodes_
);
...
@@ -45,7 +44,7 @@ fillBoundaryCondition(Matrix& matrix, VectorX& solution, VectorB& rhs,
...
@@ -45,7 +44,7 @@ fillBoundaryCondition(Matrix& matrix, VectorX& solution, VectorB& rhs,
for
(
auto
const
&
triplet
:
columns
)
for
(
auto
const
&
triplet
:
columns
)
rhs
[
triplet
.
row
]
-=
triplet
.
value
*
solution
[
triplet
.
col
];
rhs
[
triplet
.
row
]
-=
triplet
.
value
*
solution
[
triplet
.
col
];
Dune
::
Hybrid
::
ifElse
(
std
::
is_same
<
RangeType_t
<
C
olNode
>
,
R
>
{},
Dune
::
Hybrid
::
ifElse
(
std
::
is_same
<
RangeType_t
<
C
N
>
,
R
>
{},
[
&
](
auto
id
)
{
[
&
](
auto
id
)
{
auto
subBasis
=
Dune
::
Functions
::
subspaceBasis
(
solution
.
basis
(),
colNode
.
treePath
());
auto
subBasis
=
Dune
::
Functions
::
subspaceBasis
(
solution
.
basis
(),
colNode
.
treePath
());
Dune
::
Functions
::
interpolate
(
subBasis
,
solution
,
values_
,
dirichletNodes_
);
Dune
::
Functions
::
interpolate
(
subBasis
,
solution
,
values_
,
dirichletNodes_
);
...
...
src/amdis/GridFunctionOperator.hpp
View file @
0faff253
...
@@ -26,28 +26,30 @@ namespace AMDiS
...
@@ -26,28 +26,30 @@ namespace AMDiS
*
*
* The class is specialized, by deriving from it, in \ref GridFunctionOperator.
* The class is specialized, by deriving from it, in \ref GridFunctionOperator.
*
*
* \tparam Derived
The class derived from GridFunctionOperatorBase
* \tparam Derived The class derived from GridFunctionOperatorBase
* \tparam L
ocalContext
The Element or Intersection type
* \tparam L
C
The Element or Intersection type
* \tparam G
ridFunction
The GridFunction, a LocalFunction is created from, and
* \tparam G
F
The GridFunction, a LocalFunction is created from, and
*
that is evaluated at quadrature points.
* that is evaluated at quadrature points.
*
*
* **Requirements:**
* **Requirements:**
* - `L
ocalContext
` models either Entity (of codim 0) or Intersection
* - `L
C
` models either Entity (of codim 0) or Intersection
* - `G
ridFunction
` models the \ref Concepts::GridFunction
* - `G
F
` models the \ref Concepts::GridFunction
**/
**/
template
<
class
Derived
,
class
L
ocalContext
,
class
GridFunction
>
template
<
class
Derived
,
class
L
C
,
class
GF
>
class
GridFunctionOperatorBase
class
GridFunctionOperatorBase
:
public
LocalOperator
<
Derived
,
L
ocalContext
>
:
public
LocalOperator
<
Derived
,
L
C
>
{
{
template
<
class
D
,
class
LC
>
template
<
class
,
class
>
friend
class
LocalOperator
;
friend
class
LocalOperator
;
using
ContextType
=
Impl
::
ContextTypes
<
L
ocalContext
>
;
using
ContextType
=
Impl
::
ContextTypes
<
L
C
>
;
using
Super
=
LocalOperator
<
Derived
,
L
ocalContext
>
;
using
Super
=
LocalOperator
<
Derived
,
L
C
>
;
private:
private:
using
GridFunction
=
GF
;
/// The type of the localFunction associated with the GridFunction
/// The type of the localFunction associated with the GridFunction
using
LocalFunction
=
decltype
(
localFunction
(
std
::
declval
<
G
ridFunction
>
()));
using
LocalFunction
=
decltype
(
localFunction
(
std
::
declval
<
G
F
>
()));
/// The Codim=0 entity of the grid, the localFunction can be bound to
/// The Codim=0 entity of the grid, the localFunction can be bound to
using
Element
=
typename
ContextType
::
Entity
;
using
Element
=
typename
ContextType
::
Entity
;
...
@@ -56,10 +58,10 @@ namespace AMDiS
...
@@ -56,10 +58,10 @@ namespace AMDiS
using
Geometry
=
typename
Element
::
Geometry
;
using
Geometry
=
typename
Element
::
Geometry
;
/// The type of the local coordinates in the \ref Element
/// The type of the local coordinates in the \ref Element
using
LocalCoordinate
=
typename
G
ridFunction
::
EntitySet
::
LocalCoordinate
;
using
LocalCoordinate
=
typename
G
F
::
EntitySet
::
LocalCoordinate
;
/// A factory for QuadratureRules that incooperate the order of the LocalFunction
/// A factory for QuadratureRules that incooperate the order of the LocalFunction
using
QuadFactory
=
QuadratureFactory
<
typename
Geometry
::
ctype
,
L
ocalContext
::
mydimension
,
LocalFunction
>
;
using
QuadFactory
=
QuadratureFactory
<
typename
Geometry
::
ctype
,
L
C
::
mydimension
,
LocalFunction
>
;
public:
public:
/// \brief Constructor. Stores a copy of `gridFct`.
/// \brief Constructor. Stores a copy of `gridFct`.
...
@@ -68,19 +70,20 @@ namespace AMDiS
...
@@ -68,19 +70,20 @@ namespace AMDiS
* differentiation order of the operator, to calculate the
* differentiation order of the operator, to calculate the
* quadrature degree in \ref getDegree.
* quadrature degree in \ref getDegree.
**/
**/
template
<
class
G
F
>
template
<
class
G
ridFct
>
GridFunctionOperatorBase
(
G
F
&&
gridFct
,
int
termOrder
)
GridFunctionOperatorBase
(
G
ridFct
&&
gridFct
,
int
termOrder
)
:
gridFct_
(
FWD
(
gridFct
))
:
gridFct_
(
FWD
(
gridFct
))
,
termOrder_
(
termOrder
)
,
termOrder_
(
termOrder
)
{}
{}
/// Create a quadrature factory from a PreQuadratureFactory, e.g. class derived from \ref QuadratureFactory
/// Create a quadrature factory from a PreQuadratureFactory, e.g. class derived from \ref QuadratureFactory
template
<
class
PreQuadFactory
>
/// \tparam PQF A PreQuadratureFactory
void
setQuadFactory
(
PreQuadFactory
&&
pre
)
template
<
class
PQF
>
void
setQuadFactory
(
PQF
&&
pre
)
{
{
using
ctype
=
typename
Geometry
::
ctype
;
using
ctype
=
typename
Geometry
::
ctype
;
quadFactory_
.
emplace
(
quadFactory_
.
emplace
(
makeQuadratureFactory
<
ctype
,
L
ocalContext
::
mydimension
,
LocalFunction
>
(
FWD
(
pre
)));
makeQuadratureFactory
<
ctype
,
L
C
::
mydimension
,
LocalFunction
>
(
FWD
(
pre
)));
}
}
protected:
protected:
...
@@ -147,7 +150,7 @@ namespace AMDiS
...
@@ -147,7 +150,7 @@ namespace AMDiS
class
GridFunctionOperatorTransposed
class
GridFunctionOperatorTransposed
:
public
LocalOperator
<
Derived
,
typename
Transposed
::
LocalContext
>
:
public
LocalOperator
<
Derived
,
typename
Transposed
::
LocalContext
>
{
{
template
<
class
D
,
class
LC
>
template
<
class
,
class
>
friend
class
LocalOperator
;
friend
class
LocalOperator
;
template
<
class
T
,
class
...
Args
>
template
<
class
T
,
class
...
Args
>
...
@@ -161,8 +164,9 @@ namespace AMDiS
...
@@ -161,8 +164,9 @@ namespace AMDiS
{}
{}
/// Redirects the setQuadFactory call top the transposed operator
/// Redirects the setQuadFactory call top the transposed operator
template
<
class
PreQuadFactory
>
/// \tparam PQF A PreQuadratureFactory
void
setQuadFactory
(
PreQuadFactory
&&
pre
)
template
<
class
PQF
>
void
setQuadFactory
(
PQF
&&
pre
)
{
{
transposedOp_
.
setQuadFactory
(
FWD
(
pre
));
transposedOp_
.
setQuadFactory
(
FWD
(
pre
));
}
}
...
@@ -182,15 +186,18 @@ namespace AMDiS
...
@@ -182,15 +186,18 @@ namespace AMDiS
}
}
/// Apply the assembling to the transposed elementMatrix with interchanged row-/colNode
/// Apply the assembling to the transposed elementMatrix with interchanged row-/colNode
template
<
class
Context
,
class
RowNode
,
class
ColNode
,
class
ElementMatrix
>
/**
void
getElementMatrix
(
Context
const
&
context
,
* \tparam CG ContextGeometry
RowNode
const
&
rowNode
,
* \tparam RN RowNode
ColNode
const
&
colNode
,
* \tparam CN ColNode
ElementMatrix
&
elementMatrix
)
* \tparam Mat ElementMatrix
**/
template
<
class
CG
,
class
RN
,
class
CN
,
class
Mat
>
void
getElementMatrix
(
CG
const
&
contextGeometry
,
RN
const
&
rowNode
,
CN
const
&
colNode
,
Mat
&
elementMatrix
)
{
{
auto
elementMatrixTransposed
=
transposed
(
elementMatrix
);
auto
elementMatrixTransposed
=
transposed
(
elementMatrix
);
transposedOp_
.
getElementMatrix
(
transposedOp_
.
getElementMatrix
(
context
,
colNode
,
rowNode
,
elementMatrixTransposed
);
context
Geometry
,
colNode
,
rowNode
,
elementMatrixTransposed
);
}
}
private:
private:
...
@@ -199,12 +206,12 @@ namespace AMDiS
...
@@ -199,12 +206,12 @@ namespace AMDiS
#ifndef DOXYGEN
#ifndef DOXYGEN
template
<
class
Tag
,
class
PreGridFct
,
class
P
reQuadFactory
>
template
<
class
Tag
,
class
PreGridFct
,
class
P
QF
>
struct
PreGridFunctionOperator
struct
PreGridFunctionOperator
{
{
Tag
tag
;
Tag
tag
;
PreGridFct
expr
;
PreGridFct
expr
;
P
reQuadFactory
quadFactory
;
P
QF
quadFactory
;
};
};
#endif
#endif
...
@@ -228,12 +235,12 @@ namespace AMDiS
...
@@ -228,12 +235,12 @@ namespace AMDiS
* other effect.
* other effect.
*
*
* \tparam Tag An Identifier for this GridFunctionOperator
* \tparam Tag An Identifier for this GridFunctionOperator
* \tparam L
ocalContext
An Element or Intersection the operator is evaluated on
* \tparam L
C
An Element or Intersection the operator is evaluated on
* \tparam GridFct A GridFunction evaluated in local coordinates on the bound element
* \tparam GridFct A GridFunction evaluated in local coordinates on the bound element
**/
**/
template
<
class
Tag
,
class
L
ocalContext
,
class
GridFct
>
template
<
class
Tag
,
class
L
C
,
class
GridFct
>
class
GridFunctionOperator
class
GridFunctionOperator
:
public
GridFunctionOperatorBase
<
GridFunctionOperator
<
Tag
,
L
ocalContext
,
GridFct
>
,
L
ocalContext
,
GridFct
>
:
public
GridFunctionOperatorBase
<
GridFunctionOperator
<
Tag
,
L
C
,
GridFct
>
,
L
C
,
GridFct
>
{};
{};
template
<
class
Context
,
class
Tag
,
class
GF
,
class
QF
>
template
<
class
Context
,
class
Tag
,
class
GF
,
class
QF
>
...
...
src/amdis/GridTransferManager.hpp
View file @
0faff253
...
@@ -17,7 +17,7 @@ namespace AMDiS
...
@@ -17,7 +17,7 @@ namespace AMDiS
/// Static administration class for automatic handling of DOFVectors during grid adaption
/// Static administration class for automatic handling of DOFVectors during grid adaption
class
GridTransferManager
class
GridTransferManager
{
{
template
<
class
T1
,
class
T2
>
template
<
class
,
class
>
friend
class
DOFVectorBase
;
friend
class
DOFVectorBase
;
using
Self
=
GridTransferManager
;
using
Self
=
GridTransferManager
;
...
...
src/amdis/Integrate.hpp
View file @
0faff253
...
@@ -8,8 +8,8 @@ namespace AMDiS
...
@@ -8,8 +8,8 @@ namespace AMDiS
{
{
namespace
Impl
namespace
Impl
{
{
template
<
class
GF
,
class
G
ridView
,
class
Q
uadProvider
>
template
<
class
GF
,
class
G
V
,
class
Q
P
>
auto
integrateImpl
(
GF
&&
gf
,
G
ridView
const
&
gridView
,
Q
uadProvider
makeQuad
)
auto
integrateImpl
(
GF
&&
gf
,
G
V
const
&
gridView
,
Q
P
makeQuad
)
{
{
auto
localFct
=
localFunction
(
FWD
(
gf
));
auto
localFct
=
localFunction
(
FWD
(
gf
));
...
@@ -31,8 +31,8 @@ namespace AMDiS
...
@@ -31,8 +31,8 @@ namespace AMDiS
return
result
;
return
result
;
}
}
template
<
class
GF
,
class
G
ridView
,
class
Q
uadProvider
>
template
<
class
GF
,
class
G
V
,
class
Q
P
>
auto
integrateImpl
(
GF
&&
gf
,
G
ridView
const
&
gv
,
Q
uadProvider
makeQuad
,
std
::
true_type
)
auto
integrateImpl
(
GF
&&
gf
,
G
V
const
&
gv
,
Q
P
makeQuad
,
std
::
true_type
)
{
{
return
integrateImpl
(
FWD
(
gf
),
gv
,
makeQuad
);
return
integrateImpl
(
FWD
(
gf
),
gv
,
makeQuad
);
}
}
...
...
src/amdis/LocalOperator.hpp
View file @
0faff253
...
@@ -73,34 +73,29 @@ namespace AMDiS
...
@@ -73,34 +73,29 @@ namespace AMDiS
/// \brief Assemble a local element matrix on the element that is bound.
/// \brief Assemble a local element matrix on the element that is bound.
/**
/**
* \param context Container for geometry related data, \ref ContextGeometry
* \param context
Geo
Container for geometry related data, \ref ContextGeometry
* \param rowNode The node of the test-basis
* \param rowNode The node of the test-basis
* \param colNode The node of the trial-basis
* \param colNode The node of the trial-basis
* \param elementMatrix The output element matrix
* \param elementMatrix The output element matrix
**/
**/
template
<
class
Context
,
class
RowNode
,
class
ColNode
,
class
ElementMatrix
>
template
<
class
CG
,
class
RN
,
class
CN
,
class
Mat
>
void
calculateElementMatrix
(
Context
const
&
context
,
void
calculateElementMatrix
(
CG
const
&
contextGeo
,
RN
const
&
rowNode
,
CN
const
&
colNode
,
Mat
&
elementMatrix
)
RowNode
const
&
rowNode
,
ColNode
const
&
colNode
,
ElementMatrix
&
elementMatrix
)
{
{
assert
(
bound_
);
assert
(
bound_
);
derived
().
getElementMatrix
(
context
,
rowNode
,
colNode
,
elementMatrix
);
derived
().
getElementMatrix
(
context
Geo
,
rowNode
,
colNode
,
elementMatrix
);
}
}
/// \brief Assemble a local element vector on the element that is bound.
/// \brief Assemble a local element vector on the element that is bound.
/**
/**
* \param context Container for geometry related data \ref ContextGeometry
* \param context
Geo
Container for geometry related data \ref ContextGeometry
* \param node The node of the test-basis
* \param node The node of the test-basis
* \param elementVector The output element vector
* \param elementVector The output element vector
**/
**/
template
<
class
Context
,
class
Node
,
class
ElementVector
>
template
<
class
CG
,
class
Node
,
class
Vec
>
void
calculateElementVector
(
Context
const
&
context
,
void
calculateElementVector
(
CG
const
&
contextGeo
,
Node
const
&
node
,
Vec
&
elementVector
)
Node
const
&
node
,