Skip to content

Commit d2365f5

Browse files
authored
Merge pull request #42 from gismo/hotfix_datadir
Fix data directory
2 parents 9601418 + 264066e commit d2365f5

24 files changed

+32
-29
lines changed

CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/${PROJECT_NAME}"
5252
DESTINATION include/gismo
5353
FILES_MATCHING PATTERN "*.h" )
5454

55+
# add filedata folder
56+
add_definitions(-D${PROJECT_NAME}_DATA="${CMAKE_CURRENT_SOURCE_DIR}/filedata/")
57+
5558
# add example files
5659
if(GISMO_BUILD_EXAMPLES)
5760
add_custom_target(${PROJECT_NAME}-examples)

examples/aroundCylinder_NS_2D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ int main(int argc, char* argv[]){
2727
// Input //
2828
//=====================================//
2929

30-
std::string filename = ELAST_DATA_DIR"/flow_around_cylinder.xml";
30+
std::string filename = gsElasticity_DATA"/flow_around_cylinder.xml";
3131
real_t viscosity = 0.001; // kinematic viscosity
3232
real_t meanVelocity = 0.2; // inflow velocity
3333
real_t density = 1.;

examples/aroundCylinder_NS_2Dt.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ int main(int argc, char* argv[]){
6161
// Input //
6262
//=====================================//
6363

64-
std::string filename = ELAST_DATA_DIR"/flow_around_cylinder.xml";
64+
std::string filename = gsElasticity_DATA"/flow_around_cylinder.xml";
6565
real_t viscosity = 0.001; // kinematic viscosity
6666
real_t meanVelocity = 1; // inflow velocity
6767
real_t density = 1.0;

examples/aroundCylinder_stokes_2D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ int main(int argc, char* argv[]){
2626
// Input //
2727
//=====================================//
2828

29-
std::string filename = ELAST_DATA_DIR"/flow_around_cylinder.xml";
29+
std::string filename = gsElasticity_DATA"/flow_around_cylinder.xml";
3030
real_t viscosity = 0.001; // kinematic viscosity
3131
real_t meanVelocity = 0.2; // inflow velocity
3232
real_t density = 1.;

examples/biceps_activeMuscle_3D.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ int main(int argc, char* argv[]){
6464

6565
// scanning geometry
6666
gsMultiPatch<> geometry;
67-
gsReadFile<>(rightOrLeft ? ELAST_DATA_DIR"/bicepsRightMP.xml" :
68-
ELAST_DATA_DIR"/bicepsLeftMP.xml", geometry);
67+
gsReadFile<>(rightOrLeft ? gsElasticity_DATA"/bicepsRightMP.xml" :
68+
gsElasticity_DATA"/bicepsLeftMP.xml", geometry);
6969
geometry.computeTopology();
7070

7171
// creating bases

examples/biceps_activeMuscle_3Dt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ int main(int argc, char* argv[]){
6969

7070
// scanning geometry
7171
gsMultiPatch<> geometry;
72-
gsReadFile<>(rightOrLeft ? ELAST_DATA_DIR"/bicepsRightMP.xml" :
73-
ELAST_DATA_DIR"/bicepsLeftMP.xml", geometry);
72+
gsReadFile<>(rightOrLeft ? gsElasticity_DATA"/bicepsRightMP.xml" :
73+
gsElasticity_DATA"/bicepsLeftMP.xml", geometry);
7474
geometry.computeTopology();
7575

7676
// creating bases

examples/cooks_mixedLinElast_2D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int main(int argc, char* argv[]){
1717
// Input //
1818
//=====================================//
1919

20-
std::string filename = ELAST_DATA_DIR"/cooks.xml";
20+
std::string filename = gsElasticity_DATA"/cooks.xml";
2121
real_t youngsModulus = 240.565e6;
2222
real_t poissonsRatio = 0.4;
2323
index_t numUniRef = 3;

examples/cooks_mixedNonLinElast_2D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ int main(int argc, char* argv[]){
1919
// Input //
2020
//=====================================//
2121

22-
std::string filename = ELAST_DATA_DIR"/cooks.xml";
22+
std::string filename = gsElasticity_DATA"/cooks.xml";
2323
real_t youngsModulus = 240.565e6;
2424
real_t poissonsRatio = 0.4;
2525
index_t materialLaw = material_law::mixed_neo_hooke_ln;

examples/cooks_nonLinElast_2D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ int main(int argc, char* argv[]){
2121
// Input //
2222
//=====================================//
2323

24-
std::string filename = ELAST_DATA_DIR"/cooks.xml";
24+
std::string filename = gsElasticity_DATA"/cooks.xml";
2525
real_t youngsModulus = 240.565e6;
2626
real_t poissonsRatio = 0.4;
2727
index_t numUniRef = 4;

examples/flappingBeam_CFD1_NS_2D.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ int main(int argc, char* argv[]){
4646
// Input //
4747
//=====================================//
4848

49-
std::string filename = ELAST_DATA_DIR"/flappingBeam_flow.xml";
49+
std::string filename = gsElasticity_DATA"/flappingBeam_flow.xml";
5050
real_t viscosity = 0.001; // kinematic viscosity
5151
real_t meanVelocity = 0.2; // inflow velocity
5252
real_t density = 1.0e3;

0 commit comments

Comments
 (0)