Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
4015be3b
Commit
4015be3b
authored
4 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rename "reference" -> "direct" to avoid confusion with reference data
parent
9a865baa
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
Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
+4
-5
4 additions, 5 deletions
Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
Tests/Functional/Python/PyStandard/PyStandardTest.cpp
+5
-7
5 additions, 7 deletions
Tests/Functional/Python/PyStandard/PyStandardTest.cpp
with
9 additions
and
12 deletions
Tests/Functional/GUI/GUIStandardTest/GUIStandardTest.cpp
+
4
−
5
View file @
4015be3b
...
@@ -27,7 +27,7 @@ namespace
...
@@ -27,7 +27,7 @@ namespace
{
{
std
::
unique_ptr
<
OutputData
<
double
>>
domainData
(
const
std
::
string
&
/*test_name*/
,
std
::
unique_ptr
<
OutputData
<
double
>>
domainData
(
const
std
::
string
&
/*test_name*/
,
const
Simulation
&
reference
_simulation
)
const
Simulation
&
direct
_simulation
)
{
{
// initializing necessary GUI
// initializing necessary GUI
DocumentModel
documentModel
;
DocumentModel
documentModel
;
...
@@ -36,10 +36,9 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/,
...
@@ -36,10 +36,9 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& /*test_name*/,
MaterialModel
materialModel
;
MaterialModel
materialModel
;
// populating GUI models from domain
// populating GUI models from domain
GUIObjectBuilder
::
populateSampleModelFromSim
(
&
sampleModel
,
&
materialModel
,
GUIObjectBuilder
::
populateSampleModelFromSim
(
&
sampleModel
,
&
materialModel
,
direct_simulation
);
reference_simulation
);
GUIObjectBuilder
::
populateInstrumentModel
(
&
instrumentModel
,
direct_simulation
);
GUIObjectBuilder
::
populateInstrumentModel
(
&
instrumentModel
,
reference_simulation
);
GUIObjectBuilder
::
populateDocumentModel
(
&
documentModel
,
direct_simulation
);
GUIObjectBuilder
::
populateDocumentModel
(
&
documentModel
,
reference_simulation
);
std
::
unique_ptr
<
Simulation
>
domain_simulation
=
DomainSimulationBuilder
::
createSimulation
(
std
::
unique_ptr
<
Simulation
>
domain_simulation
=
DomainSimulationBuilder
::
createSimulation
(
sampleModel
.
multiLayerItem
(),
instrumentModel
.
instrumentItem
(),
sampleModel
.
multiLayerItem
(),
instrumentModel
.
instrumentItem
(),
...
...
This diff is collapsed.
Click to expand it.
Tests/Functional/Python/PyStandard/PyStandardTest.cpp
+
5
−
7
View file @
4015be3b
...
@@ -28,7 +28,7 @@ namespace
...
@@ -28,7 +28,7 @@ namespace
{
{
std
::
unique_ptr
<
OutputData
<
double
>>
domainData
(
const
std
::
string
&
test_name
,
std
::
unique_ptr
<
OutputData
<
double
>>
domainData
(
const
std
::
string
&
test_name
,
const
Simulation
&
reference
_simulation
)
const
Simulation
&
direct
_simulation
)
{
{
const
std
::
string
output_name
=
const
std
::
string
output_name
=
FileSystemUtils
::
jointPath
(
BATesting
::
PyStandardOutputDir
(),
test_name
);
FileSystemUtils
::
jointPath
(
BATesting
::
PyStandardOutputDir
(),
test_name
);
...
@@ -40,7 +40,7 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& test_name,
...
@@ -40,7 +40,7 @@ std::unique_ptr<OutputData<double>> domainData(const std::string& test_name,
const
std
::
string
pyscript_filename
=
const
std
::
string
pyscript_filename
=
FileSystemUtils
::
jointPath
(
BATesting
::
PyStandardOutputDir
(),
test_name
+
".py"
);
FileSystemUtils
::
jointPath
(
BATesting
::
PyStandardOutputDir
(),
test_name
+
".py"
);
std
::
ofstream
pythonFile
(
pyscript_filename
);
std
::
ofstream
pythonFile
(
pyscript_filename
);
pythonFile
<<
ExportToPython
::
generatePyExportTest
(
reference
_simulation
);
pythonFile
<<
ExportToPython
::
generatePyExportTest
(
direct
_simulation
);
pythonFile
.
close
();
pythonFile
.
close
();
// Run Python script
// Run Python script
...
@@ -76,11 +76,9 @@ bool PyStandardTest::runTest()
...
@@ -76,11 +76,9 @@ bool PyStandardTest::runTest()
domainData
(
m_name
,
*
m_reference_simulation
);
domainData
(
m_name
,
*
m_reference_simulation
);
// Run direct simulation
// Run direct simulation
std
::
cout
<<
"- run
reference
simulation
\n
"
;
std
::
cout
<<
"- run
direct
simulation
\n
"
;
m_reference_simulation
->
runSimulation
();
m_reference_simulation
->
runSimulation
();
const
std
::
unique_ptr
<
OutputData
<
double
>>
reference_data
=
const
std
::
unique_ptr
<
OutputData
<
double
>>
direct_data
=
m_reference_simulation
->
result
().
data
();
m_reference_simulation
->
result
().
data
();
return
IntensityDataFunctions
::
checkRelativeDifference
(
*
domain_data
,
*
reference_data
,
return
IntensityDataFunctions
::
checkRelativeDifference
(
*
domain_data
,
*
direct_data
,
m_threshold
);
m_threshold
);
}
}
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