├── .gitignore ├── CMakeLists.txt ├── addons └── paraview_plugin │ ├── CMakeLists.txt │ ├── IgatoolsParaViewReader.cpp │ ├── IgatoolsParaViewReader.h │ ├── IgatoolsParaViewReader.xml │ ├── Readme │ ├── cmake │ └── macros │ │ ├── create_paraview_plugin_configuration_target.cmake │ │ ├── create_paraview_plugin_install_target.cmake │ │ ├── find_igatools.cmake │ │ ├── find_paraview.cmake │ │ ├── generate_plugin_instantiations.cmake │ │ └── print_paraview_plugin_final_message.cmake │ ├── doc │ └── iga_paraview_plugin.dox │ ├── include │ └── paraview_plugin │ │ ├── vtk_iga_control_grid.h │ │ ├── vtk_iga_grid.h │ │ ├── vtk_iga_grid_container.h │ │ ├── vtk_iga_grid_information.h │ │ ├── vtk_iga_knot_grid.h │ │ ├── vtk_iga_solid_grid.h │ │ └── vtk_iga_types.h │ └── source │ ├── vtk_iga_control_grid.cpp │ ├── vtk_iga_control_grid.inst.py │ ├── vtk_iga_grid.cpp │ ├── vtk_iga_grid.inst.py │ ├── vtk_iga_grid_container.cpp │ ├── vtk_iga_grid_information.cpp │ ├── vtk_iga_knot_grid.cpp │ ├── vtk_iga_knot_grid.inst.py │ ├── vtk_iga_solid_grid.cpp │ └── vtk_iga_solid_grid.inst.py ├── authors.txt ├── cmake ├── config │ ├── igatoolsConfig.cmake.in │ └── igatoolsConfigVersion.cmake.in ├── instantiation_scripts │ ├── create_basis_table.cmake │ ├── generate_inst_table.py │ ├── generate_instantiations.cmake │ └── init_instantiation_data.py └── macros │ ├── MacroOutOfBuildInstall.cmake │ ├── MacroOutOfSourceBuild.cmake │ ├── create_doc_target.cmake │ ├── create_install_target.cmake │ ├── find_boost.cmake │ ├── find_cblas.cmake │ ├── find_cgal.cmake │ ├── find_doxygen.cmake │ ├── find_petsc.cmake │ ├── find_python.cmake │ ├── find_sed.cmake │ ├── find_trilinos.cmake │ ├── find_xercesc.cmake │ ├── init_cxx_flags.cmake │ └── print_final_message.cmake ├── doc ├── Doxyfile.in ├── bibliography.bib ├── design.dox ├── html_extra_style.html ├── iga-logo.png ├── input_output_xml.dox ├── main.dox ├── multi_array_containers.dox └── refinement.dox ├── include └── igatools │ ├── base │ ├── array_utils.h │ ├── cache_status.h │ ├── config.h.in │ ├── equality_constraint.h │ ├── exceptions.h │ ├── flags_handler.h │ ├── linear_constraint.h │ ├── logstream.h │ ├── numbers.h │ ├── objects_container.h │ ├── print_info_utils.h │ ├── properties.h │ ├── properties_id_container.h │ ├── quadrature.h │ ├── quadrature_lib.h │ ├── tensor-inline.h │ ├── tensor.h │ ├── tuple_utils.h │ ├── types.h │ └── value_types.h │ ├── basis_functions │ ├── basis.h │ ├── basis_element.h │ ├── basis_handler.h │ ├── basis_tools.h │ ├── bernstein_basis.h │ ├── bernstein_extraction.h │ ├── bspline.h │ ├── bspline_element.h │ ├── bspline_handler.h │ ├── dof_distribution.h │ ├── nurbs.h │ ├── nurbs_element.h │ ├── nurbs_handler.h │ ├── physical_basis.h │ ├── physical_basis_element.h │ ├── physical_basis_handler.h │ ├── reference_basis.h │ ├── reference_basis_element.h │ ├── reference_basis_handler.h │ ├── space_tools.h │ ├── spline_space.h │ ├── values1d_const_view.h │ └── values_cache.h │ ├── contrib │ ├── cereal │ │ └── include │ │ │ └── cereal │ │ │ ├── access.hpp │ │ │ ├── archives │ │ │ ├── adapters.hpp │ │ │ ├── binary.hpp │ │ │ ├── json.hpp │ │ │ ├── portable_binary.hpp │ │ │ └── xml.hpp │ │ │ ├── cereal.hpp │ │ │ ├── details │ │ │ ├── helpers.hpp │ │ │ ├── polymorphic_impl.hpp │ │ │ ├── static_object.hpp │ │ │ ├── traits.hpp │ │ │ └── util.hpp │ │ │ ├── external │ │ │ ├── base64.hpp │ │ │ ├── rapidjson │ │ │ │ ├── document.h │ │ │ │ ├── filestream.h │ │ │ │ ├── genericstream.h │ │ │ │ ├── internal │ │ │ │ │ ├── pow10.h │ │ │ │ │ ├── stack.h │ │ │ │ │ └── strfunc.h │ │ │ │ ├── license.txt │ │ │ │ ├── prettywriter.h │ │ │ │ ├── rapidjson.h │ │ │ │ ├── reader.h │ │ │ │ ├── stringbuffer.h │ │ │ │ └── writer.h │ │ │ └── rapidxml │ │ │ │ ├── license.txt │ │ │ │ ├── manual.html │ │ │ │ ├── rapidxml.hpp │ │ │ │ ├── rapidxml_iterators.hpp │ │ │ │ ├── rapidxml_print.hpp │ │ │ │ └── rapidxml_utils.hpp │ │ │ ├── macros.hpp │ │ │ └── types │ │ │ ├── array.hpp │ │ │ ├── base_class.hpp │ │ │ ├── bitset.hpp │ │ │ ├── boost_variant.hpp │ │ │ ├── chrono.hpp │ │ │ ├── common.hpp │ │ │ ├── complex.hpp │ │ │ ├── deque.hpp │ │ │ ├── forward_list.hpp │ │ │ ├── list.hpp │ │ │ ├── map.hpp │ │ │ ├── memory.hpp │ │ │ ├── polymorphic.hpp │ │ │ ├── queue.hpp │ │ │ ├── set.hpp │ │ │ ├── stack.hpp │ │ │ ├── string.hpp │ │ │ ├── tuple.hpp │ │ │ ├── unordered_map.hpp │ │ │ ├── unordered_set.hpp │ │ │ ├── utility.hpp │ │ │ ├── valarray.hpp │ │ │ └── vector.hpp │ ├── convergence_table.h │ ├── mpl_util.h │ ├── table.h │ ├── table_handler.h │ ├── table_indices.h │ └── variant.h │ ├── functions │ ├── formula_function.h │ ├── formula_function_handler.h │ ├── formula_grid_function.h │ ├── formula_grid_function_handler.h │ ├── function.h │ ├── function_element.h │ ├── function_handler.h │ ├── function_lib.h │ ├── grid_function.h │ ├── grid_function_element.h │ ├── grid_function_handler.h │ ├── grid_function_lib.h │ ├── identity_function.h │ ├── identity_function_handler.h │ ├── ig_coefficients.h │ ├── ig_function.h │ ├── ig_function_handler.h │ ├── ig_grid_function.h │ ├── ig_grid_function_handler.h │ ├── sub_function.h │ ├── sub_grid_function.h │ ├── sub_grid_function_element.h │ └── sub_grid_function_handler.h │ ├── geometry │ ├── bbox.h │ ├── domain.h │ ├── domain_element.h │ ├── domain_handler.h │ ├── domain_lib.h │ ├── grid.h │ ├── grid_element.h │ ├── grid_handler.h │ ├── grid_iterator.h │ ├── grid_tools.h │ ├── push_forward.h │ └── unit_element.h │ ├── io │ ├── objects_container_reader-XML_schema.h │ ├── objects_container_xml_reader.h │ ├── objects_container_xml_writer.h │ ├── writer.h │ ├── xml_document.h │ └── xml_element.h │ ├── linear_algebra │ ├── dense_matrix.h │ ├── dense_vector.h │ ├── dof_tools.h │ ├── epetra.h │ ├── epetra_graph.h │ ├── epetra_map.h │ ├── epetra_matrix.h │ ├── epetra_solver.h │ ├── epetra_vector.h │ └── native_vector.h │ ├── operators │ ├── elasticity_operators_sf_integration.h │ ├── elliptic_operators.h │ ├── elliptic_operators_sf_integration.h │ ├── elliptic_operators_std_integration.h │ ├── integrator_sum_factorization.h │ └── interface_operator.h │ └── utils │ ├── cartesian_product_array.h │ ├── cartesian_product_indexer.h │ ├── concatenated_iterator-inline.h │ ├── concatenated_iterator.h │ ├── container_view-inline.h │ ├── container_view.h │ ├── dynamic_multi_array.h │ ├── element_index.h │ ├── multi_array-inline.h │ ├── multi_array.h │ ├── multi_array_iterator-inline.h │ ├── multi_array_iterator.h │ ├── multi_array_utils-inline.h │ ├── multi_array_utils.h │ ├── safe_stl_array.h │ ├── safe_stl_container.h │ ├── safe_stl_map.h │ ├── safe_stl_set.h │ ├── safe_stl_vector.h │ ├── shared_ptr_constness_handler.h │ ├── static_multi_array-inline.h │ ├── static_multi_array.h │ ├── tensor_index-inline.h │ ├── tensor_index.h │ ├── tensor_product_array-inline.h │ ├── tensor_product_array.h │ ├── tensor_range.h │ ├── tensor_size.h │ ├── tensor_sized_container-inline.h │ ├── tensor_sized_container.h │ ├── unique_id_generator.h │ ├── value_container.h │ ├── value_table.h │ ├── value_vector.h │ ├── vector_tools-inline.h │ └── vector_tools.h ├── license.txt ├── readme.txt ├── source ├── base │ ├── cache_status.cpp │ ├── exceptions.cpp │ ├── flags_handler.cpp │ ├── instantiated_types.cpp │ ├── instantiated_types.inst.py │ ├── logstream.cpp │ ├── objects_container.cpp │ ├── objects_container.inst.py │ ├── objects_container.serial.py │ ├── properties.cpp │ ├── properties_id_container.cpp │ ├── properties_id_container.inst.py │ ├── quadrature.cpp │ ├── quadrature.inst.py │ ├── quadrature_lib.cpp │ ├── quadrature_lib.inst.py │ ├── tensor.cpp │ ├── tensor.inst.py │ ├── value_flags_handler.cpp │ └── value_types.cpp ├── basis_functions │ ├── basis.cpp │ ├── basis.inst.py │ ├── basis_element.cpp │ ├── basis_element.inst.py │ ├── basis_handler.cpp │ ├── basis_handler.inst.py │ ├── basis_tools.cpp │ ├── basis_tools.inst.py │ ├── bernstein_basis.cpp │ ├── bernstein_extraction.cpp │ ├── bernstein_extraction.inst.py │ ├── bernstein_extraction.serial.py │ ├── bspline.cpp │ ├── bspline.inst.py │ ├── bspline.serial.py │ ├── bspline_element.cpp │ ├── bspline_element.inst.py │ ├── bspline_element_scalar_evaluator.inst.py │ ├── bspline_handler.cpp │ ├── bspline_handler.inst.py │ ├── dof_distribution.cpp │ ├── dof_distribution.inst.py │ ├── dof_distribution.serial.py │ ├── nurbs.cpp │ ├── nurbs.inst.py │ ├── nurbs.serial.py │ ├── nurbs_element.cpp │ ├── nurbs_element.inst.py │ ├── nurbs_handler.cpp │ ├── nurbs_handler.inst.py │ ├── physical_basis.cpp │ ├── physical_basis.inst.py │ ├── physical_basis_element.cpp │ ├── physical_basis_element.inst.py │ ├── physical_basis_handler.cpp │ ├── physical_basis_handler.inst.py │ ├── reference_basis.cpp │ ├── reference_basis.inst.py │ ├── reference_basis_element.cpp │ ├── reference_basis_element.inst.py │ ├── reference_basis_handler.cpp │ ├── reference_basis_handler.inst.py │ ├── spline_space.cpp │ ├── spline_space.inst.py │ ├── spline_space.serial.py │ └── values1d_const_view.cpp ├── contrib │ ├── convergence_table.cpp │ └── table_handler.cpp ├── functions │ ├── formula_function.cpp │ ├── formula_function.inst.py │ ├── formula_function_handler.cpp │ ├── formula_function_handler.inst.py │ ├── formula_grid_function.cpp │ ├── formula_grid_function.inst.py │ ├── formula_grid_function_handler.cpp │ ├── formula_grid_function_handler.inst.py │ ├── function.cpp │ ├── function.inst.py │ ├── function_element.cpp │ ├── function_element.inst.py │ ├── function_handler.cpp │ ├── function_handler.inst.py │ ├── function_lib.cpp │ ├── function_lib.inst.py │ ├── grid_function.cpp │ ├── grid_function.inst.py │ ├── grid_function_element.cpp │ ├── grid_function_element.inst.py │ ├── grid_function_handler.cpp │ ├── grid_function_handler.inst.py │ ├── grid_function_lib.cpp │ ├── grid_function_lib.inst.py │ ├── identity_function.cpp │ ├── identity_function_handler.cpp │ ├── ig_coefficients.cpp │ ├── ig_function.cpp │ ├── ig_function.inst.py │ ├── ig_function.serial.py │ ├── ig_function_handler.cpp │ ├── ig_function_handler.inst.py │ ├── ig_grid_function.cpp │ ├── ig_grid_function.inst.py │ ├── ig_grid_function.serial.py │ ├── ig_grid_function_handler.cpp │ ├── ig_grid_function_handler.inst.py │ ├── sub_grid_function.cpp │ ├── sub_grid_function.inst.py │ ├── sub_grid_function_element.cpp │ ├── sub_grid_function_element.inst.py │ ├── sub_grid_function_handler.cpp │ └── sub_grid_function_handler.inst.py ├── geometry │ ├── bbox.cpp │ ├── bbox.inst.py │ ├── domain.cpp │ ├── domain.inst.py │ ├── domain_element.cpp │ ├── domain_element.inst.py │ ├── domain_handler.cpp │ ├── domain_handler.inst.py │ ├── domain_lib.cpp │ ├── domain_lib.inst.py │ ├── grid.cpp │ ├── grid.inst.py │ ├── grid.serial.py │ ├── grid_element.cpp │ ├── grid_element.inst.py │ ├── grid_handler.cpp │ ├── grid_handler.inst.py │ ├── grid_iterator.cpp │ ├── grid_tools.cpp │ ├── grid_tools.inst.py │ ├── push_forward.cpp │ ├── push_forward.inst.py │ ├── unit_element.cpp │ └── unit_element.inst.py ├── io │ ├── objects_container_xml_reader.cpp │ ├── objects_container_xml_writer.cpp │ ├── writer.cpp │ ├── writer.inst.py │ ├── xml_document.cpp │ └── xml_element.cpp ├── linear_algebra │ ├── dense_matrix.cpp │ ├── dense_vector.cpp │ ├── dof_tools.cpp │ ├── dof_tools.inst.py │ ├── epetra_graph.cpp │ ├── epetra_map.cpp │ ├── epetra_matrix.cpp │ ├── epetra_solver.cpp │ └── epetra_vector.cpp ├── operators │ ├── integrator_sum_factorization.cpp │ ├── interface_operator.cpp │ └── interface_operator.inst.py.old └── utils │ ├── cartesian_product_array.cpp │ ├── cartesian_product_array.inst.py │ ├── cartesian_product_indexer.cpp │ ├── cartesian_product_indexer.inst.py │ ├── dynamic_multi_array.cpp │ ├── dynamic_multi_array.inst.py │ ├── element_index.cpp │ ├── element_index.inst.py │ ├── element_index.serial.py │ ├── safe_stl_array.cpp │ ├── safe_stl_array.inst.py │ ├── safe_stl_array.serial.py │ ├── safe_stl_container.cpp │ ├── safe_stl_container.inst.py │ ├── safe_stl_map.cpp │ ├── safe_stl_map.inst.py │ ├── safe_stl_set.cpp │ ├── safe_stl_set.inst.py │ ├── safe_stl_vector.cpp │ ├── safe_stl_vector.inst.py │ ├── tensor_index.cpp │ ├── tensor_index.inst.py │ ├── tensor_index.serial.py │ ├── tensor_product_array.cpp │ ├── tensor_product_array.inst.py │ ├── tensor_range.cpp │ ├── tensor_size.cpp │ ├── tensor_size.inst.py │ ├── tensor_size.serial.py │ ├── tensor_sized_container.cpp │ ├── tensor_sized_container.inst.py │ ├── unique_id_generator.cpp │ ├── value_table.cpp │ ├── value_table.inst.py │ ├── value_vector.cpp │ └── value_vector.inst.py ├── tests ├── CMakeLists.txt ├── CTestConfig.cmake ├── assemble │ ├── local_mass_matrix_01.cpp │ ├── local_mass_matrix_01 │ │ └── expected.txt │ ├── local_mass_matrix_02.cpp │ ├── local_mass_matrix_02 │ │ └── expected.txt │ ├── local_stiffness_matrix_01.cpp │ └── local_stiffness_matrix_01 │ │ └── expected.txt ├── base │ ├── assert_macro_01.cpp │ ├── assert_macro_01 │ │ └── expected.txt │ ├── objects_container-serialize_01.cpp │ ├── objects_container-serialize_01 │ │ └── expected.txt │ ├── objects_container_01.cpp │ ├── objects_container_01 │ │ └── expected.txt │ ├── points_01.cpp │ ├── points_01 │ │ └── expected.txt │ ├── print_info_utils_01.cpp │ ├── print_info_utils_01 │ │ └── expected.txt │ ├── quadrature-collapse_01.cpp │ ├── quadrature-collapse_01 │ │ └── expected.txt │ ├── quadrature-extension_01.cpp │ ├── quadrature-extension_01 │ │ └── expected.txt │ ├── quadrature-gauss_01.cpp │ ├── quadrature-gauss_01 │ │ └── expected.txt │ ├── quadrature-gauss_lobatto_01.cpp │ ├── quadrature-gauss_lobatto_01 │ │ └── expected.txt │ ├── quadrature-uniform_01.cpp │ ├── quadrature-uniform_01 │ │ └── expected.txt │ ├── tensor-action_01.cpp │ ├── tensor-action_01 │ │ └── expected.txt │ ├── tensor-action_02.cpp │ ├── tensor-action_02 │ │ └── expected.txt │ ├── tensor-arithmetic_01.cpp │ ├── tensor-arithmetic_01 │ │ └── expected.txt │ ├── tensor-co_action_01.cpp │ ├── tensor-co_action_01 │ │ └── expected.txt │ ├── tensor-contract_1_01.cpp │ ├── tensor-contract_1_01 │ │ └── expected.txt │ ├── tensor-cross_product_01.cpp │ ├── tensor-cross_product_01 │ │ └── expected.txt │ ├── tensor-det_01.cpp │ ├── tensor-det_01 │ │ └── expected.txt │ ├── tensor-det_02.cpp │ ├── tensor-det_02 │ │ └── expected.txt │ ├── tensor-index_01.cpp │ ├── tensor-index_01 │ │ └── expected.txt │ ├── tensor-inverse_01.cpp │ ├── tensor-inverse_01 │ │ └── expected.txt │ ├── tensor-inverse_02.cpp │ ├── tensor-inverse_02 │ │ └── expected.txt │ ├── tensor-number_entries_01.cpp │ ├── tensor-number_entries_01 │ │ └── expected.txt │ ├── tensor-scalar_product_01.cpp │ ├── tensor-scalar_product_01 │ │ └── expected.txt │ ├── tensor-tensor_product_01.cpp │ ├── tensor-tensor_product_01 │ │ └── expected.txt │ ├── tensor-transpose_01.cpp │ ├── tensor-transpose_01 │ │ └── expected.txt │ ├── tensor_01.cpp │ ├── tensor_01 │ │ └── expected.txt │ ├── tensor_02.cpp │ ├── tensor_02 │ │ └── expected.txt │ ├── tensor_03.cpp │ ├── tensor_03 │ │ └── expected.txt │ ├── tensor_04.cpp │ └── tensor_04 │ │ └── expected.txt ├── basis_functions │ ├── bernstein_01.cpp │ ├── bernstein_01 │ │ └── expected.txt │ ├── bernstein_extraction_01.cpp │ ├── bernstein_extraction_01 │ │ └── expected.txt │ ├── bernstein_extraction_03.cpp │ ├── bernstein_extraction_03 │ │ └── expected.txt │ ├── bernstein_extraction_04.cpp │ ├── bernstein_extraction_04 │ │ └── expected.txt │ ├── bernstein_extraction_tests_common.h │ ├── boundary_values_01.cpp │ ├── boundary_values_01 │ │ └── expected.txt │ ├── boundary_values_02.cpp │ ├── boundary_values_02 │ │ └── expected.txt │ ├── boundary_values_03.cpp │ ├── boundary_values_03 │ │ └── expected.txt │ ├── bspline-face_basis_01.cpp │ ├── bspline-face_basis_01 │ │ └── expected.txt │ ├── bspline-face_basis_02.cpp │ ├── bspline-face_basis_02 │ │ └── expected.txt │ ├── bspline_basis-serialize_01.cpp │ ├── bspline_basis-serialize_01 │ │ └── expected.txt │ ├── bspline_basis_01.cpp │ ├── bspline_basis_01 │ │ └── expected.txt │ ├── bspline_basis_02.cpp │ ├── bspline_basis_02 │ │ └── expected.txt │ ├── bspline_basis_03.cpp │ ├── bspline_basis_03 │ │ └── expected.txt │ ├── bspline_element_iterator-no_cache_01.cpp │ ├── bspline_element_iterator-no_cache_01 │ │ └── expected.txt │ ├── bspline_element_iterator-no_cache_02.cpp │ ├── bspline_element_iterator-no_cache_02 │ │ └── expected.txt │ ├── bspline_iterator_01.cpp │ ├── bspline_iterator_01 │ │ └── expected.txt │ ├── bspline_iterator_02.cpp │ ├── bspline_iterator_02 │ │ └── expected.txt │ ├── bspline_iterator_03.cpp │ ├── bspline_iterator_03 │ │ └── expected.txt │ ├── bspline_iterator_04.cpp │ ├── bspline_iterator_04 │ │ └── expected.txt │ ├── bspline_iterator_05.cpp │ ├── bspline_iterator_05 │ │ └── expected.txt │ ├── bspline_iterator_06.cpp │ ├── bspline_iterator_06 │ │ └── expected.txt │ ├── bspline_iterator_07.cpp │ ├── bspline_iterator_07 │ │ └── expected.txt │ ├── bspline_iterator_08.cpp │ ├── bspline_iterator_08 │ │ └── expected.txt │ ├── bspline_iterator_09.cpp │ ├── bspline_iterator_09 │ │ └── expected.txt │ ├── bspline_periodic_01.cpp │ ├── bspline_periodic_01 │ │ └── expected.txt │ ├── bspline_periodic_02.cpp │ ├── bspline_periodic_02 │ │ └── expected.txt │ ├── bspline_periodic_03.cpp │ ├── bspline_periodic_03 │ │ └── expected.txt │ ├── bspline_periodic_04-bug.cpp │ ├── bspline_periodic_04-bug │ │ └── expected.txt │ ├── common_functions.h │ ├── derivative_symmetric_manager_01.cpp │ ├── derivative_symmetric_manager_01 │ │ └── expected.txt │ ├── dof_distribution-serialize_01.cpp │ ├── dof_distribution-serialize_01 │ │ └── expected.txt │ ├── dof_distribution_01.cpp │ ├── dof_distribution_01 │ │ └── expected.txt │ ├── filtered_basis_01.cpp │ ├── filtered_basis_01 │ │ └── expected.txt │ ├── filtered_basis_02.cpp │ ├── filtered_basis_02 │ │ └── expected.txt │ ├── filtered_basis_03.cpp │ ├── filtered_basis_03 │ │ └── expected.txt │ ├── get_boundary_dofs_01.cpp │ ├── get_boundary_dofs_01 │ │ └── expected.txt │ ├── get_interior_dofs_01.cpp │ ├── get_interior_dofs_01 │ │ └── expected.txt │ ├── integrate_difference_01.cpp │ ├── integrate_difference_01 │ │ └── expected.txt │ ├── integrate_difference_02.cpp │ ├── integrate_difference_02 │ │ └── expected.txt │ ├── norm_difference_01.cpp │ ├── norm_difference_01 │ │ └── expected.txt │ ├── nurbs_basis-serialize_01.cpp │ ├── nurbs_basis-serialize_01 │ │ └── expected.txt │ ├── nurbs_basis_01.cpp │ ├── nurbs_basis_01 │ │ └── expected.txt │ ├── nurbs_element_iterator-no_cache_01.cpp │ ├── nurbs_element_iterator-no_cache_01 │ │ └── expected.txt │ ├── nurbs_element_iterator-no_cache_02.cpp │ ├── nurbs_element_iterator-no_cache_02 │ │ └── expected.txt │ ├── nurbs_element_iterator_01.cpp │ ├── nurbs_element_iterator_01 │ │ └── expected.txt │ ├── nurbs_element_iterator_02.cpp │ ├── nurbs_element_iterator_02 │ │ └── expected.txt │ ├── nurbs_face_basis_01.cpp │ ├── nurbs_face_basis_01 │ │ └── expected.txt │ ├── phys_basis_01.cpp │ ├── phys_basis_01 │ │ └── expected.txt │ ├── phys_basis_02.cpp │ ├── phys_basis_02 │ │ └── expected.txt │ ├── phys_basis_03.cpp │ ├── phys_basis_03 │ │ └── expected.txt │ ├── phys_basis_04.cpp │ ├── phys_basis_04 │ │ └── expected.txt │ ├── phys_basis_iterator-serialize_01.cpp │ ├── phys_basis_iterator-serialize_01 │ │ └── expected.txt │ ├── phys_basis_iterator.h │ ├── phys_basis_iterator_01.cpp │ ├── phys_basis_iterator_01 │ │ └── expected.txt │ ├── phys_basis_iterator_02.cpp │ ├── phys_basis_iterator_02 │ │ └── expected.txt │ ├── phys_basis_iterator_03.cpp │ ├── phys_basis_iterator_03 │ │ └── expected.txt │ ├── phys_basis_iterator_04.cpp │ ├── phys_basis_iterator_04 │ │ └── expected.txt │ ├── projection_l2_01.cpp │ ├── projection_l2_01 │ │ └── expected.txt │ ├── projection_l2_02.cpp │ ├── projection_l2_02 │ │ └── expected.txt │ ├── projection_l2_03.cpp │ ├── projection_l2_03 │ │ └── expected.txt │ ├── projection_l2_04.cpp │ ├── projection_l2_04 │ │ └── expected.txt │ ├── spline_space-serialize_01.cpp │ ├── spline_space-serialize_01 │ │ └── expected.txt │ ├── spline_space-sub_space_01.cpp │ ├── spline_space-sub_space_01 │ │ └── expected.txt │ ├── spline_space_01.cpp │ ├── spline_space_01 │ │ └── expected.txt │ ├── spline_space_02.cpp │ ├── spline_space_02 │ │ └── expected.txt │ ├── spline_space_03.cpp │ ├── spline_space_03 │ │ └── expected.txt │ ├── spline_space_04.cpp │ ├── spline_space_04 │ │ └── expected.txt │ └── spline_space_tests_common.h ├── functions │ ├── constant_function_01.cpp │ ├── constant_function_01 │ │ └── expected.txt │ ├── function_test.h │ ├── ig_function_01.cpp │ ├── ig_function_01 │ │ └── expected.txt │ ├── ig_grid_function_01.cpp │ ├── ig_grid_function_01 │ │ └── expected.txt │ ├── ig_grid_function_bspline-serialize_01.cpp │ ├── ig_grid_function_bspline-serialize_01 │ │ └── expected.txt │ ├── ig_grid_function_bspline_01.cpp │ ├── ig_grid_function_bspline_01 │ │ └── expected.txt │ ├── ig_grid_function_bspline_02.cpp │ ├── ig_grid_function_bspline_02 │ │ └── expected.txt │ ├── ig_grid_function_bspline_03.cpp │ ├── ig_grid_function_bspline_03 │ │ └── expected.txt │ ├── linear_function_01.cpp │ ├── linear_function_01 │ │ └── expected.txt │ ├── linear_function_02.cpp │ ├── linear_function_02 │ │ └── expected.txt │ ├── linear_function_03.cpp │ ├── linear_function_03 │ │ └── expected.txt │ ├── sub_domain_01.cpp │ ├── sub_domain_01 │ │ └── expected.txt │ ├── sub_domain_02.cpp │ ├── sub_domain_02 │ │ └── expected.txt │ ├── sub_domain_03.cpp │ └── sub_domain_03 │ │ └── expected.txt ├── geometry │ ├── domain-ball_01.cpp │ ├── domain-ball_01 │ │ └── expected.txt │ ├── domain-ball_02.cpp │ ├── domain-ball_02 │ │ └── expected.txt │ ├── domain-curvatures_01.cpp │ ├── domain-curvatures_01 │ │ └── expected.txt │ ├── domain-curvatures_02.cpp │ ├── domain-curvatures_02 │ │ └── expected.txt │ ├── domain-cylindrical_annulus_01.cpp │ ├── domain-cylindrical_annulus_01 │ │ └── expected.txt │ ├── domain-cylindrical_annulus_02.cpp │ ├── domain-cylindrical_annulus_02 │ │ └── expected.txt │ ├── domain-external_normals_01.cpp │ ├── domain-external_normals_01 │ │ └── expected.txt │ ├── domain-linear_01.cpp │ ├── domain-linear_01 │ │ └── expected.txt │ ├── domain-sphere_01.cpp │ ├── domain-sphere_01 │ │ └── expected.txt │ ├── domain-sphere_02.cpp │ ├── domain-sphere_02 │ │ └── expected.txt │ ├── domain-triangle_01.cpp │ ├── domain-triangle_01 │ │ └── expected.txt │ ├── domain_01.cpp │ ├── domain_01 │ │ └── expected.txt │ ├── domain_02.cpp │ ├── domain_02 │ │ └── expected.txt │ ├── domain_03.cpp │ ├── domain_03 │ │ └── expected.txt │ ├── domain_04.cpp │ ├── domain_04 │ │ └── expected.txt │ ├── domain_face_measure_01.cpp │ ├── domain_face_measure_01 │ │ └── expected.txt │ ├── domain_integration_01.cpp │ ├── domain_integration_01 │ │ └── expected.txt │ ├── domain_no_cache_01.cpp │ ├── domain_no_cache_01 │ │ └── expected.txt │ ├── domain_no_cache_02.cpp │ ├── domain_no_cache_02 │ │ └── expected.txt │ ├── domain_values.h │ ├── grid-boundary_id_01.cpp │ ├── grid-boundary_id_01 │ │ └── expected.txt │ ├── grid-boundary_normals_01.cpp │ ├── grid-boundary_normals_01 │ │ └── expected.txt │ ├── grid-constructor_01.cpp │ ├── grid-constructor_01 │ │ └── expected.txt │ ├── grid-points_in_elems_01.cpp │ ├── grid-points_in_elems_01 │ │ └── expected.txt │ ├── grid-serialize_01.cpp │ ├── grid-serialize_01 │ │ └── expected.txt │ ├── grid-subgrid_01.cpp │ ├── grid-subgrid_01 │ │ └── expected.txt │ ├── grid-union_01.cpp │ ├── grid-union_01 │ │ └── expected.txt │ ├── grid_iterator-add_property_01.cpp │ ├── grid_iterator-add_property_01 │ │ └── expected.txt │ ├── grid_iterator-is_boundary_01.cpp │ ├── grid_iterator-is_boundary_01 │ │ └── expected.txt │ ├── grid_iterator-measure_01.cpp │ ├── grid_iterator-measure_01 │ │ └── expected.txt │ ├── grid_iterator-points_01.cpp │ ├── grid_iterator-points_01 │ │ └── expected.txt │ ├── grid_iterator-weights_01.cpp │ ├── grid_iterator-weights_01 │ │ └── expected.txt │ ├── grid_iterator_01.cpp │ ├── grid_iterator_01 │ │ └── expected.txt │ ├── grid_iterator_02.cpp │ ├── grid_iterator_02 │ │ └── expected.txt │ ├── grid_iterator_03.cpp │ ├── grid_iterator_03 │ │ └── expected.txt │ ├── unit_element_01.cpp │ ├── unit_element_01 │ │ └── expected.txt │ └── vtkUnstructuredGridOverlay_3.h ├── io │ ├── objects_container_xml_io_01.cpp │ ├── objects_container_xml_io_01 │ │ └── expected.txt │ ├── writer_01.cpp │ ├── writer_01 │ │ └── expected.txt │ ├── writer_02.cpp │ ├── writer_02 │ │ └── expected.txt │ ├── writer_03.cpp │ ├── writer_03 │ │ └── expected.txt │ ├── writer_04.cpp │ ├── writer_04 │ │ └── expected.txt │ ├── writer_05.cpp │ ├── writer_05 │ │ └── expected.txt │ ├── writer_06.cpp │ ├── writer_06 │ │ └── expected.txt │ ├── writer_07.cpp │ └── writer_07 │ │ └── expected.txt ├── linear_algebra │ ├── dense_matrix-determinant_01.cpp │ ├── dense_matrix-determinant_01 │ │ └── expected.txt │ ├── dense_matrix-eigen_values_01.cpp │ ├── dense_matrix-eigen_values_01 │ │ └── expected.txt │ ├── dense_matrix-eigen_values_02.cpp │ ├── dense_matrix-eigen_values_02 │ │ └── expected.txt │ ├── distributed_matrix_01.cpp │ ├── distributed_matrix_01 │ │ └── expected.txt │ ├── distributed_vector_01.cpp │ ├── distributed_vector_01 │ │ └── expected.txt │ ├── distributed_vector_02.cpp │ ├── distributed_vector_02 │ │ └── expected.txt │ ├── epetra_01.cpp │ ├── epetra_01 │ │ └── expected.txt │ ├── epetra_02.cpp │ └── epetra_02 │ │ └── expected.txt ├── refinement │ ├── grid-refinement_01.cpp │ ├── grid-refinement_01 │ │ └── expected.txt │ ├── phys_basis-refinement_01.cpp │ ├── phys_basis-refinement_01 │ │ └── expected.txt │ ├── phys_basis-refinement_02.cpp │ ├── phys_basis-refinement_02 │ │ └── expected.txt │ ├── phys_basis-refinement_03.cpp │ └── phys_basis-refinement_03 │ │ └── expected.txt ├── runtest.cmake ├── tests.h ├── tests_utils.h ├── tutorial │ ├── example_01.cpp │ ├── example_01 │ │ └── expected.txt │ ├── example_02-bug.cpp │ ├── example_02-bug │ │ └── expected.txt │ ├── example_03-bug.cpp │ ├── example_03-bug │ │ └── expected.txt │ ├── example_04-bug.cpp │ ├── example_04-bug │ │ └── expected.txt │ ├── example_05-bug.cpp │ ├── example_05-bug │ │ └── expected.txt │ ├── example_06-bug.cpp │ ├── example_06-bug │ │ └── expected.txt │ ├── example_07-bug.cpp │ ├── example_07-bug │ │ ├── expected.txt │ │ ├── nurb_geometry-2d.xml │ │ ├── nurb_geometry-2d_v2.xml │ │ ├── nurb_geometry-3d.xml │ │ └── nurb_geometry-3d_v2.xml │ ├── example_08-bug.cpp │ ├── example_08-bug │ │ └── expected.txt │ ├── example_09-bug.cpp │ └── example_09-bug │ │ └── expected.txt └── utils │ ├── array-serialize_01.cpp │ ├── array-serialize_01 │ └── expected.txt │ ├── array_01.cpp │ ├── array_01 │ └── expected.txt │ ├── cartesian_product_array_01.cpp │ ├── cartesian_product_array_01 │ └── expected.txt │ ├── cartesian_product_indexer_01.cpp │ ├── cartesian_product_indexer_01 │ └── expected.txt │ ├── concatenated_forward_iterator_01.cpp │ ├── concatenated_forward_iterator_01 │ └── expected.txt │ ├── concatenated_forward_iterator_02.cpp │ ├── concatenated_forward_iterator_02 │ └── expected.txt │ ├── dynamic_multi_array-serialize_01.cpp │ ├── dynamic_multi_array-serialize_01 │ └── expected.txt │ ├── dynamic_multi_array_01.cpp │ ├── dynamic_multi_array_01 │ └── expected.txt │ ├── dynamic_multi_array_iterator_01.cpp │ ├── dynamic_multi_array_iterator_01 │ └── expected.txt │ ├── shared_ptr_constness_handler_01.cpp │ ├── shared_ptr_constness_handler_01 │ └── expected.txt │ ├── static_multi_array-serialize_01.cpp │ ├── static_multi_array-serialize_01 │ └── expected.txt │ ├── static_multi_array_01.cpp │ ├── static_multi_array_01 │ └── expected.txt │ ├── static_multi_array_02.cpp │ ├── static_multi_array_02 │ └── expected.txt │ ├── static_multi_array_03.cpp │ ├── static_multi_array_03 │ └── expected.txt │ ├── static_multi_array_04.cpp │ ├── static_multi_array_04 │ └── expected.txt │ ├── tensor_index-serialize_01.cpp │ ├── tensor_index-serialize_01 │ └── expected.txt │ ├── tensor_index_01.cpp │ ├── tensor_index_01 │ └── expected.txt │ ├── tensor_product_array_01.cpp │ ├── tensor_product_array_01 │ └── expected.txt │ ├── tensor_size-serialize_01.cpp │ ├── tensor_size-serialize_01 │ └── expected.txt │ ├── tensor_sized_container-serialize_01.cpp │ ├── tensor_sized_container-serialize_01 │ └── expected.txt │ ├── value_table_01.cpp │ ├── value_table_01 │ └── expected.txt │ ├── value_vector_01.cpp │ ├── value_vector_01 │ └── expected.txt │ ├── vector-serialize_01.cpp │ ├── vector-serialize_01 │ └── expected.txt │ ├── vector_01.cpp │ └── vector_01 │ └── expected.txt ├── tutorial ├── CMakeLists.txt ├── cmake_template.txt ├── example_01 │ ├── doc │ │ ├── example_01-01.png │ │ ├── example_01-02.png │ │ ├── example_01-03.png │ │ ├── example_01-04.png │ │ └── example_01.dox │ └── example_01.cpp ├── example_02 │ ├── doc │ │ └── example_02.dox │ └── example_02.cpp ├── example_03 │ ├── doc │ │ ├── example_03-01.png │ │ ├── example_03-02.png │ │ └── example_03.dox │ └── example_03.cpp ├── example_04 │ ├── doc │ │ └── example_04.dox │ └── example_04.cpp ├── example_05 │ ├── doc │ │ └── example_05.dox │ └── example_05.cpp ├── example_06 │ ├── doc │ │ └── example_06.dox │ └── example_06.cpp ├── example_07 │ ├── doc │ │ └── example_07.dox │ ├── example_07.cpp │ ├── nurb_geometry-2d.xml │ ├── nurb_geometry-2d_v2.xml │ ├── nurb_geometry-3d.xml │ └── nurb_geometry-3d_v2.xml ├── example_08 │ ├── doc │ │ └── example_08.dox │ └── example_08.cpp ├── example_09 │ ├── doc │ │ └── example_09.dox │ └── example_09.cpp └── tutorial.dox └── utils ├── apply_copyright.sh ├── astyle_git.sh ├── astylerc ├── copyright_header.txt ├── dealii_copyright_header.txt ├── logo └── logo_generation.tex └── pre-commit.astyle /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | .DS_Store 3 | ._.DS_Store 4 | *kdev4* 5 | -------------------------------------------------------------------------------- /addons/paraview_plugin/Readme: -------------------------------------------------------------------------------- 1 | This is the igatools plugin for paraview. 2 | -------------------------------------------------------------------------------- /addons/paraview_plugin/cmake/macros/create_paraview_plugin_install_target.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 22 | # Create the install target 23 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 24 | 25 | macro(create_paraview_plugin_install_target) 26 | install(TARGETS ${igatools_paraview_lib_name} 27 | ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/paraview_plugin 28 | LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/paraview_plugin) 29 | endmacro(create_paraview_plugin_install_target) 30 | -------------------------------------------------------------------------------- /addons/paraview_plugin/source/vtk_iga_control_grid.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | (f, inst) = (data.file_output, data.inst) 27 | 28 | 29 | domains = set() 30 | 31 | for x in inst.sub_mapping_dims: 32 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 33 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 34 | domains.add(domain) 35 | 36 | for x in inst.mapping_dims: 37 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 38 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 39 | domains.add(domain) 40 | 41 | f.write("namespace paraview_plugin {\n") 42 | 43 | for domain in domains: 44 | f.write('template class VtkIgaControlGrid<%s>;\n' %(domain)) 45 | 46 | f.write("};") -------------------------------------------------------------------------------- /addons/paraview_plugin/source/vtk_iga_grid.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | (f, inst) = (data.file_output, data.inst) 27 | 28 | 29 | domains = set() 30 | 31 | for x in inst.sub_mapping_dims: 32 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 33 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 34 | domains.add(domain) 35 | 36 | for x in inst.mapping_dims: 37 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 38 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 39 | domains.add(domain) 40 | 41 | f.write("namespace paraview_plugin {\n") 42 | 43 | for domain in domains: 44 | f.write('template class VtkIgaGrid<%s>;\n' %(domain)) 45 | 46 | f.write("};") -------------------------------------------------------------------------------- /addons/paraview_plugin/source/vtk_iga_knot_grid.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | (f, inst) = (data.file_output, data.inst) 27 | 28 | 29 | domains = set() 30 | 31 | for x in inst.sub_mapping_dims: 32 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 33 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 34 | domains.add(domain) 35 | 36 | for x in inst.mapping_dims: 37 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 38 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 39 | domains.add(domain) 40 | 41 | f.write("namespace paraview_plugin {\n") 42 | 43 | for domain in domains: 44 | f.write('template class VtkIgaKnotGrid<%s>;\n' %(domain)) 45 | 46 | f.write("};") -------------------------------------------------------------------------------- /addons/paraview_plugin/source/vtk_iga_solid_grid.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | (f, inst) = (data.file_output, data.inst) 27 | 28 | 29 | domains = set() 30 | 31 | for x in inst.sub_mapping_dims: 32 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 33 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 34 | domains.add(domain) 35 | 36 | for x in inst.mapping_dims: 37 | if x.dim > 0 and x.dim < 4 and (x.dim + x.codim) > 0 and (x.dim + x.codim) < 4: 38 | domain = 'Domain<%d,%d>' %(x.dim, x.codim) 39 | domains.add(domain) 40 | 41 | f.write("namespace paraview_plugin {\n") 42 | 43 | for domain in domains: 44 | f.write('template class VtkIgaSolidGrid<%s>;\n' %(domain)) 45 | 46 | f.write("};") -------------------------------------------------------------------------------- /authors.txt: -------------------------------------------------------------------------------- 1 | igatools authors 2 | 3 | igatools is administered by a group of developers. 4 | The leading developers are in charge of being the guardian 5 | of the overall design principles decided for the project in 6 | the developers strategic meetings. All developers have 7 | provided substantial and continuous contribution to the library and 8 | hold a global overview of the library. Contributors have provided 9 | important patches over the years. 10 | 11 | Leading developers 12 | 13 | Massimiliano Martinelli 14 | Sebastian Pauletti 15 | 16 | Developers 17 | 18 | Pablo Antolin 19 | 20 | Contributors 21 | 22 | Rafael Vazques 23 | Nicola Cavallini 24 | 25 | 26 | -------------------------------------------------------------------------------- /cmake/config/igatoolsConfigVersion.cmake.in: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # This file allows client projects to determine the version of igatools 22 | # and automatically determine whether the detected version is suitable 23 | # if the client-project requested a minimum (or even exact) version. 24 | 25 | set(PACKAGE_VERSION "@IGATOOLS_VERSION@") 26 | 27 | # Check whether the requested PACKAGE_FIND_VERSION is compatible 28 | if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") 29 | set(PACKAGE_VERSION_COMPATIBLE FALSE) 30 | else() 31 | set(PACKAGE_VERSION_COMPATIBLE TRUE) 32 | if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}") 33 | set(PACKAGE_VERSION_EXACT TRUE) 34 | endif() 35 | endif() 36 | -------------------------------------------------------------------------------- /cmake/instantiation_scripts/create_basis_table.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 | # Creates a file with a table of the spaces that the library 22 | # is suppossed to be compiled for. 23 | # 24 | macro(create_basis_table) 25 | message(STATUS "Generating physical basis table.") 26 | execute_process(COMMAND 27 | ${PYTHON_EXECUTABLE} 28 | -B ${PROJECT_SOURCE_DIR}/cmake/instantiation_scripts/generate_inst_table.py 29 | dim_ref=${dim} 30 | range_ref=${range} 31 | rank_ref=${rank} 32 | WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} 33 | RESULT_VARIABLE res) 34 | endmacro(create_basis_table) 35 | -------------------------------------------------------------------------------- /cmake/macros/MacroOutOfBuildInstall.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # Ensures that we do an out of build install 22 | 23 | macro( MACRO_ENSURE_OUT_OF_BUILD_INSTALL ) 24 | string( COMPARE EQUAL "${CMAKE_BINARY_DIR}" "${CMAKE_INSTALL_PREFIX}" inbuild ) 25 | if( inbuild ) 26 | MESSAGE(FATAL_ERROR "The install has to be different from the build directory" ) 27 | endif( inbuild ) 28 | endmacro(MACRO_ENSURE_OUT_OF_BUILD_INSTALL) 29 | 30 | -------------------------------------------------------------------------------- /cmake/macros/MacroOutOfSourceBuild.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # Ensures that we do an out of source build 22 | macro( MACRO_ENSURE_OUT_OF_SOURCE_BUILD ) 23 | string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${CMAKE_BINARY_DIR}" insource ) 24 | get_filename_component( PARENTDIR ${CMAKE_SOURCE_DIR} PATH ) 25 | string( COMPARE EQUAL "${CMAKE_SOURCE_DIR}" "${PARENTDIR}" insourcesubdir ) 26 | if( insource OR insourcesubdir ) 27 | MESSAGE("The build has to be different from the source directory" ) 28 | message(FATAL_ERROR "you will have to run something like:" 29 | "\n rm -rf CMakeFiles and rm CMakeCache.txt") 30 | endif( insource OR insourcesubdir ) 31 | endmacro(MACRO_ENSURE_OUT_OF_SOURCE_BUILD) 32 | 33 | -------------------------------------------------------------------------------- /cmake/macros/find_boost.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 22 | # Find Boost library (Required) 23 | #------------------------------------------------------------------------------- 24 | macro(find_boost) 25 | 26 | if (USE_CGAL) 27 | 28 | find_package(Boost 1.54.0 REQUIRED COMPONENTS system thread) 29 | 30 | include_directories(${Boost_INCLUDE_DIRS}) 31 | 32 | set(Boost_LIBRARIES "${Boost_SYSTEM_LIBRARIES};${Boost_THREAD_LIBRARIES}") 33 | message("-- Boost_LIBRARIES = ${Boost_LIBRARIES}") 34 | 35 | else (USE_CGAL) 36 | 37 | find_package(Boost 1.54.0 REQUIRED) 38 | 39 | include_directories(${Boost_INCLUDE_DIRS}) 40 | # set(Boost_LIBRARIES "${Boost_SERIALIZATION_LIBRARIES}") 41 | 42 | endif (USE_CGAL) 43 | 44 | endmacro(find_boost) 45 | -------------------------------------------------------------------------------- /cmake/macros/find_cblas.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 | # Find CBLAS library (Required) 22 | #------------------------------------------------------------------------------- 23 | macro(find_cblas) 24 | set(CBLAS_SEARCH_PATHS /usr/lib) 25 | find_library(CBLAS_LIBRARY NAMES cblas PATHS ${CBLAS_SEARCH_PATHS}) 26 | 27 | if (CBLAS_LIBRARY) 28 | set(CBLAS_FOUND ON) 29 | set(CBLAS_LIBRARY_DIR ${CBLAS_SEARCH_PATHS}) 30 | endif (CBLAS_LIBRARY) 31 | 32 | if (CBLAS_FOUND) 33 | message(STATUS "Found CBLAS in ${CBLAS_LIBRARY}") 34 | else (CBLAS_FOUND) 35 | message(FATAL_ERROR "Could not find CBLAS libraries.") 36 | endif (CBLAS_FOUND) 37 | 38 | # mark_as_advanced(CBLAS_LIBRARY) 39 | endmacro(find_cblas) 40 | -------------------------------------------------------------------------------- /cmake/macros/find_cgal.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 | # Find CGAL library (Optional) 22 | #------------------------------------------------------------------------------- 23 | macro(find_cgal) 24 | set(CGAL_PREFIX $ENV{CGAL_DIR} CACHE LOCATION "Location where CGAL library is installed") 25 | 26 | # find_package(CGAL REQUIRED PATHS ${CGAL_PREFIX}) 27 | find_package(CGAL REQUIRED COMPENENTS Core) 28 | 29 | message(STATUS "Found CGAL: version ${CGAL_VERSION}.") 30 | 31 | set(CGAL_LIBRARIES "${CGAL_LIBRARY};${CGAL_Core_LIBRARY};${GMP_LIBRARIES};${MPFR_LIBRARIES}") 32 | 33 | message("-- CGAL_LIBRARIES = ${CGAL_LIBRARIES}") 34 | 35 | # add the location of CGAL headers to the include directories 36 | include_directories(${CGAL_INCLUDE_DIRS}) 37 | 38 | endmacro(find_cgal) 39 | -------------------------------------------------------------------------------- /cmake/macros/find_doxygen.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | macro(find_doxygen) 21 | find_package(Doxygen 1.8.1 REQUIRED) 22 | endmacro(find_doxygen) 23 | -------------------------------------------------------------------------------- /cmake/macros/find_petsc.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 | # Find PETSc library (Optional) 22 | #------------------------------------------------------------------------------- 23 | macro(find_petsc) 24 | set(Petsc_INCLUDE_DIRS $ENV{PETSC_INCLUDE_DIRS} CACHE LOCATION 25 | "Location where PETSc headers are installed") 26 | 27 | set(Petsc_LIBRARY_DIRS $ENV{PETSC_LIBRARY_DIRS} CACHE LOCATION 28 | "Location where PETSc libraries are installed") 29 | 30 | include_directories(${Petsc_INCLUDE_DIRS} ${Petsc_INCLUDE_DIRS}/$ENV{PETSC_ARCH}/include $ENV{PETSC_DIR}/$ENV{PETSC_ARCH}/include) 31 | link_directories(${Petsc_LIBRARY_DIRS}) 32 | 33 | set(Petsc_LIBRARIES libpetsc.so) 34 | 35 | message("-- Found PETSc library in ${Petsc_LIBRARY_DIRS}") 36 | endmacro(find_petsc) 37 | -------------------------------------------------------------------------------- /cmake/macros/find_python.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 | # Find Phython library (Required) 22 | #------------------------------------------------------------------------------- 23 | macro(find_python) 24 | include(FindPythonInterp) 25 | find_package(PythonInterp REQUIRED) 26 | endmacro(find_python) 27 | -------------------------------------------------------------------------------- /cmake/macros/find_sed.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | #+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 21 | # Find sed (Required) 22 | #------------------------------------------------------------------------------- 23 | macro(find_sed) 24 | find_program(SED_EXECUTABLE sed) 25 | message(STATUS "Found sed: ${SED_EXECUTABLE}.") 26 | endmacro(find_sed) 27 | -------------------------------------------------------------------------------- /doc/bibliography.bib: -------------------------------------------------------------------------------- 1 | @Article{ PMCA2014, 2 | author = {Pauletti, M. S. and Martinelli, M. 3 | and Cavallini, N. and Antolin, P.}, 4 | title = {igatools: An isogeometric analisys library}, 5 | journal = {IMATI Preprint series}, 6 | year = {2014} 7 | } -------------------------------------------------------------------------------- /doc/html_extra_style.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | -------------------------------------------------------------------------------- /doc/iga-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/doc/iga-logo.png -------------------------------------------------------------------------------- /include/igatools/base/array_utils.h: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #ifndef __IGA_ARRAY_UTILS_H_ 22 | #define __IGA_ARRAY_UTILS_H_ 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | #include 29 | #include 30 | #include 31 | 32 | IGA_NAMESPACE_OPEN 33 | 34 | 35 | 36 | /** 37 | * Returns an array filled with the sequence of N integers numbers 38 | * from init to init+N-1. 39 | */ 40 | template 41 | constexpr 42 | auto 43 | sequence(const int init = 0) 44 | -> SafeSTLArray 45 | { 46 | SafeSTLArray seq; 47 | std::iota(seq.begin(),seq.end(),init); 48 | return seq; 49 | } 50 | 51 | 52 | IGA_NAMESPACE_CLOSE 53 | 54 | #endif 55 | -------------------------------------------------------------------------------- /include/igatools/base/print_info_utils.h: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #ifndef __PRINT_INFO_UTILS_H_ 22 | #define __PRINT_INFO_UTILS_H_ 23 | 24 | #include 25 | #include 26 | #include 27 | 28 | IGA_NAMESPACE_OPEN 29 | #if 0 30 | /** 31 | * Type traits to determine if a class provides 32 | * a print_info function 33 | */ 34 | template 35 | using print_info_type = 36 | decltype(std::declval().print_info(std::declval())); 37 | 38 | 39 | template 40 | constexpr 41 | EnableIf>::value, bool > 42 | has_print_info(int) 43 | { 44 | return true; 45 | } 46 | 47 | template 48 | constexpr bool 49 | has_print_info(long) 50 | { 51 | return false; 52 | } 53 | #endif 54 | 55 | 56 | 57 | 58 | IGA_NAMESPACE_CLOSE 59 | 60 | #endif 61 | -------------------------------------------------------------------------------- /include/igatools/base/properties.h: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #ifndef __PROPERTIES_H_ 22 | #define __PROPERTIES_H_ 23 | 24 | #include 25 | #include 26 | 27 | IGA_NAMESPACE_OPEN 28 | 29 | using PropId = std::string; 30 | 31 | struct ElementProperties 32 | { 33 | static const PropId active; 34 | }; 35 | 36 | 37 | struct DofProperties 38 | { 39 | static const PropId active; 40 | }; 41 | 42 | IGA_NAMESPACE_CLOSE 43 | 44 | #endif // #ifndef PROPERTIES_H_ 45 | -------------------------------------------------------------------------------- /include/igatools/contrib/cereal/include/cereal/external/rapidjson/internal/strfunc.h: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | #ifndef RAPIDJSON_INTERNAL_STRFUNC_H_ 21 | #define RAPIDJSON_INTERNAL_STRFUNC_H_ 22 | 23 | namespace rapidjson 24 | { 25 | namespace internal 26 | { 27 | 28 | //! Custom strlen() which works on different character types. 29 | /*! \tparam Ch Character type (e.g. char, wchar_t, short) 30 | \param s Null-terminated input string. 31 | \return Number of characters in the string. 32 | \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints. 33 | */ 34 | template 35 | inline SizeType StrLen(const Ch *s) 36 | { 37 | const Ch *p = s; 38 | while (*p != '\0') 39 | ++p; 40 | return SizeType(p - s); 41 | } 42 | 43 | } // namespace internal 44 | } // namespace rapidjson 45 | 46 | #endif // RAPIDJSON_INTERNAL_STRFUNC_H_ 47 | -------------------------------------------------------------------------------- /include/igatools/contrib/cereal/include/cereal/external/rapidjson/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (C) 2011 Milo Yip 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /include/igatools/utils/tensor_product_array-inline.h: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | 22 | #ifndef TENSOR_PRODUCT_ARRAY_INLINE_H_ 23 | #define TENSOR_PRODUCT_ARRAY_INLINE_H_ 24 | 25 | 26 | #include 27 | 28 | IGA_NAMESPACE_OPEN 29 | 30 | 31 | 32 | 33 | 34 | IGA_NAMESPACE_CLOSE 35 | #endif /* TENSOR_PRODUCT_ARRAY_INLINE_H_ */ 36 | -------------------------------------------------------------------------------- /readme.txt: -------------------------------------------------------------------------------- 1 | For installing and getting started with igatools go to: 2 | 3 | https://github.com/igatoolsProject/igatools/wiki -------------------------------------------------------------------------------- /source/base/instantiated_types.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | -------------------------------------------------------------------------------- /source/base/properties.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | 23 | IGA_NAMESPACE_OPEN 24 | 25 | const PropId ElementProperties::active = "active"; 26 | const PropId DofProperties::active = "active"; 27 | 28 | IGA_NAMESPACE_CLOSE 29 | -------------------------------------------------------------------------------- /source/base/quadrature_lib.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | ############################################################################### 21 | 22 | # QA (pauletti, Mar 19, 2014): 23 | from init_instantiation_data import * 24 | data = Instantiation() 25 | f = data.file_output 26 | inst = data.inst 27 | 28 | 29 | quad_types = ['QGauss','QGaussLobatto','QUniform','QTrapez'] 30 | 31 | quad_classes = [] 32 | 33 | for dim in inst.all_domain_dims: 34 | for quad_type in quad_types: 35 | quad = '%s<%d>' % (quad_type,dim) 36 | quad_classes.append(quad) 37 | 38 | for quad in unique(quad_classes): 39 | f.write('template class %s;\n' % (quad)) 40 | 41 | 42 | #f.write('IGA_NAMESPACE_CLOSE\n') 43 | # 44 | #for quad in unique(quad_classes): 45 | # f.write('extern template class std::shared_ptr;\n' % (quad)) 46 | # 47 | #f.write('IGA_NAMESPACE_OPEN\n') 48 | 49 | -------------------------------------------------------------------------------- /source/base/tensor.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | #include 23 | 24 | #ifndef NDEBUG 25 | #include 26 | #endif 27 | -------------------------------------------------------------------------------- /source/base/tensor.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # todo: this class is inline for completeness many things would need to be inst 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | (f, inst) = (data.file_output, data.inst) 25 | 26 | for row in inst.derivatives + inst.values: 27 | f.write('template class %s ;\n' %row) 28 | f.write('template EnableIf<%s::is_tensor,%s> operator+ < %s > (const %s &A, const %s &B) noexcept ;\n' 29 | % (row, row, row, row, row)) 30 | f.write('template EnableIf<%s::is_tensor,%s> operator- < %s > (const %s &A, const %s &B) noexcept ;\n' 31 | % (row, row, row, row, row)) 32 | -------------------------------------------------------------------------------- /source/basis_functions/basis_tools.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | -------------------------------------------------------------------------------- /source/basis_functions/basis_tools.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | 22 | from init_instantiation_data import * 23 | 24 | data = Instantiation() 25 | (f, inst) = (data.file_output, data.inst) 26 | -------------------------------------------------------------------------------- /source/basis_functions/bspline_element_scalar_evaluator.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # QA (martinelli, Mar 29, 2014): 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | (f, inst) = (data.file_output, data.inst) 25 | 26 | # list=['BSplineElementScalarEvaluator<%d>' %dim for dim in inst.domain_dims] 27 | # for row in list: 28 | # f.write('template class %s; \n' %row) 29 | -------------------------------------------------------------------------------- /source/basis_functions/nurbs_element.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | data = Instantiation(include_files) 25 | (f, inst) = (data.file_output, data.inst) 26 | 27 | 28 | 29 | 30 | elements = ['NURBSElement<0,0,1>'] 31 | 32 | for x in inst.sub_ref_sp_dims + inst.ref_sp_dims: 33 | elem = 'NURBSElement<%d,%d,%d>' %(x.dim, x.range, x.rank) 34 | elements.append(elem) 35 | 36 | 37 | 38 | for elem in unique(elements): 39 | f.write('template class %s; \n' %elem) 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /source/basis_functions/reference_basis_handler.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | (f, inst) = (data.file_output, data.inst) 27 | 28 | 29 | handlers = ['ReferenceBasisHandler<0,0,1>'] 30 | handler_funcs = set() 31 | 32 | 33 | for x in inst.sub_ref_sp_dims + inst.ref_sp_dims: 34 | handler = 'ReferenceBasisHandler<%d,%d,%d>' %(x.dim, x.range, x.rank) 35 | handlers.append(handler) 36 | # for k in range(0,x.dim+1): 37 | # func = 'int %s::get_num_points<%d>() const;' % (handler,k) 38 | # handler_funcs.add(func) 39 | 40 | 41 | 42 | 43 | for handler in unique(handlers): 44 | f.write('template class %s;\n' %handler) 45 | 46 | for func in handler_funcs: 47 | f.write('template %s;\n' %func) 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /source/functions/formula_function.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | 22 | #include 23 | #include 24 | 25 | IGA_NAMESPACE_OPEN 26 | 27 | template 28 | FormulaFunction:: 29 | FormulaFunction(const SharedPtrConstnessHandler &domain) 30 | : 31 | parent_t(domain) 32 | {} 33 | 34 | 35 | 36 | template 37 | auto 38 | FormulaFunction:: 39 | create_cache_handler() const 40 | -> std::unique_ptr 41 | { 42 | return std::unique_ptr(new Handler( 43 | std::dynamic_pointer_cast(this->shared_from_this()))); 44 | } 45 | 46 | IGA_NAMESPACE_CLOSE 47 | 48 | #include 49 | 50 | -------------------------------------------------------------------------------- /source/functions/formula_function.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | 27 | (f, inst) = (data.file_output, data.inst) 28 | 29 | for row in inst.all_function_dims: 30 | func = 'FormulaFunction<%d,%d,%d,%d>' %(row.dim, row.codim, row.range, row.rank) 31 | f.write('template class %s ;\n' %(func)) 32 | 33 | -------------------------------------------------------------------------------- /source/functions/formula_function_handler.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | 27 | (f, inst) = (data.file_output, data.inst) 28 | 29 | functions = [] 30 | 31 | for row in inst.all_function_dims: 32 | dims = '<%d, %d, %d, %d>' %(row.dim, row.codim, row.range, row.rank) 33 | func = 'FormulaFunctionHandler%s' %(dims) 34 | functions.append(func) 35 | f.write('template class %s ;\n' %(func)) 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /source/functions/formula_grid_function.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | #include 23 | 24 | IGA_NAMESPACE_OPEN 25 | 26 | template 27 | FormulaGridFunction:: 28 | FormulaGridFunction(const SharedPtrConstnessHandler &grid) 29 | : 30 | parent_t::GridFunction(grid) 31 | {} 32 | 33 | 34 | 35 | template 36 | auto 37 | FormulaGridFunction:: 38 | create_cache_handler() const 39 | -> std::unique_ptr 40 | { 41 | return std::unique_ptr(new Handler( 42 | std::dynamic_pointer_cast(this->shared_from_this()))); 43 | } 44 | 45 | 46 | 47 | 48 | 49 | IGA_NAMESPACE_CLOSE 50 | 51 | #include 52 | 53 | -------------------------------------------------------------------------------- /source/functions/formula_grid_function.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | (f, inst) = (data.file_output, data.inst) 27 | 28 | mappings = [] 29 | 30 | for x in inst.sub_mapping_dims + inst.mapping_dims: 31 | mapping = 'FormulaGridFunction<%d,%d>' %(x.dim,x.space_dim) 32 | mappings.append(mapping) 33 | mapping = 'FormulaGridFunction<%d,1>' %(x.dim) 34 | mappings.append(mapping) 35 | 36 | 37 | 38 | 39 | for map in unique(mappings): 40 | f.write('template class %s ;\n' %(map)) 41 | 42 | -------------------------------------------------------------------------------- /source/functions/function.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | 27 | (f, inst) = (data.file_output, data.inst) 28 | 29 | funcs = set() 30 | 31 | for row in inst.all_function_dims: 32 | dims = '<%d,%d,%d,%d>' %(row.dim, row.codim, row.range, row.rank) 33 | func = 'Function%s' %(dims) 34 | funcs.add(func) 35 | f.write('template class %s ;\n' %(func)) 36 | 37 | 38 | 39 | #--------------------------------------------------- 40 | f.write('#ifdef IGATOOLS_WITH_SERIALIZATION\n') 41 | archives = ['OArchive','IArchive'] 42 | 43 | for func in funcs: 44 | for ar in archives: 45 | f.write('template void %s::serialize(%s&);\n' %(func,ar)) 46 | f.write('#endif // IGATOOLS_WITH_SERIALIZATION\n') 47 | #--------------------------------------------------- -------------------------------------------------------------------------------- /source/functions/function_handler.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | 27 | (f, inst) = (data.file_output, data.inst) 28 | 29 | functions = [] 30 | 31 | for row in inst.all_function_dims: 32 | dims = '<%d, %d, %d, %d>' %(row.dim, row.codim, row.range, row.rank) 33 | func = 'FunctionHandler%s' %(dims) 34 | functions.append(func) 35 | f.write('template class %s ;\n' %(func)) 36 | 37 | 38 | 39 | #--------------------------------------------------- 40 | #f.write('IGA_NAMESPACE_CLOSE\n') 41 | 42 | 43 | #f.write('IGA_NAMESPACE_OPEN\n') 44 | #--------------------------------------------------- 45 | -------------------------------------------------------------------------------- /source/functions/sub_grid_function.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | 25 | data = Instantiation(include_files) 26 | (f, inst) = (data.file_output, data.inst) 27 | 28 | 29 | classes = set() 30 | 31 | 32 | for x in inst.sub_mapping_dims + inst.mapping_dims: 33 | for sdim in range(0,x.dim): 34 | cl = 'SubGridFunction<%d,%d,%d>' %(sdim,x.dim,x.space_dim) 35 | classes.add(cl) 36 | 37 | #for x in inst.mapping_dims: 38 | # for sdim in range(0,x.dim): 39 | # cl = 'SubGridFunction<%d,%d,%d>' %(sdim,x.dim,x.space_dim) 40 | # classes.append(cl) 41 | 42 | #the next classes are needed by NURBS 43 | cl = 'SubGridFunction<%d,%d,1>' %(sdim,x.dim) 44 | classes.add(cl) 45 | 46 | 47 | 48 | 49 | for cl in classes: 50 | f.write('template class %s;\n' %(cl)) 51 | 52 | -------------------------------------------------------------------------------- /source/geometry/bbox.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # QA (pauletti, Mar 19, 2014): 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | f = data.file_output 25 | inst = data.inst 26 | 27 | for dim in inst.all_domain_dims: 28 | f.write('template class BBox<%d> ;\n' % (dim)) 29 | 30 | -------------------------------------------------------------------------------- /source/geometry/domain_lib.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | data = Instantiation() 23 | (f, inst) = (data.file_output, data.inst) 24 | 25 | output = set () 26 | 27 | for dim in inst.domain_dims: 28 | output.add ('template class domains::BallDomain<%d>;\n' % (dim) ) 29 | 30 | for s in output: 31 | f.write(s) 32 | 33 | 34 | #s = ('template class functions::SphereFunction<%d>;\n' %1 ) 35 | #f.write(s) 36 | #s = ('template class functions::SphereFunction<%d>;\n' %2 ) 37 | #f.write(s) 38 | 39 | #s = ('template class functions::CylindricalAnnulus<%d>;\n' %3) 40 | #f.write(s) 41 | 42 | -------------------------------------------------------------------------------- /source/geometry/push_forward.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #if 0 22 | #include 23 | #include 24 | #endif 25 | -------------------------------------------------------------------------------- /source/geometry/push_forward.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | include_files = [] 24 | data = Instantiation(include_files) 25 | (f, inst) = (data.file_output, data.inst) 26 | 27 | 28 | push_forwards = [] 29 | 30 | for x in inst.sub_mapping_dims: 31 | dims = '' %(x.dim, x.codim) 32 | pf = 'PushForward%s' % (dims) 33 | push_forwards.append(pf) 34 | 35 | for x in inst.mapping_dims: 36 | dims = '' %(x.dim, x.codim) 37 | pf = 'PushForward%s' % (dims) 38 | push_forwards.append(pf) 39 | 40 | 41 | for pf in unique(push_forwards): 42 | f.write('template class %s ;\n' %(pf)) 43 | -------------------------------------------------------------------------------- /source/geometry/unit_element.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # QA (pauletti, Mar 19, 2014): 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | f = data.file_output 25 | inst = data.inst 26 | 27 | for dim in inst.all_domain_dims: 28 | f.write('template struct UnitElement<%d> ;\n' % (dim)) 29 | 30 | -------------------------------------------------------------------------------- /source/io/writer.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | include_files = [] 23 | 24 | data = Instantiation(include_files) 25 | (f, inst) = (data.file_output, data.inst) 26 | 27 | strings = [] 28 | 29 | writer_real_types = ['double'] 30 | 31 | for x in inst.mapping_dims: 32 | for writer_real_t in writer_real_types: 33 | writer = 'Writer<%d, %d, %s>' %(x.dim, x.codim, writer_real_t) 34 | strings.append('template class %s ;\n' % (writer)) 35 | 36 | for s in unique(strings): # Removing repeated entries. 37 | f.write(s) 38 | 39 | -------------------------------------------------------------------------------- /source/linear_algebra/dense_vector.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | #include 23 | 24 | IGA_NAMESPACE_OPEN 25 | 26 | 27 | DenseVector & 28 | DenseVector:: 29 | operator=(const Real value) 30 | { 31 | using zero_vector = boost::numeric::ublas::zero_vector; 32 | Assert(value==0, ExcNonZero(value)); 33 | *this = zero_vector(this->size()); 34 | return *this; 35 | } 36 | 37 | int 38 | DenseVector:: 39 | size() const 40 | { 41 | return int(boost::numeric::ublas::vector::size()); 42 | } 43 | 44 | IGA_NAMESPACE_CLOSE 45 | 46 | -------------------------------------------------------------------------------- /source/linear_algebra/dof_tools.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | data = Instantiation() 23 | (f, inst) = (data.file_output, data.inst) 24 | # delete this file 25 | -------------------------------------------------------------------------------- /source/linear_algebra/epetra_map.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | 23 | IGA_NAMESPACE_OPEN 24 | 25 | #ifdef IGATOOLS_USES_TRILINOS 26 | 27 | namespace EpetraTools 28 | { 29 | 30 | MapPtr 31 | create_map(const std::set &dofs, 32 | const Comm &comm) 33 | { 34 | SafeSTLVector dofs_vec(dofs.begin(), dofs.end()); 35 | return std::make_shared(-1, dofs_vec.size(), dofs_vec.data(), 0, comm); 36 | } 37 | 38 | } 39 | 40 | #endif //IGATOOLS_USES_TRILINOS 41 | 42 | IGA_NAMESPACE_CLOSE 43 | -------------------------------------------------------------------------------- /source/utils/safe_stl_array.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | 22 | #include 23 | 24 | 25 | IGA_NAMESPACE_OPEN 26 | 27 | #if 0 28 | template 29 | T & 30 | SafeSTLArray:: 31 | operator[](Size n) 32 | { 33 | Assert(n < this->size(), ExcIndexRange(n, 0, this->size())); 34 | return std::array::operator[](n); 35 | } 36 | 37 | template 38 | const T & 39 | SafeSTLArray:: 40 | operator[](Size n) const 41 | { 42 | Assert(n < this->size(), ExcIndexRange(n, 0, this->size())); 43 | return std::array::operator[](n); 44 | } 45 | #endif 46 | 47 | IGA_NAMESPACE_CLOSE 48 | 49 | #include 50 | -------------------------------------------------------------------------------- /source/utils/safe_stl_map.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | 22 | #include 23 | 24 | 25 | IGA_NAMESPACE_OPEN 26 | 27 | 28 | 29 | IGA_NAMESPACE_CLOSE 30 | 31 | #include 32 | -------------------------------------------------------------------------------- /source/utils/safe_stl_map.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | include_files = [] 23 | data = Instantiation(include_files) 24 | f = data.file_output 25 | inst = data.inst 26 | 27 | 28 | #for deriv in inst.derivatives + inst.values + inst.divs: 29 | # value_vectors.append('ValueVector<%s>' % (deriv)) 30 | 31 | #for row in set (value_vectors): 32 | # f.write('template class %s; \n' % (row)) 33 | # f.write("template %s operator*(const Real, const %s &) ;\n" % (row,row)) 34 | # f.write("template %s operator*(const %s &, const Real) ;\n" % (row,row)) 35 | 36 | #for row in set (normals + curvatures): 37 | # f.write('template class ValueVector<%s>; \n' % (row)) 38 | -------------------------------------------------------------------------------- /source/utils/safe_stl_set.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | 22 | #include 23 | 24 | 25 | IGA_NAMESPACE_OPEN 26 | 27 | 28 | 29 | IGA_NAMESPACE_CLOSE 30 | 31 | #include 32 | -------------------------------------------------------------------------------- /source/utils/safe_stl_set.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | include_files = [] 23 | data = Instantiation(include_files) 24 | f = data.file_output 25 | inst = data.inst 26 | 27 | 28 | #for deriv in inst.derivatives + inst.values + inst.divs: 29 | # value_vectors.append('ValueVector<%s>' % (deriv)) 30 | 31 | #for row in set (value_vectors): 32 | # f.write('template class %s; \n' % (row)) 33 | # f.write("template %s operator*(const Real, const %s &) ;\n" % (row,row)) 34 | # f.write("template %s operator*(const %s &, const Real) ;\n" % (row,row)) 35 | 36 | #for row in set (normals + curvatures): 37 | # f.write('template class ValueVector<%s>; \n' % (row)) 38 | -------------------------------------------------------------------------------- /source/utils/safe_stl_vector.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | #include 23 | 24 | IGA_NAMESPACE_OPEN 25 | 26 | 27 | template 28 | T & 29 | SafeSTLVector:: 30 | operator[](Size n) 31 | { 32 | Assert(n < this->size(), ExcIndexRange(n, 0, this->size())); 33 | return std::vector::operator[](n); 34 | } 35 | 36 | template 37 | const T & 38 | SafeSTLVector:: 39 | operator[](Size n) const 40 | { 41 | Assert(n < this->size(), ExcIndexRange(n, 0, this->size())); 42 | return std::vector::operator[](n); 43 | } 44 | 45 | 46 | IGA_NAMESPACE_CLOSE 47 | 48 | #include 49 | -------------------------------------------------------------------------------- /source/utils/tensor_index.serial.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | data = Instantiation() 24 | (f, inst) = (data.file_output, data.inst) 25 | 26 | 27 | #--------------------------------------------------- 28 | f.write('IGA_NAMESPACE_CLOSE\n') 29 | 30 | archives = ['OArchive','IArchive'] 31 | 32 | id = 0 33 | for dim in unique(inst.all_domain_dims): 34 | alias = 'TensorIndexAlias%d' %(id) 35 | f.write('using %s = iga::TensorIndex<%d>;\n' % (alias,dim)) 36 | for ar in archives: 37 | f.write('CEREAL_SPECIALIZE_FOR_ARCHIVE(%s,%s,cereal::specialization::member_serialize)\n' % (ar,alias)); 38 | 39 | id += 1 40 | # 41 | f.write('IGA_NAMESPACE_OPEN\n') 42 | #--------------------------------------------------- 43 | -------------------------------------------------------------------------------- /source/utils/tensor_product_array.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # QA (pauletti, Mar 19, 2014): 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | f = data.file_output 25 | inst = data.inst 26 | 27 | for dim in inst.all_domain_dims: 28 | f.write('template class TensorProductArray<%d> ;\n' %dim) 29 | 30 | -------------------------------------------------------------------------------- /source/utils/tensor_range.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | #include 22 | 23 | IGA_NAMESPACE_OPEN 24 | 25 | template<> 26 | SafeSTLSet > 27 | el_tensor_range(TensorIndex<1> first, TensorIndex<1> last) 28 | { 29 | Assert(first <= last, ExcMessage("first bigger than last")); 30 | SafeSTLSet> result; 31 | for (int i=first[0]; i el {i}; 34 | result.insert(el); 35 | } 36 | 37 | return result; 38 | } 39 | 40 | 41 | 42 | template<> 43 | SafeSTLSet > 44 | el_tensor_range(TensorIndex<0> first, TensorIndex<0> last) 45 | { 46 | SafeSTLSet> result; 47 | return result; 48 | } 49 | 50 | IGA_NAMESPACE_CLOSE 51 | -------------------------------------------------------------------------------- /source/utils/tensor_size.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # QA (pauletti, Mar 19, 2014): 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | (f, inst) = (data.file_output, data.inst) 25 | 26 | ts_list=['TensorSize<%d>' %dim for dim in inst.all_domain_dims] 27 | for row in ts_list: 28 | f.write('template class %s; \n' %row) 29 | f.write('template LogStream & operator<<(LogStream &,const %s &); \n' %(row) ) 30 | f.write('template %s operator-(const %s &, const Index); \n' % (row,row)) 31 | -------------------------------------------------------------------------------- /source/utils/tensor_size.serial.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | from init_instantiation_data import * 22 | 23 | data = Instantiation() 24 | (f, inst) = (data.file_output, data.inst) 25 | 26 | 27 | #--------------------------------------------------- 28 | f.write('IGA_NAMESPACE_CLOSE\n') 29 | 30 | archives = ['OArchive','IArchive'] 31 | 32 | id = 0 33 | for dim in unique(inst.all_domain_dims): 34 | alias = 'TensorSizeAlias%d' %(id) 35 | f.write('using %s = iga::TensorSize<%d>;\n' % (alias,dim)) 36 | for ar in archives: 37 | f.write('CEREAL_SPECIALIZE_FOR_ARCHIVE(%s,%s,cereal::specialization::member_serialize)\n' % (ar,alias)); 38 | 39 | id += 1 40 | # 41 | f.write('IGA_NAMESPACE_OPEN\n') 42 | #--------------------------------------------------- 43 | -------------------------------------------------------------------------------- /source/utils/tensor_sized_container.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # QA (pauletti, Mar 19, 2014): 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | (f, inst) = (data.file_output, data.inst) 25 | 26 | ts_list=['TensorSizedContainer<%d>' %dim for dim in inst.all_domain_dims] 27 | for row in ts_list: 28 | f.write('template class %s; \n' % (row)) 29 | 30 | 31 | 32 | #--------------------------------------------------- 33 | f.write('#ifdef IGATOOLS_WITH_SERIALIZATION\n') 34 | 35 | archives = ['OArchive','IArchive'] 36 | 37 | for ts in unique(ts_list): 38 | for ar in archives: 39 | f.write('template void %s::serialize(%s&);\n' %(ts,ar)) 40 | 41 | f.write('#endif // IGATOOLS_WITH_SERIALIZATION\n') 42 | #--------------------------------------------------- 43 | -------------------------------------------------------------------------------- /source/utils/unique_id_generator.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | 22 | // QualityAssurance: martinelli, 04 Sep 2014 23 | 24 | #include 25 | #include 26 | 27 | #include 28 | 29 | 30 | IGA_NAMESPACE_OPEN 31 | 32 | 33 | Index 34 | UniqueIdGenerator:: 35 | get_unique_id() 36 | { 37 | const Index int_max = std::numeric_limits::max(); 38 | Assert(id_ < int_max,ExcIndexRange(id_,0,int_max-1)); 39 | AssertThrow(id_ < int_max,ExcIndexRange(id_,0,int_max-1)); 40 | 41 | Index ret = id_; 42 | id_++; 43 | return ret; 44 | } 45 | 46 | 47 | Index UniqueIdGenerator::id_ = 0; 48 | 49 | IGA_NAMESPACE_CLOSE 50 | 51 | -------------------------------------------------------------------------------- /source/utils/value_table.inst.py: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # QA (pauletti, Mar 19, 2014): 22 | from init_instantiation_data import * 23 | data = Instantiation() 24 | f = data.file_output 25 | inst = data.inst 26 | 27 | value_tables = [ 'ValueTable<%s>' % deriv for deriv in inst.derivatives + inst.values + inst.divs + ['double']] 28 | for row in set (value_tables): 29 | f.write('template class %s; \n' % (row)) 30 | -------------------------------------------------------------------------------- /tests/CTestConfig.cmake: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | ## This file should be placed in the root directory of your project. 21 | ## Then modify the CMakeLists.txt file in the root directory of your 22 | ## project to incorporate the testing dashboard. 23 | ## # The following are required to uses Dart and the Cdash dashboard 24 | ## ENABLE_TESTING() 25 | ## INCLUDE(CTest) 26 | set(CTEST_PROJECT_NAME "igatools") 27 | set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") 28 | 29 | set(CTEST_DROP_METHOD "http") 30 | set(CTEST_DROP_SITE "matley.imati.cnr.it") 31 | set(CTEST_DROP_LOCATION "/cdash/submit.php?project=igatools") 32 | set(CTEST_DROP_SITE_CDASH TRUE) 33 | -------------------------------------------------------------------------------- /tests/base/assert_macro_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /** 22 | * @file 23 | * @brief Test for the exception throw mechanism 24 | * @author pauletti 25 | * @date 2012-11-18 26 | */ 27 | 28 | #include "../tests.h" 29 | #include 30 | 31 | int main() 32 | { 33 | iga_exceptions::suppress_stacktrace_in_exceptions(); 34 | Assert(true, ExcInternalError()); 35 | 36 | try 37 | { 38 | AssertThrow(false, ExcInternalError()); 39 | } 40 | catch (ExceptionBase &e) 41 | { 42 | out << "Exception" << endl; 43 | e.print_info(out.get_file_stream()); 44 | } 45 | 46 | return 0; 47 | } 48 | -------------------------------------------------------------------------------- /tests/base/assert_macro_01/expected.txt: -------------------------------------------------------------------------------- 1 | Exception 2 | This exception -- which is used in many places in the library -- usually indicates that some condition which the author of the code thought must be satisfied at a certain point in an algorithm, is not fulfilled. An example would be that the first part of an algorithm sorts elements of an array in ascending order, and a second part of the algorithm later encounters an an element that is not larger than the previous one. 3 | 4 | There is usually not very much you can do if you encounter such an exception since it indicates an error in igatools, not in your own program. Try to come up with the smallest possible program that still demonstrates the error and contact the igatools mailing lists with it to obtain help. 5 | -------------------------------------------------------------------------------- /tests/base/points_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test for the Points alias 23 | * author: pauletti 24 | * date: Jun 21, 2014 25 | * 26 | */ 27 | 28 | #include "../tests.h" 29 | #include "igatools/base/tensor.h" 30 | 31 | template 32 | void default_constructor() 33 | { 34 | Points p; 35 | out << p << endl; 36 | } 37 | 38 | void init_list() 39 | { 40 | Points<2> p2 = {1., 2.5}; 41 | Points<3> p3({1., 2.5, -4.3}); 42 | Points<3> p3a {1., 2.5, -4.3}; 43 | out << p2 << p3 << p3a << endl; 44 | } 45 | 46 | int main() 47 | { 48 | 49 | default_constructor<0>(); 50 | default_constructor<1>(); 51 | default_constructor<2>(); 52 | default_constructor<3>(); 53 | 54 | init_list(); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /tests/base/points_01/expected.txt: -------------------------------------------------------------------------------- 1 | [ ] 2 | [ 0 ] 3 | [ 0 0 ] 4 | [ 0 0 0 ] 5 | [ 1.00000 2.50000 ] [ 1.00000 2.50000 -4.30000 ] [ 1.00000 2.50000 -4.30000 ] 6 | -------------------------------------------------------------------------------- /tests/base/print_info_utils_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test for 23 | * 24 | * author: pauletti 25 | * date:2014-08-26 26 | */ 27 | 28 | #include "../tests.h" 29 | #include 30 | 31 | 32 | class clA 33 | { 34 | public: 35 | void print_info(LogStream &) {} 36 | }; 37 | 38 | 39 | class clB 40 | {}; 41 | 42 | 43 | template 44 | EnableIf(0), void> 45 | print_info(LogStream &out) 46 | { 47 | } 48 | 49 | template 50 | EnableIf<(!has_print_info(0)), void> 51 | print_info(LogStream &out) 52 | { 53 | } 54 | 55 | int main() 56 | { 57 | out << has_print_info(0) << endl; 58 | out << has_print_info(0) << endl; 59 | print_info(out); 60 | print_info(out); 61 | return 0; 62 | } 63 | -------------------------------------------------------------------------------- /tests/base/print_info_utils_01/expected.txt: -------------------------------------------------------------------------------- 1 | 1 2 | 0 3 | -------------------------------------------------------------------------------- /tests/base/tensor-action_01/expected.txt: -------------------------------------------------------------------------------- 1 | The action of: 2 | [ [ 0 ] ] 3 | on: 4 | [ 0 ] 5 | is: 6 | [ 0 ] 7 | The action of: 8 | [ [ 0 1.00000 ] [ 3.00000 4.00000 ] [ 6.00000 7.00000 ] ] 9 | on: 10 | [ 0 1.00000 2.00000 ] 11 | is: 12 | [ 15.0000 18.0000 ] 13 | The action of: 14 | [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] 15 | on: 16 | [ 0 1.00000 ] 17 | is: 18 | [ 2.00000 3.00000 ] 19 | The action of: 20 | [ [ 0 1.00000 2.00000 ] [ 2.00000 3.00000 4.00000 ] ] 21 | on: 22 | [ 0 1.00000 ] 23 | is: 24 | [ 2.00000 3.00000 4.00000 ] 25 | The action of: 26 | [ [ 0 1.00000 ] [ 3.00000 4.00000 ] [ 6.00000 7.00000 ] ] 27 | on: 28 | [ 0 1.00000 2.00000 ] 29 | is: 30 | [ 15.0000 18.0000 ] 31 | The action of: 32 | [ [ 0 1.00000 2.00000 ] [ 3.00000 4.00000 5.00000 ] [ 6.00000 7.00000 8.00000 ] ] 33 | on: 34 | [ 0 1.00000 2.00000 ] 35 | is: 36 | [ 15.0000 18.0000 21.0000 ] 37 | -------------------------------------------------------------------------------- /tests/base/tensor-action_02/expected.txt: -------------------------------------------------------------------------------- 1 | The action of: 2 | [ [ [ 0 0 ] [ 0 0 ] ] [ [ 0 0 ] [ 0 0 ] ] ] 3 | on: 4 | [ 0 0 ] 5 | is: 6 | [ [ 0 0 ] [ 0 0 ] ] 7 | -------------------------------------------------------------------------------- /tests/base/tensor-arithmetic_01/expected.txt: -------------------------------------------------------------------------------- 1 | Test for tensor arithmetic operators 2 | Testing Derivatives<2,2,1,1> 3 | A = 4 | [ [ 0 0 ] [ 0 0 ] ] 5 | B = 6 | [ [ 0 0 ] [ 0 0 ] ] 7 | alpha = 1.00000 8 | A + B = 9 | [ [ 0 0 ] [ 0 0 ] ] 10 | A - B = 11 | [ [ 0 0 ] [ 0 0 ] ] 12 | alpha * A = 13 | [ [ 0 0 ] [ 0 0 ] ] 14 | A * alpha 15 | [ [ 0 0 ] [ 0 0 ] ] 16 | A / alpha 17 | [ [ 0 0 ] [ 0 0 ] ] 18 | Testing Derivatives<3,3,1,1> 19 | A = 20 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 21 | B = 22 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 23 | alpha = 1.00000 24 | A + B = 25 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 26 | A - B = 27 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 28 | alpha * A = 29 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 30 | A * alpha 31 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 32 | A / alpha 33 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 34 | -------------------------------------------------------------------------------- /tests/base/tensor-co_action_01/expected.txt: -------------------------------------------------------------------------------- 1 | dim: 1 range: 1 2 | Action of: [ [ 1.00000 ] ] on:[ 1.00000 ] is:[ 1.00000 ] 3 | Action of: [ [ 1.00000 ] ] on:[ 1.00000 ] is:[ 1.00000 ] 4 | dim: 2 range: 2 5 | Action of: [ [ 1.00000 0 ] [ 0 2.00000 ] ] on:[ 1.00000 2.00000 ] is:[ 1.00000 4.00000 ] 6 | Action of: [ [ 1.00000 0 ] [ 0 0.500000 ] ] on:[ 1.00000 2.00000 ] is:[ 1.00000 1.00000 ] 7 | dim: 3 range: 3 8 | Action of: [ [ 1.00000 0 0 ] [ 0 2.00000 0 ] [ 0 0 3.00000 ] ] on:[ 1.00000 2.00000 3.00000 ] is:[ 1.00000 4.00000 9.00000 ] 9 | Action of: [ [ 1.00000 0 0 ] [ 0 0.500000 0 ] [ 0 0 0.333333 ] ] on:[ 1.00000 2.00000 3.00000 ] is:[ 1.00000 1.00000 1.00000 ] 10 | dim: 1 range: 2 11 | Action of: [ [ 1.00000 0 ] ] on:[ 1.00000 ] is:[ 1.00000 0 ] 12 | Action of: [ [ 1.00000 0 ] ] on:[ 1.00000 ] is:[ 1.00000 0 ] 13 | dim: 1 range: 3 14 | Action of: [ [ 1.00000 0 0 ] ] on:[ 1.00000 ] is:[ 1.00000 0 0 ] 15 | Action of: [ [ 1.00000 0 0 ] ] on:[ 1.00000 ] is:[ 1.00000 0 0 ] 16 | dim: 2 range: 3 17 | Action of: [ [ 1.00000 0 0 ] [ 0 2.00000 0 ] ] on:[ 1.00000 2.00000 ] is:[ 1.00000 4.00000 0 ] 18 | Action of: [ [ 1.00000 0 0 ] [ 0 0.500000 0 ] ] on:[ 1.00000 2.00000 ] is:[ 1.00000 1.00000 0 ] 19 | -------------------------------------------------------------------------------- /tests/base/tensor-contract_1_01/expected.txt: -------------------------------------------------------------------------------- 1 | The contract_1 of: 2 | [ [ [ 0 ] ] ] 3 | with: 4 | [ [ 1.00000 ] ] 5 | is: 6 | [ 0 ] 7 | The contract_1 of: 8 | [ [ [ 0 ] ] ] 9 | with: 10 | [ [ 1.00000 ] ] 11 | is: 12 | [ 0 ] 13 | 14 | The contract_1 of: 15 | [ [ [ 0 0 0 ] ] ] 16 | with: 17 | [ [ 3.00000 0 0 ] ] 18 | is: 19 | [ 0 ] 20 | The contract_1 of: 21 | [ [ [ 0 0 0 ] ] ] 22 | with: 23 | [ [ 0.333333 0 0 ] ] 24 | is: 25 | [ 0 ] 26 | 27 | The contract_1 of: 28 | [ [ [ 0 0 0 ] ] ] 29 | with: 30 | [ [ 3.00000 0 0 ] ] 31 | is: 32 | [ 0 ] 33 | The contract_1 of: 34 | [ [ [ 0 0 0 ] ] ] 35 | with: 36 | [ [ 0.333333 0 0 ] ] 37 | is: 38 | [ 0 ] 39 | 40 | The contract_1 of: 41 | [ [ [ 0 0 ] [ 0 0 ] ] [ [ 0 0 ] [ 0 0 ] ] ] 42 | with: 43 | [ [ 2.00000 0 ] [ 0 4.00000 ] ] 44 | is: 45 | [ 0 0 ] 46 | The contract_1 of: 47 | [ [ [ 0 0 ] [ 0 0 ] ] [ [ 0 0 ] [ 0 0 ] ] ] 48 | with: 49 | [ [ 0.500000 0 ] [ 0 0.250000 ] ] 50 | is: 51 | [ 0 0 ] 52 | 53 | The contract_1 of: 54 | [ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ] 55 | with: 56 | [ [ 3.00000 0 0 ] [ 0 6.00000 0 ] ] 57 | is: 58 | [ 0 0 ] 59 | The contract_1 of: 60 | [ [ [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] ] ] 61 | with: 62 | [ [ 0.333333 0 0 ] [ 0 0.166667 0 ] ] 63 | is: 64 | [ 0 0 ] 65 | 66 | The contract_1 of: 67 | [ [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] ] 68 | with: 69 | [ [ 3.00000 0 0 ] [ 0 6.00000 0 ] [ 0 0 9.00000 ] ] 70 | is: 71 | [ 0 0 0 ] 72 | The contract_1 of: 73 | [ [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] ] 74 | with: 75 | [ [ 0.333333 0 0 ] [ 0 0.166667 0 ] [ 0 0 0.111111 ] ] 76 | is: 77 | [ 0 0 0 ] 78 | 79 | -------------------------------------------------------------------------------- /tests/base/tensor-cross_product_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | compute_cp 3 | ======================================================================== 4 | cross product: [ 0 -1.00000 ] 5 | scalar product: 0: 0 6 | ======================================================================== 7 | 8 | ======================================================================== 9 | compute_cp 10 | ======================================================================== 11 | cross product: [ 0 0 1.00000 ] 12 | scalar product: 0: 0 13 | scalar product: 1: 0 14 | ======================================================================== 15 | 16 | ======================================================================== 17 | compute_cp2 18 | ======================================================================== 19 | cross product: [ 1.00000 0 ] 20 | scalar product: 0: 0 21 | ======================================================================== 22 | 23 | ======================================================================== 24 | compute_cp2 25 | ======================================================================== 26 | cross product: [ -1.00000 2.00000 -1.00000 ] 27 | scalar product: 0: 0 28 | scalar product: 1: 0 29 | ======================================================================== 30 | 31 | -------------------------------------------------------------------------------- /tests/base/tensor-det_01/expected.txt: -------------------------------------------------------------------------------- 1 | The determinant of: 2 | t[0][0] = 1.00000 3 | is 1.00000 4 | The determinant of: 5 | t[0][0] = 1.00000 6 | t[0][1] = 2.00000 7 | t[1][0] = 3.00000 8 | t[1][1] = 4.00000 9 | is -2.00000 10 | The determinant of: 11 | t[0][0] = 1.00000 12 | t[0][1] = 2.00000 13 | t[0][2] = 3.00000 14 | t[1][0] = 4.00000 15 | t[1][1] = 5.00000 16 | t[1][2] = 6.00000 17 | t[2][0] = 7.00000 18 | t[2][1] = 8.00000 19 | t[2][2] = 9.00000 20 | is 0 21 | -------------------------------------------------------------------------------- /tests/base/tensor-det_02/expected.txt: -------------------------------------------------------------------------------- 1 | The determinant of: 2 | [ [ 1.00000 2.00000 ] ] 3 | is 2.23607 4 | The determinant of: 5 | [ [ 1.00000 2.00000 3.00000 ] ] 6 | is 3.74166 7 | The determinant of: 8 | [ [ 1.00000 2.00000 3.00000 ] [ 4.00000 5.00000 6.00000 ] ] 9 | is 7.34847 10 | -------------------------------------------------------------------------------- /tests/base/tensor-index_01/expected.txt: -------------------------------------------------------------------------------- 1 | Test for printing a TensorIndex<0> 2 | [] 3 | 4 | Test for printing a TensorIndex<1> 5 | [0] 6 | 7 | Test for printing a TensorIndex<2> 8 | [0,0] 9 | 10 | Test for printing a TensorIndex<3> 11 | [0,0,0] 12 | 13 | Test the access to a tensor using tensor indices, 14 | on a tensor of rank: 3 and dim: 2. 15 | [ [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] [ [ 4.00000 5.00000 ] [ 6.00000 7.00000 ] ] ] 16 | using linear indices 17 | 0 18 | 1.00000 19 | 2.00000 20 | 3.00000 21 | 4.00000 22 | 5.00000 23 | 6.00000 24 | 7.00000 25 | transforming linear to tensor indices 26 | 0 0 27 | 1.00000 1.00000 28 | 2.00000 2.00000 29 | 3.00000 3.00000 30 | 4.00000 4.00000 31 | 5.00000 5.00000 32 | 6.00000 6.00000 33 | 7.00000 7.00000 34 | 35 | Test the access to a tensor using tensor indices, 36 | on a tensor of rank: 2 and dim: 3. 37 | [ [ 0 1.00000 2.00000 ] [ 3.00000 4.00000 5.00000 ] [ 6.00000 7.00000 8.00000 ] ] 38 | using linear indices 39 | 0 40 | 1.00000 41 | 2.00000 42 | 3.00000 43 | 4.00000 44 | 5.00000 45 | 6.00000 46 | 7.00000 47 | 8.00000 48 | transforming linear to tensor indices 49 | 0 0 50 | 1.00000 1.00000 51 | 2.00000 2.00000 52 | 3.00000 3.00000 53 | 4.00000 4.00000 54 | 5.00000 5.00000 55 | 6.00000 6.00000 56 | 7.00000 7.00000 57 | 8.00000 8.00000 58 | 59 | -------------------------------------------------------------------------------- /tests/base/tensor-inverse_01/expected.txt: -------------------------------------------------------------------------------- 1 | Case:2 2 2 | The Tensor A is: 3 | [ [ 1.00000 1.00000 ] [ 1.00000 0.540302 ] ] 4 | Its action on: 5 | [ 1.00000 2.00000 ] 6 | is: 7 | [ 3.00000 2.08060 ] 8 | Its inverse is: 9 | [ [ -1.17534 2.17534 ] [ 2.17534 -2.17534 ] ] 10 | compose A by its inverse to get: 11 | [ [ 1.00000 0 ] [ 0 1.00000 ] ] 12 | 13 | Case:3 2 14 | The Tensor A is: 15 | [ [ 1.00000 1.00000 1.00000 ] [ 1.00000 0.540302 -0.416147 ] ] 16 | Its action on: 17 | [ 1.00000 2.00000 ] 18 | is: 19 | [ 3.00000 2.08060 0.167706 ] 20 | Its inverse is: 21 | [ [ 0.108874 0.599007 ] [ 0.273893 0.158626 ] [ 0.617233 -0.757633 ] ] 22 | compose A by its inverse to get: 23 | [ [ 0.707882 0.432519 -0.140401 ] [ 0.432519 0.359599 0.207882 ] [ -0.140401 0.207882 0.932519 ] ] 24 | 25 | Case:3 3 26 | The Tensor A is: 27 | [ [ 1.00000 1.00000 1.00000 ] [ 1.00000 0.540302 -0.416147 ] [ 1.00000 -0.416147 -0.653644 ] ] 28 | Its action on: 29 | [ 1.00000 2.00000 3.00000 ] 30 | is: 31 | [ 6.00000 0.832164 -1.79322 ] 32 | Its inverse is: 33 | [ [ 0.422665 -0.190715 0.768050 ] [ -0.190715 1.32791 -1.13720 ] [ 0.768050 -1.13720 0.369147 ] ] 34 | compose A by its inverse to get: 35 | [ [ 1.00000 0 0 ] [ 0 1.00000 0 ] [ 0 0 1.00000 ] ] 36 | 37 | -------------------------------------------------------------------------------- /tests/base/tensor-number_entries_01/expected.txt: -------------------------------------------------------------------------------- 1 | The number of entries of Tdouble is: 1 2 | The number of entries of Tensor<1, 1, tensor::contravariant, Tdouble> is: 1 3 | The number of entries of Tensor<2, 1, tensor::contravariant, Tdouble> is: 2 4 | The number of entries of Tensor<3, 1, tensor::contravariant, Tdouble> is: 3 5 | The number of entries of Tensor<1, 1, tensor::covariant, Tensor< 1, 1, tensor::contravariant, Tdouble> > is: 1 6 | The number of entries of Tensor<3, 1, tensor::covariant, Tensor< 2, 1, tensor::contravariant, Tdouble> > is: 6 7 | The number of entries of Tensor<2, 1, tensor::covariant, Tensor< 2, 1, tensor::contravariant, Tdouble> > is: 4 8 | The number of entries of Tensor<2, 1, tensor::covariant, Tensor< 3, 1, tensor::contravariant, Tdouble> > is: 6 9 | The number of entries of Tensor<3, 1, tensor::covariant, Tensor< 2, 1, tensor::contravariant, Tdouble> > is: 6 10 | The number of entries of Tensor<3, 1, tensor::covariant, Tensor< 3, 1, tensor::contravariant, Tdouble> > is: 9 11 | -------------------------------------------------------------------------------- /tests/base/tensor-scalar_product_01/expected.txt: -------------------------------------------------------------------------------- 1 | Test for Tensor of rank: 1 and dim: 1 2 | The scalar product of: 3 | [ 0 ] 4 | with: 5 | [ 1.00000 ] 6 | is: 7 | 0 8 | 9 | Test for Tensor of rank: 1 and dim: 2 10 | The scalar product of: 11 | [ 0 1.00000 ] 12 | with: 13 | [ 2.00000 3.00000 ] 14 | is: 15 | 3.00000 16 | 17 | Test for Tensor of rank: 1 and dim: 3 18 | The scalar product of: 19 | [ 0 1.00000 2.00000 ] 20 | with: 21 | [ 3.00000 4.00000 5.00000 ] 22 | is: 23 | 14.0000 24 | 25 | Test for Tensor of rank: 2 and dim: 1 26 | The scalar product of: 27 | [ [ 0 ] ] 28 | with: 29 | [ [ 1.00000 ] ] 30 | is: 31 | 0 32 | 33 | Test for Tensor of rank: 2 and dim: 2 34 | The scalar product of: 35 | [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] 36 | with: 37 | [ [ 4.00000 5.00000 ] [ 6.00000 7.00000 ] ] 38 | is: 39 | 38.0000 40 | 41 | Test for Tensor of rank: 2 and dim: 3 42 | The scalar product of: 43 | [ [ 0 1.00000 2.00000 ] [ 3.00000 4.00000 5.00000 ] [ 6.00000 7.00000 8.00000 ] ] 44 | with: 45 | [ [ 9.00000 10.0000 11.0000 ] [ 12.0000 13.0000 14.0000 ] [ 15.0000 16.0000 17.0000 ] ] 46 | is: 47 | 528.000 48 | 49 | Test for Tensor of rank: 2 and dim: 1 50 | The scalar product of: 51 | [ [ 0 ] ] 52 | with: 53 | [ [ 1.00000 ] ] 54 | is: 55 | 0 56 | 57 | Test for Tensor of rank: 2 and dim: 2 58 | The scalar product of: 59 | [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] 60 | with: 61 | [ [ 4.00000 5.00000 ] [ 6.00000 7.00000 ] ] 62 | is: 63 | 38.0000 64 | 65 | Test for Tensor of rank: 2 and dim: 3 66 | The scalar product of: 67 | [ [ 0 1.00000 2.00000 ] [ 3.00000 4.00000 5.00000 ] [ 6.00000 7.00000 8.00000 ] ] 68 | with: 69 | [ [ 9.00000 10.0000 11.0000 ] [ 12.0000 13.0000 14.0000 ] [ 15.0000 16.0000 17.0000 ] ] 70 | is: 71 | 528.000 72 | 73 | -------------------------------------------------------------------------------- /tests/base/tensor-tensor_product_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | /* 21 | * Test for the 22 | * Author: pauletti 2013/04/26 23 | * 24 | */ 25 | 26 | #include "../tests.h" 27 | 28 | #include 29 | 30 | 31 | template 32 | void test_tensor_product() 33 | { 34 | 35 | Points a; 36 | Points b; 37 | 38 | out << "The tensor product of:" << std::endl; 39 | out << a << endl; 40 | out << "and:" << endl; 41 | out << b << endl; 42 | out << "is:" << endl; 43 | out << tensor_product(a, b) << endl; 44 | } 45 | 46 | int main(int argc, char *argv[]) 47 | { 48 | out.depth_console(1); 49 | 50 | test_tensor_product<2,2>(); 51 | test_tensor_product<2,3>(); 52 | 53 | return 0; 54 | } 55 | 56 | -------------------------------------------------------------------------------- /tests/base/tensor-tensor_product_01/expected.txt: -------------------------------------------------------------------------------- 1 | The tensor product of: 2 | [ 0 0 ] 3 | and: 4 | [ 0 0 ] 5 | is: 6 | [ [ 0 0 ] [ 0 0 ] ] 7 | The tensor product of: 8 | [ 0 0 ] 9 | and: 10 | [ 0 0 0 ] 11 | is: 12 | [ [ 0 0 ] [ 0 0 ] [ 0 0 ] ] 13 | -------------------------------------------------------------------------------- /tests/base/tensor-transpose_01/expected.txt: -------------------------------------------------------------------------------- 1 | Test for the transpose of a tensor: 2 | on a tensor of ranks: 1, 1 3 | and dims: 1, 2. 4 | A= 5 | [ [ 0 1.00000 ] ] 6 | A^t= 7 | [ [ 0 ] [ 1.00000 ] ] 8 | 9 | Test for the transpose of a tensor: 10 | on a tensor of ranks: 1, 1 11 | and dims: 2, 2. 12 | A= 13 | [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] 14 | A^t= 15 | [ [ 0 2.00000 ] [ 1.00000 3.00000 ] ] 16 | 17 | Test for the transpose of a tensor: 18 | on a tensor of ranks: 1, 2 19 | and dims: 2, 2. 20 | A= 21 | [ [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] [ [ 4.00000 5.00000 ] [ 6.00000 7.00000 ] ] ] 22 | A^t= 23 | [ [ [ 0 4.00000 ] [ 1.00000 5.00000 ] ] [ [ 2.00000 6.00000 ] [ 3.00000 7.00000 ] ] ] 24 | 25 | Test for the transpose of a tensor: 26 | on a tensor of ranks: 1, 1 27 | and dims: 3, 3. 28 | A= 29 | [ [ 0 1.00000 2.00000 ] [ 3.00000 4.00000 5.00000 ] [ 6.00000 7.00000 8.00000 ] ] 30 | A^t= 31 | [ [ 0 3.00000 6.00000 ] [ 1.00000 4.00000 7.00000 ] [ 2.00000 5.00000 8.00000 ] ] 32 | 33 | Test for the transpose of a tensor: 34 | on a tensor of ranks: 1, 1 35 | and dims: 3, 2. 36 | A= 37 | [ [ 0 1.00000 ] [ 2.00000 3.00000 ] [ 4.00000 5.00000 ] ] 38 | A^t= 39 | [ [ 0 2.00000 4.00000 ] [ 1.00000 3.00000 5.00000 ] ] 40 | 41 | -------------------------------------------------------------------------------- /tests/base/tensor_01/expected.txt: -------------------------------------------------------------------------------- 1 | [ 0 ] 2 | [ 1.00000 ] 3 | [ 2.00000 ] 4 | [ 2.00000 ] 5 | [ 2.00000 ] 6 | [ 2.00000 ] 7 | [ 3.00000 ] 8 | [ 3.00000 ] 9 | [ 4.00000 ] 10 | [ 4.00000 ] 11 | [ 1.00000 ] 12 | [ 4.00000 ] 13 | [ 3.00000 ] 14 | [ 6.00000 ] 15 | [ 6.00000 ] 16 | [ 6.00000 ] 17 | -------------------------------------------------------------------------------- /tests/base/tensor_02/expected.txt: -------------------------------------------------------------------------------- 1 | [ [ 0 ] [ 0 ] [ 0 ] ] 2 | [ [ 0 ] [ 1.00000 ] [ 2.00000 ] ] 3 | [ [ 0 ] [ -1.00000 ] [ -2.00000 ] ] 4 | [ [ 2.00000 ] [ 1.00000 ] [ 0 ] ] 5 | [ [ 2.00000 ] [ 1.00000 ] [ 0 ] ] 6 | [ [ 2.00000 ] [ 1.00000 ] [ 0 ] ] 7 | [ [ 2.00000 ] [ 1.00000 ] [ 0 ] ] 8 | [ [ 2.00000 ] [ 2.00000 ] [ 2.00000 ] ] 9 | [ [ -2.00000 ] [ 0 ] [ 2.00000 ] ] 10 | -------------------------------------------------------------------------------- /tests/base/tensor_04/expected.txt: -------------------------------------------------------------------------------- 1 | Test for standard Constructor 2 | Tensor of rank: 1 and dim: 1 3 | A = 4 | [ 0 ] 5 | B = 6 | [ 0 ] 7 | C = 8 | [ [ 0 ] ] 9 | D = 10 | [ [ 0 ] ] 11 | 12 | A+A= 13 | [ 0 ] 14 | Test for standard Constructor 15 | Tensor of rank: 1 and dim: 3 16 | A = 17 | [ 0 0 0 ] 18 | B = 19 | [ 0 0 0 ] 20 | C = 21 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 22 | D = 23 | [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] 24 | 25 | A+A= 26 | [ 0 0 0 ] 27 | Test for standard Constructor 28 | Tensor of rank: 2 and dim: 1 29 | A = 30 | [ [ 0 ] ] 31 | B = 32 | [ [ 0 ] ] 33 | C = 34 | [ [ [ [ 0 ] ] ] ] 35 | D = 36 | [ [ [ [ 0 ] ] ] ] 37 | 38 | A+A= 39 | [ [ 0 ] ] 40 | Test for filling a tensor 41 | Tensor of rank: 2 1 42 | [ [ 0 ] ] 43 | 44 | Test accesing unsing tensor indices 45 | Tensor of rank: 2 and dim: 1 46 | [ [ 0 ] ] 47 | 0 0 48 | 49 | Test for standard Constructor 50 | Tensor of rank: 2 and dim: 2 51 | A = 52 | [ [ 0 0 ] [ 0 0 ] ] 53 | B = 54 | [ [ 0 0 ] [ 0 0 ] ] 55 | C = 56 | [ [ [ [ 0 0 ] [ 0 0 ] ] [ [ 0 0 ] [ 0 0 ] ] ] [ [ [ 0 0 ] [ 0 0 ] ] [ [ 0 0 ] [ 0 0 ] ] ] ] 57 | D = 58 | [ [ [ [ 0 0 ] [ 0 0 ] ] [ [ 0 0 ] [ 0 0 ] ] ] [ [ [ 0 0 ] [ 0 0 ] ] [ [ 0 0 ] [ 0 0 ] ] ] ] 59 | 60 | A+A= 61 | [ [ 0 0 ] [ 0 0 ] ] 62 | Test for filling a tensor 63 | Tensor of rank: 2 2 64 | [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] 65 | 66 | Test accesing unsing tensor indices 67 | Tensor of rank: 2 and dim: 2 68 | [ [ 0 1.00000 ] [ 2.00000 3.00000 ] ] 69 | 0 0 70 | 1.00000 1.00000 71 | 2.00000 2.00000 72 | 3.00000 3.00000 73 | 74 | -------------------------------------------------------------------------------- /tests/basis_functions/bernstein_01/expected.txt: -------------------------------------------------------------------------------- 1 | points: [ 0 0.250000 0.500000 0.750000 1.00000 ] 2 | degree: 0 3 | values: [1,5]((1.00000,1.00000,1.00000,1.00000,1.00000)) 4 | first derivatives: [1,5]((0,0,0,0,0)) 5 | second derivatives: [1,5]((0,0,0,0,0)) 6 | 7 | degree: 1 8 | values: [2,5]((1.00000,0.750000,0.500000,0.250000,0),(0,0.250000,0.500000,0.750000,1.00000)) 9 | first derivatives: [2,5]((-1.00000,-1.00000,-1.00000,-1.00000,-1.00000),(1.00000,1.00000,1.00000,1.00000,1.00000)) 10 | second derivatives: [2,5]((0,0,0,0,0),(0,0,0,0,0)) 11 | 12 | degree: 2 13 | values: [3,5]((1.00000,0.562500,0.250000,0.0625000,0),(0,0.375000,0.500000,0.375000,0),(0,0.0625000,0.250000,0.562500,1.00000)) 14 | first derivatives: [3,5]((-2.00000,-1.50000,-1.00000,-0.500000,0),(2.00000,1.00000,0,-1.00000,-2.00000),(0,0.500000,1.00000,1.50000,2.00000)) 15 | second derivatives: [3,5]((2.00000,2.00000,2.00000,2.00000,2.00000),(-4.00000,-4.00000,-4.00000,-4.00000,-4.00000),(2.00000,2.00000,2.00000,2.00000,2.00000)) 16 | 17 | -------------------------------------------------------------------------------- /tests/basis_functions/bernstein_extraction_01/expected.txt: -------------------------------------------------------------------------------- 1 | Raw components: 2 | Size: [ 1 ] Weights: [1] 3 | Entry id: 0 4 | Entry id: 0 5 | [ 0 0 0 0.333333 0.666667 1.00000 1.00000 1.00000 ] 6 | 7 | 8 | Components map: 9 | [ 0 ] 10 | Active components ids: 11 | [ 0 ] 12 | Inactive components ids: 13 | [ ] 14 | Raw components: 15 | Size: [ 1 ] Weights: [1] 16 | Entry id: 0 17 | Entry id: 0 18 | Entry id: 0 19 | [3,3]((1.00000,0,0),(0,1.00000,0.500000),(0,0,0.500000)) 20 | Entry id: 1 21 | [3,3]((0.500000,0,0),(0.500000,1.00000,0.500000),(0,0,0.500000)) 22 | Entry id: 2 23 | [3,3]((0.500000,0,0),(0.500000,1.00000,0),(0,0,1.00000)) 24 | 25 | 26 | 27 | Components map: 28 | [ 0 ] 29 | Active components ids: 30 | [ 0 ] 31 | Inactive components ids: 32 | [ ] 33 | -------------------------------------------------------------------------------- /tests/basis_functions/bernstein_extraction_03/expected.txt: -------------------------------------------------------------------------------- 1 | Raw components: 2 | Size: [ 1 ] Weights: [1] 3 | Entry id: 0 4 | Entry id: 0 5 | Entry id: 0 6 | [3,3]((1.00000,0,0),(0,1.00000,0.500000),(0,0,0.500000)) 7 | Entry id: 1 8 | [3,3]((0.500000,0,0),(0.500000,1.00000,0),(0,0,1.00000)) 9 | Entry id: 2 10 | [3,3]((1.00000,0,0),(0,1.00000,0.187500),(0,0,0.812500)) 11 | 12 | 13 | 14 | Components map: 15 | [ 0 ] 16 | Active components ids: 17 | [ 0 ] 18 | Inactive components ids: 19 | [ ] 20 | Raw components: 21 | Size: [ 1 ] Weights: [1] 22 | Entry id: 0 23 | Entry id: 0 24 | Entry id: 0 25 | [4,4]((1.00000,0,0,0),(0,1.00000,0.500000,0.250000),(0,0,0.500000,0.583333),(0,0,0,0.166667)) 26 | Entry id: 1 27 | [4,4]((0.250000,0,0,0),(0.583333,0.666667,0.333333,0.166667),(0.166667,0.333333,0.666667,0.666667),(0,0,0,0.166667)) 28 | Entry id: 2 29 | [4,4]((0.166667,0,0,0),(0.666667,0.666667,0.333333,0.166667),(0.166667,0.333333,0.666667,0.583333),(0,0,0,0.250000)) 30 | Entry id: 3 31 | [4,4]((0.166667,0,0,0),(0.583333,0.500000,0,0),(0.250000,0.500000,1.00000,0),(0,0,0,1.00000)) 32 | 33 | 34 | 35 | Components map: 36 | [ 0 ] 37 | Active components ids: 38 | [ 0 ] 39 | Inactive components ids: 40 | [ ] 41 | -------------------------------------------------------------------------------- /tests/basis_functions/bernstein_extraction_04/expected.txt: -------------------------------------------------------------------------------- 1 | Raw components: 2 | Size: [ 1 ] Weights: [1] 3 | Entry id: 0 4 | Entry id: 0 5 | [ -2.00000 -1.00000 1.00000 2.00000 3.00000 5.00000 6.00000 ] 6 | 7 | 8 | Components map: 9 | [ 0 ] 10 | Active components ids: 11 | [ 0 ] 12 | Inactive components ids: 13 | [ ] 14 | 15 | Raw components: 16 | Size: [ 1 ] Weights: [1] 17 | Entry id: 0 18 | Entry id: 0 19 | [ 0 1 2 3 ] 20 | 21 | 22 | Components map: 23 | [ 0 ] 24 | Active components ids: 25 | [ 0 ] 26 | Inactive components ids: 27 | [ ] 28 | 29 | Raw components: 30 | Size: [ 1 ] Weights: [1] 31 | Entry id: 0 32 | Entry id: 0 33 | Entry id: 0 34 | [2,2]((1.00000,0),(0,1.00000)) 35 | Entry id: 1 36 | [2,2]((1.00000,0),(0,1.00000)) 37 | Entry id: 2 38 | [2,2]((1.00000,0),(0,1.00000)) 39 | Entry id: 3 40 | [2,2]((1.00000,0),(0,1.00000)) 41 | 42 | 43 | 44 | Components map: 45 | [ 0 ] 46 | Active components ids: 47 | [ 0 ] 48 | Inactive components ids: 49 | [ ] 50 | -------------------------------------------------------------------------------- /tests/basis_functions/boundary_values_03/expected.txt: -------------------------------------------------------------------------------- 1 | Dimension: 2 2 | basis index value 3 | 0 0 4 | 1 0.500000 5 | 2 1.00000 6 | -------------------------------------------------------------------------------- /tests/basis_functions/bspline_basis_03/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | using_const_basis 3 | ======================================================================== 4 | ======================================================================== 5 | 6 | ======================================================================== 7 | using_const_function 8 | ======================================================================== 9 | ======================================================================== 10 | 11 | -------------------------------------------------------------------------------- /tests/basis_functions/derivative_symmetric_manager_01/expected.txt: -------------------------------------------------------------------------------- 1 | univariate derivative orders: 2 | Entry id: 0 3 | [ 0 0 ] 4 | 5 | Assigment indices: 6 | Entry id: 0 7 | [ ] 8 | 9 | all equal indices indices: 10 | Entry id: 0 11 | Entry id: 0 12 | [ ] 13 | 14 | 15 | -------------------------------------------------------------------------------- /tests/basis_functions/dof_distribution_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | test1 3 | ======================================================================== 4 | Num dofs table: 5 | Entry id: 0 6 | [ 7 ] 7 | Scalar components dimensions: 8 | [ 7 ] 9 | Total Dimension: 7 10 | 11 | Index table size: 12 | Entry id: 0 13 | [ 7 ] 14 | Scalar components dimensions: 15 | [ 7 ] 16 | Total Dimension: 7 17 | 18 | Dof indices: 19 | Size: [ 7 ] Weights: [7] 20 | [ 0 1 2 3 4 5 6 ] 21 | 22 | Dof properties: 23 | IDs with property "active": 24 | [ 0 2 4 6 ] 25 | 26 | ======================================================================== 27 | 28 | ======================================================================== 29 | test2 30 | ======================================================================== 31 | Num dofs table: 32 | Entry id: 0 33 | [ 4 4 ] 34 | Scalar components dimensions: 35 | [ 16 ] 36 | Total Dimension: 16 37 | 38 | Index table size: 39 | Entry id: 0 40 | [ 4 4 ] 41 | Scalar components dimensions: 42 | [ 16 ] 43 | Total Dimension: 16 44 | 45 | Dof indices: 46 | Size: [ 4 4 ] Weights: [4,16] 47 | [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ] 48 | 49 | Dof properties: 50 | IDs with property "active": 51 | [ 0 2 4 6 8 10 12 14 ] 52 | 53 | ======================================================================== 54 | 55 | -------------------------------------------------------------------------------- /tests/basis_functions/filtered_basis_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | filtered_dofs 3 | ======================================================================== 4 | Interior dofs: 5 | Number: 1 6 | [ 4 ] 7 | dirichlet dofs: 8 | [ 0 1 3 ] 9 | neumman dofs: 10 | [ ] 11 | 12 | Interior dofs: 13 | Number: 1 14 | [ 4 ] 15 | dirichlet dofs: 16 | [ 3 6 ] 17 | neumman dofs: 18 | [ 7 ] 19 | 20 | Interior dofs: 21 | Number: 1 22 | [ 4 ] 23 | dirichlet dofs: 24 | [ 1 2 5 ] 25 | neumman dofs: 26 | [ ] 27 | 28 | Interior dofs: 29 | Number: 1 30 | [ 4 ] 31 | dirichlet dofs: 32 | [ 5 8 ] 33 | neumman dofs: 34 | [ 7 ] 35 | 36 | ======================================================================== 37 | 38 | -------------------------------------------------------------------------------- /tests/basis_functions/filtered_basis_02/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | filtered_dofs 3 | ======================================================================== 4 | ----------------------------- 5 | Num. rows = 1 6 | Num. cols = 1 7 | Num. entries = 1 8 | 9 | Row Index Col Index Value 10 | 4 4 0 11 | ----------------------------- 12 | ----------------------------- 13 | Global_ID Value 14 | 4 0 15 | ----------------------------- 16 | ----------------------------- 17 | Num. rows = 1 18 | Num. cols = 1 19 | Num. entries = 1 20 | 21 | Row Index Col Index Value 22 | 4 4 2.66667 23 | ----------------------------- 24 | ----------------------------- 25 | Global_ID Value 26 | 4 0.250000 27 | ----------------------------- 28 | ----------------------------- 29 | Global_ID Value 30 | 4 0.0937500 31 | ----------------------------- 32 | ======================================================================== 33 | 34 | -------------------------------------------------------------------------------- /tests/basis_functions/get_boundary_dofs_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | get_bdry_dof 3 | ======================================================================== 4 | 0 5 | 2 6 | ======================================================================== 7 | 8 | ======================================================================== 9 | get_bdry_dof 10 | ======================================================================== 11 | 0 3 6 12 | 0 1 2 5 6 7 8 13 | ======================================================================== 14 | 15 | ======================================================================== 16 | get_bdry_dof 17 | ======================================================================== 18 | 0 3 6 9 12 15 18 21 24 19 | 0 1 2 3 4 5 6 7 8 9 10 11 14 15 16 17 18 19 20 21 22 23 24 25 26 20 | ======================================================================== 21 | 22 | ======================================================================== 23 | get_bdry_dof 24 | ======================================================================== 25 | 0 26 | 3 27 | ======================================================================== 28 | 29 | ======================================================================== 30 | get_bdry_dof 31 | ======================================================================== 32 | 0 4 8 12 33 | 0 1 2 3 7 11 12 13 14 15 34 | ======================================================================== 35 | 36 | -------------------------------------------------------------------------------- /tests/basis_functions/get_interior_dofs_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | get_interior_dof 3 | ======================================================================== 4 | 1 5 | ======================================================================== 6 | 7 | ======================================================================== 8 | get_interior_dof 9 | ======================================================================== 10 | 4 11 | ======================================================================== 12 | 13 | ======================================================================== 14 | get_interior_dof 15 | ======================================================================== 16 | 13 17 | ======================================================================== 18 | 19 | -------------------------------------------------------------------------------- /tests/basis_functions/integrate_difference_01/expected.txt: -------------------------------------------------------------------------------- 1 | integrate_grid_function<1>(3,10) 2 | Error L2: 3 | Expected: 0.577350 4 | Computed: 0.577350 5 | 6 | 7 | integrate_grid_function<2>(3,10) 8 | Error L2: 9 | Expected: 0.333333 10 | Computed: 0.333333 11 | 12 | 13 | integrate_grid_function<3>(1,10) 14 | Error L2: 15 | Expected: 0.192450 16 | Computed: 0.192450 17 | 18 | 19 | -------------------------------------------------------------------------------- /tests/basis_functions/integrate_difference_02/expected.txt: -------------------------------------------------------------------------------- 1 | integrate_grid_function<1>(1,3) 2 | Error L2 = 0.446825 3 | Error H1 = 1.23814 4 | 5 | integrate_grid_function<2>(1,3) 6 | Error L2 = 0.788811 7 | Error H1 = 1.81353 8 | 9 | integrate_grid_function<3>(1,3) 10 | Error L2 = 1.12546 11 | Error H1 = 2.29492 12 | 13 | -------------------------------------------------------------------------------- /tests/basis_functions/phys_basis_03/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | elem_values 3 | ======================================================================== 4 | ValueTable (num_functions=2,num_points=2) : 5 | Function 0 6 | [ 0.788675 ] [ 0.211325 ] 7 | Function 1 8 | [ 0.211325 ] [ 0.788675 ] 9 | 10 | ValueTable (num_functions=2,num_points=2) : 11 | Function 0 12 | [ 0.788675 ] [ 0.211325 ] 13 | Function 1 14 | [ 0.211325 ] [ 0.788675 ] 15 | 16 | ValueTable (num_functions=2,num_points=2) : 17 | Function 0 18 | [ 0.788675 ] [ 0.211325 ] 19 | Function 1 20 | [ 0.211325 ] [ 0.788675 ] 21 | 22 | ValueTable (num_functions=2,num_points=2) : 23 | Function 0 24 | [ 0.788675 ] [ 0.211325 ] 25 | Function 1 26 | [ 0.211325 ] [ 0.788675 ] 27 | 28 | ======================================================================== 29 | 30 | -------------------------------------------------------------------------------- /tests/basis_functions/spline_space_03/expected.txt: -------------------------------------------------------------------------------- 1 | [2,2]((1.00000,0.00000),(0.00000,1.00000)) 2 | [3,3]((1.00000,0.00000,0.00000),(0.00000,1.00000,0.00000),(0.00000,0.00000,1.00000)) 3 | [4,4]((1.00000,0.00000,0.00000,0.00000),(0.00000,1.00000,0.00000,0.00000),(0.00000,0.00000,1.00000,0.00000),(0.00000,0.00000,0.00000,1.00000)) 4 | -------------------------------------------------------------------------------- /tests/functions/ig_grid_function_01/expected.txt: -------------------------------------------------------------------------------- 1 | ValueVector (num_points=4) : 2 | [ [ 0.622009 ] [ 0.166667 ] [ 0.166667 ] [ 0.0446582 ] ] 3 | 4 | ValueVector (num_points=4) : 5 | [ [ [ -1.57735 ] [ -1.57735 ] ] [ [ -1.57735 ] [ -0.422650 ] ] [ [ -0.422650 ] [ -1.57735 ] ] [ [ -0.422650 ] [ -0.422650 ] ] ] 6 | 7 | ValueVector (num_points=4) : 8 | [ [ [ [ 0 ] [ 4.00000 ] ] [ [ 4.00000 ] [ 0 ] ] ] [ [ [ 0 ] [ 4.00000 ] ] [ [ 4.00000 ] [ 0 ] ] ] [ [ [ 0 ] [ 4.00000 ] ] [ [ 4.00000 ] [ 0 ] ] ] [ [ [ 0 ] [ 4.00000 ] ] [ [ 4.00000 ] [ 0 ] ] ] ] 9 | 10 | ValueVector (num_points=4) : 11 | [ [ 0 ] [ 0 ] [ 0 ] [ 0 ] ] 12 | 13 | ValueVector (num_points=4) : 14 | [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] 15 | 16 | ValueVector (num_points=4) : 17 | [ [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] ] 18 | 19 | ValueVector (num_points=4) : 20 | [ [ 0 ] [ 0 ] [ 0 ] [ 0 ] ] 21 | 22 | ValueVector (num_points=4) : 23 | [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] 24 | 25 | ValueVector (num_points=4) : 26 | [ [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] ] 27 | 28 | ValueVector (num_points=4) : 29 | [ [ 0 ] [ 0 ] [ 0 ] [ 0 ] ] 30 | 31 | ValueVector (num_points=4) : 32 | [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] 33 | 34 | ValueVector (num_points=4) : 35 | [ [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] [ [ [ 0 ] [ 0 ] ] [ [ 0 ] [ 0 ] ] ] ] 36 | 37 | -------------------------------------------------------------------------------- /tests/functions/linear_function_03/expected.txt: -------------------------------------------------------------------------------- 1 | test_linear_function. 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test cylindrical annulus mapping values. 23 | * author: martinelli 24 | * date: Nov 06, 2015 25 | * 26 | */ 27 | 28 | 29 | #include "domain_values.h" 30 | 31 | 32 | std::shared_ptr > 33 | create_cylinder_function() 34 | { 35 | auto grid = Grid<3>::create({{1.,2.},{0.,numbers::PI/2.},{0.,2.}}); 36 | 37 | using Cyl = grid_functions::CylindricalAnnulusGridFunction; 38 | auto cylinder = Cyl::create(grid); 39 | 40 | return cylinder; 41 | } 42 | 43 | int main() 44 | { 45 | out.depth_console(10); 46 | 47 | auto cyl = create_cylinder_function(); 48 | auto domain = Domain<3>::const_create(cyl); 49 | 50 | auto quad = QGauss<3>::create(1); 51 | 52 | domain_values<3,0>(*domain,quad); 53 | 54 | return 0; 55 | } 56 | 57 | 58 | -------------------------------------------------------------------------------- /tests/geometry/domain-cylindrical_annulus_01/expected.txt: -------------------------------------------------------------------------------- 1 | Element 0 2 | Element ID: Flat ID: 0 Tensor ID: [0,0,0] 3 | Ref. Points: 4 | ValueVector (num_points=1) : 5 | [ [ 1.50000 0.785398 1.00000 ] ] 6 | 7 | Points: 8 | ValueVector (num_points=1) : 9 | [ [ 1.06066 1.06066 1.00000 ] ] 10 | 11 | Jacobians: 12 | ValueVector (num_points=1) : 13 | [ [ [ 0.707107 0.707107 0 ] [ -1.06066 1.06066 0 ] [ 0 0 1.00000 ] ] ] 14 | 15 | Hessians: 16 | ValueVector (num_points=1) : 17 | [ [ [ [ 0 0 0 ] [ -0.707107 0.707107 0 ] [ 0 0 0 ] ] [ [ -0.707107 0.707107 0 ] [ -1.06066 -1.06066 0 ] [ 0 0 0 ] ] [ [ 0 0 0 ] [ 0 0 0 ] [ 0 0 0 ] ] ] ] 18 | 19 | Measure: 20 | ValueVector (num_points=1) : 21 | [ 1.50000 ] 22 | 23 | Weight * Measure: 24 | ValueVector (num_points=1) : 25 | [ 4.71239 ] 26 | 27 | 28 | -------------------------------------------------------------------------------- /tests/geometry/domain-cylindrical_annulus_02/expected.txt: -------------------------------------------------------------------------------- 1 | Element 0 2 | Element ID: Flat ID: 0 Tensor ID: [0,0,0] 3 | Face: 0 4 | Normal vector: 5 | ValueVector (num_points=1) : 6 | [ [ -0.707107 -0.707107 0 ] ] 7 | 8 | 9 | Face: 1 10 | Normal vector: 11 | ValueVector (num_points=1) : 12 | [ [ 0.707107 0.707107 0 ] ] 13 | 14 | 15 | Face: 2 16 | Normal vector: 17 | ValueVector (num_points=1) : 18 | [ [ 0 -1.00000 0 ] ] 19 | 20 | 21 | Face: 3 22 | Normal vector: 23 | ValueVector (num_points=1) : 24 | [ [ -1.00000 0 0 ] ] 25 | 26 | 27 | Face: 4 28 | Normal vector: 29 | ValueVector (num_points=1) : 30 | [ [ 0 0 -1.00000 ] ] 31 | 32 | 33 | Face: 5 34 | Normal vector: 35 | ValueVector (num_points=1) : 36 | [ [ 0 0 1.00000 ] ] 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/geometry/domain_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | domain 3 | ======================================================================== 4 | ValueVector (num_points=2) : 5 | [ [ 0.211325 ] [ 0.788675 ] ] 6 | ValueVector (num_points=2) : 7 | [ 0.500000 0.500000 ] 8 | 9 | ======================================================================== 10 | 11 | ======================================================================== 12 | domain 13 | ======================================================================== 14 | ValueVector (num_points=4) : 15 | [ [ 0.206624 0.0443266 ] [ 0.771130 0.165429 ] [ 0.148939 0.149918 ] [ 0.555847 0.559502 ] ] 16 | ValueVector (num_points=4) : 17 | [ 0.0528312 0.197169 0.0528312 0.197169 ] 18 | 19 | ======================================================================== 20 | 21 | ======================================================================== 22 | domain 23 | ======================================================================== 24 | ValueVector (num_points=8) : 25 | [ [ 0.206624 0.0433405 0.00929774 ] [ 0.771130 0.161749 0.0346996 ] [ 0.148939 0.146583 0.0314461 ] [ 0.555847 0.547055 0.117359 ] [ 0.206624 0.0312407 0.0314461 ] [ 0.771130 0.116592 0.117359 ] [ 0.148939 0.105660 0.106355 ] [ 0.555847 0.394329 0.396922 ] ] 26 | ValueVector (num_points=8) : 27 | [ 0.00117091 0.0163087 0.00396018 0.0551582 0.00117091 0.0163087 0.00396018 0.0551582 ] 28 | 29 | ======================================================================== 30 | 31 | -------------------------------------------------------------------------------- /tests/geometry/domain_face_measure_01/expected.txt: -------------------------------------------------------------------------------- 1 | Dimension 3 2 | Area of face 0 : 1.57080 3 | Area of face 1 : 3.14159 4 | Area of face 2 : 1.00000 5 | Area of face 3 : 1.00000 6 | Area of face 4 : 2.35619 7 | Area of face 5 : 2.35619 8 | -------------------------------------------------------------------------------- /tests/geometry/grid-boundary_normals_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | boundary_normals 3 | ======================================================================== 4 | Sub element index: 0 5 | Outer normals: [ -1.00000 ] 6 | Sub element index: 1 7 | Outer normals: [ 1.00000 ] 8 | ======================================================================== 9 | 10 | ======================================================================== 11 | boundary_normals 12 | ======================================================================== 13 | Sub element index: 0 14 | Outer normals: [ -1.00000 0 ] 15 | Sub element index: 1 16 | Outer normals: [ 1.00000 0 ] 17 | Sub element index: 2 18 | Outer normals: [ 0 -1.00000 ] 19 | Sub element index: 3 20 | Outer normals: [ 0 1.00000 ] 21 | ======================================================================== 22 | 23 | ======================================================================== 24 | boundary_normals 25 | ======================================================================== 26 | Sub element index: 0 27 | Outer normals: [ -1.00000 0 0 ] 28 | Sub element index: 1 29 | Outer normals: [ 1.00000 0 0 ] 30 | Sub element index: 2 31 | Outer normals: [ 0 -1.00000 0 ] 32 | Sub element index: 3 33 | Outer normals: [ 0 1.00000 0 ] 34 | Sub element index: 4 35 | Outer normals: [ 0 0 -1.00000 ] 36 | Sub element index: 5 37 | Outer normals: [ 0 0 1.00000 ] 38 | ======================================================================== 39 | 40 | -------------------------------------------------------------------------------- /tests/geometry/grid-points_in_elems_01/expected.txt: -------------------------------------------------------------------------------- 1 | The element: Flat ID: 0 Tensor ID: [] contains the points: [ ] [ ] [ ] 2 | The element: Flat ID: 0 Tensor ID: [0] contains the points: [ 0 ] [ 0.500000 ] [ 1.00000 ] 3 | The element: Flat ID: 0 Tensor ID: [0,0] contains the points: [ 0 0 ] 4 | The element: Flat ID: 1 Tensor ID: [0,1] contains the points: [ 0.500000 0.500000 ] 5 | The element: Flat ID: 2 Tensor ID: [0,2] contains the points: [ 1.00000 1.00000 ] 6 | The element: Flat ID: 0 Tensor ID: [0,0,0] contains the points: [ 0 0 0 ] 7 | The element: Flat ID: 7 Tensor ID: [0,1,2] contains the points: [ 0.500000 0.500000 0.500000 ] 8 | The element: Flat ID: 14 Tensor ID: [0,2,4] contains the points: [ 1.00000 1.00000 1.00000 ] 9 | -------------------------------------------------------------------------------- /tests/geometry/grid_iterator_03.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /** 22 | * @file 23 | * @brief Plain iteration 24 | * @author pauletti 25 | * @date Aug 19, 2015 26 | */ 27 | 28 | #include "../tests.h" 29 | 30 | #include 31 | #include 32 | 33 | template 34 | void iterate(const int n_knots = 5) 35 | { 36 | OUTSTART 37 | 38 | auto grid = Grid::const_create(n_knots); 39 | 40 | for (auto &elem : *grid) 41 | { 42 | elem.print_info(out); 43 | } 44 | 45 | OUTEND 46 | } 47 | 48 | 49 | 50 | int main() 51 | { 52 | iterate<0>(); 53 | iterate<1>(); 54 | iterate<2>(); 55 | iterate<3>(); 56 | 57 | return 0; 58 | } 59 | -------------------------------------------------------------------------------- /tests/io/writer_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Testing the writer, this test the grid 23 | * author: pauletti 24 | * date: Jun 21, 2014 25 | * 26 | */ 27 | 28 | #include "../tests.h" 29 | #include "igatools/io/writer.h" 30 | 31 | template 32 | void 33 | test() 34 | { 35 | const int n_knots = 4; 36 | auto grid = Grid::create(n_knots); 37 | Writer writer(grid); 38 | 39 | string filename = "grid" + to_string(dim); 40 | writer.save(filename, "ascii"); 41 | writer.save(filename + "_bin", "appended"); 42 | writer.print_info(out); 43 | } 44 | 45 | 46 | int main() 47 | { 48 | test<1>(); 49 | test<2>(); 50 | test<3>(); 51 | 52 | return 0; 53 | } 54 | 55 | -------------------------------------------------------------------------------- /tests/io/writer_02.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Testing the writer, this test the BallGridFunction 23 | * author: pauletti 24 | * date: Jun 21, 2014 25 | * 26 | */ 27 | 28 | #include "../tests.h" 29 | #include "igatools/io/writer.h" 30 | #include "igatools/functions/grid_function_lib.h" 31 | 32 | template 33 | void 34 | test() 35 | { 36 | const int n_knots = 4; 37 | auto grid = Grid::create(n_knots); 38 | auto ball_function = grid_functions::BallGridFunction::create(grid); 39 | Writer writer(ball_function, 4); 40 | 41 | string filename = "ball_dim" + to_string(dim); 42 | writer.save(filename, "ascii"); 43 | writer.save(filename + "_bin", "appended"); 44 | writer.print_info(out); 45 | } 46 | 47 | 48 | int main() 49 | { 50 | test<1>(); 51 | test<2>(); 52 | test<3>(); 53 | 54 | return 0; 55 | } 56 | 57 | -------------------------------------------------------------------------------- /tests/linear_algebra/dense_matrix-determinant_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test for the SphericalFunction class as a mapping 23 | * 24 | * author: pauletti 25 | * date: 2014-10-24 26 | * 27 | */ 28 | 29 | #include "../tests.h" 30 | 31 | #include 32 | 33 | 34 | template 35 | void comp_determinant() 36 | { 37 | OUTSTART 38 | 39 | DenseMatrix A(dim, dim); 40 | for (int i=0; i(); 54 | comp_determinant<3>(); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /tests/linear_algebra/dense_matrix-determinant_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | comp_determinant 3 | ======================================================================== 4 | [2,2]((1.00000,0),(1.00000,1.00000)) 5 | Determinant: 1.00000 6 | ======================================================================== 7 | 8 | ======================================================================== 9 | comp_determinant 10 | ======================================================================== 11 | [3,3]((1.00000,0,0),(1.00000,1.00000,1.00000),(1.00000,2.00000,4.00000)) 12 | Determinant: 2.00000 13 | ======================================================================== 14 | 15 | -------------------------------------------------------------------------------- /tests/linear_algebra/dense_matrix-eigen_values_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | eigen_values 3 | ======================================================================== 4 | [2,2]((1.00000,0),(0,2.00000)) 5 | Eigen Values: 6 | [ 1.00000 2.00000 ] 7 | ======================================================================== 8 | 9 | ======================================================================== 10 | eigen_values 11 | ======================================================================== 12 | [3,3]((1.00000,0,0),(0,2.00000,0),(0,0,3.00000)) 13 | Eigen Values: 14 | [ 1.00000 2.00000 3.00000 ] 15 | ======================================================================== 16 | 17 | ======================================================================== 18 | eigen_values2 19 | ======================================================================== 20 | 21 | Eigen Values: 22 | [ -0.372281 5.37228 ] 23 | ======================================================================== 24 | 25 | -------------------------------------------------------------------------------- /tests/linear_algebra/distributed_matrix_01/expected.txt: -------------------------------------------------------------------------------- 1 | Domain dim: 1 Range dim: 1 2 | Degree of rows basis: 3 3 | Degree of columns basis: 2 4 | 5 | Number of dofs of rows basis: 4 6 | Number of dofs of columns basis: 3 7 | 8 | A matrix 9 | ----------------------------- 10 | Num. rows = 4 11 | Num. cols = 3 12 | Num. entries = 12 13 | 14 | Row Index Col Index Value 15 | 0 0 0 16 | 0 1 0 17 | 0 2 0 18 | 1 0 0 19 | 1 1 0 20 | 1 2 0 21 | 2 0 0 22 | 2 1 0 23 | 2 2 0 24 | 3 0 0 25 | 3 1 0 26 | 3 2 0 27 | ----------------------------- 28 | 29 | -------------------------------------------------------------------------------- /tests/linear_algebra/distributed_vector_01/expected.txt: -------------------------------------------------------------------------------- 1 | Testing Trilinos/Tpetra vector: 2 | ----------------------------- 3 | Global_ID Value 4 | ----------------------------- 5 | 6 | 7 | Testing Trilinos/Epetra vector: 8 | ----------------------------- 9 | Global_ID Value 10 | ----------------------------- 11 | 12 | 13 | -------------------------------------------------------------------------------- /tests/linear_algebra/distributed_vector_02/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | non_contig_indices 3 | ======================================================================== 4 | vec 5 | ----------------------------- 6 | Global_ID Value 7 | 1 0 8 | 3 0 9 | 5 0 10 | ----------------------------- 11 | 12 | coeff 13 | ----------------------------- 14 | Global_ID Value 15 | 1 0 16 | 3 0 17 | 5 0 18 | ----------------------------- 19 | 20 | vec1 21 | Coef[loc_id=0 , glob_id=1] = 0 22 | Coef[loc_id=1 , glob_id=3] = 0 23 | Coef[loc_id=2 , glob_id=5] = 0 24 | 25 | vec2 26 | Coef[loc_id=0 , glob_id=1] = 0 27 | Coef[loc_id=1 , glob_id=3] = 0 28 | Coef[loc_id=2 , glob_id=5] = 0 29 | 30 | ======================================================================== 31 | 32 | -------------------------------------------------------------------------------- /tests/tests_utils.h: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* test_utils.h 22 | * 23 | * Created on: Aug 20, 2015 24 | * Author: pauletti 25 | */ 26 | 27 | #ifndef __TESTS_TEST_UTILS_H_ 28 | template 29 | auto non_uniform_grid(const int max_nodes = 5) 30 | { 31 | SafeSTLArray,dim> knots; 32 | for (int i=0; i::create(knots); 41 | } 42 | 43 | #define __TESTS_TEST_UTILS_H_ 44 | 45 | 46 | 47 | 48 | 49 | #endif /* TESTS_TEST_UTILS_H_ */ 50 | -------------------------------------------------------------------------------- /tests/tutorial/example_01.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_01/example_01.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_02-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_02/example_02.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_03-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_03/example_03.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_04-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_04/example_04.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_05-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_05/example_05.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_05-bug/expected.txt: -------------------------------------------------------------------------------- 1 | Assembling local contributions for the 2-dimensional laplace problem. 2 | Element matrix: 3 | [4,4]((0.666667,-0.166667,-0.166667,-0.333333),(-0.166667,0.666667,-0.333333,-0.166667),(-0.166667,-0.333333,0.666667,-0.166667),(-0.333333,-0.166667,-0.166667,0.666667)) 4 | Element vector: 5 | [4](0.250000,0.250000,0.250000,0.250000) 6 | -------------------------------------------------------------------------------- /tests/tutorial/example_06-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_06/example_06.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_06-bug/expected.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tests/tutorial/example_06-bug/expected.txt -------------------------------------------------------------------------------- /tests/tutorial/example_07-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_07/example_07.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_07-bug/expected.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tests/tutorial/example_07-bug/expected.txt -------------------------------------------------------------------------------- /tests/tutorial/example_07-bug/nurb_geometry-2d.xml: -------------------------------------------------------------------------------- 1 | ../../../tutorial/example_07/nurb_geometry-2d.xml -------------------------------------------------------------------------------- /tests/tutorial/example_07-bug/nurb_geometry-2d_v2.xml: -------------------------------------------------------------------------------- 1 | ../../../tutorial/example_07/nurb_geometry-2d_v2.xml -------------------------------------------------------------------------------- /tests/tutorial/example_07-bug/nurb_geometry-3d.xml: -------------------------------------------------------------------------------- 1 | ../../../tutorial/example_07/nurb_geometry-3d.xml -------------------------------------------------------------------------------- /tests/tutorial/example_07-bug/nurb_geometry-3d_v2.xml: -------------------------------------------------------------------------------- 1 | ../../../tutorial/example_07/nurb_geometry-3d_v2.xml -------------------------------------------------------------------------------- /tests/tutorial/example_08-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_08/example_08.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_08-bug/expected.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tests/tutorial/example_08-bug/expected.txt -------------------------------------------------------------------------------- /tests/tutorial/example_09-bug.cpp: -------------------------------------------------------------------------------- 1 | ../../tutorial/example_09/example_09.cpp -------------------------------------------------------------------------------- /tests/tutorial/example_09-bug/expected.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tests/tutorial/example_09-bug/expected.txt -------------------------------------------------------------------------------- /tests/utils/array-serialize_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | array_serialization 3 | ======================================================================== 4 | SafeSTLArray before serialization 5 | [ -1 -2 -3 ] 6 | SafeSTLArray after serialization 7 | [ -1 -2 -3 ] 8 | ======================================================================== 9 | 10 | -------------------------------------------------------------------------------- /tests/utils/array_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /** 22 | * @file 23 | * @brief SafeSTLArray 24 | * @author pauletti 25 | * @date 2014-08-26 26 | */ 27 | 28 | #include "../tests.h" 29 | 30 | #include 31 | 32 | void array_print_info() 33 | { 34 | OUTSTART 35 | 36 | SafeSTLArray arr(2); 37 | arr.print_info(out); 38 | out<< endl; 39 | 40 | OUTEND 41 | } 42 | 43 | 44 | int main() 45 | { 46 | array_print_info(); 47 | return 0; 48 | } 49 | -------------------------------------------------------------------------------- /tests/utils/array_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | array_print_info 3 | ======================================================================== 4 | [ 2.00000 2.00000 2.00000 2.00000 2.00000 ] 5 | ======================================================================== 6 | 7 | -------------------------------------------------------------------------------- /tests/utils/cartesian_product_indexer_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | /* 21 | * Test for CartesianProductIndexer 22 | * martinelli 23 | * 25 Feb 2014 24 | * 25 | */ 26 | 27 | #include "../tests.h" 28 | 29 | #include 30 | 31 | template 32 | void 33 | do_test() 34 | { 35 | out << "========== BEGIN do_test<" << rank << "> ==========" << endl; 36 | TensorSize size; 37 | for (int i = 0 ; i < rank ; ++i) 38 | size[i] = i+2; 39 | 40 | CartesianProductIndexer indexer(size); 41 | out << "Num. indices = " << indexer.get_num_indices() << endl; 42 | indexer.print_info(out); 43 | out << endl; 44 | out << "========== END do_test<" << rank << "> ==========" << endl; 45 | out << endl; 46 | } 47 | 48 | 49 | int main() 50 | { 51 | do_test<1>(); 52 | do_test<2>(); 53 | do_test<3>(); 54 | 55 | return 0; 56 | } 57 | -------------------------------------------------------------------------------- /tests/utils/cartesian_product_indexer_01/expected.txt: -------------------------------------------------------------------------------- 1 | ========== BEGIN do_test<1> ========== 2 | Num. indices = 2 3 | Size: [ 2 ] Weights: [2] 4 | Entry id: 0 5 | [ 0 ] 6 | Entry id: 1 7 | [ 1 ] 8 | 9 | ========== END do_test<1> ========== 10 | 11 | ========== BEGIN do_test<2> ========== 12 | Num. indices = 6 13 | Size: [ 2 3 ] Weights: [2,6] 14 | Entry id: 0 15 | [ 0 0 ] 16 | Entry id: 1 17 | [ 1 0 ] 18 | Entry id: 2 19 | [ 0 1 ] 20 | Entry id: 3 21 | [ 1 1 ] 22 | Entry id: 4 23 | [ 0 2 ] 24 | Entry id: 5 25 | [ 1 2 ] 26 | 27 | ========== END do_test<2> ========== 28 | 29 | ========== BEGIN do_test<3> ========== 30 | Num. indices = 24 31 | Size: [ 2 3 4 ] Weights: [2,6,24] 32 | Entry id: 0 33 | [ 0 0 0 ] 34 | Entry id: 1 35 | [ 1 0 0 ] 36 | Entry id: 2 37 | [ 0 1 0 ] 38 | Entry id: 3 39 | [ 1 1 0 ] 40 | Entry id: 4 41 | [ 0 2 0 ] 42 | Entry id: 5 43 | [ 1 2 0 ] 44 | Entry id: 6 45 | [ 0 0 1 ] 46 | Entry id: 7 47 | [ 1 0 1 ] 48 | Entry id: 8 49 | [ 0 1 1 ] 50 | Entry id: 9 51 | [ 1 1 1 ] 52 | Entry id: 10 53 | [ 0 2 1 ] 54 | Entry id: 11 55 | [ 1 2 1 ] 56 | Entry id: 12 57 | [ 0 0 2 ] 58 | Entry id: 13 59 | [ 1 0 2 ] 60 | Entry id: 14 61 | [ 0 1 2 ] 62 | Entry id: 15 63 | [ 1 1 2 ] 64 | Entry id: 16 65 | [ 0 2 2 ] 66 | Entry id: 17 67 | [ 1 2 2 ] 68 | Entry id: 18 69 | [ 0 0 3 ] 70 | Entry id: 19 71 | [ 1 0 3 ] 72 | Entry id: 20 73 | [ 0 1 3 ] 74 | Entry id: 21 75 | [ 1 1 3 ] 76 | Entry id: 22 77 | [ 0 2 3 ] 78 | Entry id: 23 79 | [ 1 2 3 ] 80 | 81 | ========== END do_test<3> ========== 82 | 83 | -------------------------------------------------------------------------------- /tests/utils/concatenated_forward_iterator_01/expected.txt: -------------------------------------------------------------------------------- 1 | ========== do_test_1_const() --- begin ========== 2 | i = 0 value = 1 3 | i = 1 value = 2 4 | i = 2 value = 3 5 | i = 3 value = 4 6 | i = 4 value = 5 7 | i = 5 value = 6 8 | i = 6 value = 7 9 | i = 7 value = 8 10 | i = 8 value = 9 11 | i = 9 value = 10 12 | i = 10 value = 11 13 | i = 11 value = 12 14 | i = 12 value = 13 15 | ========== do_test_1_const() --- end ========== 16 | 17 | ========== do_test_1_nonconst() --- begin ========== 18 | i = 0 value = 1 19 | i = 1 value = 2 20 | i = 2 value = 3 21 | i = 3 value = 4 22 | i = 4 value = 5 23 | i = 5 value = 6 24 | i = 6 value = 7 25 | i = 7 value = 8 26 | i = 8 value = 9 27 | i = 9 value = 10 28 | i = 10 value = 11 29 | i = 11 value = 12 30 | i = 12 value = 13 31 | ========== do_test_1_nonconst() --- end ========== 32 | 33 | ========== do_test_2() --- begin ========== 34 | i_a = 0 value = 1 35 | i_a = 1 value = 2 36 | i_a = 2 value = 3 37 | i_a = 3 value = 4 38 | i_a = 4 value = 5 39 | i_a = 5 value = 6 40 | i_a = 6 value = 7 41 | i_a = 7 value = 8 42 | i_a = 8 value = 9 43 | 44 | i_b = 0 value = 10 45 | i_b = 1 value = 11 46 | i_b = 2 value = 12 47 | i_b = 3 value = 13 48 | 49 | i = 0 value = 1 50 | i = 1 value = 2 51 | i = 2 value = 3 52 | i = 3 value = 4 53 | i = 4 value = 5 54 | i = 5 value = 6 55 | i = 6 value = 7 56 | i = 7 value = 8 57 | i = 8 value = 9 58 | i = 9 value = 10 59 | i = 10 value = 11 60 | i = 11 value = 12 61 | i = 12 value = 13 62 | ========== do_test_2() --- end ========== 63 | 64 | -------------------------------------------------------------------------------- /tests/utils/dynamic_multi_array-serialize_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | dyamic_multiarray_serialization 3 | ======================================================================== 4 | DynamicMultiArray before serialization 5 | Size: [ 4 ] Weights: [4] 6 | [ 0 1 2 3 ] 7 | DynamicMultiArray after serialization 8 | Size: [ 4 ] Weights: [4] 9 | [ 0 1 2 3 ] 10 | ======================================================================== 11 | 12 | ======================================================================== 13 | dyamic_multiarray_serialization 14 | ======================================================================== 15 | DynamicMultiArray before serialization 16 | Size: [ 4 4 ] Weights: [4,16] 17 | [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ] 18 | DynamicMultiArray after serialization 19 | Size: [ 4 4 ] Weights: [4,16] 20 | [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ] 21 | ======================================================================== 22 | 23 | ======================================================================== 24 | dyamic_multiarray_serialization 25 | ======================================================================== 26 | DynamicMultiArray before serialization 27 | Size: [ 4 4 4 ] Weights: [4,16,64] 28 | [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ] 29 | DynamicMultiArray after serialization 30 | Size: [ 4 4 4 ] Weights: [4,16,64] 31 | [ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ] 32 | ======================================================================== 33 | 34 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array-serialize_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | static_multiarray_serialization 3 | ======================================================================== 4 | StaticMultiArray before serialization 5 | Size: [ 1 1 ] Weights: [1,1] 6 | [ 0 ] 7 | StaticMultiArray after serialization 8 | Size: [ 1 1 ] Weights: [1,1] 9 | [ 0 ] 10 | ======================================================================== 11 | 12 | ======================================================================== 13 | static_multiarray_serialization 14 | ======================================================================== 15 | StaticMultiArray before serialization 16 | Size: [ 2 2 ] Weights: [2,4] 17 | [ 0 1 2 3 ] 18 | StaticMultiArray after serialization 19 | Size: [ 2 2 ] Weights: [2,4] 20 | [ 0 1 2 3 ] 21 | ======================================================================== 22 | 23 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test for StaticMultiArray 23 | * author: pauletti 24 | * data: 28 Aug 2014 25 | * 26 | */ 27 | 28 | #include "../tests.h" 29 | #include 30 | 31 | template 32 | void constructors() 33 | { 34 | OUTSTART 35 | 36 | StaticMultiArray data1; 37 | 38 | StaticMultiArray data2(3); 39 | data2.print_info(out); 40 | out << endl; 41 | 42 | OUTEND 43 | } 44 | 45 | 46 | int main() 47 | { 48 | out.depth_console(10); 49 | 50 | constructors<1>(); 51 | constructors<2>(); 52 | constructors<3>(); 53 | 54 | constructors<2,3>(); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | constructors 3 | ======================================================================== 4 | Size: [ 1 1 ] Weights: [1,1] 5 | [ 3 ] 6 | ======================================================================== 7 | 8 | ======================================================================== 9 | constructors 10 | ======================================================================== 11 | Size: [ 2 2 ] Weights: [2,4] 12 | [ 3 3 3 3 ] 13 | ======================================================================== 14 | 15 | ======================================================================== 16 | constructors 17 | ======================================================================== 18 | Size: [ 3 3 ] Weights: [3,9] 19 | [ 3 3 3 3 3 3 3 3 3 ] 20 | ======================================================================== 21 | 22 | ======================================================================== 23 | constructors 24 | ======================================================================== 25 | Size: [ 2 2 2 ] Weights: [2,4,8] 26 | [ 3 3 3 3 3 3 3 3 ] 27 | ======================================================================== 28 | 29 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_02.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test for StaticMultiArray 23 | * author: pauletti 24 | * data: 28 Aug 2014 25 | * 26 | */ 27 | 28 | #include "../tests.h" 29 | #include 30 | 31 | template 32 | void access_operator() 33 | { 34 | OUTSTART 35 | 36 | StaticMultiArray data; 37 | 38 | for (int i = 0; i < data.flat_size(); ++i) 39 | data[i] = i; 40 | 41 | data.print_info(out); 42 | out << endl; 43 | 44 | for (const auto &entry : data) 45 | out << entry << " ";; 46 | out << endl; 47 | 48 | OUTEND 49 | } 50 | 51 | 52 | int main() 53 | { 54 | out.depth_console(10); 55 | 56 | access_operator<1>(); 57 | access_operator<2>(); 58 | access_operator<3>(); 59 | 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_02/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | access_operator 3 | ======================================================================== 4 | Size: [ 1 1 ] Weights: [1,1] 5 | [ 0 ] 6 | 0 7 | ======================================================================== 8 | 9 | ======================================================================== 10 | access_operator 11 | ======================================================================== 12 | Size: [ 2 2 ] Weights: [2,4] 13 | [ 0 1 2 3 ] 14 | 0 1 2 3 15 | ======================================================================== 16 | 17 | ======================================================================== 18 | access_operator 19 | ======================================================================== 20 | Size: [ 3 3 ] Weights: [3,9] 21 | [ 0 1 2 3 4 5 6 7 8 ] 22 | 0 1 2 3 4 5 6 7 8 23 | ======================================================================== 24 | 25 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_03.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test for StaticMultiArray 23 | * author: pauletti 24 | * data: 28 Aug 2014 25 | * 26 | */ 27 | 28 | #include "../tests.h" 29 | #include 30 | 31 | template 32 | void fill_progression() 33 | { 34 | OUTSTART 35 | 36 | out << "Fill progression from 0 "<< endl; 37 | StaticMultiArray data1(3); 38 | data1.fill_progression(); 39 | data1.print_info(out); 40 | out << endl; 41 | 42 | 43 | out << "Fill progression from 10 "<< endl; 44 | data1.fill_progression(10); 45 | data1.print_info(out); 46 | out << endl; 47 | 48 | OUTEND 49 | } 50 | 51 | 52 | int main() 53 | { 54 | out.depth_console(10); 55 | 56 | fill_progression<1>(); 57 | fill_progression<2>(); 58 | fill_progression<3>(); 59 | 60 | return 0; 61 | } 62 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_03/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | fill_progression 3 | ======================================================================== 4 | Fill progression from 0 5 | Size: [ 1 1 ] Weights: [1,1] 6 | [ 0 ] 7 | Fill progression from 10 8 | Size: [ 1 1 ] Weights: [1,1] 9 | [ 10 ] 10 | ======================================================================== 11 | 12 | ======================================================================== 13 | fill_progression 14 | ======================================================================== 15 | Fill progression from 0 16 | Size: [ 2 2 ] Weights: [2,4] 17 | [ 0 1 2 3 ] 18 | Fill progression from 10 19 | Size: [ 2 2 ] Weights: [2,4] 20 | [ 10 11 12 13 ] 21 | ======================================================================== 22 | 23 | ======================================================================== 24 | fill_progression 25 | ======================================================================== 26 | Fill progression from 0 27 | Size: [ 3 3 ] Weights: [3,9] 28 | [ 0 1 2 3 4 5 6 7 8 ] 29 | Fill progression from 10 30 | Size: [ 3 3 ] Weights: [3,9] 31 | [ 10 11 12 13 14 15 16 17 18 ] 32 | ======================================================================== 33 | 34 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_04.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /* 22 | * Test for StaticMultiArray 23 | * author: pauletti 24 | * data: 28 Aug 2014 25 | * 26 | */ 27 | 28 | #include "../tests.h" 29 | #include 30 | 31 | template 32 | void fill_progression() 33 | { 34 | OUTSTART 35 | 36 | StaticMultiArray data1(4); 37 | out << "Fill progression from 2 "<< endl; 38 | data1.fill_progression(2); 39 | out << "Size: " << data1.flat_size() << endl; 40 | data1.print_info(out); 41 | out << endl; 42 | 43 | OUTEND 44 | } 45 | 46 | 47 | int main() 48 | { 49 | out.depth_console(10); 50 | 51 | 52 | fill_progression<1>(); 53 | fill_progression<2>(); 54 | fill_progression<3>(); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /tests/utils/static_multi_array_04/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | fill_progression 3 | ======================================================================== 4 | Fill progression from 2 5 | Size: 1 6 | Size: [ 1 1 ] Weights: [1,1] 7 | [ 2 ] 8 | ======================================================================== 9 | 10 | ======================================================================== 11 | fill_progression 12 | ======================================================================== 13 | Fill progression from 2 14 | Size: 4 15 | Size: [ 2 2 ] Weights: [2,4] 16 | [ 2 3 4 5 ] 17 | ======================================================================== 18 | 19 | ======================================================================== 20 | fill_progression 21 | ======================================================================== 22 | Fill progression from 2 23 | Size: 9 24 | Size: [ 3 3 ] Weights: [3,9] 25 | [ 2 3 4 5 6 7 8 9 10 ] 26 | ======================================================================== 27 | 28 | -------------------------------------------------------------------------------- /tests/utils/tensor_index-serialize_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | ti_serialization 3 | ======================================================================== 4 | TensorIndex<1> before serialization 5 | [ 3 ] 6 | TensorIndex<1> after serialization 7 | [ 3 ] 8 | ======================================================================== 9 | 10 | ======================================================================== 11 | ti_serialization 12 | ======================================================================== 13 | TensorIndex<2> before serialization 14 | [ 3 3 ] 15 | TensorIndex<2> after serialization 16 | [ 3 3 ] 17 | ======================================================================== 18 | 19 | ======================================================================== 20 | ti_serialization 21 | ======================================================================== 22 | TensorIndex<3> before serialization 23 | [ 3 3 3 ] 24 | TensorIndex<3> after serialization 25 | [ 3 3 3 ] 26 | ======================================================================== 27 | 28 | -------------------------------------------------------------------------------- /tests/utils/tensor_size-serialize_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | ts_serialization 3 | ======================================================================== 4 | TensorSize<1> before serialization 5 | [ 3 ] 6 | TensorSize<1> after serialization 7 | [ 3 ] 8 | ======================================================================== 9 | 10 | ======================================================================== 11 | ts_serialization 12 | ======================================================================== 13 | TensorSize<2> before serialization 14 | [ 3 3 ] 15 | TensorSize<2> after serialization 16 | [ 3 3 ] 17 | ======================================================================== 18 | 19 | ======================================================================== 20 | ts_serialization 21 | ======================================================================== 22 | TensorSize<3> before serialization 23 | [ 3 3 3 ] 24 | TensorSize<3> after serialization 25 | [ 3 3 3 ] 26 | ======================================================================== 27 | 28 | -------------------------------------------------------------------------------- /tests/utils/tensor_sized_container-serialize_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | tsc_serialization 3 | ======================================================================== 4 | TensorSizedContainer<1> before serialization 5 | Size: [ 3 ] Weights: [3] 6 | TensorSizedContainer<1> after serialization 7 | Size: [ 3 ] Weights: [3] 8 | ======================================================================== 9 | 10 | ======================================================================== 11 | tsc_serialization 12 | ======================================================================== 13 | TensorSizedContainer<2> before serialization 14 | Size: [ 3 3 ] Weights: [3,9] 15 | TensorSizedContainer<2> after serialization 16 | Size: [ 3 3 ] Weights: [3,9] 17 | ======================================================================== 18 | 19 | ======================================================================== 20 | tsc_serialization 21 | ======================================================================== 22 | TensorSizedContainer<3> before serialization 23 | Size: [ 3 3 3 ] Weights: [3,9,27] 24 | TensorSizedContainer<3> after serialization 25 | Size: [ 3 3 3 ] Weights: [3,9,27] 26 | ======================================================================== 27 | 28 | -------------------------------------------------------------------------------- /tests/utils/vector-serialize_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | vector_serialization 3 | ======================================================================== 4 | SafeSTLVector before serialization 5 | [ 1.00000 2.00000 3.00000 4.00000 5.00000 ] 6 | SafeSTLVector after serialization 7 | [ 1.00000 2.00000 3.00000 4.00000 5.00000 ] 8 | ======================================================================== 9 | 10 | -------------------------------------------------------------------------------- /tests/utils/vector_01.cpp: -------------------------------------------------------------------------------- 1 | //-+-------------------------------------------------------------------- 2 | // Igatools a general purpose Isogeometric analysis library. 3 | // Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | // 5 | // This file is part of the igatools library. 6 | // 7 | // The igatools library is free software: you can use it, redistribute 8 | // it and/or modify it under the terms of the GNU General Public 9 | // License as published by the Free Software Foundation, either 10 | // version 3 of the License, or (at your option) any later version. 11 | // 12 | // This program is distributed in the hope that it will be useful, 13 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | // GNU General Public License for more details. 16 | // 17 | // You should have received a copy of the GNU General Public License 18 | // along with this program. If not, see . 19 | //-+-------------------------------------------------------------------- 20 | 21 | /** 22 | * @file 23 | * @brief SafeSTLVector 24 | * @author pauletti 25 | * @date 2014-08-26 26 | */ 27 | 28 | #include "../tests.h" 29 | 30 | #include 31 | 32 | void vector_print_info() 33 | { 34 | OUTSTART 35 | 36 | SafeSTLVector vec(5,1); 37 | vec.print_info(out); 38 | out << endl; 39 | 40 | OUTEND 41 | } 42 | 43 | 44 | 45 | int main() 46 | { 47 | vector_print_info(); 48 | return 0; 49 | } 50 | -------------------------------------------------------------------------------- /tests/utils/vector_01/expected.txt: -------------------------------------------------------------------------------- 1 | ======================================================================== 2 | vector_print_info 3 | ======================================================================== 4 | [ 1.00000 1.00000 1.00000 1.00000 1.00000 ] 5 | ======================================================================== 6 | 7 | -------------------------------------------------------------------------------- /tutorial/cmake_template.txt: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # common template for the CMakeLists of the individual steps 22 | 23 | set (name @example_name@ ) 24 | 25 | project(${name}) 26 | 27 | set( CMAKE_PREFIX_PATH ${iga_BINARY_DIR} ${CMAKE_PREFIX_PATH} ) 28 | find_package( igatools REQUIRED) 29 | 30 | include_directories(${IGATOOLS_INCLUDE_DIRS}) 31 | link_directories(${IGATOOLS_LIBRARY_DIR}) 32 | 33 | add_executable(${name} EXCLUDE_FROM_ALL ${name}.cpp ) 34 | 35 | # todo: I would like to make this depend on the library install but it does not work 36 | add_dependencies(${name} ${iga_lib_name}) 37 | target_link_libraries (${name} ${IGATOOLS_LIBRARIES}) 38 | 39 | # add the make run target 40 | add_custom_target(run-${name} ./${name} DEPENDS ${name} 41 | COMMENT "Running program ${name}") 42 | 43 | message("-- Configured: ${name}") 44 | 45 | 46 | -------------------------------------------------------------------------------- /tutorial/example_01/doc/example_01-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tutorial/example_01/doc/example_01-01.png -------------------------------------------------------------------------------- /tutorial/example_01/doc/example_01-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tutorial/example_01/doc/example_01-02.png -------------------------------------------------------------------------------- /tutorial/example_01/doc/example_01-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tutorial/example_01/doc/example_01-03.png -------------------------------------------------------------------------------- /tutorial/example_01/doc/example_01-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tutorial/example_01/doc/example_01-04.png -------------------------------------------------------------------------------- /tutorial/example_03/doc/example_03-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tutorial/example_03/doc/example_03-01.png -------------------------------------------------------------------------------- /tutorial/example_03/doc/example_03-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/tutorial/example_03/doc/example_03-02.png -------------------------------------------------------------------------------- /tutorial/example_07/doc/example_07.dox: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | \page example_07 Example 7: Geometries (the mapping) 4 | 5 | \section Introduction 6 | In example \ref example_06 we have seen how to solve the poisson problem using 7 | a B-spline space (that we call a reference space). 8 | If the domain for the equation is not a hyper rectangle, then a new kind of 9 | space (the physical space) is required. 10 | In the isogeometric conception of igatools the physical space is obtained as 11 | the push forward of a reference space. 12 | A push forward uses the geometry and a transformation type to generate the 13 | functions in the physical space from the function in the reference space. 14 | 15 | In this example we will deal with the geometry which is realized by the 16 | Mapping class. 17 | We create three different geometries using different possibilities 18 | -# an analitical map 19 | -# a manual nurb geometry 20 | -# a NURB geometry read from file 21 | 22 | \section code07 Description of the program 23 | We have different header for the different approches 24 | For the analytical mapping 25 | \snippet example_07.cpp analytical map 26 | the isogeometric B-spline mapping 27 | \snippet example_07.cpp ig map bspline 28 | the NURBS mapping read from a file 29 | \snippet example_07.cpp ig map read nurb 30 | the writer to save the output and some using clauses 31 | \snippet example_07.cpp old includes 32 | 33 | The analytical_geometry() creates a BallMapping geometry which is a deformation 34 | of the hyperrectangle grid using spherical coordinates 35 | \snippet example_07.cpp an geometry 36 | 37 | 38 | \section Exercises 39 | -# Check what else is available form igatools/geometry/mapping_lib.h 40 | -# Create your own analytical mapping 41 | -# Use the NURBS toolbox to genereate a geometry of your desire 42 | and read from igatools 43 | \section fcode07 The full program 44 | \include example_07_no_tag.cpp 45 | 46 | 47 | */ 48 | -------------------------------------------------------------------------------- /tutorial/example_07/nurb_geometry-2d.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 0.000000e+00 1.000000e+00 6 | 3 3 7 | 8 | 9 | 0.000000e+00 1.000000e+00 10 | 2 2 11 | 12 | 13 | 3 2 14 | 8.000000e-01 8.000000e-01 4.000000e-01 1.000000e+00 1.000000e+00 5.000000e-01 15 | 0.000000e+00 4.618802e-01 6.928203e-01 0.000000e+00 5.773503e-01 8.660254e-01 16 | 1.000000e+00 8.660254e-01 1.000000e+00 1.000000e+00 8.660254e-01 1.000000e+00 17 | 18 | 19 | -------------------------------------------------------------------------------- /tutorial/example_07/nurb_geometry-2d_v2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 0.0 1.0 8 | 9 | 10 | 0.0 1.0 11 | 12 | 13 | 14 | 15 | 0 0 16 | 17 | 18 | 19 | 3 2 20 | 21 | 22 | 2 1 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 1.0 8.660254e-01 1.0 1.0 8.660254e-01 1.0 32 | 33 | 34 | 35 | 36 | 37 | 0.8 0.8 0.4 1.0 1.0 0.5 0.0 4.618802e-01 6.928203e-01 0.0 5.773503e-01 8.660254e-01 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /tutorial/example_08/doc/example_08.dox: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | \page example_08 Example 8: Physical space = PushForwad + Reference Basis 4 | 5 | \section Introduction 6 | We show the creation of a physical space, a physical space is given by a push forward of a reference space. A push fordward is an operator that transforms functions from a reference space using a Mapping and a rule (the transformation type). 7 | 8 | \section code08 Description of the program 9 | 10 | \section exc08 Exercises 11 | 12 | \section fcode08 The full program 13 | 14 | \include example_08_no_tag.cpp 15 | 16 | */ 17 | -------------------------------------------------------------------------------- /tutorial/example_09/doc/example_09.dox: -------------------------------------------------------------------------------- 1 | /** 2 | 3 | \page example_09 Example 9: Poisson problem: Physical domain 4 | 5 | \section Introduction 6 | In example_05 we solved Poisson equation on a reference domain. 7 | Now using the Mapping and PushForward we solve the Poisson problem 8 | on a deformed domain. 9 | 10 | \section code09 Description of the program 11 | 12 | \snippet example_09.cpp old includes 13 | 14 | \section exc09 Exercises 15 | 16 | \section fullcode09 The full program 17 | \include example_09_no_tag.cpp 18 | 19 | 20 | */ 21 | -------------------------------------------------------------------------------- /utils/astyle_git.sh: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | #!/bin/bash 21 | 22 | # This script run astyle with the igatools's specific options file astylerc_ansi, on the new and modified [.h,.cpp] files 23 | # 24 | # requirements: astyle, awk and git 25 | 26 | astyle --options=astylerc (git status | awk -F : '(/modified:/ || /new file:/) && (/\.h\>/ || /\.c\>/ || /\.cpp\>/) {print $2}') 27 | 28 | -------------------------------------------------------------------------------- /utils/astylerc: -------------------------------------------------------------------------------- 1 | #-+-------------------------------------------------------------------- 2 | # Igatools a general purpose Isogeometric analysis library. 3 | # Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 4 | # 5 | # This file is part of the igatools library. 6 | # 7 | # The igatools library is free software: you can use it, redistribute 8 | # it and/or modify it under the terms of the GNU General Public 9 | # License as published by the Free Software Foundation, either 10 | # version 3 of the License, or (at your option) any later version. 11 | # 12 | # This program is distributed in the hope that it will be useful, 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | # GNU General Public License for more details. 16 | # 17 | # You should have received a copy of the GNU General Public License 18 | # along with this program. If not, see . 19 | #-+-------------------------------------------------------------------- 20 | 21 | # astyle indentation style for igatools 22 | # 23 | 24 | # general style 25 | --style=allman 26 | 27 | # no tabs, we use spaces 28 | --convert-tabs 29 | 30 | # how to handle the indentation 31 | --indent=spaces=2 32 | --indent-switches 33 | --indent-labels 34 | --indent-preprocessor 35 | --min-conditional-indent=0 36 | --max-instatement-indent=60 37 | 38 | --pad-header 39 | --unpad-paren 40 | --lineend=linux 41 | 42 | 43 | # write things as 'char *p' 44 | --align-pointer=name 45 | --align-reference=name 46 | 47 | 48 | --suffix=none 49 | --quiet 50 | -------------------------------------------------------------------------------- /utils/copyright_header.txt: -------------------------------------------------------------------------------- 1 | Igatools a general purpose Isogeometric analysis library. 2 | Copyright (C) 2012-2016 by the igatools authors (see authors.txt). 3 | 4 | This file is part of the igatools library. 5 | 6 | The igatools library is free software: you can use it, redistribute 7 | it and/or modify it under the terms of the GNU General Public 8 | License as published by the Free Software Foundation, either 9 | version 3 of the License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU General Public License for more details. 15 | 16 | You should have received a copy of the GNU General Public License 17 | along with this program. If not, see . 18 | -------------------------------------------------------------------------------- /utils/dealii_copyright_header.txt: -------------------------------------------------------------------------------- 1 | This file is part of igatools, a general purpose Isogeometric analysis 2 | library. It was copied from the deal.II project where it is licensed 3 | under the LGPL (see http://www.dealii.org/). 4 | It has been modified by the igatools authors to fit the igatools framework. 5 | -------------------------------------------------------------------------------- /utils/logo/logo_generation.tex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/igatoolsProject/igatools/e1e76ab6d13cb5023e9fb71d639d36675c58675b/utils/logo/logo_generation.tex -------------------------------------------------------------------------------- /utils/pre-commit.astyle: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # This hook script runs the astyle program in order to apply the style defined by ../../utils/astylerc_ansi 4 | # 5 | # 6 | # the astyle configuratios for igatools can be also found in igatools/utils/astylerc_ansi 7 | # 8 | astyle --style=allman --convert-tabs --indent-preprocessor --indent=spaces=4 \ 9 | --indent-switches --min-conditional-indent=0 --pad-header \ 10 | --unpad-paren --lineend=linux --indent-labels --align-pointer=name \ 11 | --align-reference=name --max-instatement-indent=60 --suffix=none \ 12 | --quiet \ 13 | $(git status | awk -F : '(/modified:/ || /new file:/) && (/\.h\>/ || /\.cpp\>/) {print $2}') 14 | 15 | --------------------------------------------------------------------------------