Skip to content
Snippets Groups Projects
Commit 138095ad authored by René Heß's avatar René Heß
Browse files

Analyze grid in 3d example

parent a6286490
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@ int main(int argc, char** argv){
try
{
if (argc != 3){
std::cout << "Need ini file as command line argument." << std::endl;
std::cout << "Need ini file and output filename." << std::endl;
return 1;
}
......
......@@ -120,7 +120,7 @@ function(add_generated_executable)
set(ANALYZE_GRID_OPTION)
if(GEN_ANALYZE_GRID)
set(ANALYZE_GRID_FILE "${GEN_INIFILE}.csv")
set(ANALYZE_GRID_OPTION "--sumfact-grid-info=${ANALYZE_GRID_FILE}")
set(ANALYZE_GRID_OPTION "--grid-info=${ANALYZE_GRID_FILE}")
add_custom_command(OUTPUT ${ANALYZE_GRID_FILE}
COMMAND ${CMAKE_BINARY_DIR}/bin/analyzegrid/analyze_grid ${GEN_INIFILE} ${ANALYZE_GRID_FILE}
COMMENT "Analyzing the grid for target ${GEN_TARGET}..."
......
......@@ -39,6 +39,7 @@ class PerftoolGlobalOptionsArray(ImmutableRecord):
explicit_time_stepping = PerftoolOption(default=False, helpstr="use explicit time stepping")
exact_solution_expression = PerftoolOption(helpstr="name of the exact solution expression in the ufl file")
compare_l2errorsquared = PerftoolOption(helpstr="maximal allowed l2 error squared of difference between numerical solution and interpolation of exact solution (NOTE: requires --exact-solution-expression)")
grid_info = PerftoolOption(default=None, helpstr="Path to file with information about facedir and facemod variations. This can be used to limit the generation of skeleton kernels.")
l2error_tree_path = PerftoolOption(default=None, helpstr="Tree pathes that should be considered for l2 error calculation. Default None means we take all of them into account.")
ini_file = PerftoolOption(helpstr="An inifile to use. A generated driver will be hard-coded to it, a [formcompiler] section will be used as default values to form compiler arguments (use snake case)")
opcounter = PerftoolOption(default=False, helpstr="Count operations. Note: In this case only operator applications are generated since solving and operator counting does not work. You probably want to set instrumentation level>0.")
......@@ -80,7 +81,6 @@ class PerftoolFormOptionsArray(ImmutableRecord):
fastdg = PerftoolOption(default=False, helpstr="Use FastDGGridOperator from PDELab.")
sumfact = PerftoolOption(default=False, helpstr="Use sumfactorization")
sumfact_regular_jacobians = PerftoolOption(default=False, helpstr="Generate non sum-factorized jacobians (only useful if sumfact is set)")
sumfact_grid_info = PerftoolOption(default=None, helpstr="Path to file with information about facedir and facemod variations. This can be used to limit the generation of skeleton kernels.")
vectorization_quadloop = PerftoolOption(default=False, helpstr="whether to generate code with explicit vectorization")
vectorization_strategy = PerftoolOption(default="none", helpstr="The identifier of the vectorization cost model. Possible values: none|explicit|model")
vectorization_not_fully_vectorized_error = PerftoolOption(default=False, helpstr="throw an error if nonquadloop vectorization did not fully vectorize")
......
......@@ -57,8 +57,8 @@ def decide_if_kernel_is_necessary(facedir_s, facemod_s, facedir_n, facemod_n):
# If we are not using YaspGrid, all variants need to be realized
if not get_form_option("diagonal_transformation_matrix"):
# Reduce the variability according to grid info file
if get_form_option("sumfact_grid_info") is not None:
filename = get_form_option("sumfact_grid_info")
if get_option("grid_info") is not None:
filename = get_option("grid_info")
with open(filename) as csv_file:
csv_reader = csv.reader(csv_file, delimiter=" ")
for row in csv_reader:
......
......@@ -55,10 +55,11 @@ dune_add_formcompiler_system_test(UFLFILE poisson_dg_2d.ufl
INIFILE poisson_dg_2d_unstructured.mini
ANALYZE_GRID
)
# dune_add_formcompiler_system_test(UFLFILE poisson_dg_3d.ufl
# BASENAME sumfact_poisson_dg_3d_unstructured
# INIFILE poisson_dg_3d_unstructured.mini
# )
dune_add_formcompiler_system_test(UFLFILE poisson_dg_3d.ufl
BASENAME sumfact_poisson_dg_3d_unstructured
INIFILE poisson_dg_3d_unstructured.mini
ANALYZE_GRID
)
#=============================================
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment