Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-tectonic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
podlesny
dune-tectonic
Commits
6ca97a3e
Commit
6ca97a3e
authored
13 years ago
by
Elias Pipping
Committed by
Elias Pipping
13 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Make assemble_frictional a factory method
parent
3441176f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/one-body-sample.cc
+11
-12
11 additions, 12 deletions
src/one-body-sample.cc
with
11 additions
and
12 deletions
src/one-body-sample.cc
+
11
−
12
View file @
6ca97a3e
...
@@ -122,21 +122,21 @@ void assemble_neumann(GridView const &gridView, FEBasis const &feBasis,
...
@@ -122,21 +122,21 @@ void assemble_neumann(GridView const &gridView, FEBasis const &feBasis,
// Assembles constant 1-function on frictional boundary in nodalIntegrals
// Assembles constant 1-function on frictional boundary in nodalIntegrals
template
<
class
GridType
,
class
GridView
,
class
LocalVectorType
,
class
FEBasis
>
template
<
class
GridType
,
class
GridView
,
class
LocalVectorType
,
class
FEBasis
>
void
assemble_frictional
(
Dune
::
shared_ptr
<
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
1
>>>
GridView
const
&
gridView
,
FEBasis
const
&
feBasis
,
assemble_frictional
(
GridView
const
&
gridView
,
FEBasis
const
&
feBasis
,
Dune
::
BitSetVector
<
1
>
const
&
frictionalNodes
,
Dune
::
BitSetVector
<
1
>
const
&
frictionalNodes
)
{
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
1
>>
&
nodalIntegrals
)
{
BoundaryPatch
<
GridView
>
frictionalBoundary
(
gridView
,
frictionalNodes
);
BoundaryPatch
<
GridView
>
frictionalBoundary
(
gridView
,
frictionalNodes
);
ConstantFunction
<
LocalVectorType
,
Dune
::
FieldVector
<
double
,
1
>>
ConstantFunction
<
LocalVectorType
,
Dune
::
FieldVector
<
double
,
1
>>
constantOneFunction
(
1
);
constantOneFunction
(
1
);
NeumannBoundaryAssembler
<
GridType
,
Dune
::
FieldVector
<
double
,
1
>>
NeumannBoundaryAssembler
<
GridType
,
Dune
::
FieldVector
<
double
,
1
>>
frictionalBoundaryAssembler
(
constantOneFunction
);
frictionalBoundaryAssembler
(
constantOneFunction
);
BoundaryFunctionalAssembler
<
FEBasis
>
boundaryFunctionalAssembler
(
auto
nodalIntegrals
=
feBasis
,
frictionalBoundary
);
Dune
::
make_shared
<
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
1
>>>
();
boundaryFunctionalAssembler
.
assemble
(
BoundaryFunctionalAssembler
<
FEBasis
>
(
feBasis
,
frictionalBoundary
)
frictionalBoundaryAssembler
,
nodalIntegrals
,
.
assemble
(
frictionalBoundaryAssembler
,
*
nodalIntegrals
,
true
);
// whether to resize the output vector and zero all of its entries
true
);
// resize and zero output vector
return
nodalIntegrals
;
}
}
template
<
class
VectorType
,
class
MatrixType
>
template
<
class
VectorType
,
class
MatrixType
>
...
@@ -267,9 +267,8 @@ int main(int argc, char *argv[]) {
...
@@ -267,9 +267,8 @@ int main(int argc, char *argv[]) {
VectorType
b4
;
VectorType
b4
;
auto
nodalIntegrals
=
auto
nodalIntegrals
=
Dune
::
make_shared
<
Dune
::
BlockVector
<
Dune
::
FieldVector
<
double
,
1
>>>
();
assemble_frictional
<
GridType
,
GridView
,
SmallVector
,
P1Basis
>
(
assemble_frictional
<
GridType
,
GridView
,
SmallVector
,
P1Basis
>
(
leafView
,
p1Basis
,
frictionalNodes
);
leafView
,
p1Basis
,
frictionalNodes
,
*
nodalIntegrals
);
auto
myGlobalNonlinearity
=
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
auto
myGlobalNonlinearity
=
assemble_nonlinearity
<
VectorType
,
OperatorType
>
(
grid
->
size
(
grid
->
maxLevel
(),
dim
),
parset
,
nodalIntegrals
);
grid
->
size
(
grid
->
maxLevel
(),
dim
),
parset
,
nodalIntegrals
);
...
...
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