Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
lattice-dehomogenization
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Samuel Hayden
lattice-dehomogenization
Commits
4c622dd9
Commit
4c622dd9
authored
11 months ago
by
samuel.hayden
Browse files
Options
Downloads
Patches
Plain Diff
Input file now has cell type option
parent
40efb48c
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
LatticeDehomogenization/src/inputParsing/ParseInputFile.cpp
+14
-1
14 additions, 1 deletion
LatticeDehomogenization/src/inputParsing/ParseInputFile.cpp
LatticeDehomogenization/src/inputParsing/ParseInputFile.h
+2
-0
2 additions, 0 deletions
LatticeDehomogenization/src/inputParsing/ParseInputFile.h
with
16 additions
and
1 deletion
LatticeDehomogenization/src/inputParsing/ParseInputFile.cpp
+
14
−
1
View file @
4c622dd9
...
...
@@ -2,9 +2,15 @@
/* Parsed Data */
ParseInputFile
::
ParseInputFile
(
const
ParseCommandLine
&
cmdln
)
:
_hasCells
(
false
),
_hasRadii
(
false
),
_hasCellSize
(
false
),
_hasPositions
(
false
),
:
_hasCells
(
false
),
_hasRadii
(
false
),
_hasCellSize
(
false
),
_hasPositions
(
false
),
_hasCellType
(
false
),
_nx
(
0
),
_ny
(
0
),
_nz
(
0
),
_cx
(
0.0
),
_cy
(
0.0
),
_cz
(
0.0
)
{
if
(
cmdln
.
hasKey
(
"celltype"
))
{
_cellType
=
cmdln
.
getValue
(
"celltype"
);
_hasCellType
=
true
;
}
if
(
cmdln
.
hasKey
(
"input"
))
if
(
!
parseFile
(
cmdln
.
getValue
(
"input"
)))
return
;
...
...
@@ -57,6 +63,13 @@ bool ParseInputFile::parseFile(const std::string filepath)
iss
>>
nPoints
;
parsePositions
(
file
,
nPoints
);
}
else
if
(
argument
==
"CellType"
&&
!
_hasCellType
)
{
iss
>>
_cellType
;
for
(
auto
&
c
:
_cellType
)
c
=
tolower
(
c
);
_hasCellType
=
true
;
}
}
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
LatticeDehomogenization/src/inputParsing/ParseInputFile.h
+
2
−
0
View file @
4c622dd9
...
...
@@ -15,8 +15,10 @@ private:
bool
_hasRadii
;
// nRadii > 0
bool
_hasCellSize
;
// Cell size given
bool
_hasPositions
;
// Cell positions defined
bool
_hasCellType
;
// Cell type defined
/* Parsed Data */
std
::
string
_cellType
;
// Type of unit cell
size_t
_nx
,
_ny
,
_nz
;
// nCells
double
_cx
,
_cy
,
_cz
;
// cell size
std
::
vector
<
double
>
_radii
;
// Cell radii
...
...
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