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
7f526360
Commit
7f526360
authored
15 years ago
by
Oliver Sander
Committed by
sander@PCPOOL.MI.FU-BERLIN.DE
15 years ago
Browse files
Options
Downloads
Patches
Plain Diff
get rid of the polOrd template parameter of PlanarRodAssembler
[[Imported from SVN: r5692]]
parent
006ef150
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
rodobstacle.cc
+3
-2
3 additions, 2 deletions
rodobstacle.cc
src/rodassembler.cc
+13
-13
13 additions, 13 deletions
src/rodassembler.cc
src/rodassembler.hh
+1
-1
1 addition, 1 deletion
src/rodassembler.hh
with
17 additions
and
16 deletions
rodobstacle.cc
+
3
−
2
View file @
7f526360
...
@@ -152,11 +152,12 @@ int main (int argc, char *argv[]) try
...
@@ -152,11 +152,12 @@ int main (int argc, char *argv[]) try
// //////////////////////////
// //////////////////////////
for
(
int
i
=
0
;
i
<
x
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
x
.
size
();
i
++
)
{
x
[
i
].
r
[
1
]
=
i
;
//double(i)/(x.size()-1);
x
[
i
].
r
[
0
]
=
0
;
x
[
i
].
r
[
0
]
=
0
;
x
[
i
].
r
[
1
]
=
i
;
//double(i)/(x.size()-1);
x
[
i
].
q
=
Rotation
<
2
,
double
>::
identity
();
x
[
i
].
q
=
Rotation
<
2
,
double
>::
identity
();
}
}
x
.
back
().
r
[
1
]
+=
1
;
// /////////////////////////////////////////////////////////////////////
// /////////////////////////////////////////////////////////////////////
// Refinement Loop
// Refinement Loop
...
@@ -180,7 +181,7 @@ int main (int argc, char *argv[]) try
...
@@ -180,7 +181,7 @@ int main (int argc, char *argv[]) try
MatrixType
hessianMatrix
;
MatrixType
hessianMatrix
;
PlanarRodAssembler
<
GridType
,
4
>
rodAssembler
(
grid
);
PlanarRodAssembler
<
GridType
>
rodAssembler
(
grid
);
rodAssembler
.
setParameters
(
1
,
350000
,
350000
);
rodAssembler
.
setParameters
(
1
,
350000
,
350000
);
...
...
This diff is collapsed.
Click to expand it.
src/rodassembler.cc
+
13
−
13
View file @
7f526360
...
@@ -214,8 +214,8 @@ getResultantForce(const BoundaryPatchBase<PatchGridView>& boundary,
...
@@ -214,8 +214,8 @@ getResultantForce(const BoundaryPatchBase<PatchGridView>& boundary,
}
}
template
<
class
GridType
,
int
polOrd
>
template
<
class
GridType
>
void
PlanarRodAssembler
<
GridType
,
polOrd
>::
getNeighborsPerVertex
(
Dune
::
MatrixIndexSet
&
nb
)
const
void
PlanarRodAssembler
<
GridType
>::
getNeighborsPerVertex
(
Dune
::
MatrixIndexSet
&
nb
)
const
{
{
const
int
gridDim
=
GridType
::
dimension
;
const
int
gridDim
=
GridType
::
dimension
;
const
typename
GridType
::
Traits
::
LevelIndexSet
&
indexSet
=
grid_
->
levelIndexSet
(
grid_
->
maxLevel
());
const
typename
GridType
::
Traits
::
LevelIndexSet
&
indexSet
=
grid_
->
levelIndexSet
(
grid_
->
maxLevel
());
...
@@ -247,8 +247,8 @@ void PlanarRodAssembler<GridType, polOrd>::getNeighborsPerVertex(Dune::MatrixInd
...
@@ -247,8 +247,8 @@ void PlanarRodAssembler<GridType, polOrd>::getNeighborsPerVertex(Dune::MatrixInd
}
}
template
<
class
GridType
,
int
polOrd
>
template
<
class
GridType
>
void
PlanarRodAssembler
<
GridType
,
polOrd
>::
void
PlanarRodAssembler
<
GridType
>::
assembleMatrix
(
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
sol
,
assembleMatrix
(
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
sol
,
Dune
::
BCRSMatrix
<
MatrixBlock
>&
matrix
)
Dune
::
BCRSMatrix
<
MatrixBlock
>&
matrix
)
{
{
...
@@ -301,9 +301,9 @@ assembleMatrix(const std::vector<RigidBodyMotion<2> >& sol,
...
@@ -301,9 +301,9 @@ assembleMatrix(const std::vector<RigidBodyMotion<2> >& sol,
template
<
class
GridType
,
int
polOrd
>
template
<
class
GridType
>
template
<
class
MatrixType
>
template
<
class
MatrixType
>
void
PlanarRodAssembler
<
GridType
,
polOrd
>::
void
PlanarRodAssembler
<
GridType
>::
getLocalMatrix
(
EntityType
&
entity
,
getLocalMatrix
(
EntityType
&
entity
,
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
localSolution
,
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
localSolution
,
const
int
matSize
,
MatrixType
&
localMat
)
const
const
int
matSize
,
MatrixType
&
localMat
)
const
...
@@ -320,7 +320,7 @@ getLocalMatrix( EntityType &entity,
...
@@ -320,7 +320,7 @@ getLocalMatrix( EntityType &entity,
Dune
::
P1LocalFiniteElement
<
double
,
double
,
gridDim
>
localFiniteElement
;
Dune
::
P1LocalFiniteElement
<
double
,
double
,
gridDim
>
localFiniteElement
;
// Get quadrature rule
// Get quadrature rule
const
Dune
::
QuadratureRule
<
double
,
gridDim
>&
quad
=
Dune
::
QuadratureRules
<
double
,
gridDim
>::
rule
(
entity
.
type
(),
polOrd
);
const
Dune
::
QuadratureRule
<
double
,
gridDim
>&
quad
=
Dune
::
QuadratureRules
<
double
,
gridDim
>::
rule
(
entity
.
type
(),
2
);
/* Loop over all integration points */
/* Loop over all integration points */
for
(
int
ip
=
0
;
ip
<
quad
.
size
();
ip
++
)
{
for
(
int
ip
=
0
;
ip
<
quad
.
size
();
ip
++
)
{
...
@@ -453,8 +453,8 @@ getLocalMatrix( EntityType &entity,
...
@@ -453,8 +453,8 @@ getLocalMatrix( EntityType &entity,
}
}
template
<
class
GridType
,
int
polOrd
>
template
<
class
GridType
>
void
PlanarRodAssembler
<
GridType
,
polOrd
>::
void
PlanarRodAssembler
<
GridType
>::
assembleGradient
(
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
sol
,
assembleGradient
(
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
grad
)
const
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
grad
)
const
{
{
...
@@ -483,7 +483,7 @@ assembleGradient(const std::vector<RigidBodyMotion<2> >& sol,
...
@@ -483,7 +483,7 @@ assembleGradient(const std::vector<RigidBodyMotion<2> >& sol,
localSolution
[
i
]
=
sol
[
indexSet
.
subIndex
(
*
it
,
i
,
gridDim
)];
localSolution
[
i
]
=
sol
[
indexSet
.
subIndex
(
*
it
,
i
,
gridDim
)];
// Get quadrature rule
// Get quadrature rule
const
Dune
::
QuadratureRule
<
double
,
gridDim
>&
quad
=
Dune
::
QuadratureRules
<
double
,
gridDim
>::
rule
(
it
->
type
(),
polOrd
);
const
Dune
::
QuadratureRule
<
double
,
gridDim
>&
quad
=
Dune
::
QuadratureRules
<
double
,
gridDim
>::
rule
(
it
->
type
(),
2
);
for
(
int
pt
=
0
;
pt
<
quad
.
size
();
pt
++
)
{
for
(
int
pt
=
0
;
pt
<
quad
.
size
();
pt
++
)
{
...
@@ -555,8 +555,8 @@ assembleGradient(const std::vector<RigidBodyMotion<2> >& sol,
...
@@ -555,8 +555,8 @@ assembleGradient(const std::vector<RigidBodyMotion<2> >& sol,
}
}
template
<
class
GridType
,
int
polOrd
>
template
<
class
GridType
>
double
PlanarRodAssembler
<
GridType
,
polOrd
>::
double
PlanarRodAssembler
<
GridType
>::
computeEnergy
(
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
sol
)
const
computeEnergy
(
const
std
::
vector
<
RigidBodyMotion
<
2
>
>&
sol
)
const
{
{
const
int
maxlevel
=
grid_
->
maxLevel
();
const
int
maxlevel
=
grid_
->
maxLevel
();
...
@@ -584,7 +584,7 @@ computeEnergy(const std::vector<RigidBodyMotion<2> >& sol) const
...
@@ -584,7 +584,7 @@ computeEnergy(const std::vector<RigidBodyMotion<2> >& sol) const
localSolution
[
i
]
=
sol
[
indexSet
.
subIndex
(
*
it
,
i
,
gridDim
)];
localSolution
[
i
]
=
sol
[
indexSet
.
subIndex
(
*
it
,
i
,
gridDim
)];
// Get quadrature rule
// Get quadrature rule
const
Dune
::
QuadratureRule
<
double
,
gridDim
>&
quad
=
Dune
::
QuadratureRules
<
double
,
gridDim
>::
rule
(
it
->
type
(),
polOrd
);
const
Dune
::
QuadratureRule
<
double
,
gridDim
>&
quad
=
Dune
::
QuadratureRules
<
double
,
gridDim
>::
rule
(
it
->
type
(),
2
);
for
(
int
pt
=
0
;
pt
<
quad
.
size
();
pt
++
)
{
for
(
int
pt
=
0
;
pt
<
quad
.
size
();
pt
++
)
{
...
...
This diff is collapsed.
Click to expand it.
src/rodassembler.hh
+
1
−
1
View file @
7f526360
...
@@ -79,7 +79,7 @@ public:
...
@@ -79,7 +79,7 @@ public:
/** \brief The FEM operator for a 2D extensible, shearable rod
/** \brief The FEM operator for a 2D extensible, shearable rod
*/
*/
template
<
class
GridType
,
int
polOrd
>
template
<
class
GridType
>
class
PlanarRodAssembler
:
public
GeodesicFEAssembler
<
typename
GridType
::
LeafGridView
,
RigidBodyMotion
<
2
>
>
class
PlanarRodAssembler
:
public
GeodesicFEAssembler
<
typename
GridType
::
LeafGridView
,
RigidBodyMotion
<
2
>
>
{
{
...
...
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