Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dune-fem-dg
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
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
dune-fem
dune-fem-dg
Commits
d2aee1aa
Commit
d2aee1aa
authored
9 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
make compile.
parent
0ae8fa2e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/fem-dg/assemble/primalmatrix.hh
+77
-68
77 additions, 68 deletions
dune/fem-dg/assemble/primalmatrix.hh
with
77 additions
and
68 deletions
dune/fem-dg/assemble/primalmatrix.hh
+
77
−
68
View file @
d2aee1aa
...
...
@@ -559,74 +559,83 @@ class DGPrimalMatrixAssembly
void
assemble
(
const
double
time
,
DestinationType
&
rhs
)
const
{
// rhs.clear()
;
//
// const DiscreteFunctionSpaceType &dfSpace = rhs.space();
// const size_t maxNumBasisFunctions = maxNumScalarBasisFunctions( dfSpace );
//
// flux_.initialize(dfSpace);
//
// const RangeType uZero(0);
// const JacobianRangeType uJacZero(0);
//
// const IteratorType end = dfSpace.end();
// for( IteratorType it = dfSpace.begin(); it != end; ++it )
// {
// const EntityType &entity = *it;
// const GeometryType &geometry = entity.geometry();
//
// LocalFunctionType rhsLocal = rhs.localFunction( entity );
//
// const BasisFunctionSetType &baseSet = rhsLocal.baseFunctionSet();
// const unsigned int numBasisFunctionsEn = baseSet.size();
//
// const IntersectionIteratorType endiit = dfSpace.gridPart().iend( entity );
// for ( IntersectionIteratorType iit = dfSpace.gridPart().ibegin( entity );
// iit != endiit ; ++ iit )
// {
// const IntersectionType& intersection = *iit ;
//
// if( intersection.neighbor() && calculateFluxes_ )
// {
// }
// else if ( intersection.boundary() && ! useStrongBoundaryCondition_ )
// {
// FaceQuadratureType faceQuadInside(dfSpace.gridPart(), intersection,
// faceQuadOrder( dfSpace.order( entity ) ),
// FaceQuadratureType::INSIDE);
//
// const size_t numFaceQuadPoints = faceQuadInside.nop();
// resize( numFaceQuadPoints, maxNumBasisFunctions );
//
// // store all basis functions
//
// // evalute base functions
// for( size_t pt = 0; pt < numFaceQuadPoints; ++pt )
// {
// baseSet.evaluateAll( faceQuadInside[ pt ], phiFaceEn[pt] );
// baseSet.jacobianAll( faceQuadInside[ pt ], dphiFaceEn[pt] );
// }
//
// boundaryValues(local,bndValues);
//
// // first compute affine part of boundary flux
// boundaryFlux(local, RangeValues(-1,phiFaceEn), JacobianRangeValues(-1,dphiFaceEn),bndValues,
// valueNb,dvalueNb);
//
// // now move affine part to right hand side
// for( size_t pt = 0; pt < numFaceQuadPoints; ++pt )
// {
// RangeType& rhsFlux = valueNb[ pt ];
// JacobianRangeType& drhsFlux = dvalueNb[ pt ];
//
// const double weight = faceQuadInside.weight( pt );
// rhsFlux *= -weight;
// drhsFlux *= -weight;
// }
// rhsLocal.axpyQuadrature( faceQuadInside, valueNb, dvalueNb );
// }
// }
// }
rhs
.
clear
();
const
DiscreteFunctionSpaceType
&
dfSpace
=
rhs
.
space
();
const
size_t
maxNumBasisFunctions
=
maxNumScalarBasisFunctions
(
dfSpace
);
#ifndef EULER
flux_
.
initialize
(
dfSpace
);
#endif
const
RangeType
uZero
(
0
);
const
JacobianRangeType
uJacZero
(
0
);
const
IteratorType
end
=
dfSpace
.
end
();
for
(
IteratorType
it
=
dfSpace
.
begin
();
it
!=
end
;
++
it
)
{
const
EntityType
&
entity
=
*
it
;
const
GeometryType
&
geometry
=
entity
.
geometry
();
const
double
volume
=
geometry
.
volume
();
LocalFunctionType
rhsLocal
=
rhs
.
localFunction
(
entity
);
const
BasisFunctionSetType
&
baseSet
=
rhsLocal
.
baseFunctionSet
();
const
unsigned
int
numBasisFunctionsEn
=
baseSet
.
size
();
const
IntersectionIteratorType
endiit
=
dfSpace
.
gridPart
().
iend
(
entity
);
for
(
IntersectionIteratorType
iit
=
dfSpace
.
gridPart
().
ibegin
(
entity
);
iit
!=
endiit
;
++
iit
)
{
const
IntersectionType
&
intersection
=
*
iit
;
if
(
intersection
.
neighbor
()
&&
calculateFluxes_
)
{
}
else
if
(
intersection
.
boundary
()
&&
!
useStrongBoundaryCondition_
)
{
FaceQuadratureType
faceQuadInside
(
dfSpace
.
gridPart
(),
intersection
,
faceQuadOrder
(
dfSpace
.
order
(
entity
)
),
FaceQuadratureType
::
INSIDE
);
const
size_t
numFaceQuadPoints
=
faceQuadInside
.
nop
();
resize
(
numFaceQuadPoints
,
maxNumBasisFunctions
);
// store all basis functions
// evalute base functions
for
(
size_t
pt
=
0
;
pt
<
numFaceQuadPoints
;
++
pt
)
{
baseSet
.
evaluateAll
(
faceQuadInside
[
pt
],
phiFaceEn
[
pt
]
);
baseSet
.
jacobianAll
(
faceQuadInside
[
pt
],
dphiFaceEn
[
pt
]
);
}
typedef
RangeType
RangeTuple
;
typedef
JacobianRangeType
JacobianTuple
;
typedef
IntersectionQuadraturePointContext
<
IntersectionType
,
EntityType
,
FaceQuadratureType
,
RangeTuple
,
JacobianTuple
>
IntersectionLocalEvaluationType
;
IntersectionLocalEvaluationType
local
(
intersection
,
entity
,
faceQuadInside
,
uZero
,
uJacZero
,
0
,
time
,
volume
);
boundaryValues
(
local
,
bndValues
);
// first compute affine part of boundary flux
boundaryFlux
(
dfSpace
.
gridPart
(),
intersection
,
entity
,
time
,
faceQuadInside
,
RangeValues
(
-
1
,
phiFaceEn
),
JacobianRangeValues
(
-
1
,
dphiFaceEn
),
bndValues
,
valueNb
,
dvalueNb
);
// now move affine part to right hand side
for
(
size_t
pt
=
0
;
pt
<
numFaceQuadPoints
;
++
pt
)
{
RangeType
&
rhsFlux
=
valueNb
[
pt
];
JacobianRangeType
&
drhsFlux
=
dvalueNb
[
pt
];
const
double
weight
=
faceQuadInside
.
weight
(
pt
);
rhsFlux
*=
-
weight
;
drhsFlux
*=
-
weight
;
}
rhsLocal
.
axpyQuadrature
(
faceQuadInside
,
valueNb
,
dvalueNb
);
}
}
}
}
template
<
bool
conforming
,
class
Matrix
>
...
...
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