Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VirtualFluids
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
iRMB
VirtualFluids
Commits
5baed6ed
Commit
5baed6ed
authored
1 year ago
by
Anna Wellmann
Browse files
Options
Downloads
Patches
Plain Diff
Remove test as it does not really test Parameter
parent
851f65de
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!234
Update CMakeList for VF_GPU and remove a unit test for Parameter.cpp
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/gpu/VirtualFluids_GPU/Parameter/ParameterTest.cpp
+0
-58
0 additions, 58 deletions
src/gpu/VirtualFluids_GPU/Parameter/ParameterTest.cpp
with
0 additions
and
58 deletions
src/gpu/VirtualFluids_GPU/Parameter/ParameterTest.cpp
+
0
−
58
View file @
5baed6ed
...
...
@@ -250,64 +250,6 @@ TEST(ParameterTest, whenCreatingParameterClassWithGridRefinement_afterCallingIni
EXPECT_THAT
(
para
->
getParH
(
1
),
testing
::
Ne
(
nullptr
));
}
class
MockCommunicator
:
public
vf
::
gpu
::
Communicator
{
public:
void
waitAll
()
override
{};
int
getPID
()
const
override
{
return
0
;
};
int
getNumberOfProcess
()
const
override
{
return
1
;
};
void
exchngData
(
float
*
sbuf_t
,
float
*
rbuf_t
,
float
*
sbuf_b
,
float
*
rbuf_b
,
int
count
)
override
{};
//////////////////////////////////////////////////////////////////////////
void
exchngDataGPU
(
real
*
sbuf
,
int
count_s
,
real
*
rbuf
,
int
count_r
,
int
nb_rank
)
override
{};
void
nbRecvDataGPU
(
real
*
rbuf
,
int
count_r
,
int
nb_rank
)
override
{};
void
nbSendDataGPU
(
real
*
sbuf
,
int
count_s
,
int
nb_rank
)
override
{};
void
waitallGPU
()
override
{};
void
sendDataGPU
(
real
*
sbuf
,
int
count_s
,
int
nb_rank
)
override
{};
void
waitGPU
(
int
id
)
override
{};
void
resetRequest
()
override
{};
//////////////////////////////////////////////////////////////////////////
int
mapCudaDevice
(
const
int
&
rank
,
const
int
&
size
,
const
std
::
vector
<
unsigned
int
>
&
devices
,
const
int
&
maxdev
)
override
{
return
0
;
};
double
reduceSum
(
double
quantityPerProcess
)
override
{
return
0
;
};
//////////////////////////////////////////////////////////////////////////
void
receive_send
(
uint
*
buffer_receive
,
int
size_buffer_recv
,
int
neighbor_rank_recv
,
uint
*
buffer_send
,
int
size_buffer_send
,
int
neighbor_rank_send
)
const
override
{};
};
TEST
(
ParameterTest
,
whenCreatingParameterClassWithGridRefinement_afterCallingSimulationConstructor_shouldNotThrow
)
{
spdlog
::
set_level
(
spdlog
::
level
::
warn
);
// avoids logger spam in output
auto
para
=
std
::
make_shared
<
Parameter
>
();
para
->
setMaxLevel
(
2
);
SPtr
<
CudaMemoryManager
>
cudaMemoryManager
=
std
::
make_shared
<
CudaMemoryManager
>
(
para
);
MockCommunicator
communicator
=
MockCommunicator
();
auto
gridFactory
=
GridFactory
::
make
();
auto
gridBuilder
=
MultipleGridBuilder
::
makeShared
(
gridFactory
);
SPtr
<
GridProvider
>
gridGenerator
=
std
::
make_shared
<
MockGridGenerator
>
(
gridBuilder
,
para
,
cudaMemoryManager
,
communicator
);
BoundaryConditionFactory
bcFactory
=
BoundaryConditionFactory
();
GridScalingFactory
scalingFactory
=
GridScalingFactory
();
EXPECT_THAT
(
para
->
getParH
(
1
),
testing
::
Eq
(
nullptr
));
// Parameter initialization incomplete
// Simulation() calls para->initLBMSimulationParameter() --> that function completes the initialization of Parameter
Simulation
sim
(
para
,
cudaMemoryManager
,
communicator
,
*
gridGenerator
,
&
bcFactory
,
&
scalingFactory
);
EXPECT_THAT
(
para
->
getParH
(
1
),
testing
::
Ne
(
nullptr
));
EXPECT_NO_THROW
(
cudaMemoryManager
->
cudaAllocLevelForcing
(
1
));
// throws if para->getParH(1) is a null pointer
}
class
ParameterTestCumulantK17
:
public
testing
::
Test
{
protected:
...
...
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