Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor 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
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
d274b518
There was an error fetching the commit references. Please try again later.
Commit
d274b518
authored
8 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Fixing tnl-quickstart.
parent
4db50c8f
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/Tools/tnl-quickstart/operator-grid-specialization.h.in
+11
-9
11 additions, 9 deletions
src/Tools/tnl-quickstart/operator-grid-specialization.h.in
src/Tools/tnl-quickstart/operator-grid-specialization_impl.h.in
+18
-13
18 additions, 13 deletions
...ols/tnl-quickstart/operator-grid-specialization_impl.h.in
with
29 additions
and
22 deletions
src/Tools/tnl-quickstart/operator-grid-specialization.h.in
+
11
−
9
View file @
d274b518
...
...
@@ -28,16 +28,18 @@ class {operatorName}< TNL::Meshes::Grid< {meshDimensions}, MeshReal, Device, Mes
const IndexType& index,
const MeshEntity& entity ) const;
template< typename MeshEntity, typename Vector, typename MatrixRow >
template< typename PreimageFunction,
typename MeshEntity,
typename Matrix,
typename Vector >
__cuda_callable__
void setMatrixElements( const RealType& time,
const RealType& tau,
const MeshType& mesh,
const IndexType& index,
const MeshEntity& entity,
const MeshFunctionType& u,
Vector& b,
MatrixRow& matrixRow ) const;
inline void setMatrixElements( const PreimageFunction& u,
const MeshEntity& entity,
const RealType& time,
const RealType& tau,
Matrix& matrix,
Vector& b ) const;
}};
This diff is collapsed.
Click to expand it.
src/Tools/tnl-quickstart/operator-grid-specialization_impl.h.in
+
18
−
13
View file @
d274b518
...
...
@@ -69,26 +69,31 @@ template< typename MeshReal,
typename MeshIndex,
typename Real,
typename Index >
template< typename MeshEntity, typename Vector, typename MatrixRow >
__cuda_callable__
template< typename PreimageFunction,
typename MeshEntity,
typename Matrix,
typename Vector >
__cuda_callable__
inline
void
{operatorName}< TNL::Meshes::Grid< {meshDimensions}, MeshReal, Device, MeshIndex >, Real, Index >::
setMatrixElements( const RealType& time,
const RealType& tau,
const MeshType& mesh,
const IndexType& index,
setMatrixElements( const PreimageFunction& u,
const MeshEntity& entity,
const MeshFunctionType& u,
Vector& b,
MatrixRow& matrixRow ) const
const RealType& time,
const RealType& tau,
Matrix& matrix,
Vector& b ) const
{{
static_assert( MeshEntity::entityDimensions == {meshDimensions}, "Wrong mesh entity dimensions." );
static_assert( PreimageFunction::getEntitiesDimensions() == {meshDimensions}, "Wrong preimage function" );
/****
* Setup the non-zero elements of the linear system here.
* The following example is the Laplace operator approximated
* by the Finite difference method.
*/
const
typename MeshEntity::template NeighbourEntities< " + dimensions + " >& neighbourEntities = entity.getNeighbourEntities
();
const typename MeshEntity::template NeighbourEntities< {meshDimensions} >& neighbourEntities = entity.getNeighbourEntities();
const
IndexType& index = entity.getIndex
();
typename Matrix::MatrixRow matrixRow = matrix.getRow( index );
{semiimplicitScheme}
}}
\ No newline at end of file
}}
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