Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
86452ff
add dynamic solvers
hverhelst Dec 29, 2023
0f5cd2f
update dynamic base and examples
hverhelst Jan 5, 2024
9017422
clang fixes
hverhelst Jan 9, 2024
4826974
Adding gsDynamicXBraid
hverhelst Jan 9, 2024
473727e
clang fixes (2)
hverhelst Jan 10, 2024
d449b50
Reverted Newmark, update RK4
Crazy-Rich-Meghan Jan 10, 2024
14c8c28
NL
Crazy-Rich-Meghan Jan 11, 2024
47aabbe
Tested
Crazy-Rich-Meghan Jan 11, 2024
c268f53
fix example; works now
hverhelst Jan 15, 2024
359a846
fix norms==0
hverhelst Feb 27, 2024
3132910
oops
hverhelst Feb 27, 2024
2770b35
Merge remote-tracking branch 'origin/DynamicFamily' into DynamicXBraid
hverhelst Feb 27, 2024
7e03a90
fix compiler warnings
hverhelst Feb 28, 2024
d469504
Merge remote-tracking branch 'origin/DynamicXBraid' into DynamicXBraid
hverhelst Feb 28, 2024
81afd52
small fix pybind
hverhelst Feb 28, 2024
e138850
small changes:
hverhelst Mar 1, 2024
77e0d4d
Merge remote-tracking branch 'origin/DynamicXBraid' into DynamicXBraid
hverhelst Mar 1, 2024
59f2b6e
Merge pull request #16 from gismo/DynamicXBraid
hverhelst Mar 1, 2024
d5291f5
fix compiler issues
hverhelst Mar 1, 2024
fa01c2f
remove gsTimeIntegrator
hverhelst Mar 1, 2024
3256c6f
fix R factor and override
hverhelst Mar 1, 2024
7503dc5
* Simplify CMakeLists
hverhelst Mar 1, 2024
4100498
Small fix
Crazy-Rich-Meghan Mar 1, 2024
a57f89f
update cmake
hverhelst Mar 5, 2024
179ebf7
fix includes
hverhelst Mar 5, 2024
f83119d
Merge remote-tracking branch 'origin/main' into tutorials
hverhelst Mar 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 16 additions & 41 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,47 +29,22 @@ endif()
add_definitions(-DSTRAN_DATA_DIR="${CMAKE_CURRENT_SOURCE_DIR}/filedata/")

# add example files
add_custom_target(${PROJECT_NAME}-all)
add_custom_target(${PROJECT_NAME}-examples)
aux_cpp_directory(${CMAKE_CURRENT_SOURCE_DIR}/examples FILES)
foreach(file ${FILES})
add_gismo_executable(${file})
get_filename_component(tarname ${file} NAME_WE) # name without extension
set_property(TEST ${tarname} PROPERTY LABELS "${PROJECT_NAME}")
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
add_dependencies(${PROJECT_NAME}-examples ${tarname})
add_dependencies(${PROJECT_NAME}-all ${tarname})
# install the example executables (optionally)
install(TARGETS ${tarname} DESTINATION "${BIN_INSTALL_DIR}" COMPONENT exe OPTIONAL)
endforeach(file ${FILES})

# add benchmark files
add_custom_target(${PROJECT_NAME}-benchmarks)
aux_cpp_directory(${CMAKE_CURRENT_SOURCE_DIR}/benchmarks FILES)
foreach(file ${FILES})
add_gismo_executable(${file})
get_filename_component(tarname ${file} NAME_WE) # name without extension
set_property(TEST ${tarname} PROPERTY LABELS "${PROJECT_NAME}")
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
add_dependencies(${PROJECT_NAME}-benchmarks ${tarname})
add_dependencies(${PROJECT_NAME}-all ${tarname})
# install the example executables (optionally)
install(TARGETS ${tarname} DESTINATION "${BIN_INSTALL_DIR}" COMPONENT exe OPTIONAL)
endforeach(file ${FILES})

# add solver files
add_custom_target(${PROJECT_NAME}-solvers)
aux_cpp_directory(${CMAKE_CURRENT_SOURCE_DIR}/solvers FILES)
foreach(file ${FILES})
add_gismo_executable(${file})
get_filename_component(tarname ${file} NAME_WE) # name without extension
set_property(TEST ${tarname} PROPERTY LABELS "${PROJECT_NAME}")
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
add_dependencies(${PROJECT_NAME}-solvers ${tarname})
add_dependencies(${PROJECT_NAME}-all ${tarname})
# install the example executables (optionally)
install(TARGETS ${tarname} DESTINATION "${BIN_INSTALL_DIR}" COMPONENT exe OPTIONAL)
endforeach(file ${FILES})
if(GISMO_BUILD_EXAMPLES)
add_custom_target(${PROJECT_NAME}-all)
add_custom_target(${PROJECT_NAME}-examples)
add_custom_target(${PROJECT_NAME}-benchmarks)
add_custom_target(${PROJECT_NAME}-solvers)
add_custom_target(${PROJECT_NAME}-tutorials)
add_subdirectory(examples)
add_subdirectory(benchmarks)
add_subdirectory(solvers)
add_subdirectory(tutorials)
else()
add_subdirectory(examples EXCLUDE_FROM_ALL)
add_subdirectory(benchmarks EXCLUDE_FROM_ALL)
add_subdirectory(solvers EXCLUDE_FROM_ALL)
add_subdirectory(tutorials EXCLUDE_FROM_ALL)
endif(GISMO_BUILD_EXAMPLES)

# # add unittests
# aux_gs_cpp_directory(${PROJECT_SOURCE_DIR}/unittests unittests_SRCS)
Expand Down
26 changes: 26 additions & 0 deletions benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
######################################################################
## CMakeLists.txt --- gsStructuralAnalysis/benchmarks
## This file is part of the G+Smo library.
##
## Author: Angelos Mantzaflaris, Hugo Verhelst
## Copyright (C) 2023
######################################################################

# add benchmark files
aux_cpp_directory(${CMAKE_CURRENT_SOURCE_DIR} FILES)
foreach(file ${FILES})
add_gismo_executable(${file})
get_filename_component(tarname ${file} NAME_WE) # name without extension
set_property(TEST ${tarname} PROPERTY LABELS "${PROJECT_NAME}")
if(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES FOLDER "${PROJECT_NAME}")
else(GISMO_BUILD_EXAMPLES)
set_target_properties(${tarname} PROPERTIES
FOLDER "${PROJECT_NAME}"
EXCLUDE_FROM_ALL TRUE)
endif(GISMO_BUILD_EXAMPLES)
add_dependencies(${PROJECT_NAME}-benchmarks ${tarname})
add_dependencies(${PROJECT_NAME}-all ${tarname})
# install the example executables (optionally)
install(TARGETS ${tarname} DESTINATION "${BIN_INSTALL_DIR}" COMPONENT exe OPTIONAL)
endforeach(file ${FILES})
6 changes: 1 addition & 5 deletions benchmarks/benchmark_Balloon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,7 @@ int main (int argc, char** argv)
dirname = dirname + "/Balloon";
std::string output = "solution";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");

gsFileManager::mkdir(dirname);

// plot geometry
if (plot)
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_Beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ int main (int argc, char** argv)
else
GISMO_ERROR("Testcase unknown");

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);

// plot geometry
if (plot)
Expand Down
6 changes: 1 addition & 5 deletions benchmarks/benchmark_Cylinder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,7 @@ int main (int argc, char** argv)
std::string output = "solution";
wn = output + "data.txt";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");

gsFileManager::mkdir(dirname);

// plot geometry
if (plot)
Expand Down
4 changes: 1 addition & 3 deletions benchmarks/benchmark_Elasticity_Beam_APALM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -283,9 +283,7 @@ int main (int argc, char** argv)
wn = output + "data.txt";
}

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
system(command);
gsFileManager::mkdir(dirname);

gsFunctionExpr<> g("0","0","0",3);

Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_FrustrumALM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,10 +186,7 @@ int main (int argc, char** argv)

wn = output + "data.txt";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);

// plot geometry
if (plot)
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_FrustrumDC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,7 @@ int main (int argc, char** argv)

wn = output + "data.txt";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);

// plot geometry
if (plot)
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_MaterialTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,7 @@ int main (int argc, char** argv)
output = "solution";
wn = output + "data.txt";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);

// plot geometry
if (plot)
Expand Down
2 changes: 1 addition & 1 deletion benchmarks/benchmark_MaterialTestConv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ int main (int argc, char** argv)
staticSolver.setOptions(solverOptions);

gsStatus status = staticSolver.solveNonlinear(solVector);
GISMO_ASSERT(status==gsStatus::Success,"Newton solver failed");
GISMO_ENSURE(status==gsStatus::Success,"Newton solver failed");

mp_def = assembler->constructSolution(solVector);
gsMultiPatch<> deformation = mp_def;
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_Roof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,7 @@ int main (int argc, char** argv)
output = "solution";
wn = output + "data.txt";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);


// plot geometry
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_Roof_DWR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,10 +317,7 @@ int main (int argc, char** argv)
output = "solution";
wn = output + "data.txt";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);


// plot geometry
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_TensionWrinkling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,7 @@ int main (int argc, char** argv)
real_t cross_val = 0.0;


std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);


// plot geometry
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_UniaxialTension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ int main (int argc, char** argv)
std::string output = dirname + "/UniaxialTension";
output = "solution";

std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
int systemRet = system(command);
GISMO_ASSERT(systemRet!=-1,"Something went wrong with calling the system argument");
gsFileManager::mkdir(dirname);


// plot geometry
Expand Down
15 changes: 10 additions & 5 deletions benchmarks/benchmark_Wrinkling.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
#include <gsStructuralAnalysis/src/gsALMSolvers/gsALMRiks.h>
#include <gsStructuralAnalysis/src/gsALMSolvers/gsALMCrisfield.h>

#ifdef gsUnstructuredSplines_ENABLED
#include <gsUnstructuredSplines/src/gsApproxC1Spline.h>
#include <gsUnstructuredSplines/src/gsAlmostC1.h>
#include <gsUnstructuredSplines/src/gsSmoothInterfaces.h>
#endif

using namespace gismo;

Expand All @@ -42,9 +44,10 @@ void initStepOutput( const std::string name, const gsMatrix<T> & points);
template <class T>
void writeStepOutput(const gsALMBase<T> * arcLength, const gsMultiPatch<T> & deformation, const std::string name, const gsMatrix<T> & points, const gsMatrix<index_t> & patches);

#ifdef gsKLShell_ENABLED
int main (int argc, char** argv)
{
#ifdef gsKLShell_ENABLED
#ifdef gsUnstructuredSplines_ENABLED
// Input options
int numElevate = 2;
int numHref = 5;
Expand Down Expand Up @@ -1073,14 +1076,16 @@ int main (int argc, char** argv)
delete arcLength;

return result;
}

#else//gsUnstructuredSplines_ENABLED
gsWarn<<"G+Smo is not compiled with the gsUnstructuredSplines module.";
return EXIT_FAILURE;
#endif
#else//gsKLShell_ENABLED
int main(int argc, char *argv[])
{
gsWarn<<"G+Smo is not compiled with the gsKLShell module.";
return EXIT_FAILURE;
}
#endif
}

template <class T>
void initStepOutput(const std::string name, const gsMatrix<T> & points)
Expand Down
5 changes: 1 addition & 4 deletions benchmarks/benchmark_Wrinkling_DWR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,10 +307,7 @@ int main (int argc, char** argv)
index_t cross_coordinate = 0;
real_t cross_val = 0.0;


std::string commands = "mkdir -p " + dirname;
const char *command = commands.c_str();
system(command);
gsFileManager::mkdir(dirname);

// plot geometry
if (plot)
Expand Down
32 changes: 0 additions & 32 deletions doc/gsALMBase.dox

This file was deleted.

31 changes: 31 additions & 0 deletions doc/gsALMSolvers.dox
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
namespace gismo
{

/** \defgroup gsALMSolvers Arc-length methods
\ingroup gsStructuralAnalysis

Performs the arc length method to solve a nonlinear equation system.

More details can be found in [1].

Examples with the use of arc-length methods are
- \ref benchmark_Balloon.cpp
- \ref benchmark_Beam.cpp
- \ref benchmark_Cylinder.cpp
- \ref benchmark_FrustrumALM.cpp
- \ref benchmark_MaterialTest.cpp
- \ref benchmark_Roof.cpp
- \ref benchmark_UniaxialTension.cpp
- \ref benchmark_Wrinkling.cpp
- \ref gsElasticity_ArcLength.cpp
- \ref gsThinShell_ArcLength.cpp
- \ref gsThinShell_Wrinkling.cpp
- \ref gsThinShell_WrinklingFitting.cpp
- \ref gsThinShell_WrinklingPerturbed.cpp


[1] de Borst, R., Crisfield, M. A., Remmers, J. J. C., & Verhoosel, C. V. (2012). Non-Linear Finite Element Analysis of Solids and Structures: Second Edition. In Non-Linear Finite Element Analysis of Solids and Structures: Second Edition. https://doi.org/10.1002/9781118375938

*/
}

5 changes: 2 additions & 3 deletions doc/gsBucklingSolver.dox → doc/gsDynamicSolvers.dox
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
namespace gismo
{

/** \page gsBucklingSolver gsBucklingSolver
\defgroup gsBucklingSolver gsBucklingSolver
/** \defgroup gsDynamicSolvers Dynamic solvers
\ingroup gsStructuralAnalysis

Linear buckling analysis is performed by solving the following eigenvalue problem:
Expand All @@ -18,7 +17,7 @@ obtained by solving a linear problem \f$K_L\mathbf{u}^L_h = \mathbf{P}\f$. Furth
The modeshape is represented by \f$\phi\f$.

Examples with the use of this class are:
- \subpage gsThinShell_Buckling.cpp
- \ref gsThinShell_Buckling.cpp

*/

Expand Down
Loading