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
219db39d
There was an error fetching the commit references. Please try again later.
Commit
219db39d
authored
6 years ago
by
Jakub Klinkovský
Committed by
Jakub Klinkovský
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added convenient overload of the loadMesh function for non-distributed meshes
parent
a0133466
No related branches found
No related tags found
1 merge request
!49
Bug fixes
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/TNL/Meshes/TypeResolver/TypeResolver_impl.h
+12
-0
12 additions, 0 deletions
src/TNL/Meshes/TypeResolver/TypeResolver_impl.h
with
12 additions
and
0 deletions
src/TNL/Meshes/TypeResolver/TypeResolver_impl.h
+
12
−
0
View file @
219db39d
...
...
@@ -19,6 +19,7 @@
#include
<TNL/Meshes/Readers/VTKReader.h>
#include
<TNL/Meshes/TypeResolver/GridTypeResolver.h>
#include
<TNL/Meshes/TypeResolver/MeshTypeResolver.h>
#include
<TNL/Communicators/NoDistrCommunicator.h>
// TODO: implement this in TNL::String
inline
bool
ends_with
(
const
std
::
string
&
value
,
const
std
::
string
&
ending
)
...
...
@@ -278,5 +279,16 @@ decomposeMesh( const Config::ParameterContainer& parameters,
return
true
;
}
// convenient overload for non-distributed meshes
template
<
typename
Mesh
>
bool
loadMesh
(
const
String
&
fileName
,
Mesh
&
mesh
)
{
using
Communicator
=
TNL
::
Communicators
::
NoDistrCommunicator
;
using
DistributedMesh
=
DistributedMeshes
::
DistributedMesh
<
Mesh
>
;
DistributedMesh
distributedMesh
;
return
loadMesh
<
Communicator
>
(
fileName
,
mesh
,
distributedMesh
);
}
}
// namespace Meshes
}
// namespace TNL
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