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
253d3308
Commit
253d3308
authored
10 years ago
by
Oliver Sander
Committed by
sander
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Remove trailing whitespace
[[Imported from SVN: r9979]]
parent
2ea197de
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
dune/gfe/rodassembler.hh
+29
-29
29 additions, 29 deletions
dune/gfe/rodassembler.hh
with
29 additions
and
29 deletions
dune/gfe/rodassembler.hh
+
29
−
29
View file @
253d3308
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
template
<
class
GridView
,
int
spaceDim
>
template
<
class
GridView
,
int
spaceDim
>
class
RodAssembler
class
RodAssembler
{
{
dune_static_assert
(
spaceDim
==
2
||
spaceDim
==
3
,
dune_static_assert
(
spaceDim
==
2
||
spaceDim
==
3
,
"You can only instantiate the class RodAssembler for 2d and 3d spaces"
);
"You can only instantiate the class RodAssembler for 2d and 3d spaces"
);
};
};
...
@@ -26,7 +26,7 @@ class RodAssembler
...
@@ -26,7 +26,7 @@ class RodAssembler
template
<
class
GridView
>
template
<
class
GridView
>
class
RodAssembler
<
GridView
,
3
>
:
public
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
3
>
>
class
RodAssembler
<
GridView
,
3
>
:
public
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
3
>
>
{
{
//typedef typename GridType::template Codim<0>::Entity EntityType;
//typedef typename GridType::template Codim<0>::Entity EntityType;
//typedef typename GridType::template Codim<0>::EntityPointer EntityPointer;
//typedef typename GridType::template Codim<0>::EntityPointer EntityPointer;
typedef
typename
GridView
::
template
Codim
<
0
>
::
Iterator
ElementIterator
;
typedef
typename
GridView
::
template
Codim
<
0
>
::
Iterator
ElementIterator
;
...
@@ -38,16 +38,16 @@ class RodAssembler<GridView,3> : public GeodesicFEAssembler<P1NodalBasis<GridVie
...
@@ -38,16 +38,16 @@ class RodAssembler<GridView,3> : public GeodesicFEAssembler<P1NodalBasis<GridVie
//! Each block is x, y, theta in 2d, T (R^3 \times SO(3)) in 3d
//! Each block is x, y, theta in 2d, T (R^3 \times SO(3)) in 3d
enum
{
blocksize
=
6
};
enum
{
blocksize
=
6
};
//!
//!
typedef
Dune
::
FieldMatrix
<
double
,
blocksize
,
blocksize
>
MatrixBlock
;
typedef
Dune
::
FieldMatrix
<
double
,
blocksize
,
blocksize
>
MatrixBlock
;
public
:
public
:
//! ???
//! ???
RodAssembler
(
const
GridView
&
gridView
,
RodAssembler
(
const
GridView
&
gridView
,
RodLocalStiffness
<
GridView
,
double
>*
localStiffness
)
RodLocalStiffness
<
GridView
,
double
>*
localStiffness
)
:
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
3
>
>
(
gridView
,
localStiffness
)
:
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
3
>
>
(
gridView
,
localStiffness
)
{
{
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>
referenceConfiguration
(
gridView
.
size
(
gridDim
));
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>
referenceConfiguration
(
gridView
.
size
(
gridDim
));
typename
GridView
::
template
Codim
<
gridDim
>
::
Iterator
it
=
gridView
.
template
begin
<
gridDim
>();
typename
GridView
::
template
Codim
<
gridDim
>
::
Iterator
it
=
gridView
.
template
begin
<
gridDim
>();
...
@@ -73,13 +73,13 @@ public:
...
@@ -73,13 +73,13 @@ public:
void
assembleGradient
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
sol
,
void
assembleGradient
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
grad
)
const
;
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
grad
)
const
;
void
getStrain
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
sol
,
void
getStrain
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
strain
)
const
;
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
strain
)
const
;
void
getStress
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
sol
,
void
getStress
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
3
>
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
stress
)
const
;
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
stress
)
const
;
/** \brief Return resultant force across boundary in canonical coordinates
/** \brief Return resultant force across boundary in canonical coordinates
\note Linear run-time in the size of the grid */
\note Linear run-time in the size of the grid */
template
<
class
PatchGridView
>
template
<
class
PatchGridView
>
...
@@ -94,63 +94,63 @@ public:
...
@@ -94,63 +94,63 @@ public:
template
<
class
GridView
>
template
<
class
GridView
>
class
RodAssembler
<
GridView
,
2
>
:
public
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
2
>
>
class
RodAssembler
<
GridView
,
2
>
:
public
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
2
>
>
{
{
typedef
typename
GridView
::
template
Codim
<
0
>
::
Entity
EntityType
;
typedef
typename
GridView
::
template
Codim
<
0
>
::
Entity
EntityType
;
typedef
typename
GridView
::
template
Codim
<
0
>
::
Iterator
ElementIterator
;
typedef
typename
GridView
::
template
Codim
<
0
>
::
Iterator
ElementIterator
;
//! Dimension of the grid. This needs to be one!
//! Dimension of the grid. This needs to be one!
enum
{
gridDim
=
GridView
::
dimension
};
enum
{
gridDim
=
GridView
::
dimension
};
enum
{
elementOrder
=
1
};
enum
{
elementOrder
=
1
};
//! Each block is x, y, theta
//! Each block is x, y, theta
enum
{
blocksize
=
3
};
enum
{
blocksize
=
3
};
//!
//!
typedef
Dune
::
FieldMatrix
<
double
,
blocksize
,
blocksize
>
MatrixBlock
;
typedef
Dune
::
FieldMatrix
<
double
,
blocksize
,
blocksize
>
MatrixBlock
;
/** \brief Material constants */
/** \brief Material constants */
double
B
;
double
B
;
double
A1
;
double
A1
;
double
A3
;
double
A3
;
public
:
public
:
//! ???
//! ???
RodAssembler
(
const
GridView
&
gridView
)
RodAssembler
(
const
GridView
&
gridView
)
:
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
2
>
>
(
gridView
,
NULL
)
:
GeodesicFEAssembler
<
P1NodalBasis
<
GridView
>
,
RigidBodyMotion
<
double
,
2
>
>
(
gridView
,
NULL
)
{
{
B
=
1
;
B
=
1
;
A1
=
1
;
A1
=
1
;
A3
=
1
;
A3
=
1
;
}
}
~
RodAssembler
()
{}
~
RodAssembler
()
{}
void
setParameters
(
double
b
,
double
a1
,
double
a3
)
{
void
setParameters
(
double
b
,
double
a1
,
double
a3
)
{
B
=
b
;
B
=
b
;
A1
=
a1
;
A1
=
a1
;
A3
=
a3
;
A3
=
a3
;
}
}
/** \brief Assemble the tangent stiffness matrix and the right hand side
/** \brief Assemble the tangent stiffness matrix and the right hand side
*/
*/
void
assembleMatrix
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
sol
,
void
assembleMatrix
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
sol
,
Dune
::
BCRSMatrix
<
MatrixBlock
>&
matrix
);
Dune
::
BCRSMatrix
<
MatrixBlock
>&
matrix
);
void
assembleGradient
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
sol
,
void
assembleGradient
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
sol
,
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
grad
)
const
;
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
blocksize
>
>&
grad
)
const
;
/** \brief Compute the energy of a deformation state */
/** \brief Compute the energy of a deformation state */
double
computeEnergy
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
sol
)
const
;
double
computeEnergy
(
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
sol
)
const
;
protected
:
protected
:
/** \brief Compute the element tangent stiffness matrix */
/** \brief Compute the element tangent stiffness matrix */
void
getLocalMatrix
(
EntityType
&
entity
,
void
getLocalMatrix
(
EntityType
&
entity
,
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
localSolution
,
const
std
::
vector
<
RigidBodyMotion
<
double
,
2
>
>&
localSolution
,
Dune
::
Matrix
<
MatrixBlock
>&
mat
)
const
;
Dune
::
Matrix
<
MatrixBlock
>&
mat
)
const
;
};
// end class
};
// end class
#include
"rodassembler.cc"
#include
"rodassembler.cc"
...
...
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