Skip to content

Commit

Permalink
Merge branch 'main' into fem_2d_analyses
Browse files Browse the repository at this point in the history
  • Loading branch information
FEA-eng authored Mar 2, 2024
2 parents 94682cc + 6c8ee59 commit d9a05a1
Show file tree
Hide file tree
Showing 486 changed files with 53,950 additions and 47,712 deletions.
25 changes: 0 additions & 25 deletions cMake/ConfigureChecks.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,8 @@ include(CheckCSourceCompiles)
include(CheckIncludeFileCXX)
include(CheckCXXSourceCompiles)

#check_include_file(dlfcn.h HAVE_DLFCN_H)
check_include_file(GL/gl.h HAVE_GL_GL_H)

#check_include_file(iomanip.h HAVE_IOMANIP_H)
#check_include_file(limits.h HAVE_LIMITS_H)
#check_include_file(values.h HAVE_VALUES_H)
#check_include_file(float.h HAVE_FLOAT_H)
#check_include_file(inttypes.h HAVE_INTTYPES_H)

#check_include_file(libc.h HAVE_LIBC_H)
#check_include_file(memory.h HAVE_MEMORY_H)
#check_include_file(stdint.h HAVE_STDINT_H)
#check_include_file(stdlib.h HAVE_STDLIB_H)
#check_include_file(unistd.h HAVE_UNISTD_H)
#check_include_file(strings.h HAVE_STRINGS_H)
#check_include_file(string.h HAVE_STRING_H)

#check_include_file(bstring.h HAVE_BSTRING_H)
#check_include_file(siginfo.h HAVE_SIGINFO_H)
#check_include_file(bits/sigset.h HAVE_BITS_SIGSET_H)
#check_include_file(sys/dir.h HAVE_SYS_DIR_H)
#check_include_file(sys/filio.h HAVE_SYS_FILIO_H)
#check_include_file(sys/mman.h HAVE_SYS_MMAN_H)
#check_include_file(sys/select.h HAVE_SYS_SELECT_H)
#check_include_file(sys/stat.h HAVE_SYS_STAT_H)
#check_include_file(sys/types.h HAVE_SYS_TYPES_H)

# i/o streams
check_include_file_cxx(istream HAVE_ISTREAM)
check_include_file_cxx(ostream HAVE_OSTREAM)
Expand Down
31 changes: 3 additions & 28 deletions cMake/FindNETGEN.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -27,29 +27,7 @@ else(Netgen_FOUND)

SET(NETGEN_DEFINITIONS -DNO_PARALLEL_THREADS -DOCCGEOMETRY)

IF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
# We haven't supported Netgen prior to 5.3.1 on MacOS, and the current
# plan is for the next Netgen version to be 6.1 (currently unreleased).
IF(DEFINED HOMEBREW_PREFIX)
SET(NGLIB_PREFIX ${HOMEBREW_PREFIX})
ELSE(DEFINED HOMEBREW_PREFIX)
SET(NGLIB_PREFIX ${MACPORTS_PREFIX})
ENDIF(DEFINED HOMEBREW_PREFIX)

FIND_PATH(NGLIB_INCLUDE_DIR nglib.h ${NGLIB_PREFIX}/include)

FIND_LIBRARY(NGLIB_LIBNGLIB nglib ${NGLIB_PREFIX}/lib)
FIND_LIBRARY(NGLIB_LIBMESH mesh ${NGLIB_PREFIX}/lib)
FIND_LIBRARY(NGLIB_LIBOCC occ ${NGLIB_PREFIX}/lib)
FIND_LIBRARY(NGLIB_LIBINTERFACE interface ${NGLIB_PREFIX}/lib)
SET(NGLIB_LIBRARIES ${NGLIB_LIBNGLIB} ${NGLIB_LIBMESH}
${NGLIB_LIBOCC} ${NGLIB_LIBINTERFACE})

IF(NOT NETGENDATA)
SET(NETGENDATA ${NGLIB_PREFIX}/include/netgen)
ENDIF(NOT NETGENDATA)

ELSEIF(WIN32)
IF(WIN32)
FIND_PATH(NGLIB_INCLUDE_DIR NAMES nglib.h PATHS ${NETGEN_INCLUDEDIR})
SET(NETGEN_LIBS nglib mesh occ interface)
SET(NGLIB_LIBRARIES "")
Expand All @@ -72,7 +50,7 @@ else(Netgen_FOUND)
SET(NETGENDATA netgen)
ENDIF(NOT NETGENDATA)

ELSE(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
ELSEIF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)
IF(NETGEN_ROOT)
SET(NETGEN_INCLUDEDIR ${NETGEN_ROOT}/include)
SET(NETGEN_LIBDIR ${NETGEN_ROOT}/lib)
Expand Down Expand Up @@ -101,17 +79,14 @@ else(Netgen_FOUND)
IF(NOT NETGENDATA)
SET(NETGENDATA /usr/share/netgen/libsrc)
ENDIF(NOT NETGENDATA)

ENDIF(DEFINED MACPORTS_PREFIX OR DEFINED HOMEBREW_PREFIX)

FIND_PATH(NETGEN_DIR_include NAMES mydefs.hpp NO_DEFAULT_PATH PATHS ${NGLIB_INCLUDE_DIR}/include ${NETGENDATA}/include ${NETGEN_INCLUDEDIR} ${NGLIB_INCLUDE_DIR})

IF(NOT NGLIB_INCLUDE_DIR AND NOT NETGEN_DIR_include)
MESSAGE(STATUS "Cannot find NETGEN header files.")
ELSEIF(NOT NETGEN_VERSION)
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION
REGEX "#define PACKAGE_VERSION.*"
)
file(STRINGS ${NETGEN_DIR_include}/mydefs.hpp NETGEN_VERSION REGEX "#define PACKAGE_VERSION.*")
ENDIF()

IF(NOT NGLIB_LIBRARIES)
Expand Down
6 changes: 1 addition & 5 deletions src/App/ComplexGeoData.h
Original file line number Diff line number Diff line change
Expand Up @@ -270,12 +270,8 @@ class AppExport ComplexGeoData: public Base::Persistence, public Base::Handled
*
* @return Returns the existing element map.
*/
virtual ElementMapPtr resetElementMap(ElementMapPtr elementMap = ElementMapPtr(),
ElementMapResetPolicy forceEmpty = ForceEmptyMap)
virtual ElementMapPtr resetElementMap(ElementMapPtr elementMap = ElementMapPtr())
{
if (!elementMap && forceEmpty == ForceEmptyMap) {
elementMap = std::make_shared<Data::ElementMap>();
}
_elementMap.swap(elementMap);
return elementMap;
}
Expand Down
7 changes: 7 additions & 0 deletions src/App/ElementMap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,13 @@ MappedName ElementMap::setElementName(const IndexedName& element, const MappedNa
}
}

// Originally in ComplexGeoData::setElementName
// LinkStable/src/App/ComplexGeoData.cpp#L1631
// No longer possible after map separated in ElementMap.cpp

// if(!_ElementMap)
// resetElementMap(std::make_shared<ElementMap>());

ElementIDRefs _sid;
if (!sid) {
sid = &_sid;
Expand Down
44 changes: 40 additions & 4 deletions src/App/GeoFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <App/GeoFeaturePy.h>

#include "ComplexGeoData.h"
#include "GeoFeature.h"
#include "GeoFeatureGroupExtension.h"
#include "ElementNamingUtils.h"
Expand Down Expand Up @@ -78,17 +79,52 @@ PyObject* GeoFeature::getPyObject()
return Py::new_reference_to(PythonObject);
}


std::pair<std::string,std::string> GeoFeature::getElementName(
const char *name, ElementNameType type) const
std::pair<std::string,std::string>
GeoFeature::getElementName(const char *name, ElementNameType type) const
{
(void)type;

std::pair<std::string,std::string> ret;
if(!name)
return ret;
auto prop = getPropertyOfGeometry();
if (!prop) {
return std::make_pair("", name);
}

auto geo = prop->getComplexData();
if (!geo) {
return std::make_pair("", name);
}

return _getElementName(name, geo->getElementName(name));
}

std::pair<std::string, std::string>
GeoFeature::_getElementName(const char* name, const Data::MappedElement& mapped) const
{
std::pair<std::string, std::string> ret;
if (mapped.index && mapped.name) {
std::ostringstream ss;
ss << Data::ComplexGeoData::elementMapPrefix() << mapped.name << '.' << mapped.index;
ret.first = ss.str();
mapped.index.appendToStringBuffer(ret.second);
}
else if (mapped.name) {
// FC_TRACE("element mapped name " << name << " not found in " << getFullName());
ret.first = name;
const char* dot = strrchr(name, '.');
if (dot) {
// deliberately mangle the old style element name to signal a
// missing reference
ret.second = Data::MISSING_PREFIX;
ret.second += dot + 1;
}
}
else {
mapped.index.appendToStringBuffer(ret.second);
}

ret.second = name;
return ret;
}

Expand Down
6 changes: 5 additions & 1 deletion src/App/GeoFeature.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include "DocumentObject.h"
#include "PropertyGeo.h"

#include "MappedElement.h"

namespace App
{
Expand Down Expand Up @@ -120,6 +120,10 @@ class AppExport GeoFeature : public App::DocumentObject
* @return Base::Placement The transformation from the global reference coordinate system
*/
Base::Placement globalPlacement() const;

protected:
std::pair<std::string, std::string> _getElementName(const char* name,
const Data::MappedElement& mapped) const;
};

} //namespace App
Expand Down
1 change: 0 additions & 1 deletion src/App/PropertyGeo.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class ComplexGeoData;

namespace App
{
class Feature;
class Placement;


Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation type="unfinished"></translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_be.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Без назвы</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Sense nom</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_cs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ které odkazují na stejný konfigurovatelný objekt</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Nepojmenovaný</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ angewendet werden soll, die das gleiche konfigurierbare Objekt referenzieren</tr
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Unbenannt</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Ανώνυμο</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_es-AR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ que hacen referencia al mismo objeto configurable</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Sin nombre</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_es-ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Sin nombre</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_eu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Izenik gabea</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_fi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Nimetön</translation>
</message>
Expand Down
4 changes: 2 additions & 2 deletions src/App/Resources/translations/App_fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
<location filename="../../Link.cpp" line="118"/>
<source>Stores the last user choice of whether to apply CopyOnChange setup to all links
that reference the same configurable object</source>
<translation>Enregistre le dernier choix de l'utilisateur concernant l'application de la configuration CopyOnChange à tous les liens qui font référence au même objet configurable</translation>
<translation>Enregistre le dernier choix de l'utilisateur concernant la configuration de CopyOnChange sur tous les liens qui font référence au même objet configurable.</translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Sans nom</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_gl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Sen nome</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_hr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ na sve veze koje referenciraju isti konfigurabilni objekt</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Neimenovano</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_hu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ amelyek ugyanarra a konfigurálható tárgyra hivatkoznak</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Névtelen</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_id.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Tanpa nama</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ che fanno riferimento allo stesso oggetto configurabile</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>Senza nome</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>名称未設定</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_ka.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ that reference the same configurable object</source>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>უსახელო</translation>
</message>
Expand Down
2 changes: 1 addition & 1 deletion src/App/Resources/translations/App_ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ that reference the same configurable object</translation>
<context>
<name>QObject</name>
<message>
<location filename="../../Application.cpp" line="446"/>
<location filename="../../Application.cpp" line="448"/>
<source>Unnamed</source>
<translation>이름없음</translation>
</message>
Expand Down
Loading

0 comments on commit d9a05a1

Please sign in to comment.