Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
ogs
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
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
wenqing
ogs
Commits
b5e43c51
Commit
b5e43c51
authored
7 years ago
by
Tom Fischer
Browse files
Options
Downloads
Patches
Plain Diff
[T/NL] Test for parallel comp. of component norm.
parent
f30f18c4
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
Tests/NumLib/TestComponentNorms.cpp
+25
-4
25 additions, 4 deletions
Tests/NumLib/TestComponentNorms.cpp
with
25 additions
and
4 deletions
Tests/NumLib/TestComponentNorms.cpp
+
25
−
4
View file @
b5e43c51
...
...
@@ -11,10 +11,17 @@
#include
<limits>
#include
<logog/include/logog.hpp>
#ifdef USE_PETSC
#include
"BaseLib/BuildInfo.h"
#endif
#include
"MathLib/LinAlg/LinAlg.h"
#include
"MathLib/LinAlg/MatrixSpecifications.h"
#include
"MathLib/LinAlg/MatrixVectorTraits.h"
#ifdef USE_PETSC
#include
"MeshLib/IO/readMeshFromFile.h"
#else
#include
"MeshLib/MeshGenerators/MeshGenerator.h"
#endif
#include
"NumLib/DOF/LocalToGlobalIndexMap.h"
#include
"NumLib/NumericsConfig.h"
#include
"NumLib/DOF/DOFTableUtil.h"
...
...
@@ -34,8 +41,14 @@ struct DOFTableData
{
DOFTableData
(
unsigned
const
num_components
,
NumLib
::
ComponentOrder
const
order
)
#ifdef USE_PETSC
:
mesh
(
MeshLib
::
IO
::
readMeshFromFile
(
BaseLib
::
BuildInfo
::
data_path
+
"/EllipticPETSc/quad_20x10_GroundWaterFlow."
)),
#else
:
mesh
(
MeshLib
::
MeshGenerator
::
generateRegularHexMesh
(
mesh_length
,
mesh_elements_in_each_direction
)),
#endif
mesh_subset_all_nodes
(
*
mesh
,
&
mesh
->
getNodes
()),
dof_table
(
createMeshSubsets
(
mesh_subset_all_nodes
,
num_components
),
order
)
...
...
@@ -46,12 +59,16 @@ struct DOFTableData
MeshLib
::
MeshSubset
const
mesh_subset_all_nodes
;
NumLib
::
LocalToGlobalIndexMap
const
dof_table
;
#ifndef USE_PETSC
private
:
static
const
double
mesh_length
;
static
const
std
::
size_t
mesh_elements_in_each_direction
;
#endif
};
#ifndef USE_PETSC
const
double
DOFTableData
::
mesh_length
=
1
;
const
std
::
size_t
DOFTableData
::
mesh_elements_in_each_direction
=
5
;
#endif
template
<
typename
AccumulateCallback
,
typename
AccumulateFinishCallback
>
void
do_test
(
unsigned
const
num_components
,
...
...
@@ -65,7 +82,11 @@ void do_test(unsigned const num_components,
* vector.
*/
using
CO
=
NumLib
::
ComponentOrder
;
#ifdef USE_PETSC
for
(
auto
order
:
{
CO
::
BY_LOCATION
})
#else
for
(
auto
order
:
{
CO
::
BY_COMPONENT
,
CO
::
BY_LOCATION
})
#endif
{
DOFTableData
dtd
(
num_components
,
order
);
...
...
@@ -97,7 +118,7 @@ void do_test(unsigned const num_components,
#ifndef USE_PETSC
TEST
(
NumLib
,
ComponentNormSingleComponent
)
#else
TEST
(
NumLib
,
DISABLED_
ComponentNormSingleComponent
)
TEST
(
MPITest_
NumLib
,
ComponentNormSingleComponent
)
#endif
{
unsigned
const
num_components
=
1
;
...
...
@@ -116,7 +137,7 @@ TEST(NumLib, DISABLED_ComponentNormSingleComponent)
#ifndef USE_PETSC
TEST
(
NumLib
,
ComponentNormMultiComponent1
)
#else
TEST
(
NumLib
,
DISABLED_
ComponentNormMultiComponent1
)
TEST
(
MPITest_
NumLib
,
ComponentNormMultiComponent1
)
#endif
{
unsigned
const
num_components
=
3
;
...
...
@@ -132,7 +153,7 @@ TEST(NumLib, DISABLED_ComponentNormMultiComponent1)
#ifndef USE_PETSC
TEST
(
NumLib
,
ComponentNormMultiComponent2
)
#else
TEST
(
NumLib
,
DISABLED_
ComponentNormMultiComponent2
)
TEST
(
MPITest_
NumLib
,
ComponentNormMultiComponent2
)
#endif
{
unsigned
const
num_components
=
3
;
...
...
@@ -148,7 +169,7 @@ TEST(NumLib, DISABLED_ComponentNormMultiComponent2)
#ifndef USE_PETSC
TEST
(
NumLib
,
ComponentNormMultiComponentInfinity
)
#else
TEST
(
NumLib
,
DISABLED_
ComponentNormMultiComponentInfinity
)
TEST
(
MPITest_
NumLib
,
ComponentNormMultiComponentInfinity
)
#endif
{
unsigned
const
num_components
=
3
;
...
...
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