Changeset 73faf4 for src/Actions
- Timestamp:
- May 8, 2017, 2:00:47 PM (8 years ago)
- Branches:
- ForceAnnealing_goodresults, ForceAnnealing_tocheck
- Children:
- c8165c
- Parents:
- ce254c (diff), cb6357 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- src/Actions
- Files:
-
- 15 added
- 7 edited
-
Action_impl_pre.hpp (modified) (1 diff)
-
CommandAction/HelpAction.cpp (modified) (1 diff)
-
GeometryAction/GeometryDistanceToVectorAction.cpp (added)
-
GeometryAction/GeometryDistanceToVectorAction.def (added)
-
GeometryAction/GeometryDistanceToVectorAction.hpp (added)
-
GeometryAction/GeometryInputToVectorAction.cpp (added)
-
GeometryAction/GeometryInputToVectorAction.def (added)
-
GeometryAction/GeometryInputToVectorAction.hpp (added)
-
GeometryAction/GeometryPlaneToVectorAction.cpp (added)
-
GeometryAction/GeometryPlaneToVectorAction.def (added)
-
GeometryAction/GeometryPlaneToVectorAction.hpp (added)
-
GeometryAction/GeometryPositionToVectorAction.cpp (added)
-
GeometryAction/GeometryPositionToVectorAction.def (added)
-
GeometryAction/GeometryPositionToVectorAction.hpp (added)
-
GeometryAction/GeometryRemoveAction.cpp (added)
-
GeometryAction/GeometryRemoveAction.def (added)
-
GeometryAction/GeometryRemoveAction.hpp (added)
-
GlobalListOfActions.hpp (modified) (1 diff)
-
Makefile.am (modified) (4 diffs)
-
MakroAction_impl_pre.hpp (modified) (1 diff)
-
Values.cpp (modified) (3 diffs)
-
Values.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Actions/Action_impl_pre.hpp
rce254c r73faf4 173 173 output << \ 174 174 BOOST_PP_IF(n, ", ", "") \ 175 << "\"" << toPythonString(params. \175 << "\"" << params. \ 176 176 BOOST_PP_SEQ_ELEM(n, paramreferences) \ 177 .get Unvalidated()) \177 .getAsStringUnvalidated() \ 178 178 << "\""; 179 179 -
src/Actions/CommandAction/HelpAction.cpp
rce254c r73faf4 73 73 std::cout << "\t - List/vector of strings: gives as \"first\" \"second\" \"third\"." << std::endl; 74 74 std::cout << "\t - Vector: give as \"x,y,z\", i.e. its 3 components." << std::endl; 75 std::cout << "\t - or give as \"<name>\", where <name> is a stored geometry name." << std::endl; 75 76 std::cout << "\t - Domain: give as \"xx,yx,yy,zx,zy,zz\", i.e. symmetric 3x3 matrix." << std::endl; 76 77 std::cout << "\t - Path/filename: give as \"<path/filename>\"." << std::endl; -
src/Actions/GlobalListOfActions.hpp
rce254c r73faf4 69 69 (FragmentationStoreSaturatedFragment) \ 70 70 (FragmentationStructuralOptimization) \ 71 (GeometryDistanceToVector) \ 72 (GeometryInputToVector) \ 73 (GeometryPlaneToVector) \ 74 (GeometryPositionToVector) \ 75 (GeometryRemove) \ 71 76 (GraphUpdateMolecules) \ 72 77 (GraphCorrectBondDegree) \ -
src/Actions/Makefile.am
rce254c r73faf4 64 64 ${FILLACTIONSOURCE} \ 65 65 ${FRAGMENTATIONACTIONSOURCE} \ 66 ${GEOMETRYACTIONSOURCE} \ 66 67 ${GRAPHACTIONSOURCE} \ 67 68 ${MOLECULEACTIONSOURCE} \ … … 84 85 ${FILLACTIONHEADER} \ 85 86 ${FRAGMENTATIONACTIONHEADER} \ 87 ${GEOMETRYACTIONHEADER} \ 86 88 ${GRAPHACTIONHEADER} \ 87 89 ${MOLECULEACTIONHEADER} \ … … 104 106 ${FILLACTIONDEFS} \ 105 107 ${FRAGMENTATIONACTIONDEFS} \ 108 ${GEOMETRYACTIONDEFS} \ 106 109 ${GRAPHACTIONDEFS} \ 107 110 ${MOLECULEACTIONDEFS} \ … … 285 288 Actions/FragmentationAction/StoreSaturatedFragmentAction.def \ 286 289 Actions/FragmentationAction/StructuralOptimizationAction.def 290 291 GEOMETRYACTIONSOURCE = \ 292 Actions/GeometryAction/GeometryDistanceToVectorAction.cpp \ 293 Actions/GeometryAction/GeometryInputToVectorAction.cpp \ 294 Actions/GeometryAction/GeometryPlaneToVectorAction.cpp \ 295 Actions/GeometryAction/GeometryPositionToVectorAction.cpp \ 296 Actions/GeometryAction/GeometryRemoveAction.cpp 297 GEOMETRYACTIONHEADER = \ 298 Actions/GeometryAction/GeometryDistanceToVectorAction.hpp \ 299 Actions/GeometryAction/GeometryInputToVectorAction.hpp \ 300 Actions/GeometryAction/GeometryPlaneToVectorAction.hpp \ 301 Actions/GeometryAction/GeometryPositionToVectorAction.hpp \ 302 Actions/GeometryAction/GeometryRemoveAction.hpp 303 GEOMETRYACTIONDEFS = \ 304 Actions/GeometryAction/GeometryDistanceToVectorAction.def \ 305 Actions/GeometryAction/GeometryInputToVectorAction.def \ 306 Actions/GeometryAction/GeometryPlaneToVectorAction.def \ 307 Actions/GeometryAction/GeometryPositionToVectorAction.def \ 308 Actions/GeometryAction/GeometryRemoveAction.def 287 309 288 310 GRAPHACTIONSOURCE = \ -
src/Actions/MakroAction_impl_pre.hpp
rce254c r73faf4 165 165 output << \ 166 166 BOOST_PP_IF(n, ", ", "") \ 167 << "\"" << toPythonString(params. \167 << "\"" << params. \ 168 168 BOOST_PP_SEQ_ELEM(n, paramreferences) \ 169 .get ()) \169 .getAsStringUnvalidated() \ 170 170 << "\""; 171 171 -
src/Actions/Values.cpp
rce254c r73faf4 37 37 #include "CodePatterns/Assert.hpp" 38 38 39 #include <boost/lexical_cast.hpp> 40 #include <boost/tokenizer.hpp> 41 39 42 #include "Box.hpp" 40 43 #include "LinearAlgebra/BoxVector.hpp" … … 44 47 #include "Values.hpp" 45 48 49 static const Vector parseAsVector(const std::string &_string) 50 { 51 Vector temp; 52 // dissect by "," 53 typedef boost::tokenizer<boost::char_separator<char> > tokenizer; 54 boost::char_separator<char> value_separator(",)("); 55 56 bool status = true; 57 tokenizer tokens(_string, value_separator); 58 if (!_string.empty()) { 59 tokenizer::iterator tok_iter = tokens.begin(); 60 for (size_t i=0;i<NDIM;++i) { 61 if (tok_iter == tokens.end()) { 62 status = false; 63 break; 64 } 65 temp[i] = boost::lexical_cast<double>(*(tok_iter++)); 66 } 67 } 68 if (!status) 69 temp.Zero(); 70 71 return temp; 72 } 73 46 74 Vector VectorValue::toVector() const 47 75 { 48 Vector returnVector (vector);76 Vector returnVector = parseAsVector(vectorstring); 49 77 50 78 return returnVector; … … 54 82 { 55 83 BoxVector returnVector; 56 static_cast<Vector>(returnVector) = Vector(vector); // under its hood it's still a Vector84 static_cast<Vector>(returnVector) = parseAsVector(vectorstring); // under its hood it's still a Vector 57 85 58 86 ASSERT(_box.isValid(returnVector), -
src/Actions/Values.hpp
rce254c r73faf4 27 27 * are registered as VectorValue and lateron inside the CommandLineQuery placed 28 28 * into the real vector. 29 * 30 * We use this abstraction also for Geometry Objects, i.e. string names 31 * referencing vectors in the GeomtryRegistry. 29 32 */ 30 33 struct VectorValue 31 34 { 32 double vector[NDIM];35 std::string vectorstring; 33 36 34 37 Vector toVector() const;
Note:
See TracChangeset
for help on using the changeset viewer.
