Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-alugrid
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ag-ohlberger
dune-community
dune-alugrid
Commits
07f5af91
Commit
07f5af91
authored
9 years ago
by
Robert K
Browse files
Options
Downloads
Patches
Plain Diff
grid selector
parent
0d02930d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/DuneAlugridMacros.cmake
+8
-3
8 additions, 3 deletions
cmake/modules/DuneAlugridMacros.cmake
cmake/modules/GridSelector.cmake
+35
-0
35 additions, 0 deletions
cmake/modules/GridSelector.cmake
with
43 additions
and
3 deletions
cmake/modules/DuneAlugridMacros.cmake
+
8
−
3
View file @
07f5af91
...
...
@@ -7,19 +7,24 @@ set(DUNE_ALUGRID_LIBRARY "${PROJECT_BINARY_DIR}/lib/libdunealugrid.a"
CACHE FILEPATH
"path to local libs in dune-alugrid"
)
mark_as_advanced
(
DUNE_ALUGRID_LIBRARY
)
include
(
GridSelector
)
initialize_grid_selector
()
set
(
GRIDS
""
)
#define available alugrid types
dune_define_alugridtype
(
GRID
_CONFIG_H_BOTTOM
GRIDTYPE ALUGRID_CONFORM
dune_define_alugridtype
(
GRID
S
GRIDTYPE ALUGRID_CONFORM
DUNETYPE
"Dune::ALUGrid< dimgrid, dimworld, simplex, conforming >"
HEADERS dune/alugrid/grid.hh dune/alugrid/dgf.hh
)
dune_define_alugridtype
(
GRID
_CONFIG_H_BOTTOM
GRIDTYPE ALUGRID_CUBE
dune_define_alugridtype
(
GRID
S
GRIDTYPE ALUGRID_CUBE
DUNETYPE
"Dune::ALUGrid< dimgrid, dimworld, cube, nonconforming >"
HEADERS dune/alugrid/grid.hh dune/alugrid/dgf.hh
)
dune_define_alugridtype
(
GRID
_CONFIG_H_BOTTOM
GRIDTYPE ALUGRID_SIMPLEX
dune_define_alugridtype
(
GRID
S
GRIDTYPE ALUGRID_SIMPLEX
DUNETYPE
"Dune::ALUGrid< dimgrid, dimworld, simplex, nonconforming >"
HEADERS dune/alugrid/grid.hh dune/alugrid/dgf.hh
)
finalize_grid_selector
(
GRIDS
)
# avoid conflicts with normal ALUGrid
if
(
ALUGRID_CPPFLAGS
)
message
(
ERROR
"--with-alugrid conflicts with dune-alugrid module,
...
...
This diff is collapsed.
Click to expand it.
cmake/modules/GridSelector.cmake
0 → 100644
+
35
−
0
View file @
07f5af91
# check whether the user wants to overload compile flags upon calling make
#
# Provides the following macros:
#
# initialize_compiler_script() : needs to be called before further flags are added to CMAKE_CXX_FLAGS
# finalize_compiler_script() : needs to be called at the end of the cmake macros, e.g. in finalize_dune_project
#
# By default this feature is disabled. Use -DALLOW_CXXFLAGS_OVERWRITE=ON to activate.
# Then the following is possible:
#
# make CXXFLAGS="your flags" GRIDTYPE="grid type"
#
# GRIDTYPE can be anything defined in config.h via the dune_define_gridtype macro from dune-grid.
# Furthermore any CPP variable of the form -DVAR=VALUE can be overloaded on the command line.
#
# Note: If you don't know what this is or what it's good for, don't use it.
#
option
(
GRID_SELECTOR OFF
)
set
(
GRID_SELECTOR_FILE
""
)
# init compiler script and store CXX flags
macro
(
initialize_grid_selector
)
if
(
GRID_SELECTOR
)
set
(
GRID_SELECTOR_FILE
${
CMAKE_BINARY_DIR
}
/gridselector.hh
)
file
(
write
${
GRID_SELECTOR_FILE
}
"// Autogenerated Grid selectors"
)
endif
()
endmacro
()
# init compiler script and store CXX flags
macro
(
finalize_grid_selector output
)
if
(
GRID_SELECTOR
)
file
(
append
${
GRID_SELECTOR_FILE
}
${
output
}
)
endif
()
endmacro
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment