Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-gfe
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Sander, Oliver
dune-gfe
Commits
819055a7
Commit
819055a7
authored
13 years ago
by
Oliver Sander
Committed by
sander@FU-BERLIN.DE
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
replace more std::vector with Dune::array
[[Imported from SVN: r7553]]
parent
0e7294be
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
dune/gfe/geodesicfefunctionadaptor.hh
+1
-1
1 addition, 1 deletion
dune/gfe/geodesicfefunctionadaptor.hh
dune/gfe/harmonicenergystiffness.hh
+6
-6
6 additions, 6 deletions
dune/gfe/harmonicenergystiffness.hh
dune/gfe/localgeodesicfefunction.hh
+3
-3
3 additions, 3 deletions
dune/gfe/localgeodesicfefunction.hh
with
10 additions
and
10 deletions
dune/gfe/geodesicfefunctionadaptor.hh
+
1
−
1
View file @
819055a7
...
@@ -52,7 +52,7 @@ void geodesicFEFunctionAdaptor(GridType& grid, std::vector<TargetSpace>& x)
...
@@ -52,7 +52,7 @@ void geodesicFEFunctionAdaptor(GridType& grid, std::vector<TargetSpace>& x)
for
(;
eIt
!=
eEndIt
;
++
eIt
)
{
for
(;
eIt
!=
eEndIt
;
++
eIt
)
{
// Set up a local gfe function on the father element
// Set up a local gfe function on the father element
std
::
vector
<
TargetSpace
>
coefficients
(
eIt
->
father
()
->
template
count
<
dim
>())
;
Dune
::
array
<
TargetSpace
,
dim
+
1
>
coefficients
;
for
(
int
i
=
0
;
i
<
eIt
->
father
()
->
template
count
<
dim
>();
i
++
)
for
(
int
i
=
0
;
i
<
eIt
->
father
()
->
template
count
<
dim
>();
i
++
)
coefficients
[
i
]
=
dofMap
.
find
(
idSet
.
subId
(
*
eIt
->
father
(),
i
,
dim
))
->
second
;
coefficients
[
i
]
=
dofMap
.
find
(
idSet
.
subId
(
*
eIt
->
father
(),
i
,
dim
))
->
second
;
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/harmonicenergystiffness.hh
+
6
−
6
View file @
819055a7
...
@@ -30,18 +30,18 @@ public:
...
@@ -30,18 +30,18 @@ public:
/** \brief Assemble the energy for a single element */
/** \brief Assemble the energy for a single element */
RT
energy
(
const
Entity
&
e
,
RT
energy
(
const
Entity
&
e
,
const
std
::
vector
<
TargetSpace
>&
localSolution
)
const
;
const
Dune
::
array
<
TargetSpace
,
gridDim
+
1
>&
localSolution
)
const
;
#ifndef HARMONIC_ENERGY_FD_GRADIENT
#ifndef HARMONIC_ENERGY_FD_GRADIENT
// The finite difference gradient method is in the base class.
// The finite difference gradient method is in the base class.
// If the cpp macro is not set we overload it here.
// If the cpp macro is not set we overload it here.
/** \brief Assemble the gradient of the energy functional on one element */
/** \brief Assemble the gradient of the energy functional on one element */
virtual
void
assembleEmbeddedGradient
(
const
Entity
&
element
,
virtual
void
assembleEmbeddedGradient
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
solution
,
const
Dune
::
array
<
TargetSpace
,
gridDim
+
1
>&
solution
,
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>&
gradient
)
const
;
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>&
gradient
)
const
;
virtual
void
assembleGradient
(
const
Entity
&
element
,
virtual
void
assembleGradient
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
localSolution
,
const
Dune
::
array
<
TargetSpace
,
gridDim
+
1
>&
localSolution
,
std
::
vector
<
typename
TargetSpace
::
TangentVector
>&
localGradient
)
const
;
std
::
vector
<
typename
TargetSpace
::
TangentVector
>&
localGradient
)
const
;
#endif
#endif
};
};
...
@@ -49,7 +49,7 @@ public:
...
@@ -49,7 +49,7 @@ public:
template
<
class
GridView
,
class
TargetSpace
>
template
<
class
GridView
,
class
TargetSpace
>
typename
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
RT
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
typename
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
RT
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
energy
(
const
Entity
&
element
,
energy
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
localSolution
)
const
const
Dune
::
array
<
TargetSpace
,
gridDim
+
1
>&
localSolution
)
const
{
{
RT
energy
=
0
;
RT
energy
=
0
;
...
@@ -96,7 +96,7 @@ energy(const Entity& element,
...
@@ -96,7 +96,7 @@ energy(const Entity& element,
template
<
class
GridView
,
class
TargetSpace
>
template
<
class
GridView
,
class
TargetSpace
>
void
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
void
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
assembleEmbeddedGradient
(
const
Entity
&
element
,
assembleEmbeddedGradient
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
localSolution
,
const
Dune
::
array
<
TargetSpace
,
gridDim
+
1
>&
localSolution
,
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>&
localGradient
)
const
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>&
localGradient
)
const
{
{
// initialize gradient
// initialize gradient
...
@@ -174,7 +174,7 @@ assembleEmbeddedGradient(const Entity& element,
...
@@ -174,7 +174,7 @@ assembleEmbeddedGradient(const Entity& element,
template
<
class
GridView
,
class
TargetSpace
>
template
<
class
GridView
,
class
TargetSpace
>
void
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
void
HarmonicEnergyLocalStiffness
<
GridView
,
TargetSpace
>::
assembleGradient
(
const
Entity
&
element
,
assembleGradient
(
const
Entity
&
element
,
const
std
::
vector
<
TargetSpace
>&
localSolution
,
const
Dune
::
array
<
TargetSpace
,
gridDim
+
1
>&
localSolution
,
std
::
vector
<
typename
TargetSpace
::
TangentVector
>&
localGradient
)
const
std
::
vector
<
typename
TargetSpace
::
TangentVector
>&
localGradient
)
const
{
{
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>
embeddedLocalGradient
;
std
::
vector
<
typename
TargetSpace
::
EmbeddedTangentVector
>
embeddedLocalGradient
;
...
...
This diff is collapsed.
Click to expand it.
dune/gfe/localgeodesicfefunction.hh
+
3
−
3
View file @
819055a7
...
@@ -133,7 +133,7 @@ private:
...
@@ -133,7 +133,7 @@ private:
return
dFdw
;
return
dFdw
;
}
}
Tensor3
<
ctype
,
embeddedDim
,
embeddedDim
,
embeddedDim
>
computeDqDqF
(
const
std
::
vector
<
ctype
>&
w
,
const
TargetSpace
&
q
)
const
Tensor3
<
ctype
,
embeddedDim
,
embeddedDim
,
embeddedDim
>
computeDqDqF
(
const
Dune
::
array
<
ctype
,
dim
+
1
>&
w
,
const
TargetSpace
&
q
)
const
{
{
Tensor3
<
ctype
,
embeddedDim
,
embeddedDim
,
embeddedDim
>
result
;
Tensor3
<
ctype
,
embeddedDim
,
embeddedDim
,
embeddedDim
>
result
;
result
=
0
;
result
=
0
;
...
@@ -300,7 +300,7 @@ evaluateDerivativeOfValueWRTCoefficient(const Dune::FieldVector<ctype, dim>& loc
...
@@ -300,7 +300,7 @@ evaluateDerivativeOfValueWRTCoefficient(const Dune::FieldVector<ctype, dim>& loc
TargetSpace
q
=
evaluate
(
local
);
TargetSpace
q
=
evaluate
(
local
);
// dFdq
// dFdq
std
::
vector
<
ctype
>
w
=
barycentricCoordinates
(
local
);
Dune
::
array
<
ctype
,
dim
+
1
>
w
=
barycentricCoordinates
(
local
);
AverageDistanceAssembler
<
TargetSpace
,
dim
+
1
>
assembler
(
coefficients_
,
w
);
AverageDistanceAssembler
<
TargetSpace
,
dim
+
1
>
assembler
(
coefficients_
,
w
);
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
embeddedDim
>
dFdq
(
0
);
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
embeddedDim
>
dFdq
(
0
);
...
@@ -403,7 +403,7 @@ evaluateDerivativeOfGradientWRTCoefficient(const Dune::FieldVector<ctype, dim>&
...
@@ -403,7 +403,7 @@ evaluateDerivativeOfGradientWRTCoefficient(const Dune::FieldVector<ctype, dim>&
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
dim
+
1
>
dFdw
=
computeDFdw
(
q
);
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
dim
+
1
>
dFdw
=
computeDFdw
(
q
);
// the actual system matrix
// the actual system matrix
std
::
vector
<
ctype
>
w
=
barycentricCoordinates
(
local
);
Dune
::
array
<
ctype
,
dim
+
1
>
w
=
barycentricCoordinates
(
local
);
AverageDistanceAssembler
<
TargetSpace
,
dim
+
1
>
assembler
(
coefficients_
,
w
);
AverageDistanceAssembler
<
TargetSpace
,
dim
+
1
>
assembler
(
coefficients_
,
w
);
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
embeddedDim
>
dFdq
(
0
);
Dune
::
FieldMatrix
<
ctype
,
embeddedDim
,
embeddedDim
>
dFdq
(
0
);
...
...
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