From 9d3ca6c2e6379bb237f90ed6bd5b2afda5e29e96 Mon Sep 17 00:00:00 2001 From: zhangc43 Date: Mon, 29 Feb 2016 14:50:21 -0500 Subject: [PATCH] move everything back to single level --- code/CMakeLists.txt | 68 ++++++++++++++++++- code/damage/CMakeLists.txt | 15 ---- code/{damage => }/damage_local.f90 | 0 code/{damage => }/damage_none.f90 | 0 code/{damage => }/damage_nonlocal.f90 | 0 code/{homogenization => }/homogenization.f90 | 0 code/homogenization/CMakeLists.txt | 16 ----- .../homogenization_RGC.f90 | 0 .../homogenization_isostrain.f90 | 0 .../homogenization_none.f90 | 0 code/hydrogenflux/CMakeLists.txt | 14 ---- .../hydrogenflux_cahnhilliard.f90 | 0 .../hydrogenflux_isoconc.f90 | 0 code/porosity/CMakeLists.txt | 14 ---- code/{porosity => }/porosity_none.f90 | 0 code/{porosity => }/porosity_phasefield.f90 | 0 code/spectral/CMakeLists.txt | 18 ----- code/{spectral => }/spectral_damage.f90 | 0 code/{spectral => }/spectral_mech_AL.f90 | 0 code/{spectral => }/spectral_mech_Basic.f90 | 0 .../spectral_mech_Polarisation.f90 | 0 code/{spectral => }/spectral_thermal.f90 | 0 code/{spectral => }/spectral_utilities.f90 | 0 code/thermal/CMakeLists.txt | 15 ---- code/{thermal => }/thermal_adiabatic.f90 | 0 code/{thermal => }/thermal_conduction.f90 | 0 code/{thermal => }/thermal_isothermal.f90 | 0 code/vacancyflux/CMakeLists.txt | 15 ---- .../vacancyflux_cahnhilliard.f90 | 0 .../vacancyflux_isochempot.f90 | 0 .../{vacancyflux => }/vacancyflux_isoconc.f90 | 0 31 files changed, 65 insertions(+), 110 deletions(-) delete mode 100644 code/damage/CMakeLists.txt rename code/{damage => }/damage_local.f90 (100%) rename code/{damage => }/damage_none.f90 (100%) rename code/{damage => }/damage_nonlocal.f90 (100%) rename code/{homogenization => }/homogenization.f90 (100%) delete mode 100644 code/homogenization/CMakeLists.txt rename code/{homogenization => }/homogenization_RGC.f90 (100%) rename code/{homogenization => }/homogenization_isostrain.f90 (100%) rename code/{homogenization => }/homogenization_none.f90 (100%) delete mode 100644 code/hydrogenflux/CMakeLists.txt rename code/{hydrogenflux => }/hydrogenflux_cahnhilliard.f90 (100%) rename code/{hydrogenflux => }/hydrogenflux_isoconc.f90 (100%) delete mode 100644 code/porosity/CMakeLists.txt rename code/{porosity => }/porosity_none.f90 (100%) rename code/{porosity => }/porosity_phasefield.f90 (100%) delete mode 100644 code/spectral/CMakeLists.txt rename code/{spectral => }/spectral_damage.f90 (100%) rename code/{spectral => }/spectral_mech_AL.f90 (100%) rename code/{spectral => }/spectral_mech_Basic.f90 (100%) rename code/{spectral => }/spectral_mech_Polarisation.f90 (100%) rename code/{spectral => }/spectral_thermal.f90 (100%) rename code/{spectral => }/spectral_utilities.f90 (100%) delete mode 100644 code/thermal/CMakeLists.txt rename code/{thermal => }/thermal_adiabatic.f90 (100%) rename code/{thermal => }/thermal_conduction.f90 (100%) rename code/{thermal => }/thermal_isothermal.f90 (100%) delete mode 100644 code/vacancyflux/CMakeLists.txt rename code/{vacancyflux => }/vacancyflux_cahnhilliard.f90 (100%) rename code/{vacancyflux => }/vacancyflux_isochempot.f90 (100%) rename code/{vacancyflux => }/vacancyflux_isoconc.f90 (100%) diff --git a/code/CMakeLists.txt b/code/CMakeLists.txt index 33208a6ed..e4ea0b01c 100644 --- a/code/CMakeLists.txt +++ b/code/CMakeLists.txt @@ -78,6 +78,68 @@ target_link_libraries(DAMASK_SOURCE DAMASK_DRIVERS) add_library(DAMASK_CONSTITUTIVE "constitutive.f90") target_link_libraries(DAMASK_CONSTITUTIVE DAMASK_PLASTIC DAMASK_KINEMATICS DAMASK_SOURCE) -# compile spectral solver -add_executable(DAMASKSpectral.exe DAMASK_spectral.f90) -target_link_libraries (DAMASKSpectral.exe DAMASK_CONSTITUTIVE) \ No newline at end of file +add_library(DAMASK_CRYSTALLITE "crystallite.f90") +target_link_libraries(DAMASK_CRYSTALLITE DAMASK_CONSTITUTIVE) + +add_library(DAMASK_HOMOGENIZATION "homogenization.f90" + "homogenization_RGC.f90" + "homogenization_isostrain.f90" + "homogenization_none.f90") +target_link_libraries(DAMASK_HOMOGENIZATION DAMASK_CRYSTALLITE) + +add_library(DAMASK_HYDROGENFLUX "hydrogenflux_isoconc.f90" + "hydrogenflux_cahnhilliard.f90") +target_link_libraries(DAMASK_HYDROGENFLUX DAMASK_CRYSTALLITE) + +add_library(DAMASK_POROSITY "porosity_none.f90" + "porosity_phasefield.f90") +target_link_libraries(DAMASK_POROSITY DAMASK_CRYSTALLITE) + +add_library(DAMASK_VACANCYFLUX "vacancyflux_isoconc.f90" + "vacancyflux_isochempot.f90" + "vacancyflux_cahnhilliard.f90") +target_link_libraries(DAMASK_VACANCYFLUX DAMASK_CRYSTALLITE) + +add_library(DAMASK_DAMAGE "damage_none.f90" + "damage_local.f90" + "damage_nonlocal.f90") +target_link_libraries(DAMASK_DAMAGE DAMASK_CRYSTALLITE) + +add_library(DAMASK_THERMAL "thermal_isothermal.f90" + "thermal_adiabatic.f90" + "thermal_conduction.f90") +target_link_libraries(DAMASK_THERMAL DAMASK_CRYSTALLITE) + +add_library(DAMASK_ENGINE "homogenization.f90") +target_link_libraries(DAMASK_ENGINE DAMASK_THERMAL + DAMASK_DAMAGE + DAMASK_VACANCYFLUX + DAMASK_POROSITY + DAMASK_HYDROGENFLUX + DAMASK_HOMOGENIZATION) + +add_library(DAMASK_CPFE "CPFEM.f90" + "CPFEM2.f90") +target_link_libraries(DAMASK_CPFE DAMASK_ENGINE) + +if (FEM) + message("special treatment for FEM code") +endif(FEM) + +if (SPECTRAL) + add_library(DAMASK_SPECTRAL_UTILITY spectral_utilities.f90) + target_link_libraries(DAMASK_SPECTRAL_UTILITY DAMASK_CPFE2) + + add_library(DAMASK_SPECTRAL_BASE "spectral_thermal.f90" + "spectral_damage.f90") + target_link_libraries(DAMASK_SPECTRAL_BASE DAMASK_SPECTRAL_UTILITY) + + add_library(DAMASK_SPECTRAL_MECH "spectral_mech_AL.f90" + "spectral_mech_Polarisation.f90" + "spectral_mech_Basic.f90") + target_link_libraries(DAMASK_SPECTRAL_MECH DAMASK_SPECTRAL_UTILITY) + + add_executable(DAMASKSpectral.exe DAMASK_spectral.f90) + target_link_libraries(DAMASKSpectral.exe DAMASK_SPECTRAL_BASE + DAMASK_SPECTRAL_MECH) +endif(SPECTRAL) \ No newline at end of file diff --git a/code/damage/CMakeLists.txt b/code/damage/CMakeLists.txt deleted file mode 100644 index 25d3e7e37..000000000 --- a/code/damage/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# group sources -set (DAMAGE "damage_none" - "damage_local" - "damage_nonlocal" - ) - -# compile damage module -foreach (p ${DAMAGE}) - add_library (${p} "${p}.f90") -endforeach (p) - -# set libraries for linking -foreach (p ${DAMAGE}) - set (DAMASK_LIB ${DAMASK_LIB} ${P}) -endforeach (p) \ No newline at end of file diff --git a/code/damage/damage_local.f90 b/code/damage_local.f90 similarity index 100% rename from code/damage/damage_local.f90 rename to code/damage_local.f90 diff --git a/code/damage/damage_none.f90 b/code/damage_none.f90 similarity index 100% rename from code/damage/damage_none.f90 rename to code/damage_none.f90 diff --git a/code/damage/damage_nonlocal.f90 b/code/damage_nonlocal.f90 similarity index 100% rename from code/damage/damage_nonlocal.f90 rename to code/damage_nonlocal.f90 diff --git a/code/homogenization/homogenization.f90 b/code/homogenization.f90 similarity index 100% rename from code/homogenization/homogenization.f90 rename to code/homogenization.f90 diff --git a/code/homogenization/CMakeLists.txt b/code/homogenization/CMakeLists.txt deleted file mode 100644 index a10de9aaa..000000000 --- a/code/homogenization/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -# group sources -set (HOMOGENIZATION "homogenization" - "homogenization_RGC" - "homogenization_isostrain" - "homogenization_none" - ) - -# compile modules -foreach (p ${HOMOGENIZATION}) - add_library (${p} "${p}.f90") -endforeach (p) - -# set libraries/modules for linking -foreach (p ${HOMOGENIZATION}) - set (DAMASK_LIB ${DAMASK_LIB} ${p}) -endforeach (p) \ No newline at end of file diff --git a/code/homogenization/homogenization_RGC.f90 b/code/homogenization_RGC.f90 similarity index 100% rename from code/homogenization/homogenization_RGC.f90 rename to code/homogenization_RGC.f90 diff --git a/code/homogenization/homogenization_isostrain.f90 b/code/homogenization_isostrain.f90 similarity index 100% rename from code/homogenization/homogenization_isostrain.f90 rename to code/homogenization_isostrain.f90 diff --git a/code/homogenization/homogenization_none.f90 b/code/homogenization_none.f90 similarity index 100% rename from code/homogenization/homogenization_none.f90 rename to code/homogenization_none.f90 diff --git a/code/hydrogenflux/CMakeLists.txt b/code/hydrogenflux/CMakeLists.txt deleted file mode 100644 index 33fa04574..000000000 --- a/code/hydrogenflux/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# group sources -set (HYDROGENFLUX "hydrogenflux_isoconc" - "hydrogenflux_cahnhilliard" - ) - -# compile hydrogenflux modules -foreach (p ${HYDROGENFLUX}) - add_library (${p} "${p}.f90") -endforeach (p) - -# set libraries/modules for linking -foreach (p ${HYDROGENFLUX}) - set (DAMASK_LIB ${DAMASK_LIB} ${p}) -endforeach (p) \ No newline at end of file diff --git a/code/hydrogenflux/hydrogenflux_cahnhilliard.f90 b/code/hydrogenflux_cahnhilliard.f90 similarity index 100% rename from code/hydrogenflux/hydrogenflux_cahnhilliard.f90 rename to code/hydrogenflux_cahnhilliard.f90 diff --git a/code/hydrogenflux/hydrogenflux_isoconc.f90 b/code/hydrogenflux_isoconc.f90 similarity index 100% rename from code/hydrogenflux/hydrogenflux_isoconc.f90 rename to code/hydrogenflux_isoconc.f90 diff --git a/code/porosity/CMakeLists.txt b/code/porosity/CMakeLists.txt deleted file mode 100644 index 0e30067e8..000000000 --- a/code/porosity/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -# group sources -set (POROSITY "porosity_none" - "porosity_phasefield" - ) - -# compile porosity modules -foreach (p ${POROSITY}) - add_library (${p} "${p}.f90") -endforeach (p) - -# set libraries/modules for linking -foreach (p ${POROSITY}) - set (DAMASK_LIB ${DAMASK_LIB} ${p}) -endforeach (p) \ No newline at end of file diff --git a/code/porosity/porosity_none.f90 b/code/porosity_none.f90 similarity index 100% rename from code/porosity/porosity_none.f90 rename to code/porosity_none.f90 diff --git a/code/porosity/porosity_phasefield.f90 b/code/porosity_phasefield.f90 similarity index 100% rename from code/porosity/porosity_phasefield.f90 rename to code/porosity_phasefield.f90 diff --git a/code/spectral/CMakeLists.txt b/code/spectral/CMakeLists.txt deleted file mode 100644 index 136d1ad88..000000000 --- a/code/spectral/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -# group source for sepctral solver driver -set (SPECTRAL "spectral_damage" - "spectral_mech_AL" - "spectral_mech_Basic" - "spectral_mech_Polarisation" - "spectral_thermal" - "spectral_utilities" - ) - -# compile spectral solver driver module -foreach (p ${SPECTRAL}) - add_library (${p} "${p}.f90") -endforeach (p) - -# set libraries/modules for linking -foreach (p ${SPECTRAL}) - set (DAMASK_LIB ${DAMASK_LIB} ${p}) -endforeach (p) \ No newline at end of file diff --git a/code/spectral/spectral_damage.f90 b/code/spectral_damage.f90 similarity index 100% rename from code/spectral/spectral_damage.f90 rename to code/spectral_damage.f90 diff --git a/code/spectral/spectral_mech_AL.f90 b/code/spectral_mech_AL.f90 similarity index 100% rename from code/spectral/spectral_mech_AL.f90 rename to code/spectral_mech_AL.f90 diff --git a/code/spectral/spectral_mech_Basic.f90 b/code/spectral_mech_Basic.f90 similarity index 100% rename from code/spectral/spectral_mech_Basic.f90 rename to code/spectral_mech_Basic.f90 diff --git a/code/spectral/spectral_mech_Polarisation.f90 b/code/spectral_mech_Polarisation.f90 similarity index 100% rename from code/spectral/spectral_mech_Polarisation.f90 rename to code/spectral_mech_Polarisation.f90 diff --git a/code/spectral/spectral_thermal.f90 b/code/spectral_thermal.f90 similarity index 100% rename from code/spectral/spectral_thermal.f90 rename to code/spectral_thermal.f90 diff --git a/code/spectral/spectral_utilities.f90 b/code/spectral_utilities.f90 similarity index 100% rename from code/spectral/spectral_utilities.f90 rename to code/spectral_utilities.f90 diff --git a/code/thermal/CMakeLists.txt b/code/thermal/CMakeLists.txt deleted file mode 100644 index 8f34d0815..000000000 --- a/code/thermal/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# group source related themal module -set (THERMAL "thermal_isothermal" - "thermal_adiabatic" - "thermal_conduction" - ) - -# compiler theraml module -foreach (p ${THERMAL}) - add_library (${p} "${p}.f90") -endforeach (p) - -# set libraries/modules for linking -foreach (p ${THERMAL}) - set (DAMASK_LIB ${DAMASK_LIB} ${p}) -endforeach (p) \ No newline at end of file diff --git a/code/thermal/thermal_adiabatic.f90 b/code/thermal_adiabatic.f90 similarity index 100% rename from code/thermal/thermal_adiabatic.f90 rename to code/thermal_adiabatic.f90 diff --git a/code/thermal/thermal_conduction.f90 b/code/thermal_conduction.f90 similarity index 100% rename from code/thermal/thermal_conduction.f90 rename to code/thermal_conduction.f90 diff --git a/code/thermal/thermal_isothermal.f90 b/code/thermal_isothermal.f90 similarity index 100% rename from code/thermal/thermal_isothermal.f90 rename to code/thermal_isothermal.f90 diff --git a/code/vacancyflux/CMakeLists.txt b/code/vacancyflux/CMakeLists.txt deleted file mode 100644 index 7163f38d7..000000000 --- a/code/vacancyflux/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# group source file -set (VACANCYFLUX "vacancyflux_isoconc" - "vacancyflux_isochempot" - "vacancyflux_cahnhilliard" - ) - -# compiler as module -foreach (p ${VACANCYFLUX}) - add_library (${p} "${p}.f90") -endforeach (p) - -# set libraries/modules for linking -foreach (p ${VACANCYFLUX}) - set (DAMASK_LIB ${DAMASK_LIB} ${p}) -endforeach (p) \ No newline at end of file diff --git a/code/vacancyflux/vacancyflux_cahnhilliard.f90 b/code/vacancyflux_cahnhilliard.f90 similarity index 100% rename from code/vacancyflux/vacancyflux_cahnhilliard.f90 rename to code/vacancyflux_cahnhilliard.f90 diff --git a/code/vacancyflux/vacancyflux_isochempot.f90 b/code/vacancyflux_isochempot.f90 similarity index 100% rename from code/vacancyflux/vacancyflux_isochempot.f90 rename to code/vacancyflux_isochempot.f90 diff --git a/code/vacancyflux/vacancyflux_isoconc.f90 b/code/vacancyflux_isoconc.f90 similarity index 100% rename from code/vacancyflux/vacancyflux_isoconc.f90 rename to code/vacancyflux_isoconc.f90