From d5fa8eac03289320f7d63518240e3eab6eafdfa3 Mon Sep 17 00:00:00 2001 From: Knut Morten Okstad Date: Sun, 22 Apr 2018 09:01:37 +0200 Subject: [PATCH] Changed: Continue supporting old file structure also + corrected spacing --- Apps/CMakeLists.txt | 109 ++++++++++++++++++++++++++++++++++---------- README.md | 16 ++++++- 2 files changed, 100 insertions(+), 25 deletions(-) diff --git a/Apps/CMakeLists.txt b/Apps/CMakeLists.txt index cd873aaf..0756e6eb 100644 --- a/Apps/CMakeLists.txt +++ b/Apps/CMakeLists.txt @@ -21,47 +21,110 @@ set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Poisson) add_subdirectory(IFEM-Poisson) -endif() -if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-AdvectionDiffusion) - add_subdirectory(IFEM-AdvectionDiffusion) -endif() -if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Darcy) - add_subdirectory(IFEM-Darcy) +elseif(EXISTS ${PROJECT_SOURCE_DIR}/Poisson) + add_subdirectory(Poisson) endif() +set(HAVE_ADVDIFF FALSE) +if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-AdvectionDiffusion) + add_subdirectory(IFEM-AdvectionDiffusion) + set(HAVE_ADVDIFF TRUE) +elseif(EXISTS ${PROJECT_SOURCE_DIR}/AdvectionDiffusion) + add_subdirectory(AdvectionDiffusion) + set(HAVE_ADVDIFF TRUE) +endif() + +if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Darcy) + add_subdirectory(IFEM-Darcy) +elseif(EXISTS ${PROJECT_SOURCE_DIR}/Darcy) + add_subdirectory(Darcy) +endif() + +set(HAVE_BEAMEX FALSE) +set(HAVE_FINITEDEF FALSE) if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Elasticity) - add_subdirectory(IFEM-Elasticity) - add_subdirectory(IFEM-Elasticity/Beam) - add_subdirectory(IFEM-Elasticity/Linear) - if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Elasticity/IFEM-BeamEx) - add_subdirectory(IFEM-Elasticity/IFEM-BeamEx) - add_subdirectory(IFEM-Elasticity/IFEM-BeamEx/BeamSim) + set(ELASTICITY_SRC IFEM-Elasticity) +else() + set(ELASTICITY_SRC Elasticity) +endif() +if(EXISTS ${PROJECT_SOURCE_DIR}/${ELASTICITY_SRC}) + + add_subdirectory(${ELASTICITY_SRC}) + add_subdirectory(${ELASTICITY_SRC}/Beam) + add_subdirectory(${ELASTICITY_SRC}/Linear) + + if(EXISTS ${PROJECT_SOURCE_DIR}/${ELASTICITY_SRC}/IFEM-BeamEx) + set(BEAMEX_SRC ${ELASTICITY_SRC}/IFEM-BeamEx) + else() + set(BEAMEX_SRC ${ELASTICITY_SRC}/BeamEx) endif() - if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Elasticity/IFEM-FiniteDeformation) - add_subdirectory(IFEM-Elasticity/IFEM-FiniteDeformation) - add_subdirectory(IFEM-Elasticity/IFEM-FiniteDeformation/Nonlinear) + if (EXISTS ${PROJECT_SOURCE_DIR}/${BEAMEX_SRC}) + add_subdirectory(${BEAMEX_SRC}) + add_subdirectory(${BEAMEX_SRC}/BeamSim) + set(HAVE_BEAMEX TRUE) endif() + + if(EXISTS ${PROJECT_SOURCE_DIR}/${ELASTICITY_SRC}/IFEM-FiniteDeformation) + set(FINITEDEF_SRC ${ELASTICITY_SRC}/IFEM-FiniteDeformation) + else() + set(FINITEDEF_SRC ${ELASTICITY_SRC}/FiniteDeformation) + endif() + if (EXISTS ${PROJECT_SOURCE_DIR}/${FINITEDEF_SRC}) + add_subdirectory(${FINITEDEF_SRC}) + add_subdirectory(${FINITEDEF_SRC}/Nonlinear) + set(HAVE_FINITEDEF TRUE) + endif() + if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-ThermoElasticity) - add_subdirectory(IFEM-ThermoElasticity) + add_subdirectory(IFEM-ThermoElasticity) + elseif(EXISTS ${PROJECT_SOURCE_DIR}/ThermoElasticity) + add_subdirectory(ThermoElasticity) endif() + if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-PoroElasticity) add_subdirectory(IFEM-PoroElasticity) + elseif(EXISTS ${PROJECT_SOURCE_DIR}/PoroElasticity) + add_subdirectory(PoroElasticity) endif() + if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-OpenFrac) add_subdirectory(IFEM-OpenFrac) + elseif(EXISTS ${PROJECT_SOURCE_DIR}/FractureDynamics) + add_subdirectory(FractureDynamics) endif() + endif() if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Stokes) - add_subdirectory(${PROJECT_SOURCE_DIR}/IFEM-Stokes) + set(STOKES_SRC IFEM-Stokes) +else() + set(STOKES_SRC Stokes) +endif() +if(EXISTS ${PROJECT_SOURCE_DIR}/${STOKES_SRC}) + + add_subdirectory(${PROJECT_SOURCE_DIR}/${STOKES_SRC}) + if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-NavierStokes) - if (EXISTS ${PROJECT_SOURCE_DIR}/IFEM-AdvectionDiffusion) - add_subdirectory(IFEM-NavierStokes) + set(NAVIERSTOKES_SRC IFEM-NavierStokes) + else() + set(NAVIERSTOKES_SRC NavierStokes) + endif() + if(EXISTS ${PROJECT_SOURCE_DIR}/${NAVIERSTOKES_SRC}) + + if (${HAVE_ADVDIFF}) + add_subdirectory(${NAVIERSTOKES_SRC}) endif() - if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-FSI AND - EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Elasticity/IFEM-BeamEx AND - EXISTS ${PROJECT_SOURCE_DIR}/IFEM-Elasticity/IFEM-FiniteDeformation) - add_subdirectory(IFEM-FSI) + if (${HAVE_BEAMEX} AND ${HAVE_FINITEDEF}) + + if(EXISTS ${PROJECT_SOURCE_DIR}/IFEM-FSI) + set(FSI_SRC IFEM-FSI) + else() + set(FSI_SRC FSI) + endif() + if(EXISTS ${PROJECT_SOURCE_DIR}/${FSI}) + add_subdirectory(${FSI}) + endif() + endif() endif() endif() diff --git a/README.md b/README.md index 6bcd3630..8e0f23e4 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,20 @@ # IFEM project - ## Introduction -IFEM is an object-oriented toolbox for implementing isogeometric finite element solvers for linear and nonlinear partial differential equations. The main toolbox together with structural mechanics applications was developed through the ICADA project at SINTEF Digital in collaboration with NTNU. The important extension to fluid mechanics and coupled problems was done during the NOWITECH and FSI-WT project. The purpose of this code is to serve as a common base for isogeometric PDE-simulators, using splines and NURBS as basis functions in the finite element formulations. The toolbox contains methods for doing linear and non-linear, stationary and dynamic time-domain analyses, as well as eigenvalue analyses. IFEM is parallelized using the Petsc library and enables adaptive refinement using LR B-splines based on residual or recovery methods for a posteriori error estimation. + +IFEM is an object-oriented toolbox for implementing isogeometric finite element +solvers for linear and nonlinear partial differential equations. +The main toolbox together with structural mechanics applications was developed +through the ICADA project at SINTEF Digital in collaboration with NTNU. +The important extension to fluid mechanics and coupled problems was done +during the NOWITECH and FSI-WT projects. + +The purpose of this code is to serve as a common base for isogeometric +PDE-simulators, using splines and NURBS as basis functions in the finite element +formulations. The toolbox contains methods for doing linear and non-linear, +stationary and dynamic time-domain analyses, as well as eigenvalue analyses. +IFEM is parallelized using the PETSc library and enables adaptive refinement +using LR B-splines based on residual or recovery methods for a posteriori error estimation. ## Module overview