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
929db4e5
Commit
929db4e5
authored
Oct 15, 2018
by
Praetorius, Simon
Browse files
changed assembled and changing flag in operators
parent
ddee16ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/amdis/LocalAssemblerList.hpp
View file @
929db4e5
...
...
@@ -98,7 +98,7 @@ namespace AMDiS
bool
assembled
=
false
;
/// if true, or \ref assembled false, do reassemble of all operators
bool
changing
=
fals
e
;
bool
changing
=
tru
e
;
};
public:
...
...
src/amdis/linear_algebra/DOFMatrixBase.hpp
View file @
929db4e5
...
...
@@ -96,12 +96,6 @@ namespace AMDiS
backend_
.
insert
(
flatMultiIndex
(
row
),
flatMultiIndex
(
col
),
value
);
}
template
<
class
RowNode
,
class
ColNode
>
auto
&
operators
(
RowNode
const
&
row
,
ColNode
const
&
col
)
{
return
operators_
[
row
][
col
];
}
/// Associate a local operator with this DOFMatrix
template
<
class
ContextTag
,
class
Operator
,
class
RowTreePath
=
RootTreePath
,
class
ColTreePath
=
RootTreePath
>
...
...
src/amdis/linear_algebra/DOFMatrixBase.inc.hpp
View file @
929db4e5
...
...
@@ -21,19 +21,9 @@ init(bool asmMatrix)
template
<
class
RB
,
class
CB
,
class
B
>
void
DOFMatrixBase
<
RB
,
CB
,
B
>::
finish
(
bool
asmMatrix
)
finish
(
bool
/*
asmMatrix
*/
)
{
backend_
.
finish
();
if
(
asmMatrix
)
{
forEachNode_
(
rowBasis_
->
localView
().
tree
(),
[
&
](
auto
const
&
rowNode
,
auto
)
{
forEachNode_
(
colBasis_
->
localView
().
tree
(),
[
&
](
auto
const
&
colNode
,
auto
)
{
auto
&
matOp
=
operators_
[
rowNode
][
colNode
];
if
(
matOp
.
doAssemble
())
matOp
.
assembled
=
true
;
});
});
}
}
...
...
@@ -73,7 +63,6 @@ addOperator(ContextTag contextTag, Operator const& preOp,
auto
localAssembler
=
makeLocalAssemblerPtr
<
Context
>
(
std
::
move
(
op
),
i
,
j
);
operators_
[
i
][
j
].
push
(
contextTag
,
localAssembler
);
operators_
[
i
][
j
].
changing
=
true
;
}
...
...
@@ -96,6 +85,7 @@ assemble(RowLocalView const& rowLocalView, ColLocalView const& colLocalView)
scaled
.
op
->
assemble
(
context
,
rowNode
,
colNode
,
elementMatrix_
);
};
assembleOperators
(
gv
,
element
,
matOp
,
matAssembler
);
matOp
.
assembled
=
true
;
matOp
.
unbind
();
}
});
...
...
src/amdis/linear_algebra/DOFVectorBase.hpp
View file @
929db4e5
...
...
@@ -132,12 +132,6 @@ namespace AMDiS
/// Insert a block of values into the matrix (add to existing values)
void
insert
(
LocalView
const
&
localView
,
ElementVector
const
&
elementVector
);
template
<
class
Node
>
auto
&
operators
(
Node
const
&
node
)
{
return
operators_
[
node
];
}
/// Associate a local operator with this DOFVector
template
<
class
ContextTag
,
class
Operator
,
class
TreePath
=
RootTreePath
>
void
addOperator
(
ContextTag
contextTag
,
Operator
const
&
preOp
,
TreePath
path
=
{});
...
...
src/amdis/linear_algebra/DOFVectorBase.inc.hpp
View file @
929db4e5
...
...
@@ -22,16 +22,8 @@ init(bool asmVector)
template
<
class
BS
,
class
B
>
void
DOFVectorBase
<
BS
,
B
>::
finish
(
bool
asmVector
)
{
if
(
asmVector
)
{
forEachNode_
(
basis_
->
localView
().
tree
(),
[
&
](
auto
const
&
node
,
auto
)
{
auto
&
rhsOp
=
operators_
[
node
];
if
(
rhsOp
.
doAssemble
())
rhsOp
.
assembled
=
true
;
});
}
}
finish
(
bool
/*asmVector*/
)
{}
template
<
class
BS
,
class
B
>
...
...
@@ -62,7 +54,6 @@ addOperator(ContextTag contextTag, Operator const& preOp, TreePath path)
auto
localAssembler
=
makeLocalAssemblerPtr
<
Context
>
(
std
::
move
(
op
),
i
);
operators_
[
i
].
push
(
contextTag
,
localAssembler
);
operators_
[
i
].
changing
=
true
;
}
...
...
@@ -86,6 +77,7 @@ assemble(LocalView const& localView)
};
assembleOperators
(
gv
,
element
,
rhsOp
,
vecAssembler
);
rhsOp
.
assembled
=
true
;
rhsOp
.
unbind
();
}
});
...
...
Write
Preview
Supports
Markdown
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