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
b42e41bc
Commit
b42e41bc
authored
6 years ago
by
anikhalder
Browse files
Options
Downloads
Patches
Plain Diff
Add initial 1D and 2D interference analogs for Radial and 2D Paracrystal
parent
cab94bda
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
GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilderUtils.cpp
+36
-0
36 additions, 0 deletions
GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilderUtils.cpp
GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h
+14
-0
14 additions, 0 deletions
GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h
with
50 additions
and
0 deletions
GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilderUtils.cpp
+
36
−
0
View file @
b42e41bc
...
...
@@ -229,6 +229,42 @@ void RealSpaceBuilderUtils::populateInterference1DLatticeType(
sceneGeometry
,
builder3D
);
}
void
RealSpaceBuilderUtils
::
populateInterferenceRadialParacrystalType
(
const
IInterferenceFunction
*
interference
,
RealSpaceModel
*
model
,
const
std
::
vector
<
Particle3DContainer
>&
particle3DContainer_vector
,
const
SceneGeometry
&
sceneGeometry
,
const
RealSpaceBuilder
*
builder3D
)
{
auto
interferenceRadialParacrystal
=
dynamic_cast
<
const
InterferenceFunctionRadialParaCrystal
*>
(
interference
);
auto
peakDistance
=
interferenceRadialParacrystal
->
peakDistance
();
// Simply set the parameters l1 = peakDistance, l2 = 0, l_alpha = 0 and l_xi = 0 in
// computeInterference2DLatticePositions() to compute initial lattice positions for 1D Radial Lattice
std
::
vector
<
std
::
vector
<
double
>>
lattice_positions
=
computeInterference2DLatticePositions
(
peakDistance
,
0.0
,
0.0
,
0.0
,
sceneGeometry
);
populateParticlesAtLatticePositions
(
lattice_positions
,
particle3DContainer_vector
,
model
,
sceneGeometry
,
builder3D
);
}
/*
// TODO Modify after completion of Radial Paracrystal
void RealSpaceBuilderUtils::populateInterference2DParacrystalType(
const IInterferenceFunction* interference, RealSpaceModel* model,
const std::vector<Particle3DContainer>& particle3DContainer_vector,
const SceneGeometry& sceneGeometry, const RealSpaceBuilder* builder3D)
{
auto interference2DParacrystal = dynamic_cast<const InterferenceFunction2DParaCrystal *>(interference);
const Lattice2D& lattice2DParacrystal = interference2DParacrystal->lattice();
std::vector<std::vector<double>> lattice_positions = computeInterference2DLatticePositions(
lattice2DParacrystal.length1(), lattice2DParacrystal.length2(), lattice2DParacrystal.latticeAngle(),
lattice2DParacrystal.rotationAngle(), sceneGeometry);
populateParticlesAtLatticePositions(lattice_positions, particle3DContainer_vector, model,
sceneGeometry, builder3D);
}
*/
// Implement Rotation of a 3D particle using parameters from IRotation Object
QVector3D
RealSpaceBuilderUtils
::
implementParticleRotationfromIRotation
(
const
IRotation
*&
rotation
)
{
...
...
This diff is collapsed.
Click to expand it.
GUI/coregui/Views/RealSpaceWidgets/RealSpaceBuilderUtils.h
+
14
−
0
View file @
b42e41bc
...
...
@@ -74,6 +74,20 @@ BA_CORE_API_ void populateInterference1DLatticeType(
const
std
::
vector
<
Particle3DContainer
>&
particle3DContainer_vector
,
const
SceneGeometry
&
sceneGeometry
,
const
RealSpaceBuilder
*
builder3D
);
// InterferenceFunctionRadialParacrystalType
BA_CORE_API_
void
populateInterferenceRadialParacrystalType
(
const
IInterferenceFunction
*
interference
,
RealSpaceModel
*
model
,
const
std
::
vector
<
Particle3DContainer
>&
particle3DContainer_vector
,
const
SceneGeometry
&
sceneGeometry
,
const
RealSpaceBuilder
*
builder3D
);
/*
// InterferenceFunction2DParacrystalType
BA_CORE_API_ void populateInterference2DParacrystalType(
const IInterferenceFunction* interference, RealSpaceModel* model,
const std::vector<Particle3DContainer>& particle3DContainer_vector,
const SceneGeometry& sceneGeometry, const RealSpaceBuilder* builder3D);
*/
// Implement Rotation of a 3D particle using parameters from IRotation Object
BA_CORE_API_
QVector3D
implementParticleRotationfromIRotation
(
const
IRotation
*&
rotation
);
...
...
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