Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-curvedgrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
iwr
dune-curvedgrid
Commits
5eeef664
Commit
5eeef664
authored
4 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
Make DiscreteGridViewFunction a reference type, storing container and basis as shared_ptr
parent
afcb3282
No related branches found
No related tags found
1 merge request
!9
Make DiscreteGridViewFunction a reference type, storing container and basis as shared_ptr
Pipeline
#5876
passed
4 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/curvedgrid/gridfunctions/discretegridviewfunction.hh
+10
-9
10 additions, 9 deletions
dune/curvedgrid/gridfunctions/discretegridviewfunction.hh
with
10 additions
and
9 deletions
dune/curvedgrid/gridfunctions/discretegridviewfunction.hh
+
10
−
9
View file @
5eeef664
...
...
@@ -235,7 +235,8 @@ public:
/// \brief Constructor.
DiscreteGridViewFunction
(
const
GridView
&
gridView
,
int
order
=
(
ORDER
>
0
?
ORDER
:
1
))
:
entitySet_
(
gridView
)
,
basis_
(
makeBasis
(
gridView
,
order
))
,
basis_
(
std
::
make_shared
<
Basis
>
(
makeBasis
(
gridView
,
order
)))
,
coords_
(
std
::
make_shared
<
VectorType
>
())
{
update
(
gridView
);
}
...
...
@@ -243,9 +244,9 @@ public:
void
update
(
const
GridView
&
gridView
)
{
entitySet_
=
EntitySet
{
gridView
};
basis_
.
update
(
gridView
);
basis_
->
update
(
gridView
);
coords_
.
resize
(
basis_
.
size
());
coords_
->
resize
(
basis_
->
size
());
}
/// \brief evaluate in global coordinates
...
...
@@ -267,7 +268,7 @@ public:
/// \brief Create a local function of this grifunction
friend
LocalFunction
<
0
>
localFunction
(
const
DiscreteGridViewFunction
&
gf
)
{
return
LocalFunction
<
0
>
{
gf
.
basis_
.
localView
(),
gf
.
coords_
};
return
LocalFunction
<
0
>
{
gf
.
basis_
->
localView
(),
*
gf
.
coords_
};
}
/// \brief obtain the stored \ref GridViewEntitySet
...
...
@@ -278,23 +279,23 @@ public:
const
Basis
&
basis
()
const
{
return
basis_
;
return
*
basis_
;
}
const
VectorType
&
coefficients
()
const
{
return
coords_
;
return
*
coords_
;
}
VectorType
&
coefficients
()
{
return
coords_
;
return
*
coords_
;
}
private
:
EntitySet
entitySet_
;
Basis
basis_
;
VectorType
coords_
;
std
::
shared_ptr
<
Basis
>
basis_
;
std
::
shared_ptr
<
VectorType
>
coords_
;
};
}
// end namespace Dune
...
...
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