From 23b5c3b29289119a3982ffd3aea9ed68d45b8975 Mon Sep 17 00:00:00 2001 From: ThaHobbyist Date: Fri, 17 May 2024 13:33:03 +0530 Subject: [PATCH 1/5] Added basic implementation of vector and tensor --- .github/workflows/python-testing.yml | 2 +- pyvnt/Reference/tensor.py | 99 ++++++++++++++++++++++++++++ pyvnt/Reference/vector.py | 65 ++++++++++++++++++ 3 files changed, 165 insertions(+), 1 deletion(-) create mode 100644 pyvnt/Reference/tensor.py create mode 100644 pyvnt/Reference/vector.py diff --git a/.github/workflows/python-testing.yml b/.github/workflows/python-testing.yml index f1dd709..787399a 100644 --- a/.github/workflows/python-testing.yml +++ b/.github/workflows/python-testing.yml @@ -29,7 +29,7 @@ jobs: python -m pip install --upgrade pip python -m pip install pytest anytree setuptools wheel python setup.py sdist bdist_wheel - python setup.py install + python -m pip install . - name: Test with pytest run: | pytest -v \ No newline at end of file diff --git a/pyvnt/Reference/tensor.py b/pyvnt/Reference/tensor.py new file mode 100644 index 0000000..7bbb49c --- /dev/null +++ b/pyvnt/Reference/tensor.py @@ -0,0 +1,99 @@ +from pyvnt.Reference.basic import * + +class PropertyTensor(ValueProperty): + ''' + A property that holds a tensor value. + + Tensor is stored in the following manner: + [[xx, xy, xz], + [yx, yy, yz], + [zx, zy, zz]] + + Constructor Parameters: + name: The name of the property. + value: list + ''' + + __slots__ = ('_PropertyTensor__name', '_PropertyTensor__values') + + def instance_restricted(self): + pass + + def __init__(self, name, value: [PropertyFloat]): + super(PropertyTensor, self).__init__() + self.setProperties(name, *value) + + def setProperties(self, name: str, xx: PropertyFloat = None, xy: PropertyFloat = None, xz: PropertyFloat = None, yx: PropertyFloat = None, yy: PropertyFloat = None, yz: PropertyFloat = None, zx: PropertyFloat = None, zy: PropertyFloat = None, zz: PropertyFloat = None) -> None: + ''' + Function to edit the values stored in the object + + Parameters: + name: The name of the property. + value: list + ''' + self._ValueProperty__name = name + + self.__values = [[xx, xy, xz], + [yx, yy, yz], + [zx, zy, zz]] + + def xx(self) -> float: + ''' + Returns the xx value of the tensor + ''' + return self.__values[0][0].giveVal() + + def xy(self) -> float: + ''' + Returns the xy value of the tensor + ''' + return self.__values[0][1].giveVal() + + def xz(self) -> float: + ''' + Returns the xz value of the tensor + ''' + return self.__values[0][2].giveVal() + + def yx(self) -> float: + ''' + Returns the yx value of the tensor + ''' + return self.__values[1][0].giveVal() + + def yy(self) -> float: + ''' + Returns the yy value of the tensor + ''' + return self.__values[1][1].giveVal() + + def yz(self) -> float: + ''' + Returns the yz value of the tensor + ''' + return self.__values[1][2].giveVal() + + def zx(self) -> float: + ''' + Returns the zx value of the tensor + ''' + return self.__values[2][0].giveVal() + + def zy(self) -> float: + ''' + Returns the zy value of the tensor + ''' + return self.__values[2][1].giveVal() + + def zz(self) -> float: + ''' + Returns the zz value of the tensor + ''' + return self.__values[2][2].giveVal() + + def __repr__(self): + return f"PropertyTensor(name = {self._ValueProperty__name}, xx = {self.xx()}, xy = {self.xy()}, xz = {self.xz()}, yx = {self.yx()}, yy = {self.yy()}, yz = {self.yz()}, zx = {self.zx()}, zy = {self.zy()}, zz = {self.zz()})" + + + + \ No newline at end of file diff --git a/pyvnt/Reference/vector.py b/pyvnt/Reference/vector.py new file mode 100644 index 0000000..fb6cb1e --- /dev/null +++ b/pyvnt/Reference/vector.py @@ -0,0 +1,65 @@ +from pyvnt.Reference.basic import * + +class PropertyVector(ValueProperty): + ''' + Property Class to store vector values + + Constructor Parameters: + name: Name of the property of which vector value is to be stored + x: PropertyFloat object to store x value of the vector + y: PropertyFloat object to store y value of the vector + z: PropertyFloat object to store z value of the vector + ''' + + __slots__ = ('_PropertyVector__name', '_PropertyVector__x', '_PropertyVector__y', '_PropertyVector__z') + + def instance_restricted(self): + pass + + def __init__(self, name: str, x: PropertyFloat, y: PropertyFloat, z: PropertyFloat): + super(PropertyVector, self).__init__() + self.setProperties(name, x, y, z) + + def setProperties(self, name: str = None, x: PropertyFloat = None, y: PropertyFloat = None, z: PropertyFloat = None) -> None: + ''' + Function to edit the values stored in the object + + Parameters: + name: Name of the property of which vector value is to be stored + x: PropertyFloat object to store x value of the vector + y: PropertyFloat object to store y value of the vector + z: PropertyFloat object to store z value of the vector + ''' + if name: + self._ValueProperty__name = name + + if x: + self.__x = x + + if y: + self.__y = y + + if z: + self.__z = z + + def x(self) -> float: + ''' + Returns the x value of the vector + ''' + + return self.__x.giveVal() + + def y(self) -> float: + ''' + Returns the y value of the vector + ''' + return self.__y.giveVal() + + def z(self) -> float: + ''' + Returns the z value of the vector + ''' + return self.__z.giveVal() + + def __repr__(self): + return f"PropertyVector(name = {self.__name}, x = {self.__x.giveVal()}, y = {self.__y.giveVal()}, z = {self.__z.giveVal()})" \ No newline at end of file From 1b1cdd76c98f066e8931a2567a70d8d8187aa5fd Mon Sep 17 00:00:00 2001 From: ThaHobbyist Date: Mon, 20 May 2024 22:26:07 +0530 Subject: [PATCH 2/5] Modified edit methods in the Tensor class and added definitions of functionalities needed in Tensors --- .../Reader/cpp_src/dictionaryFile/Make/files | 4 + .../cpp_src/dictionaryFile/Make/options | 4 + .../cpp_src/dictionaryFile/dictionaryFile.C | 48 +++ .../cpp_src/dictionaryFile/dictionaryFile.H | 15 + .../dictionaryFile_PythonInterface.H | 14 + .../dictionaryFile/lib/dictionaryFile.so | Bin 0 -> 22248 bytes .../cpp_src/dictionaryFileChecker/Make/files | 4 + .../dictionaryFileChecker.C.dep | 278 +++++++++++++ .../dictionaryFileChecker.o | Bin 0 -> 7992 bytes .../Make/linux64GccDPInt32Opt/files | 4 + .../dictionaryFileChecker/Make/options | 5 + .../bin/dictionaryFileChecker | Bin 0 -> 22264 bytes .../dictionaryFileChecker.C | 54 +++ .../cpp_src/dictionaryFileIterator/Make/files | 3 + .../dictionaryFileIterator/Make/options | 7 + .../dictionaryFileIterator.C | 374 ++++++++++++++++++ .../dictionaryFileIterator.H | 39 ++ .../dictionaryFileIterator_PythonInterface.H | 35 ++ .../lib/dictionaryFileIterator.so | Bin 0 -> 28384 bytes manual_tests/Reader/dictionaryFile.py | 56 +++ manual_tests/Reader/dictionaryFileIterator.py | 335 ++++++++++++++++ manual_tests/Reader/exceptions.py | 66 ++++ manual_tests/Reader/fileUtils.py | 22 ++ manual_tests/Reader/old__init__.py | 54 +++ manual_tests/Reader/sharedLibs.py | 150 +++++++ pyvnt/Reference/errorClasses.py | 7 + pyvnt/Reference/tensor.py | 103 ++++- pyvnt/Reference/vector.py | 23 +- 28 files changed, 1697 insertions(+), 7 deletions(-) create mode 100644 manual_tests/Reader/cpp_src/dictionaryFile/Make/files create mode 100644 manual_tests/Reader/cpp_src/dictionaryFile/Make/options create mode 100644 manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.C create mode 100644 manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.H create mode 100644 manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile_PythonInterface.H create mode 100644 manual_tests/Reader/cpp_src/dictionaryFile/lib/dictionaryFile.so create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/files create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/dictionaryFileChecker.C.dep create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/dictionaryFileChecker.o create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/files create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/options create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileChecker/bin/dictionaryFileChecker create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileChecker/dictionaryFileChecker.C create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/files create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/options create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.C create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.H create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator_PythonInterface.H create mode 100644 manual_tests/Reader/cpp_src/dictionaryFileIterator/lib/dictionaryFileIterator.so create mode 100644 manual_tests/Reader/dictionaryFile.py create mode 100644 manual_tests/Reader/dictionaryFileIterator.py create mode 100644 manual_tests/Reader/exceptions.py create mode 100644 manual_tests/Reader/fileUtils.py create mode 100644 manual_tests/Reader/old__init__.py create mode 100644 manual_tests/Reader/sharedLibs.py diff --git a/manual_tests/Reader/cpp_src/dictionaryFile/Make/files b/manual_tests/Reader/cpp_src/dictionaryFile/Make/files new file mode 100644 index 0000000..4117b6e --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFile/Make/files @@ -0,0 +1,4 @@ + +dictionaryFile.C + +LIB = ./lib/dictionaryFile \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFile/Make/options b/manual_tests/Reader/cpp_src/dictionaryFile/Make/options new file mode 100644 index 0000000..47589bc --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFile/Make/options @@ -0,0 +1,4 @@ + +LIB_LIBS = \ + -L$FOAM_LIBBIN \ + -lOpenFOAM \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.C b/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.C new file mode 100644 index 0000000..3207520 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.C @@ -0,0 +1,48 @@ + +#include "fileName.H" +#include "IFstream.H" +#include "dictionary.H" + +#include "dictionaryFile.H" +#include "dictionaryFile_PythonInterface.H" + + +DictionaryFile::DictionaryFile(const char* filepath) +{ + Foam::fileName dictPath(filepath); + Foam::IFstream dictFileStream(dictPath); + mDictPtr = new Foam::dictionary(dictFileStream); +} + +DictionaryFile::~DictionaryFile() +{ + delete mDictPtr; +} + +// void DictionaryFile::printEntry(const char* key) +// { +// Foam::word keyname(key); +// std::cout +// << "dictionaryName : " << mDictPtr->name().toAbsolute() << " " +// << mDictPtr->lookupEntry(keyname, false, false).keyword() +// << std::endl; +// } + +// API FUNCTIONS=============================================================== +void* openDictionaryFile(const char* filepath) +{ + DictionaryFile* dictFile = new DictionaryFile(filepath); + return dictFile; +} + +void closeDictionaryFile(void* dictionaryFile) +{ + DictionaryFile* dictFile = static_cast(dictionaryFile); + delete dictFile; +} + +// void printDictionary(void* dictionaryFile) +// { +// DictionaryFile* dictFile = static_cast(dictionaryFile); +// dictFile->printEntry("key1"); +// } \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.H b/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.H new file mode 100644 index 0000000..5217481 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile.H @@ -0,0 +1,15 @@ + +#pragma once + + +class DictionaryFile +{ +public: + Foam::dictionary* mDictPtr; + + DictionaryFile(const char* filepath); + ~DictionaryFile(); + // void* getIterator(); + // void printEntry(const char* key); +}; + diff --git a/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile_PythonInterface.H b/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile_PythonInterface.H new file mode 100644 index 0000000..85c4649 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFile/dictionaryFile_PythonInterface.H @@ -0,0 +1,14 @@ + +#pragma once + + +extern "C" +{ + +void* openDictionaryFile(const char* filepath); +void closeDictionaryFile(void* dictionaryFile); +// void* getIterator(void* dictionaryFile); +// void printDictionary(void* dictionaryFile); +} + + diff --git a/manual_tests/Reader/cpp_src/dictionaryFile/lib/dictionaryFile.so b/manual_tests/Reader/cpp_src/dictionaryFile/lib/dictionaryFile.so new file mode 100644 index 0000000000000000000000000000000000000000..02e09defc345e9382e70c42cab1c2fbc4037f422 GIT binary patch literal 22248 zcmeHPeUuc{m47`S%qZGDDkzG^0!IU)ooPN4$fDCQJyvT20|Sa0QuK5;OdtDW(p>|C z8`m*7NM{_yJxMk(n-j8_UE*<%W=#-11|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` zZX@Hi#P*nON145To+n{?f=-+*u^vO_yv1nzcwT@h&v&vspGW2&M~3R3$v}(DNcuy@ zCFS$S&3Xzr<+=axyaCg=L*H5deusWzz*J!RGp@`*Lz%xf`$^ z`}J+;QkyJ&npi{Hb-hVdlUTp3&$I^0c71F9sMS;{TAF5t^_Y%#==1zgQR=gwY=-ri zKL`4RvHv_TcT(y*<;hojI$zc=yQ@{i`aD0$1*~tU+;>@q=(M28O_DdJOTg0K3fLdM o|IvIp`)+EOzpXczbf0x&GkLC;Wob^Kl78(HQ{qyGf`b+R3(*I#@c;k- literal 0 HcmV?d00001 diff --git a/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/files b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/files new file mode 100644 index 0000000..b3e0f01 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/files @@ -0,0 +1,4 @@ + +dictionaryFileChecker.C + +EXE = ./bin/dictionaryFileChecker \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/dictionaryFileChecker.C.dep b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/dictionaryFileChecker.C.dep new file mode 100644 index 0000000..d538d41 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/dictionaryFileChecker.C.dep @@ -0,0 +1,278 @@ +$(OBJECTS_DIR)/dictionaryFileChecker.C.dep: \ +dictionaryFileChecker.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/fileName.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IFstream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/dictionary.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/word.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/fileNameI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ISstream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/className.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/entry.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IDLList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DLList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTable.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ITstream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordReList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Pair.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/dictionaryTemplates.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/string.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Istream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DynamicList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ISstreamI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/defineDebugSwitch.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/keyType.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/autoPtr.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ILList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DLListBase.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/label.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uLabel.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTableI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTable.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tokenList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordRe.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/List.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/primitiveEntry.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/char.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Hasher.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/stringI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IOstream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/token.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DynamicListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DynamicList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/debug.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/functionName.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/variable.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/keyTypeI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/autoPtrI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UILList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ILList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/bool.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DLListBaseI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/int.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/labelSpecific.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uint.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/error.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Tuple2.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTableIO.C \ +$(WM_PROJECT_DIR)/src/OSspecific/POSIX/lnInclude/regExp.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordReI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/List.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Hash.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/InfoProxy.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/primitiveEntryTemplates.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/scalar.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/verbatimString.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/refCount.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/typeInfo.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/runTimeSelectionTables.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tokenI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/functionNameI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/variableI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UILList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ILListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/pTraits.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/direction.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/int32.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/int64.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uint32.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uint64.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/messageStream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/errorManip.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Ostream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/nullObject.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/zero.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ListLoopM.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IndirectList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UIndirectList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/BiIndirectList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/contiguous.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IStringStream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/OStringStream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/floatScalar.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/doubleScalar.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/longDoubleScalar.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/verbatimStringI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UILListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/INew.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/OSstream.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/nullObjectI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/zeroI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Swap.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLListBase.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IndirectListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UIndirectListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UIndirectListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/BiIndirectListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/doubleFloat.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Scalar.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/OSstreamI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrListI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tmp.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLPtrList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLListBaseI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/products.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrListIO.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tmpI.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LPtrList.H \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LPtrList.C \ +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LPtrListIO.C \ + +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/fileName.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IFstream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/dictionary.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/word.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/fileNameI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ISstream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/className.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/entry.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IDLList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DLList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTable.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ITstream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordReList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Pair.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/dictionaryTemplates.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/string.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Istream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DynamicList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ISstreamI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/defineDebugSwitch.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/keyType.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/autoPtr.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ILList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DLListBase.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/label.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uLabel.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTableI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTable.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tokenList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordRe.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/List.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/primitiveEntry.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/char.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Hasher.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/stringI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IOstream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/token.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DynamicListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DynamicList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/debug.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/functionName.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/variable.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/keyTypeI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/autoPtrI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UILList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ILList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/bool.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/DLListBaseI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/int.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/labelSpecific.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uint.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/error.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Tuple2.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/HashTableIO.C : +$(WM_PROJECT_DIR)/src/OSspecific/POSIX/lnInclude/regExp.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/wordReI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/List.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Hash.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/InfoProxy.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/primitiveEntryTemplates.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/scalar.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/verbatimString.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/refCount.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/typeInfo.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/runTimeSelectionTables.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tokenI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/functionNameI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/variableI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UILList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ILListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/pTraits.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/direction.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/int32.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/int64.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uint32.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/uint64.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/messageStream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/errorManip.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Ostream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/nullObject.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/zero.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ListLoopM.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IndirectList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UIndirectList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/BiIndirectList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/contiguous.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/ListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/FixedListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IStringStream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/OStringStream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/floatScalar.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/doubleScalar.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/longDoubleScalar.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/verbatimStringI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UILListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/INew.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/OSstream.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/nullObjectI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/zeroI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Swap.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLListBase.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/IndirectListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UIndirectListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UIndirectListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/BiIndirectListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/doubleFloat.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/Scalar.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/OSstreamI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrListI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tmp.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLPtrList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/PtrListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/SLListBaseI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/products.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/UPtrListIO.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/tmpI.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LPtrList.H : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LPtrList.C : +$(WM_PROJECT_DIR)/src/OpenFOAM/lnInclude/LPtrListIO.C : + diff --git a/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/dictionaryFileChecker.o b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/dictionaryFileChecker.o new file mode 100644 index 0000000000000000000000000000000000000000..bc34aeaf38c270916866c72bf351b69af9c045ba GIT binary patch literal 7992 zcmb_hZEPIH8J_b;>{7ThAuWLfvV;R1Lauj?lh~n9U+i=CluK}JhXhEvJ>RY4BlqF% z?b!~ZB#~ptav1W1qJI4-0;x#l2bJ0=jc5o75GpD@@}~&30#rn?LfZroL=nV&pV^u7 zczf5XQeSy?W}bP!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Qv->u;IaVqtU3monu`;_=zgcf%J#Q$u8n-_w zxEi!Eq)*-}d00 zF3fZfE;C%%0zp4q5Nws41pO1%!FwH>kvy10;eTd}5Gz3?LEoKvv=jfJDI6 z`v+?Q0{%@Zk{=id^T%&uNirVbk5G~Pa(=+CQ*aq4;F^L%7UboZ@dMsQMe6@9n2Egn zceyafRek|;|7A`GOcMi$8+1u(7Y*PjlKMmgm>P$11?RtyMgI{6hm5rSBL)AOXrp>h zw81O)1|a#t2{`z1mOu?+0i-`tKMNK2I+v*JSoQ$Vx%%@*`-nDLU9$U^k-%M8)inpOP8F8aIjrO>EF z$+u<0K}^CNF@`PrC`Q(;0?p(9KsVAl$UU#B>k=Kgme?D(ujO8obuD>a$m87wf;@_p zleI<|w!#7`Dt%vc5|UB$TT~`$BS!#B7ZsI`2*wT}58Jq>)cJrP`w{lVH42E+vmUz= z7u!~L8QxXU>6L#@$g5`rLef6kAlx5({x}EcDrv(0Ln=sZDKFP?im+<(zZCM)j#MM%Wc?E%@7=#I2zmKk%_}ea$b+lR z|2Z-LX9OesK%Axj(l3m|7ti)#ONB$obySjmOY8+|0K-4ORO%D*(w-di_K(s4_unJG z9WP-b=_hL3Gg4mSX9$D+Fcp=y3;Q@@nz-zmmqQt^cTq-`m0v;sr>`%lK8Z4UyyG;&>0riIBhG m{`Sh_e)67Og4i#_#VzwrU?9(Q_?lLe*G0m&$|Kz$pB0M literal 0 HcmV?d00001 diff --git a/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/files b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/files new file mode 100644 index 0000000..386f14a --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/linux64GccDPInt32Opt/files @@ -0,0 +1,4 @@ + +SOURCE += dictionaryFileChecker.C + +EXE = ./bin/dictionaryFileChecker \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/options b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/options new file mode 100644 index 0000000..7f9fcd2 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileChecker/Make/options @@ -0,0 +1,5 @@ + + +EXE_LIBS = \ + -L$FOAM_LIBBIN \ + -lOpenFOAM \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFileChecker/bin/dictionaryFileChecker b/manual_tests/Reader/cpp_src/dictionaryFileChecker/bin/dictionaryFileChecker new file mode 100644 index 0000000000000000000000000000000000000000..468601db1b25d0d20a8ee75d37e6d78b05776436 GIT binary patch literal 22264 zcmeHP4R9PsmG0F~q&SIICN?-fkcq8;jpIdY%Z_YtkZi3ody!;e$;2cvlhy9X+ROfk z-C0`>fryg@+1d!46bAwB>YRgs3%DYwgPaLq9Go~%1aQJZ`NCb{TqUqeesB~Zz8uNk z_j>w`W{2J6;JB*0s%?Ar&HMVj*RNmq%=EOT`FmwMb5UcCvW=cRqHNr@?yL22YEEB2?9H>~syDTloDdfU8U z%H_QadK8!cZfaM8+f{kB+F?@Fn<@1ZN^eWV$2N4mEfHIjh^KN>Yo@w4tl7{N$fg5p zWj^_(;h;Ws)zA)sW;se2H)q4N&9gnqTcYww{<_S4ZyAo9Zw+7mWApXrues)XU)KMU zWXNyQAsI?!Pc^yZ>3lg3lCk4)7tWd_h7)nZ{9!UXJ8%)5S4-3{URNdK?`q&*MnTo& zseG-9ou9(NYVwajwi^EV8s&bqM!8xI`_IAt;wt{U5tvp5zoSOEUxaKmKfh3;-0#-F zKT`wWU&DTP4f!24{5(=4KBsEnzo}vWQ#I_**1#k1zgnCJYuNwS8u;a~qv7zTpThrY z_OGo`ugMyCOAS0*qh2xK%e~Hk@5iwmS7pyCJF|sljPU575i>L9?s(QRGoyoB6X}#W z8W~HN!Z3Cx(VO%@Z)t`q7ZgI&>FCS#_ocbl1PJe>+TBEimBJZb@oWcFil#3#9U| zh69ddh#031Yi+6ibS4?Gkkw@b*X^by9Rn84u5c=D zsZvI)uB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?=A+O{Z0ESokaBB>Z{rh=@$Pl2YGrIX!DsOlwx^jC z0sIBm4D3$j0+Sg$pEA}y7c`cOW2Y&A!0t3yI?0+*5y0LZVC8*0kV(rsK){?(&#Z|UtTBgT zup@^#6*VU#Pc>Kd5$Df4Id=Q3Icz3hY zGK?E3G3EIn8?|NmoG6WhXiUiZv@aJWrfQgDgZSlf4Fel+;@0=>+opzFERJ`^%0%zS zZhd|aXR1|-|AGEB$p0PYaM*vI=VHq5ff#Pduv(;E~|K2n@npXa0E zz(|Dkd0vev&!a&^CbHp9^j=SMRIJbQQcQIv%>J_+(+?t_=De8ac`v4?ls@@SezN}x z7IQeEHer39hhxg~a9lp?bNxT5^tUL3Jg>*JM;Ru4n#=U+-vx|f!uEv*hLR?K@g`N7 zy#42IknPsjG+Umj{3gO>qFtRc{Q`Km{ymr40!&$sO)$^&9*_P}rO$MljJp!+G5tF7 z+~xB;5z`hYFt!oaW0T+Z=<~b+Q=U&|d2jq4Qu^Hf{9eP9;^R)-evHw)5&6&hJTJra zdKOgFTmH{H`mI4*km+rn_<75J%A^1BwYEM}tQM+B9&_SF)(X zG`>CZRG9Ud()USjeP=$YN2)vX{x-KzKJ#yaGTGwtc|K%Wk1fIX36|$_nO~vG?_@wx z*5~FIf#yz5oCK literal 0 HcmV?d00001 diff --git a/manual_tests/Reader/cpp_src/dictionaryFileChecker/dictionaryFileChecker.C b/manual_tests/Reader/cpp_src/dictionaryFileChecker/dictionaryFileChecker.C new file mode 100644 index 0000000..d08d22f --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileChecker/dictionaryFileChecker.C @@ -0,0 +1,54 @@ + +#include "fileName.H" +#include "IFstream.H" +#include "dictionary.H" + + +Foam::dictionary* dictPtr = nullptr; + + +bool openDictionary(const char* filepath); +void closeDictionary(); + + +int main(int argc, char* argv[]){ + + if( argc != 2 ){ + return 1; + } + + bool isOpen = openDictionary(argv[1]); + closeDictionary(); + + return (isOpen ? 0 : 1); +} + + +bool openDictionary(const char* filepath) +{ + if( dictPtr != nullptr ) + { + closeDictionary(); + } + + Foam::fileName dictPath(filepath); + Foam::IFstream dictFileStream(dictPath); + + if( dictFileStream.closed() or dictFileStream.bad() ) + { + return false; + } + + dictPtr = new Foam::dictionary(dictFileStream); + return true; +} + + +void closeDictionary() +{ + if( dictPtr != nullptr ) + { + delete dictPtr; + dictPtr = nullptr; + } +} \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/files b/manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/files new file mode 100644 index 0000000..29166f8 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/files @@ -0,0 +1,3 @@ +dictionaryFileIterator.C + +LIB = ./lib/dictionaryFileIterator \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/options b/manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/options new file mode 100644 index 0000000..e11a1db --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileIterator/Make/options @@ -0,0 +1,7 @@ + +EXE_INC = \ + -I../dictionaryFile + +LIB_LIBS = \ + -L$FOAM_LIBBIN \ + -lOpenFOAM \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.C b/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.C new file mode 100644 index 0000000..4e6f2f7 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.C @@ -0,0 +1,374 @@ + +#include +#include + +#include "fileName.H" +#include "IFstream.H" +#include "dictionary.H" +#include "token.H" + +#include "dictionaryFile.H" +#include "dictionaryFileIterator.H" +#include "dictionaryFileIterator_PythonInterface.H" + + +inline DictionaryFileIterator* toDictionaryFileIteratorPtr(void* dictFileItr) +{ + return static_cast(dictFileItr); +} + +// ============================================================================ +// Python Interface Functions +// ============================================================================ +void* createIterator(void* dictFilePtr) +{ + DictionaryFile* dictFile = static_cast(dictFilePtr); + DictionaryFileIterator* itr = new DictionaryFileIterator(dictFile); + return itr; +} + +void deleteIterator(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + delete itr; +} + +bool hasEntry(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->hasEntry(); +} + +bool step(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->step(); +} + +bool stepIn(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->stepIn(); +} + +bool stepOut(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->stepOut(); +} + +const char* getCurrentEntryKeyword(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryKeyword(); +} + +bool isCurrentEntryDict(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->isCurrentEntryDict(); +} + +int getCurrentEntryValueCount(void* dictFileItr) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueCount(); +} + +int getCurrentEntryValueTypeAt(void* dictFileItr, int index) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueTypeAt(index); +} + +const char* getCurrentEntryValueAt_String(void* dictFileItr, int index) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueAt_String(index); +} + +char getCurrentEntryValueAt_Character(void* dictFileItr, int index) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueAt_Character(index); +} + +int getCurrentEntryValueAt_Integer(void* dictFileItr, int index) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueAt_Integer(index); +} + +float getCurrentEntryValueAt_Float(void* dictFileItr, int index) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueAt_Float(index); +} + +double getCurrentEntryValueAt_Double(void* dictFileItr, int index) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueAt_Double(index); +} + +long double getCurrentEntryValueAt_LongDouble(void* dictFileItr, int index) +{ + DictionaryFileIterator* itr = toDictionaryFileIteratorPtr(dictFileItr); + return itr->getCurrentEntryValueAt_LongDouble(index); +} + + + + +// ============================================================================ +// DictionaryFileIterator Functions +// ============================================================================ + +DictionaryFileIterator::DictionaryFileIterator(DictionaryFile* dictFile) +{ + mDictFilePtr = dictFile; + + Foam::dictionary* dictPtr = dictFile->mDictPtr; + mDictStack.push(std::make_pair(dictPtr, dictPtr->begin())); +} + +DictionaryFileIterator::~DictionaryFileIterator() +{ + mDictFilePtr = nullptr; +} + +const Foam::token& DictionaryFileIterator::getCurrentEntryTokenAt(int index) +{ + if( index < 0 or mDictStack.empty() ) + return UNDEFINED_TOKEN; + + dictInfo& top = mDictStack.top(); + Foam::dictionary* currDictPtr = top.first; + Foam::dictionary::iterator& currIter = top.second; + + if( currIter == currDictPtr->end() ) + return UNDEFINED_TOKEN; + + if( currIter().isDict() ) + return UNDEFINED_TOKEN; + + if( index >= currIter().stream().size() ) + return UNDEFINED_TOKEN; + + Foam::tokenList& tokens = currIter().stream(); + return tokens[index]; +} + +bool DictionaryFileIterator::hasEntry() +{ + if( mDictStack.empty() ) + return false; + + dictInfo& top = mDictStack.top(); + Foam::dictionary* currDictPtr = top.first; + Foam::dictionary::iterator& currIter = top.second; + + return (currIter != currDictPtr->end()); +} + +bool DictionaryFileIterator::step() +{ + if( mDictStack.empty() ) + return false; + + dictInfo& top = mDictStack.top(); + Foam::dictionary* currDictPtr = top.first; + Foam::dictionary::iterator& currIter = top.second; + + if( currIter == currDictPtr->end() ) + return false; + + ++currIter; + + if( currIter == currDictPtr->end() ) + return false; + + return true; +} + +bool DictionaryFileIterator::stepIn() +{ + if( mDictStack.empty() ) + return false; + + dictInfo& top = mDictStack.top(); + Foam::dictionary* currDictPtr = top.first; + Foam::dictionary::iterator& currIter = top.second; + + if( currIter == currDictPtr->end() ) + return false; + + if( not currIter().isDict() ) + return false; + + Foam::dictionary* subDictPtr = currDictPtr->subDictPtr(currIter().keyword()); + mDictStack.push(std::make_pair(subDictPtr, subDictPtr->begin())); + return true; +} + +bool DictionaryFileIterator::stepOut() +{ + if( mDictStack.empty() ) + return false; + + // to disallow stepping out of root dictionary. + if( mDictStack.size() == 1 ) + return false; + + mDictStack.pop(); + + return true; +} + +const char* DictionaryFileIterator::getCurrentEntryKeyword() +{ + if( mDictStack.empty() ) + return EMPTY_STRING; + + dictInfo& top = mDictStack.top(); + Foam::dictionary* currDictPtr = top.first; + Foam::dictionary::iterator& currIter = top.second; + + if( currIter == currDictPtr->end() ) + return EMPTY_STRING; + + return currIter().keyword().c_str(); +} + +bool DictionaryFileIterator::isCurrentEntryDict() +{ + if( mDictStack.empty() ) + return false; + + dictInfo& top = mDictStack.top(); + Foam::dictionary* currDictPtr = top.first; + Foam::dictionary::iterator& currIter = top.second; + + if( currIter == currDictPtr->end() ) + return false; + + return currIter().isDict(); +} + +int DictionaryFileIterator::getCurrentEntryValueCount() +{ + if( mDictStack.empty() ) + return 0; + + dictInfo& top = mDictStack.top(); + Foam::dictionary* currDictPtr = top.first; + Foam::dictionary::iterator& currIter = top.second; + + if( currIter == currDictPtr->end() ) + return 0; + + if( currIter().isDict() ) + return 0; + + return currIter().stream().size(); +} + +int DictionaryFileIterator::getCurrentEntryValueTypeAt(int index) +{ + const Foam::token& tkn = getCurrentEntryTokenAt(index); + int type = UNDEFINED; + + switch( tkn.type() ) + { + case Foam::token::tokenType::WORD: + type = STRING; + break; + + case Foam::token::tokenType::STRING: + type = STRING; + break; + + case Foam::token::tokenType::VERBATIMSTRING: + type = STRING; + break; + + case Foam::token::tokenType::FUNCTIONNAME: + type = STRING; + break; + + case Foam::token::tokenType::VARIABLE: + type = STRING; + break; + + case Foam::token::tokenType::LABEL: + type = INTEGER; + break; + + case Foam::token::tokenType::FLOAT_SCALAR: + type = FLOAT; + break; + + case Foam::token::tokenType::DOUBLE_SCALAR: + type = DOUBLE; + break; + + case Foam::token::tokenType::LONG_DOUBLE_SCALAR: + type = LONG_DOUBLE; + break; + + case Foam::token::tokenType::PUNCTUATION: + type = PUNCTUATION; + break; + + case Foam::token::tokenType::UNDEFINED: + type = UNDEFINED; + break; + + case Foam::token::tokenType::ERROR: + type = UNDEFINED; + break; + + case Foam::token::tokenType::COMPOUND: + type = UNDEFINED; + break; + } + + return type; +} + +const char* DictionaryFileIterator::getCurrentEntryValueAt_String(int index) +{ + const Foam::token& tkn = getCurrentEntryTokenAt(index); + return tkn.anyStringToken().c_str(); +} + +char DictionaryFileIterator::getCurrentEntryValueAt_Character(int index) +{ + const Foam::token& tkn = getCurrentEntryTokenAt(index); + return tkn.pToken(); +} + +int DictionaryFileIterator::getCurrentEntryValueAt_Integer(int index) +{ + const Foam::token& tkn = getCurrentEntryTokenAt(index); + return tkn.labelToken(); +} + +float DictionaryFileIterator::getCurrentEntryValueAt_Float(int index) +{ + const Foam::token& tkn = getCurrentEntryTokenAt(index); + return tkn.floatScalarToken(); +} + +double DictionaryFileIterator::getCurrentEntryValueAt_Double(int index) +{ + const Foam::token& tkn = getCurrentEntryTokenAt(index); + return tkn.doubleScalarToken(); +} + +long double DictionaryFileIterator::getCurrentEntryValueAt_LongDouble(int index) +{ + const Foam::token& tkn = getCurrentEntryTokenAt(index); + return tkn.longDoubleScalarToken(); +} + diff --git a/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.H b/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.H new file mode 100644 index 0000000..4c8d466 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator.H @@ -0,0 +1,39 @@ + +#pragma once + + +typedef std::pair dictInfo; +const char* EMPTY_STRING = ""; +Foam::token UNDEFINED_TOKEN = Foam::token::undefinedToken; + + +class DictionaryFileIterator +{ +public: + DictionaryFileIterator(DictionaryFile* dictPtr); + ~DictionaryFileIterator(); + + bool hasEntry(); + bool step(); + bool stepIn(); + bool stepOut(); + + const char* getCurrentEntryKeyword(); + bool isCurrentEntryDict(); + int getCurrentEntryValueCount(); + int getCurrentEntryValueTypeAt(int index); + + const char* getCurrentEntryValueAt_String(int index); + char getCurrentEntryValueAt_Character(int index); + int getCurrentEntryValueAt_Integer(int index); + float getCurrentEntryValueAt_Float(int index); + double getCurrentEntryValueAt_Double(int index); + long double getCurrentEntryValueAt_LongDouble(int index); + +private: + DictionaryFile* mDictFilePtr; + std::stack mDictStack; + + const Foam::token& getCurrentEntryTokenAt(int index); +}; + diff --git a/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator_PythonInterface.H b/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator_PythonInterface.H new file mode 100644 index 0000000..0274f79 --- /dev/null +++ b/manual_tests/Reader/cpp_src/dictionaryFileIterator/dictionaryFileIterator_PythonInterface.H @@ -0,0 +1,35 @@ + +extern "C" +{ + +enum ValueType{ + STRING = 0, + INTEGER, + FLOAT, + DOUBLE, + LONG_DOUBLE, + PUNCTUATION, + UNDEFINED, +}; + +void* createIterator(void* dictFilePtr); +void deleteIterator(void* dictFileItr); + +bool hasEntry(void* dictFileItr); +bool step(void* dictFileItr); +bool stepIn(void* dictFileItr); +bool stepOut(void* dictFileItr); + +const char* getCurrentEntryKeyword(void* dictFileItr); +bool isCurrentEntryDict(void* dictFileItr); +int getCurrentEntryValueCount(void* dictFileItr); +int getCurrentEntryValueTypeAt(void* dictFileItr, int index); + +const char* getCurrentEntryValueAt_String(void* dictFileItr, int index); +char getCurrentEntryValueAt_Character(void* dictFileItr, int index); +int getCurrentEntryValueAt_Integer(void* dictFileItr, int index); +float getCurrentEntryValueAt_Float(void* dictFileItr, int index); +double getCurrentEntryValueAt_Double(void* dictFileItr, int index); +long double getCurrentEntryValueAt_LongDouble(void* dictFileItr, int index); + +} \ No newline at end of file diff --git a/manual_tests/Reader/cpp_src/dictionaryFileIterator/lib/dictionaryFileIterator.so b/manual_tests/Reader/cpp_src/dictionaryFileIterator/lib/dictionaryFileIterator.so new file mode 100644 index 0000000000000000000000000000000000000000..0cd80daee4946cd074786623fbc1793475819314 GIT binary patch literal 28384 zcmeHw3w%`7wfC949Er|^3L5b>*ocWh%!Hr`g3ctF#F_e!~4;GR%umAfA_Wo5#ioz6{xlNS=&^rPDBBNk7%p&{nvh+oE&B% z-~GPd@80|SvGY5#_F8-Gwbx$zeI6@!dwf-C7K*yDvCMZev!`% z^8~+yR0f5*x3!l4NO`p)U%s2mF~b%Mr%NcyTZVjOms1VGoXT=hUaEH3Eb1+xD4yAp zWKf@}UeZA39wJ>tv$6DP0;lvXiPEi0D{GX0TfBSIk&(`4KbkxLaU?63;kpapg;b zfL8#{##M-`2$vIAF|PTzuEKRSE()c%u3<4nSqQjD#LES&0IU*m0@b))`*!uA@@F5* z+r7&*@19X-$lCOJ)0#WZy=&jda?|)zMr(b@rF!J*~S2z9p zA3obV^GRjK_wH!lJ^ZWt@0-Yq zKLZ^knVbbF`0q(kF7+)(l5*#xlO&V>bP74P6y;JIQr|I$QgrBK^_`ibULYsc^V}5W zx>LxhOTqt7sBbcTic`qBCxv}pg`UamHVQe(q1O|dCmG#MaB{tjkOn{r?lr-wLDqJWoz ze>+VY2tVLJIV$8F5OP)sdIKQwZx#G77Yh;eD=K$b=t=Vqh4pEi?kM2+n;a+>A-|6% zE`%F7P(By+9TakC?xOILkY6;H<5IpVf#E}@SscPjEtRc0t%L7qRC z1La|9A7OvVpCj5mAliKv^rO&;D_J}KPhlU2s8=oHR+L8tf56EJccMHBKNEIynDieI zb};v!RYIRZ(H~@e-;?bk%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self) -> int: + ''' + Get the pointer to C++ DictionaryFile object. + ''' + if not self.isOpen(): + raise ClosedDictionaryFileError(self.filepath) + return self.__fileptr + diff --git a/manual_tests/Reader/dictionaryFileIterator.py b/manual_tests/Reader/dictionaryFileIterator.py new file mode 100644 index 0000000..db346cb --- /dev/null +++ b/manual_tests/Reader/dictionaryFileIterator.py @@ -0,0 +1,335 @@ + +from enum import Enum +from pyvnt import ( + KeyData, + PropertyInt, + PropertyFloat, + PropertyString, + ValueProperty +) + +from .exceptions import ( + InvalidTraversalOperation, + ClosedDictionaryFileError, + ClosedDictionaryFileIteratorError, + IteratorOutOfRange, + InvalidPrimitiveEntryOperation, + InvalidDictionaryEntryOperation, +) +from .sharedLibs import DictionaryFileIteratorLib +from .dictionaryFile import DictionaryFile + + +INT_MIN = -99999999 +INT_MAX = 99999999 +CODEC = 'ascii' + + +class ValueType(Enum): + STRING = 0 + INTEGER = 1 + FLOAT = 2 + DOUBLE = 3 + LONG_DOUBLE = 4 + PUNCTUATION = 5 + UNDEFINED = 6 + + +class DictionaryFileIterator: + ''' + A uni-directional, read-only iterator to recursively traverse the OpenFOAM's + dictionary structure. It traverses the structure entry by entry. Dictionary + entries can be stepped in and stepped out of and primitive entries(non + dictionary entries) can be read. + ''' + def __init__(self, file: DictionaryFile): + self.file = file + if not file.isOpen(): + raise ClosedDictionaryFileError(self.file.filepath) + self.__iteratorPtr = DictionaryFileIteratorLib.createIterator( + self.file.getFilePointer() + ) + + def __checkValidity(self): + ''' + Checks if the iterator and file are open or not. + ''' + if not self.file.isOpen(): + raise ClosedDictionaryFileError(self.file.filepath) + if not self.isOpen(): + raise ClosedDictionaryFileIteratorError + + def close(self): + ''' + Closes the iterator. + ''' + if self.__iteratorPtr is None: + raise ClosedDictionaryFileIteratorError + DictionaryFileIteratorLib.deleteIterator(self.__iteratorPtr) + self.__iteratorPtr = None + + def isOpen(self) -> bool: + ''' + Checks if iterator is open or not. + ''' + return self.__iteratorPtr is not None + + def hasEntry(self) -> bool: + ''' + Checks if the iterator is currently pointing to an entry or not. + ''' + self.__checkValidity() + return DictionaryFileIteratorLib.hasEntry(self.__iteratorPtr) + + def step(self): + ''' + Moves the iterator to the next entry in current dictionary. For the last + entry in a dictionary moves the iterator out of range. + Raises an error if called when iterator is out of range. + ''' + self.__checkValidity() + if not self.hasEntry(): + raise IteratorOutOfRange + DictionaryFileIteratorLib.step(self.__iteratorPtr) + + def stepIn(self): + ''' + Steps into a dictionary entry and moves the iterator to first entry in it. + Raises an error if iterator is out of range. + Raises an error if current entry is not a dictionary entry. + ''' + self.__checkValidity() + if not self.hasEntry(): + raise IteratorOutOfRange + + if not self.isCurrentEntryDict(): + raise InvalidPrimitiveEntryOperation + + DictionaryFileIteratorLib.stepIn(self.__iteratorPtr) + + def stepOut(self): + ''' + Steps out from current dictionary and moves the iterator to the entry in + parent dictionary from where step in occured. + Raises an error when stepping out of root dictionary. + ''' + self.__checkValidity() + stepOutOccured = DictionaryFileIteratorLib.stepOut(self.__iteratorPtr) + + if not stepOutOccured: + raise InvalidTraversalOperation( + 'Cannot step out of root dictionary.' + ) + + def getCurrentEntryKeyword(self) -> str: + ''' + Returns a string representing the name of the key of current entry. + Raises an error if the iterator is out of range. + ''' + self.__checkValidity() + + if not self.hasEntry(): + raise IteratorOutOfRange + + keyword = str( + DictionaryFileIteratorLib.getCurrentEntryKeyword(self.__iteratorPtr), + CODEC + ) + return keyword + + def isCurrentEntryDict(self) -> bool: + ''' + Checks if current entry is a 'dictionary entry' or a 'primitive entry(non + dictionary entry).' + Raises an error if iterator is out of range. + ''' + self.__checkValidity() + + if not self.hasEntry(): + raise IteratorOutOfRange + + return DictionaryFileIteratorLib.isCurrentEntryDict(self.__iteratorPtr) + + def getValues(self) -> list[ValueProperty]: + ''' + Returns a list of 'ValueProperty' objects for the values in current entry. + Raises an error if iterator is out of range. + Raises an error if current entry is not primitive entry. + ''' + self.__checkValidity() + + if not self.hasEntry(): + raise IteratorOutOfRange + + if self.isCurrentEntryDict(): + raise InvalidDictionaryEntryOperation + + stack = [[]] + + for index in range(self.__getCurrentEntryValueCount()): + val = self.__getValueAt(index) + if val == '(' or val == '[': + stack.append([]) + elif val == ')': + popped = stack.pop() + # stack[len(stack)-1].append(popped) + elif val == ']': + popped = tuple(stack.pop()) + # stack[len(stack)-1].append(popped) + elif val == ',': + pass + else: + prop = self.__getValuePropertyAt(index) + stack[len(stack)-1].append(prop) + + return stack[0] + + def getRawValues(self) -> list: + ''' + Return list of raw python objects for the values in current entry. + ''' + self.__checkValidity() + return [val.giveVal() for val in self.getValues()] + + def getKeyData(self) -> KeyData: + ''' + Returns 'KeyData' object for the current entry. + Raises an error if iterator is out of range. + Raises an error if current entry is not primitive entry. + ''' + self.__checkValidity() + + if not self.hasEntry(): + raise IteratorOutOfRange + + if self.isCurrentEntryDict(): + raise InvalidDictionaryEntryOperation + + key = self.getCurrentEntryKeyword() + values = self.getValues() + return KeyData(key, *values) + + def __getCurrentEntryValueCount(self) -> int: + ''' + Returns the number of value tokens in the current entry. The tokens also + includes characters like comma(,) and brackets((),[]). + ''' + return DictionaryFileIteratorLib.getCurrentEntryValueCount(self.__iteratorPtr) + + def __getCurrentEntryValueTypeAt(self, index: int) -> ValueType: + ''' + Returns the ValueType of token at a given index in values of an entry. + ''' + valType = ValueType( + DictionaryFileIteratorLib.getCurrentEntryValueTypeAt( + self.__iteratorPtr, + index + ) + ) + return valType + + def __getCurrentEntryValueAt_String(self, index : int) -> str: + ''' + Get token at given index as a 'str'. + The ValueType of this token should be of type 'str'. + ''' + val = DictionaryFileIteratorLib.getCurrentEntryValueAt_String( + self.__iteratorPtr, + index + ) + + return str(val, CODEC) + + def __getCurrentEntryValueAt_Character(self, index : int) -> str: + ''' + Get token at given index as a 'character'. + The ValueType of this token should be of type 'character'. + ''' + val = DictionaryFileIteratorLib.getCurrentEntryValueAt_Character( + self.__iteratorPtr, + index + ) + return str(val, CODEC) + + def __getCurrentEntryValueAt_Integer(self, index : int) -> int: + ''' + Get token at given index as a 'integer'. + The ValueType of this token should be of type 'integer' + ''' + return DictionaryFileIteratorLib.getCurrentEntryValueAt_Integer( + self.__iteratorPtr, + index + ) + + def __getCurrentEntryValueAt_Float(self, index : int) -> float: + ''' + Get token at given index as a 'float'. + The ValueType of this token should be of type 'float' + ''' + return DictionaryFileIteratorLib.getCurrentEntryValueAt_Float( + self.__iteratorPtr, + index + ) + + def __getCurrentEntryValueAt_Double(self, index : int) -> float: + ''' + Get token at given index as a 'float'. + The ValueType of this token should be of type 'float' + ''' + return DictionaryFileIteratorLib.getCurrentEntryValueAt_Double( + self.__iteratorPtr, + index + ) + + def __getCurrentEntryValueAt_LongDouble(self, index : int) -> float: + ''' + Get token at given index as a 'float'. + The ValueType of this token should be of type 'float' + ''' + return DictionaryFileIteratorLib.getCurrentEntryValueAt_LongDouble( + self.__iteratorPtr, + index + ) + + def __getValueAt(self, index : int, valType: ValueType = None): + ''' + Returns a python object for value at the given index. + ''' + if valType is None: + valType = self.__getCurrentEntryValueTypeAt(index) + value = None + + if valType == ValueType.STRING: + value = self.__getCurrentEntryValueAt_String(index) + elif valType == ValueType.PUNCTUATION: + value = self.__getCurrentEntryValueAt_Character(index) + elif valType == ValueType.INTEGER: + value = self.__getCurrentEntryValueAt_Integer(index) + elif valType == ValueType.FLOAT: + value = self.__getCurrentEntryValueAt_Float(index) + elif valType == ValueType.DOUBLE: + value = self.__getCurrentEntryValueAt_Double(index) + elif valType == ValueType.LONG_DOUBLE: + value = self.__getCurrentEntryValueAt_LongDouble(index) + + return value + + def __getValuePropertyAt(self, index : int) -> ValueProperty: + ''' + Returns a ValueProperty object for value at the given index. + ''' + valType = self.__getCurrentEntryValueTypeAt(index) + val = self.__getValueAt(index, valType) + + if valType == ValueType.INTEGER: + return PropertyInt(f'val{index+1}', val, INT_MIN, INT_MAX) + + if valType == ValueType.FLOAT or \ + valType == ValueType.DOUBLE or \ + valType == ValueType.LONG_DOUBLE: + return PropertyFloat(f'val{index+1}', val, float('-inf'), float('inf')) + + if valType == ValueType.STRING: + return PropertyString(f'val{index+1}', val) + + return PropertyString(f'val{index+1}', 'Invalid') diff --git a/manual_tests/Reader/exceptions.py b/manual_tests/Reader/exceptions.py new file mode 100644 index 0000000..f060dd2 --- /dev/null +++ b/manual_tests/Reader/exceptions.py @@ -0,0 +1,66 @@ + + +class InvalidDictionaryFileError(Exception): + ''' + Invalid syntax in Dictionary File. + ''' + def __init__(self, filepath: str, openfoamErrorMessage: str): + self.filepath = filepath + self.openfoamErrorMessage = openfoamErrorMessage + + def __str__(self): + return f"Error occured while parsing the file : {self.filepath}\n {self.openfoamErrorMessage}" + + +class InvalidTraversalOperation(Exception): + ''' + Generic Invalid Traversal Operation. + ''' + def __init__(self, msg: str): + self.msg = msg + + def __str__(self): + return self.msg + + +class ClosedDictionaryFileError(Exception): + ''' + Dictionary File closed. + ''' + def __init__(self, filepath: str): + self.filepath = filepath + + def __str__(self): + return f"Cannot operate on a closed file : {self.filepath}" + + +class ClosedDictionaryFileIteratorError(Exception): + ''' + DictionaryFileIterator closed. + ''' + def __str__(self): + return f"Cannot operate with a closed iterator" + + +class IteratorOutOfRange(Exception): + ''' + DictionaryFileIterator is out of range. + ''' + def __str__(self): + return f"Iterator has moved beyond last entry in current dictionary" + + +class InvalidPrimitiveEntryOperation(Exception): + ''' + Invalid operation for a primitive entry. + ''' + def __str__(self): + return f"Invalid operation for primitive entry" + + +class InvalidDictionaryEntryOperation(Exception): + ''' + Invalid operation for a dictionary entry. + ''' + def __str__(self): + return "Invalid operation for dictionary entry" \ No newline at end of file diff --git a/manual_tests/Reader/fileUtils.py b/manual_tests/Reader/fileUtils.py new file mode 100644 index 0000000..3391970 --- /dev/null +++ b/manual_tests/Reader/fileUtils.py @@ -0,0 +1,22 @@ + +import os +import subprocess as sp + + +EXECUTABLE_PATH = os.path.join( + os.path.dirname(__file__), + 'cpp_src/dictionaryFileChecker/bin/dictionaryFileChecker' +) + + +def verifyDictionaryFile(filepath : str) -> tuple[bool, str]: + ''' + Checks if the given file follows the syntax of OpenFOAM's dictionary files. + Uses the custom utility 'dictionaryFileChecker' in a subprocess. The call to + this function is blocking as it waits for the subprocess to exit. + ''' + args = (EXECUTABLE_PATH, filepath) + res = sp.run(args, stdout=sp.PIPE, stderr=sp.STDOUT) + isValid = (res.returncode == 0) and (len(res.stdout) == 0) + output = str(res.stdout, encoding='ascii') + return (isValid, output) diff --git a/manual_tests/Reader/old__init__.py b/manual_tests/Reader/old__init__.py new file mode 100644 index 0000000..5028e7e --- /dev/null +++ b/manual_tests/Reader/old__init__.py @@ -0,0 +1,54 @@ + +import os +from pyvnt.DictionaryElement.foamDS import Foam +from .dictionaryFileIterator import DictionaryFileIterator +from .dictionaryFile import DictionaryFile + + +def read(filepath : str, verifyFile: bool = True) -> Foam: + ''' + Reads dictionary file from the given filepath and returns a node tree + representation of it. + ''' + file = DictionaryFile(filepath, verifyFile) + itr = DictionaryFileIterator(file) + root = _createTree(file.filepath, itr) + itr.close() + file.close() + + return root + + +def _createTree(parentName: str, itr: DictionaryFileIterator) -> Foam: + ''' + Recursively traverse the openfoam's dictionary data structure and create the + node-tree structure. + ''' + data = {} + while itr.hasEntry(): + key = itr.getCurrentEntryKeyword() + value = None + + if itr.isCurrentEntryDict(): + itr.stepIn() + value = _createTree(key, itr) + itr.stepOut() + else: + value = itr.getKeyData() + + data[key] = value + itr.step() + + # create node + children = [val for val in data.values() if isinstance(val,Foam)] + + for key in list(data.keys()): + val = data[key] + if isinstance(val,Foam): + del data[key] + + node = Foam(parentName, children=children, *data.values()) + + return node + + diff --git a/manual_tests/Reader/sharedLibs.py b/manual_tests/Reader/sharedLibs.py new file mode 100644 index 0000000..8fd0991 --- /dev/null +++ b/manual_tests/Reader/sharedLibs.py @@ -0,0 +1,150 @@ + + +import ctypes +import os + + +class DictionaryFileLib: + _libFilePath = os.path.join( + os.path.dirname(__file__), + "cpp_src/dictionaryFile/lib/dictionaryFile.so" + ) + _lib = ctypes.CDLL(_libFilePath) + openDictionaryFile = _lib.openDictionaryFile + closeDictionaryFile = _lib.closeDictionaryFile + +# _function_signature_dict = { +# 'openDictionaryFile' : (ctypes.c_char_p, ctypes.c_void_p), +# 'closeDictionaryFile' : (ctypes.c_void_p, None) +# } + + +# _libs = [DictionaryFileLib] + +# for lib in _libs: +# func_names = [attr for attr in dir(lib) if not attr.startswith('_')] +# print(func_names) +# for func in func_names: +# if func in lib._function_signature_dict: +# argtypes, restype = lib._function_signature_dict[func] +# lib.__dict__[func].argtypes = argtypes +# lib.__dict__[func].restype = restype + + + +DictionaryFileLib.openDictionaryFile.argtypes = [ctypes.c_char_p] +DictionaryFileLib.openDictionaryFile.restype = ctypes.c_void_p + +DictionaryFileLib.closeDictionaryFile.argtypes = [ctypes.c_void_p] +DictionaryFileLib.closeDictionaryFile.restype = None + + + +class DictionaryFileIteratorLib: + _libFilePath = os.path.join( + os.path.dirname(__file__), + "cpp_src/dictionaryFileIterator/lib/dictionaryFileIterator.so" + ) + _lib = ctypes.CDLL(_libFilePath) + createIterator = _lib.createIterator + deleteIterator = _lib.deleteIterator + hasEntry = _lib.hasEntry + step = _lib.step + stepIn = _lib.stepIn + stepOut = _lib.stepOut + getCurrentEntryKeyword = _lib.getCurrentEntryKeyword + isCurrentEntryDict = _lib.isCurrentEntryDict + getCurrentEntryValueCount = _lib.getCurrentEntryValueCount + getCurrentEntryValueTypeAt = _lib.getCurrentEntryValueTypeAt + getCurrentEntryValueAt_String = _lib.getCurrentEntryValueAt_String + getCurrentEntryValueAt_Character = _lib.getCurrentEntryValueAt_Character + getCurrentEntryValueAt_Integer = _lib.getCurrentEntryValueAt_Integer + getCurrentEntryValueAt_Float = _lib.getCurrentEntryValueAt_Float + getCurrentEntryValueAt_Double = _lib.getCurrentEntryValueAt_Double + getCurrentEntryValueAt_LongDouble = _lib.getCurrentEntryValueAt_LongDouble + + +DictionaryFileIteratorLib.createIterator.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.createIterator.restype = ctypes.c_void_p + +DictionaryFileIteratorLib.deleteIterator.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.deleteIterator.restype = None + +DictionaryFileIteratorLib.hasEntry.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.hasEntry.restype = ctypes.c_bool + +DictionaryFileIteratorLib.step.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.step.restype = ctypes.c_bool + +DictionaryFileIteratorLib.stepIn.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.stepIn.restype = ctypes.c_bool + +DictionaryFileIteratorLib.stepOut.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.stepOut.restype = ctypes.c_bool + +DictionaryFileIteratorLib.getCurrentEntryKeyword.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.getCurrentEntryKeyword.restype = ctypes.c_char_p + +DictionaryFileIteratorLib.isCurrentEntryDict.argtypes = [ctypes.c_void_p] +DictionaryFileIteratorLib.isCurrentEntryDict.restype = ctypes.c_bool + + +DictionaryFileIteratorLib.getCurrentEntryValueCount.argtypes = [ + ctypes.c_void_p +] +DictionaryFileIteratorLib.getCurrentEntryValueCount.restype = ctypes.c_int + + +DictionaryFileIteratorLib.getCurrentEntryValueTypeAt.argtypes = [ + ctypes.c_void_p, + ctypes.c_int +] +DictionaryFileIteratorLib.getCurrentEntryValueTypeAt.restype = ctypes.c_int + + +DictionaryFileIteratorLib.getCurrentEntryValueAt_String.argtypes = [ + ctypes.c_void_p, + ctypes.c_int +] +DictionaryFileIteratorLib.getCurrentEntryValueAt_String.restype \ + = ctypes.c_char_p + + +DictionaryFileIteratorLib.getCurrentEntryValueAt_Character.argtypes = [ + ctypes.c_void_p, + ctypes.c_int +] +DictionaryFileIteratorLib.getCurrentEntryValueAt_Character.restype \ + = ctypes.c_char + + +DictionaryFileIteratorLib.getCurrentEntryValueAt_Integer.argtypes = [ + ctypes.c_void_p, + ctypes.c_int +] +DictionaryFileIteratorLib.getCurrentEntryValueAt_Integer.restype \ + = ctypes.c_int + + +DictionaryFileIteratorLib.getCurrentEntryValueAt_Float.argtypes = [ + ctypes.c_void_p, + ctypes.c_int +] +DictionaryFileIteratorLib.getCurrentEntryValueAt_Float.restype \ + = ctypes.c_float + + +DictionaryFileIteratorLib.getCurrentEntryValueAt_Double.argtypes = [ + ctypes.c_void_p, + ctypes.c_int +] +DictionaryFileIteratorLib.getCurrentEntryValueAt_Double.restype \ + = ctypes.c_double + + +DictionaryFileIteratorLib.getCurrentEntryValueAt_LongDouble.argtypes = [ + ctypes.c_void_p, + ctypes.c_int +] +DictionaryFileIteratorLib.getCurrentEntryValueAt_LongDouble.restype \ + = ctypes.c_longdouble diff --git a/pyvnt/Reference/errorClasses.py b/pyvnt/Reference/errorClasses.py index f1e3bda..9766ce3 100755 --- a/pyvnt/Reference/errorClasses.py +++ b/pyvnt/Reference/errorClasses.py @@ -63,3 +63,10 @@ def __init__(self): def __str__(self): return f"Given range is invalid" + +class InvalidTupleError(TypeError): + def __init__(self, item): + self.item = item + + def __str__(self): + return f"{self.item} not an tuple type" diff --git a/pyvnt/Reference/tensor.py b/pyvnt/Reference/tensor.py index 7bbb49c..01b8216 100644 --- a/pyvnt/Reference/tensor.py +++ b/pyvnt/Reference/tensor.py @@ -1,4 +1,6 @@ from pyvnt.Reference.basic import * +from pyvnt.Reference.errorClasses import InvalidTupleError +from pyvnt.Reference.vector import PropertyVector class PropertyTensor(ValueProperty): ''' @@ -21,21 +23,60 @@ def instance_restricted(self): def __init__(self, name, value: [PropertyFloat]): super(PropertyTensor, self).__init__() - self.setProperties(name, *value) - def setProperties(self, name: str, xx: PropertyFloat = None, xy: PropertyFloat = None, xz: PropertyFloat = None, yx: PropertyFloat = None, yy: PropertyFloat = None, yz: PropertyFloat = None, zx: PropertyFloat = None, zy: PropertyFloat = None, zz: PropertyFloat = None) -> None: + inputs = [] + + for i in range(3): + for j in range(3): + inputs.append((i, j, value[i*3+j])) + self.setProperties(name, *inputs) + + # TODO: Implement matrix operations for tensors, refer to the OpenFOAM team for details + + # TODO: Change the way input is taken in this method, refer Matlab's matrix slicing --done + def setProperties(self, name: str, *args: (int, int, PropertyFloat)) -> None: ''' Function to edit the values stored in the object Parameters: name: The name of the property. - value: list + *args: The values of the tensor in the form of tuples. + + The tuples should be in the form of (i, j, PropertyFloat) where i and j are the indices of the tensor in 1-based indexing. + In order to set the value for an entire row or column, set the index to 0 for the row or column respectively. + + Example: + To set the value of the entire row 1 to 5, the tuple should be (1, 0, PropertyFloat(name, 5)) + To set the value of the entire column 2 to 5, the tuple should be (0, 2, PropertyFloat(name, 5)) + To set the value of the element at row 1 and column 2 to 5, the tuple should be (1, 2, PropertyFloat(name, 5)) + ''' self._ValueProperty__name = name - self.__values = [[xx, xy, xz], - [yx, yy, yz], - [zx, zy, zz]] + inputs = list(args) + self.__values = [[0, 0, 0], + [0, 0, 0], + [0, 0, 0]] + + for t in inputs: + if len(t) != 3 or type(t[0]) != int or type(t[1]) != int or type(t[2]) != PropertyFloat: + raise InvalidTupleError(t) + else: + if t[0] == 0 and t[1] == 0: + val = t[2] + self.__values = [[val, val, val], + [val, val, val], + [val, val, val]] + elif t[0] == 0: + for i in range(3): + self.__values[i][t[1]-1] = t[2] + elif t[1] == 0: + for i in range(3): + self.__values[t[0]-1][i] = t[2] + elif t[0] != 0 and t[1] != 0: + self.__values[t[0]-1][t[1]-1] = t[2] + else: + raise InvalidTupleError(t) def xx(self) -> float: ''' @@ -91,6 +132,56 @@ def zz(self) -> float: ''' return self.__values[2][2].giveVal() + def row(self, r: int) -> PropertyVector: + ''' + Returns the row vector of the tensor + + Parameters: + r: The row number of the tensor + ''' + return PropertyVector(self._ValueProperty__name + "_row", self.__values[r][0], self.__values[r][1], self.__values[r][2]) + + def col(self, c: int) -> PropertyVector: + ''' + Returns the column vector of the tensor + + Parameters: + c: The column number of the tensor + ''' + return PropertyVector(self._ValueProperty__name + "_col", self.__values[0][c], self.__values[1][c], self.__values[2][c]) + + def diag(self) -> PropertyVector: + ''' + Returns the diagonal vector of the tensor + ''' + return PropertyVector(self._ValueProperty__name + "_diag", self.__values[0][0], self.__values[1][1], self.__values[2][2]) + + def T(self) -> PropertyTensor: + ''' + Return non-Hermitian transpose of the tensor + ''' + return PropertyTensor(self._ValueProperty__name + "_T", [self.__values[0][0], self.__values[1][0], self.__values[2][0], + self.__values[0][1], self.__values[1][1], self.__values[2][1], + self.__values[0][2], self.__values[1][2], self.__values[2][2]]) + + def inv(self) -> PropertyTensor: + ''' + Returns the inverse of the tensor + ''' + pass + + def inner(self, t) -> PropertyTensor: + ''' + Returns the inner product of the tensor with another tensor + ''' + pass + + def schur(self, t) -> PropertyTensor: + ''' + Returns the Schur product of the tensor with another tensor + ''' + pass + def __repr__(self): return f"PropertyTensor(name = {self._ValueProperty__name}, xx = {self.xx()}, xy = {self.xy()}, xz = {self.xz()}, yx = {self.yx()}, yy = {self.yy()}, yz = {self.yz()}, zx = {self.zx()}, zy = {self.zy()}, zz = {self.zz()})" diff --git a/pyvnt/Reference/vector.py b/pyvnt/Reference/vector.py index fb6cb1e..5757ded 100644 --- a/pyvnt/Reference/vector.py +++ b/pyvnt/Reference/vector.py @@ -15,7 +15,8 @@ class PropertyVector(ValueProperty): def instance_restricted(self): pass - + + # TODO: Confirm about the format exoected from a vector def __init__(self, name: str, x: PropertyFloat, y: PropertyFloat, z: PropertyFloat): super(PropertyVector, self).__init__() self.setProperties(name, x, y, z) @@ -61,5 +62,25 @@ def z(self) -> float: ''' return self.__z.giveVal() + def magnitude(self) -> float: + ''' + Returns the magnitude of the vector + ''' + return math.sqrt(self.__x.giveVal()**2 + self.__y.giveVal()**2 + self.__z.giveVal()**2) + + def normalise(self, tol: PropertyFloat) -> PropertyVector: + ''' + Normalises the vector + + Parameters: + tol: The tolerance value for the normalisation. If the magnitude of the vector is less than the tolerance, the vector is set to 0. + ''' + s = self.magnitude() + if s < tol.giveVal(): + self.setProperties(self.__name, PropertyFloat(self.__name + "_x", 0), PropertyFloat(self.__name + "_y", 0), PropertyFloat(self.__name + "_z", 0)) + else: + self.setProperties(self.__name, PropertyFloat(self.__name + "_x", self.__x.giveVal()/s), PropertyFloat(self.__name + "_y", self.__y.giveVal()/s), PropertyFloat(self.__name + "_z", self.__z.giveVal()/s)) + return self + def __repr__(self): return f"PropertyVector(name = {self.__name}, x = {self.__x.giveVal()}, y = {self.__y.giveVal()}, z = {self.__z.giveVal()})" \ No newline at end of file From c5c76fad17ea0dbeff834ebb5524257b9d94ac33 Mon Sep 17 00:00:00 2001 From: ThaHobbyist Date: Tue, 21 May 2024 15:39:21 +0530 Subject: [PATCH 3/5] Implemented inner product, schur product and inverse of a tensor --- pyvnt/Reference/basic.py | 60 +++++++++++++++++++++++++++++++++++ pyvnt/Reference/tensor.py | 67 +++++++++++++++++++++++++-------------- 2 files changed, 104 insertions(+), 23 deletions(-) diff --git a/pyvnt/Reference/basic.py b/pyvnt/Reference/basic.py index b6279de..6090f52 100755 --- a/pyvnt/Reference/basic.py +++ b/pyvnt/Reference/basic.py @@ -73,6 +73,36 @@ def giveVal(self): def __repr__(self): return f"PropertyInt(name = {self._ValueProperty__name}, default = {self.__default}, minimum = {self.__minimum}, maximum = {self.__maximum})" + + def __add__(self, other): + return self.__default + other._PropertyFloat__default + + def __sub__(self, other): + return self.__default - other._PropertyFloat__default + + def __mul__(self, other): + return self.__default * other._PropertyFloat__default + + def __truediv__(self, other): + return self.__default / other._PropertyFloat__default + + def __gt__(self, other): + return self.__default > other._PropertyFloat__default + + def __lt__(self, other): + return self.__default < other._PropertyFloat__default + + def __le__(self, other): + return self.__default <= other._PropertyFloat__default + + def __ge__(self, other): + return self.__default >= other._PropertyFloat__default + + def __eq__(self, other): + return self.__default == other._PropertyFloat__default + + def __ne__(self, other): + return self.__default != other._PropertyFloat__default class PropertyFloat(ValueProperty): @@ -127,6 +157,36 @@ def giveVal(self): def __repr__(self): return f"PropertyFloat(name = {self._ValueProperty__name}, default = {self.__default}, minimum = {self.__minimum}, maximum = {self.__maximum})" + + def __add__(self, other): + return self.__default + other._PropertyFloat__default + + def __sub__(self, other): + return self.__default - other._PropertyFloat__default + + def __mul__(self, other): + return self.__default * other._PropertyFloat__default + + def __truediv__(self, other): + return self.__default / other._PropertyFloat__default + + def __gt__(self, other): + return self.__default > other._PropertyFloat__default + + def __lt__(self, other): + return self.__default < other._PropertyFloat__default + + def __le__(self, other): + return self.__default <= other._PropertyFloat__default + + def __ge__(self, other): + return self.__default >= other._PropertyFloat__default + + def __eq__(self, other): + return self.__default == other._PropertyFloat__default + + def __ne__(self, other): + return self.__default != other._PropertyFloat__default class PropertyString(ValueProperty): # for testing purposes only, to be scrapped diff --git a/pyvnt/Reference/tensor.py b/pyvnt/Reference/tensor.py index 01b8216..f6b3161 100644 --- a/pyvnt/Reference/tensor.py +++ b/pyvnt/Reference/tensor.py @@ -1,6 +1,7 @@ from pyvnt.Reference.basic import * from pyvnt.Reference.errorClasses import InvalidTupleError from pyvnt.Reference.vector import PropertyVector +import numpy as np class PropertyTensor(ValueProperty): ''' @@ -78,59 +79,59 @@ def setProperties(self, name: str, *args: (int, int, PropertyFloat)) -> None: else: raise InvalidTupleError(t) - def xx(self) -> float: + def xx(self) -> PropertyFloat: ''' Returns the xx value of the tensor ''' - return self.__values[0][0].giveVal() + return self.__values[0][0] - def xy(self) -> float: + def xy(self) -> PropertyFloat: ''' Returns the xy value of the tensor ''' - return self.__values[0][1].giveVal() + return self.__values[0][1] - def xz(self) -> float: + def xz(self) -> PropertyFloat: ''' Returns the xz value of the tensor ''' - return self.__values[0][2].giveVal() + return self.__values[0][2] - def yx(self) -> float: + def yx(self) -> PropertyFloat: ''' Returns the yx value of the tensor ''' - return self.__values[1][0].giveVal() + return self.__values[1][0] - def yy(self) -> float: + def yy(self) -> PropertyFloat: ''' Returns the yy value of the tensor ''' - return self.__values[1][1].giveVal() + return self.__values[1][1] - def yz(self) -> float: + def yz(self) -> PropertyFloat: ''' Returns the yz value of the tensor ''' - return self.__values[1][2].giveVal() + return self.__values[1][2] - def zx(self) -> float: + def zx(self) -> PropertyFloat: ''' Returns the zx value of the tensor ''' - return self.__values[2][0].giveVal() + return self.__values[2][0] - def zy(self) -> float: + def zy(self) -> PropertyFloat: ''' Returns the zy value of the tensor ''' - return self.__values[2][1].giveVal() + return self.__values[2][1] - def zz(self) -> float: + def zz(self) -> PropertyFloat: ''' Returns the zz value of the tensor ''' - return self.__values[2][2].giveVal() + return self.__values[2][2] def row(self, r: int) -> PropertyVector: ''' @@ -168,19 +169,39 @@ def inv(self) -> PropertyTensor: ''' Returns the inverse of the tensor ''' - pass + ar = np.array([[self.xx().giveVal(), self.xy().giveVal(), self.xz().giveVal()], + [self.yx().giveVal(), self.yy().giveVal(), self.yz().giveVal()], + [self.zx().giveVal(), self.zy().giveVal(), self.zz().giveVal()]]) + + res = np.linalg.inv(ar) - def inner(self, t) -> PropertyTensor: + return PropertyTensor(self._ValueProperty__name + "_inv", [res[0][0], res[0][1], res[0][2], + res[1][0], res[1][1], res[1][2], + res[2][0], res[2][1], res[2][2]]) + + def inner(self, t: PropertyTensor) -> PropertyTensor: ''' Returns the inner product of the tensor with another tensor ''' - pass + return PropertyTensor(self._ValueProperty__name + "_inner", [self.xx()*t.xx() + self.xy()*t.yx() + self.xz()*t.zx(), + self.xx()*t.xy() + self.xy()*t.yy() + self.xz()*t.zy(), + self.xx()*t.xz() + self.xy()*t.yz() + self.xz()*t.zz(), - def schur(self, t) -> PropertyTensor: + self.yx()*t.xx() + self.yy()*t.yx() + self.yz()*t.zx(), + self.yx()*t.xy() + self.yy()*t.yy() + self.yz()*t.zy(), + self.yx()*t.xz() + self.yy()*t.yz() + self.yz()*t.zz(), + + self.zx()*t.xx() + self.zy()*t.yx() + self.zz()*t.zx(), + self.zx()*t.xy() + self.zy()*t.yy() + self.zz()*t.zy(), + self.zx()*t.xz() + self.zy()*t.yz() + self.zz()*t.zz()]) + + def schur(self, t: PropertyTensor) -> PropertyTensor: ''' Returns the Schur product of the tensor with another tensor ''' - pass + return PropertyTensor(self._ValueProperty__name + "_schur", [self.xx()*t.xx(), self.xy()*t.xy(), self.xz()*t.xz(), + self.yx()*t.yx(), self.yy()*t.yy(), self.yz()*t.yz(), + self.zx()*t.zx(), self.zy()*t.zy(), self.zz()*t.zz()]) def __repr__(self): return f"PropertyTensor(name = {self._ValueProperty__name}, xx = {self.xx()}, xy = {self.xy()}, xz = {self.xz()}, yx = {self.yx()}, yy = {self.yy()}, yz = {self.yz()}, zx = {self.zx()}, zy = {self.zy()}, zz = {self.zz()})" From 33b8240a03d79c9347b6ac865def81bd2bb30e3c Mon Sep 17 00:00:00 2001 From: ThaHobbyist Date: Thu, 23 May 2024 18:53:13 +0530 Subject: [PATCH 4/5] Modified gitignore --- .gitignore | 170 +++++++++++++++++- .../test_pyvnt.cpython-312-pytest-8.2.0.pyc | Bin 645 -> 0 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 186 -> 0 bytes .../__pycache__/foamDS.cpython-311.pyc | Bin 5061 -> 0 bytes .../__pycache__/keyData.cpython-311.pyc | Bin 5928 -> 0 bytes .../__pycache__/showTree.cpython-311.pyc | Bin 1311 -> 0 bytes .../__pycache__/__init__.cpython-311.pyc | Bin 178 -> 0 bytes .../__pycache__/basic.cpython-311.pyc | Bin 12748 -> 0 bytes .../__pycache__/errorClasses.cpython-311.pyc | Bin 4847 -> 0 bytes pyvnt/__pycache__/__init__.cpython-311.pyc | Bin 373 -> 0 bytes .../test_basic.cpython-312-pytest-8.2.0.pyc | Bin 25015 -> 0 bytes .../test_keyData.cpython-312-pytest-8.2.0.pyc | Bin 8895 -> 0 bytes .../test_node.cpython-312-pytest-8.2.0.pyc | Bin 9909 -> 0 bytes .../test_pyvnt.cpython-312-pytest-8.2.0.pyc | Bin 638 -> 0 bytes 14 files changed, 169 insertions(+), 1 deletion(-) delete mode 100644 manual_tests/__pycache__/test_pyvnt.cpython-312-pytest-8.2.0.pyc delete mode 100644 pyvnt/DictionaryElement/__pycache__/__init__.cpython-311.pyc delete mode 100644 pyvnt/DictionaryElement/__pycache__/foamDS.cpython-311.pyc delete mode 100644 pyvnt/DictionaryElement/__pycache__/keyData.cpython-311.pyc delete mode 100644 pyvnt/DictionaryElement/__pycache__/showTree.cpython-311.pyc delete mode 100644 pyvnt/Reference/__pycache__/__init__.cpython-311.pyc delete mode 100644 pyvnt/Reference/__pycache__/basic.cpython-311.pyc delete mode 100644 pyvnt/Reference/__pycache__/errorClasses.cpython-311.pyc delete mode 100644 pyvnt/__pycache__/__init__.cpython-311.pyc delete mode 100644 tests/__pycache__/test_basic.cpython-312-pytest-8.2.0.pyc delete mode 100644 tests/__pycache__/test_keyData.cpython-312-pytest-8.2.0.pyc delete mode 100644 tests/__pycache__/test_node.cpython-312-pytest-8.2.0.pyc delete mode 100644 tests/__pycache__/test_pyvnt.cpython-312-pytest-8.2.0.pyc diff --git a/.gitignore b/.gitignore index 0e93bb2..16dc710 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,172 @@ env build/ dist/ -pyvnt.egg-info \ No newline at end of file +pyvnt.egg-info +manual_tests/* +**/__pycache__/* +.vscode + + +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*.pyc +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +*.py,cover +.hypothesis/ +.pytest_cache/ +cover/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 +db.sqlite3-journal + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don't work, or not +# install all needed dependencies. +#Pipfile.lock + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/latest/usage/project/#working-with-version-control +.pdm.toml +.pdm-python +.pdm-build/ + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__pypackages__/ + +# Celery stuff +celerybeat-schedule +celerybeat.pid + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ \ No newline at end of file diff --git a/manual_tests/__pycache__/test_pyvnt.cpython-312-pytest-8.2.0.pyc b/manual_tests/__pycache__/test_pyvnt.cpython-312-pytest-8.2.0.pyc deleted file mode 100644 index 3463b1325789552c5a62d85ee5d863b01179043f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 645 zcmYjNF>ljA6n^K}@!3h*AOsRfC|T1XRy$XPLQ@7x8xbZikyBsksb?p;JE!%Q0VGDm z0y`55{0DY6$kJOnz=Fh(s#_=SoVMZ(@4fH)?tAa)zSn9#==j}yc<|Q(_+`L#I9JWZ zd)<717-GaAL`Aid(!PZtu|o$L#bV{J8tbma+ysX>@j?%Q1;mf-Lx`PEC@z0-r=`Wr zuu>@aO7Z?vsvda8SBrg8nd+NNgiD%PCQDPazzA~Gs{Aovw}lj1X<5pDLDHD;mz)sg zZ;E|NdopK4+2e?OQ;H%fD~+)1;f%ZDTVM(5QC%vKQO?EB4(f%04EeL4*&oF diff --git a/pyvnt/DictionaryElement/__pycache__/foamDS.cpython-311.pyc b/pyvnt/DictionaryElement/__pycache__/foamDS.cpython-311.pyc deleted file mode 100644 index 215e03202978c6188ba48e7ffe47a567618708a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5061 zcmcgw-ER}w6~FUgdz{!#a8fpbuo*&NF)TsiqjbXxl}&)MA>Qp8wW{0IbmF;A4F2k! zNr){|Q52~zr7cKXVX3=SR8Bu5Bg}MNLVASgjDgcPjyRMA)b299naVf0aktJ zcyi{RbMKsc=Y0I`x%opl+(+Pg?eB9Nh(GVXwc{b+Gq4rIV~EYH5ryaWQ3{Dh|o}4HU`#w$uRQJI|#jzuD)%+ z4^+vjkQ{^$9=7GP1wB{(PoE0cOjb8d)heh4O=t2{&BJG!Y9Xy!OH{SM3VqJ7Lf&G_ zDXYNL4|S&Js70AM&AU)b9wgIh9H{#$noBJ#T%sw<8&%X9&0Eu`0iLQe#F;6z%sR6D z9~7-jA+Kj+-m9slOxA!A)9QtcX}OcQQoic_X3UenLR;LHakaMMzHG}nTQpO0m*=pJ z&U^Y#Aioyw5KHLvT4JYNA$Ng$;7QiKR%Z+$cY%4}2?S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3tU9$PVcF68=|%A>J{}5Qd4%uqdcdHip>Fw z9ydP+0_Q_PXp)ol*WFDrR^RGwlB4zByGahz-Mc0G1i2L{3j$jC<&Ww+|8RQ$^@>6K GYyJz1JErjf diff --git a/pyvnt/DictionaryElement/__pycache__/keyData.cpython-311.pyc b/pyvnt/DictionaryElement/__pycache__/keyData.cpython-311.pyc deleted file mode 100644 index d957d3df4214fe52dd231bca0b956ac89cf1f46d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5928 zcmai2+ix7z8K2u;Z14KAzTh-5nP5A~I*uKnMIue3+*1TG2nSl+!gjoKHr{wI=FHfM zm$k4^s;t44j0B2HLA9zX4N4#Ki28*37wlRq#Tp6KQpH2x9ED0KPyKyoX2-j>DQ9QD z`OfV-XTJM6e~U(&C6rUcOYGflN%}WcY9-(yk7t0~kxa>yGg4Nbkh98!B2!(-s99}7 z6S$fQWP=kyfoqx2RjEl*q|1^SxFwlECf`*h=|28$nFx!%5c`Y7t%=^)uyq$$*!btrgNysLrHHT@v1HR z_ytt&NKBfLO=&_gupI-W(>>H?Yy2frkQTda;Do;hOHa6&C`>!Hna4kk;~<6eUjwdQ>p8{@5_&8;Zw*Uv{!ij_lh9(kVyk@aXN_1F6RM(%pGCGyd zGJwg+v}KQ8nb%)Q=Vou}m(m$#jb3_neEj0Y(V6+Vob5ppPCB16`258T%Yt>I(`^2N zVH+be^R!kvm&RI!n9tggT3Z)Zv`MUNiWZCdb>0T(bV35QkxQ}!XV59^keP+P?H%mV{S=W10W3tda40Lf~vZiDngx@^(z*8i5`H^r3>N*dlMD zDgm+gw}34Azb!=#gtsID&2nIHO9EIO7q6WlCWSC8KB4`HD7ZUZ*t?)$H44X}6GmSA@ZfO%u zO_CX50j3qeN;4|jThZPOA3!G92E4^=2aSl?0T?YwH|2>|=x3)Bf_zACeoW}R6Z>`9 z33pa6cfshwevi(`9#Yn6f-B{XZ7B-_a5RHovl?uRghzuP{{`Sv`Hp1Q>7!j|g+=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j3rfxh;Ev%;&DyjFYsrTJ6kAz&l z6A<{|IR!Z2idJnuR2I+f42j&AaE5dyL6ojLEEeTo;P_8R#lr7>HLtg2lVxCnx}jf7 zBe&6~*}R_O`K&M=*W$KyALrGY!RkISGCs^Y>Dwup9g%S@&85F>r(>LKg%1HVWH><# zq#!~1A_VK!KcaDNgrKh zVZjRWcv$P7kfsz>K=li)0ICb}at9J24=)mP17n4-x9_7*RQ;s>L>bnf$nm%$RGpu} zG%p2kLO8u9=qM?|@Co$Pk^nDa;!p~urbMqU0e4$Iq0v_X5HDkWrO-z2fogC3VejaA z?`Wm>*=p~zlxsgPz|t>~ZFg?;^sPN#)}O<3&wB%{^gLI(T)Mmw+qZiD#01?8n#cBU&OB5 zBh)2ekR^reZQ(j0G9Tz~P0A{y{6iAvFJo?@t)}SS%+JwinE)b#kM(@AuiSdjeQ=c8 zL(p0iqz&K+x-GVn`f#DNu+iST*|Tre`ty6Az4yn3&lk!EPPk8{=fsM-qHeauO3gyn z?$NT1(=7?_B|zsQ_hLh&hf#dc_6gIy`xvGnl&A9N37jQxo&W_F@nufbJ69%ICW8wp z+0ArGOpH2MhO5C;$Ke diff --git a/pyvnt/DictionaryElement/__pycache__/showTree.cpython-311.pyc b/pyvnt/DictionaryElement/__pycache__/showTree.cpython-311.pyc deleted file mode 100644 index 4971a29462821819d266b271b487db7f1cb18cef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1311 zcmah|&1)M+6rb6h)ozryBDkp?(v(T-v|a=jr6vcv1Ol>KaP5{z^dMU5wRRM3vL9l0 zlt$_<^w7h)_@F=`0ym&jnly#}1BLzz667EjQUX2oCNPEKQ{SvD6StJk?*8VzH}7lS zd;7!8Odi4d_1#^js|furndwrFiGyoEJU}+Gv5P!h!=6%8Jhi5Jq(-omE3W3{YB``) zmTM?B`G(YVTdN>5_lI<1l9X%(HcRt2nQt>*Vcl^mqT{mkj6B_R?m51RQ?edd zUP_wGvg`Ob2f5|ogB;PpIg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__/__init__.cpython-311.pyc b/pyvnt/__pycache__/__init__.cpython-311.pyc deleted file mode 100644 index d2350e44559b4779934c09ab84645cbc3e687fc3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 373 zcmZ3^%ge<81d&Resq29BV-N=hn4pZ$YCy(xh7^Vr#vFza2+atknV>W?kY);I&}4oI z(xl0Fi&4u@ljW9ZL1kH9iC$1@T53^hUUI5lQetst@+~=tuuEogNoIatVo{}QPHJu{ zP+?krVy;W@Ed^Zi#TohKAw{XFx8!lD$WENX(#0O?ZM#dWq$`@eh27}H87`nlrcL9cOFz8-DMMa!I{QyHeaE$-} diff --git a/tests/__pycache__/test_basic.cpython-312-pytest-8.2.0.pyc b/tests/__pycache__/test_basic.cpython-312-pytest-8.2.0.pyc deleted file mode 100644 index 6e4e5295ec21243e7a1455bd265bbb0c48b5ad74..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 25015 zcmeHPTWlLwdY<8M$l*$tIy)I~%NprZlCYY$_zB zof+AdO10kI6dSi`-4-p3qG@4Z_rY5CLEVR~pNd>w3KS@;NDUW*1@zE|U1RqlE46T; zm-PS7nKLsahZH62;_UK({CVcw=FH5Q|MLC+;eUieeh$*FcD_3FpHFk#f8zm5ZX>g( zLFP6mb26Xd`g!u}$_j%np3A!XMV{7p`aPt^o0Uk7uiwXWF77lZyWZzy;hu|**6$}} zZYUGYvH&UbK$+Jp3y$*<=^=KC57Mrb^2Whp95T1L6q!-KOXlC_`UN~!zgrf7iZYx7 z<|G33$}o1nBzuASWC^HW_5lsZexN})05minjD&RQ?UbsW%#CFSjro$Zi9iMTF8+j^ z^9tOFAM$xFK`N1GSWD6{yKAffeq~pl8@3&@tStPq`<~GgMl;7)W;C(FXr7|c%z2D+ z5pVn`4z3I5PMp@obH~&0<0C&8wB&&9zM9N*C|+n0ap_`OOJ!BvE2oB%V;PN9#uN`$ ziV7|kT^vZN=|Nq>+jLGD8Pz?hQTXXFeq&QE-L0lFL%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w|ChFc&<6y?PNb??vqVDCUk5?3@-Z zDc^?)Iq!_AgXC~)Adx*T)nQC4X1jX3uRSbU|J%3vYA|;E!=C_BkQ_NE1pN;aCw!P7Itrn4<$oP9uUSmq(bK{DWv2e}@``c1@^!eR1qBq?V1^ zCtVdP{~NeuTB&@U=nZuUk<0Rg#6UaZ&6=s60xca_ofv<54b&#+y{6F a;Ro_)lz*OwO|n29^*ql<7a&Kk@c#iFeLhwI diff --git a/tests/__pycache__/test_keyData.cpython-312-pytest-8.2.0.pyc b/tests/__pycache__/test_keyData.cpython-312-pytest-8.2.0.pyc deleted file mode 100644 index 6ad8185b3b942da932b6734299b851a583eeb641..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8895 zcmeHNTWl2989sB{nOU#R%_b(0WYeUohf=3M^spX+?{pa1Z2dwZNfNDm&Gx+oFy4@?As_an>aA#$7OL}zkjoN=FQp3ATd z$@Aj^Muc$&#Z)=dKf-zsGud$J@$`A}nHJOko^mcgD;2 zknt1C`yg_g7;eMktj=5~XeBhjlGV|Io#>PM;+nxTUmI>?&GYb zO*;H#EtjUS5s1P%Le?_!rX%Xcls1#I+`<$Uv3krb<}Mpl5osGHrIEr+{xmI?9H9i5 z_8uumyyQ*2Bl>IL@Q{<5V;$Z!a#Kz$Z&(+Lx`}g_Os*X2yI9N{0F#qh)9O1}PQINj z%v?<#$>t2R@5rgMXGcc*O6AK1tIvXUHCh~0?sJy z0`RAWc0=6RWEmROi&qN4=yrxj*HqY!wYLLYBY#V5zHuC3G=Q6<^m!=C1aBC`39h)? z(~n>&u%}TQzRJ|Mw$0r0>sR5O4CO~}Mql=)L}wdhYg-dL;e|ji$Z|gus+`T*+@&5u zs=Uqrh%w_WUJ{U+Vsrs(O|kd<7ekL(I3;eF?g(P_=RH4qnV365`f)j$f>nFXgMQL* zjjc`MkX&7(!00huTz8MU*6xu_YCQ={M)agE2|W-)TBBrZ>)S$(4O(v@#|3h_^np-; zb*~D#tjBF3%ebkS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ZxRPk3&4qKg2=!dBY=a^%F70H_UPXtbP9ny+qb+ diff --git a/tests/__pycache__/test_pyvnt.cpython-312-pytest-8.2.0.pyc b/tests/__pycache__/test_pyvnt.cpython-312-pytest-8.2.0.pyc deleted file mode 100644 index b68eaf3c3fa776515b6a2eac5adfa0822f6fce80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 638 zcmYjNJ#Q015S=~W`S#9s;s}8R60%#Tu$9yygb#;;kXV@N8ta_fkX7!^*6!NmIu{^O zA{ywakl{bj(}A08lL8tf3Pz~!1!IifAH4=_+`LVIG4@& zdu%>H1QCfLAbGWt!oEcyu>*&gjTINaBF3%|y9o_w;sqW73z#3-hY&fRNL2jdP74do zppTL8dXjEBOWWBN?qO>X1!~4yEn`fld2g?$%NvAv? Date: Fri, 24 May 2024 21:13:50 +0530 Subject: [PATCH 5/5] Made basic implementation of OpenFOAM List in pyvnt --- pyvnt/Reference/basic.py | 2 +- pyvnt/Reference/errorClasses.py | 30 +++++++++ pyvnt/Reference/list.py | 108 ++++++++++++++++++++++++++++++++ 3 files changed, 139 insertions(+), 1 deletion(-) create mode 100644 pyvnt/Reference/list.py diff --git a/pyvnt/Reference/basic.py b/pyvnt/Reference/basic.py index 6090f52..8be129c 100755 --- a/pyvnt/Reference/basic.py +++ b/pyvnt/Reference/basic.py @@ -241,7 +241,7 @@ class EnumProp(ValueProperty): ''' - __slots__ = ('_EnumProp__items', '_EnumProp__default') + __slots__ = ('_ValueProperty__name', '_EnumProp__items', '_EnumProp__default') def __init__(self, name: str, items: {str}, default: str): super(EnumProp, self).__init__() diff --git a/pyvnt/Reference/errorClasses.py b/pyvnt/Reference/errorClasses.py index 9766ce3..da9fc5f 100755 --- a/pyvnt/Reference/errorClasses.py +++ b/pyvnt/Reference/errorClasses.py @@ -70,3 +70,33 @@ def __init__(self, item): def __str__(self): return f"{self.item} not an tuple type" + +class SizeError(Exception): + def __init__(self, size: int): + self.size = size + + def __str__(self): + return f"Size of values should be {self.size}" + +class NoPlaceholdersError(Exception): + def __init__(self, msg: str): + self.msg = msg + + def __str__(self): + return f"{self.msg}" + +class NoValueError(Exception): + def __init__(self, msg: str): + self.msg = msg + + def __str__(self): + return f"{self.msg}" + +class KeyRepeatError(Exception): + def __init__(self, key: str): + self.key = key + + def __str__(self): + return f"{self.key} Already exists" + + diff --git a/pyvnt/Reference/list.py b/pyvnt/Reference/list.py new file mode 100644 index 0000000..5b115b2 --- /dev/null +++ b/pyvnt/Reference/list.py @@ -0,0 +1,108 @@ +from pyvnt.Reference.basic import * +from pyvnt.Reference.errorClasses import SizeError, NoPlaceholdersError, NoValueError, KeyRepeatError +import warnings + +class PropertyList(ValueProperty): + ''' + A property that holds a list of values. + + Constructor Parameters: + name: The name of the property. + size: The size of the list. + values: The values of the list. + default: The default value of the list. + + Class constructor can be called in the following ways: + PropertyList(name, size, values) + PropertyList(name, values) + PropertyList(name, size, default) + + ''' + + __slots__ = ['_ValuePorperty__name', '_PropertyList__values'] + + def __init__(self, name: int, size: int = None, values: [ValueProperty] = [], default: ValueProperty = None): + super().__init__(name, default) + self.setProperties(name, size, values, default) + + + def setProperties(self, name: int, size: int, values: [ValueProperty], default: ValueProperty = None): + ''' + Sets the values of the list. + ''' + self._ValueProperty__name = name + + if size and values != []: + if default: + warnings.warn("Default value will be ignored") + else: + pass + + if size != len(values): + raise SizeError(size) + else: + self._PropertyList__values = values + + elif not size and values != []: + if default: + warnings.warn("Default value will be ignored") + else: + pass + + self._PropertyList__values = values + + elif size and values == []: + if default: + warnings.warn("Default value will be ignored") + else: + pass + + if not default: + raise NoPlaceholdersError("No default value") + else: + self._PropertyList__values = [default] * size + + else: + raise NoValueError("No values given for list construction") + + def getItem(self, index: int): + ''' + Returns the value at the given index. + ''' + return self._PropertyList__values[index] + + def append_value(self, val: ValueProperty): + ''' + Appends the value to the list. + ''' + self._PropertyList__values.append(val) + + def append_uniq_value(self, val: ValueProperty): + ''' + Appends the value to the list if it is not already present. + ''' + if val not in self._PropertyList__values: + self._PropertyList__values.append(val) + else: + raise KeyRepeatError(val) + + def __repr__(self): + return f"{self._ValueProperty__name}: {self._PropertyList__values}" + + def size(self): + ''' + Returns the size of the list. + ''' + return len(self._PropertyList__values) + + def giveVal(self): + ''' + Returns the list. + ''' + return self._PropertyList__values + + def __eq__(self, other): + return self._PropertyList__values == other.giveVal() + + +