Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
f4449b09
There was an error fetching the commit references. Please try again later.
Commit
f4449b09
authored
8 years ago
by
Jakub Klinkovský
Browse files
Options
Downloads
Patches
Plain Diff
Fixed dereferencing of shared pointers and times in LinearSystemAssembler
parent
b0aac389
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TNL/Solvers/PDE/LinearSystemAssembler.h
+34
-25
34 additions, 25 deletions
src/TNL/Solvers/PDE/LinearSystemAssembler.h
with
34 additions
and
25 deletions
src/TNL/Solvers/PDE/LinearSystemAssembler.h
+
34
−
25
View file @
f4449b09
...
...
@@ -35,11 +35,9 @@ class LinearSystemAssemblerTraverserUserData
typedef
SharedPointer
<
MeshFunction
,
DeviceType
>
MeshFunctionPointer
;
typedef
SharedPointer
<
DofVector
,
DeviceType
>
DofVectorPointer
;
const
Real
*
time
;
const
Real
time
;
const
Real
*
tau
;
const
Real
*
timeDiscretisationCoefficient
;
const
Real
tau
;
const
DifferentialOperatorPointer
differentialOperator
;
...
...
@@ -61,8 +59,8 @@ class LinearSystemAssemblerTraverserUserData
const
MeshFunctionPointer
&
u
,
MatrixPointer
&
matrix
,
DofVectorPointer
&
b
)
:
time
(
&
time
),
tau
(
&
tau
),
:
time
(
time
),
tau
(
tau
),
differentialOperator
(
differentialOperator
),
boundaryConditions
(
boundaryConditions
),
rightHandSide
(
rightHandSide
),
...
...
@@ -131,14 +129,19 @@ class LinearSystemAssembler
TraverserUserData
&
userData
,
const
EntityType
&
entity
)
{
(
*
userData
.
b
)[
entity
.
getIndex
()
]
=
0.0
;
userData
.
boundaryConditions
.
template
getData
<
DeviceType
>().
setMatrixElements
(
*
userData
.
u
,
const
auto
&
boundaryConditions
=
userData
.
boundaryConditions
.
template
getData
<
DeviceType
>();
const
auto
&
u
=
userData
.
u
.
template
getData
<
DeviceType
>();
auto
&
matrix
=
userData
.
matrix
.
template
modifyData
<
DeviceType
>();
auto
&
b
=
userData
.
b
.
template
modifyData
<
DeviceType
>();
b
[
entity
.
getIndex
()
]
=
0.0
;
userData
.
boundaryConditions
.
template
getData
<
DeviceType
>().
setMatrixElements
(
u
,
entity
,
*
userData
.
time
+
*
userData
.
tau
,
*
userData
.
tau
,
userData
.
matrix
.
template
modifyData
<
DeviceType
>()
,
*
userData
.
b
);
userData
.
time
+
userData
.
tau
,
userData
.
tau
,
matrix
,
b
);
}
};
...
...
@@ -152,26 +155,32 @@ class LinearSystemAssembler
TraverserUserData
&
userData
,
const
EntityType
&
entity
)
{
(
*
userData
.
b
)[
entity
.
getIndex
()
]
=
0.0
;
const
auto
&
differentialOperator
=
userData
.
differentialOperator
.
template
getData
<
DeviceType
>();
const
auto
&
rightHandSide
=
userData
.
rightHandSide
.
template
getData
<
DeviceType
>();
const
auto
&
u
=
userData
.
u
.
template
getData
<
DeviceType
>();
auto
&
matrix
=
userData
.
matrix
.
template
modifyData
<
DeviceType
>();
auto
&
b
=
userData
.
b
.
template
modifyData
<
DeviceType
>();
b
[
entity
.
getIndex
()
]
=
0.0
;
userData
.
differentialOperator
.
template
getData
<
DeviceType
>().
setMatrixElements
(
*
userData
.
u
,
(
u
,
entity
,
*
userData
.
time
+
*
userData
.
tau
,
*
userData
.
tau
,
userData
.
matrix
.
template
modifyData
<
DeviceType
>(),
*
userData
.
b
);
userData
.
time
+
userData
.
tau
,
userData
.
tau
,
matrix
,
b
);
typedef
Functions
::
FunctionAdapter
<
MeshType
,
RightHandSide
>
RhsFunctionAdapter
;
typedef
Functions
::
FunctionAdapter
<
MeshType
,
MeshFunction
>
MeshFunctionAdapter
;
const
RealType
&
rhs
=
RhsFunctionAdapter
::
getValue
(
userData
.
rightHandSide
.
template
getData
<
DeviceType
>()
,
(
rightHandSide
,
entity
,
*
userData
.
time
);
TimeDiscretisation
::
applyTimeDiscretisation
(
userData
.
matrix
.
template
modifyData
<
DeviceType
>()
,
(
*
userData
.
b
)
[
entity
.
getIndex
()
],
userData
.
time
);
TimeDiscretisation
::
applyTimeDiscretisation
(
matrix
,
b
[
entity
.
getIndex
()
],
entity
.
getIndex
(),
MeshFunctionAdapter
::
getValue
(
*
userData
.
u
,
entity
,
*
userData
.
time
),
(
*
userData
.
tau
)
,
MeshFunctionAdapter
::
getValue
(
u
,
entity
,
userData
.
time
),
userData
.
tau
,
rhs
);
}
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment