Skip to content
Snippets Groups Projects
Commit ab699046 authored by Bastian Telgen's avatar Bastian Telgen
Browse files

Merge ae108-meshing/main into '132-merge-ae108-meshing-into-ae108'

parent 6a0fe0d6
No related branches found
No related tags found
No related merge requests found
Pipeline #167914 failed
Showing
with 777 additions and 0 deletions
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Generate mesh. The mesh can be exported with extract_mesh.
*
* @param dimension The desired meshing dimension (e.g. volume (3) or surface
* (2) mesh).
* @param order The desired element order. See gmsh docs.
* @param algorithm The desired meshing algorithm. See gmsh docs.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L585
*/
void generate_mesh(const int dimension = 3, const int order = 1,
const int algorithm = 6) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns boundary entities (dim-1) of the specified entities, or
* optionally the boundary points, if recursive = true.
*
* @param entities Entities of interest.
* @param recursive If true, returns boundary points (dim=0).
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L284
*/
std::vector<std::pair<int, int>>
get_boundary_of(const std::vector<std::pair<int, int>> &entities,
const bool recursive = false) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <array>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns the centroid coordinates of the entity.
*
* @param entity The point tag.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L2834
*/
std::array<double, 3>
get_centroid_of(const std::pair<int, int> &entity) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <array>
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns coordinates of point
*
* @param point_tag The point tag.
*/
std::array<double, 3> get_coords_of(const int point_tag) noexcept;
/**
* @brief Returns coordinates of points
*
* @param point_tags The point tags.
*/
std::vector<std::array<double, 3>>
get_coords_of(const std::vector<int> &point_tags) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns the element types and tags of the elements in the
* specified entity.
*
* @param entity The entity {dim, tag}.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L771
*/
std::vector<std::pair<int, std::size_t>>
get_elements_in(const std::pair<int, int> &entity) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include "ae108/meshing/BoundingBox.h"
#include <array>
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns all entities of dimension inside of a bounding box
*
* @param bounding_box The bounding box or search domain.
* @param dimension Entity dimension, i.e 3-volume, 2-surface, 1-line, 0-point
* @param tol Spatial tolerance.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L307
*/
std::vector<std::pair<int, int>>
get_entities_in(const BoundingBox<std::array<double, 3>> &bounding_box,
const int dimension, const double tol = 1e-6) noexcept;
/**
* @brief Returns all entities in the specified physical group.
*
* @param physical_group The physical group {dim, tag}.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L230
*/
std::vector<std::pair<int, int>>
get_entities_in(const std::pair<int, int> &physical_group) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns all geometric entities of all or just the specified dimension.
*
* @param dim The dimension of interest. If < 0, the entities of all dimensions
* are returned.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L2792
*/
std::vector<std::pair<int, int>> get_entities_of(const int dim = -1) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include "ae108/meshing/cppgmsh/Node.h"
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Get the nodes of one or more entities. Optionally avoids
* duplicate nodes (e.g. on entity boundaries). Returns a vector of Nodes.
*
* @param dim The dimension of the model entities of interest. Set to < 0 to get
* all nodes of the mesh.
* @param tag The tag of the model entity of interest. Set to < 0 to get the
* nodes of all entities of dimension dim.
* @param remove_duplicates If true, node duplicates are removed.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L662
*/
template <std::size_t Dimension>
std::vector<Node<Dimension>>
get_nodes_of(const std::pair<int, int> &entity,
const bool remove_duplicates = true) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <array>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns the normal of a surface.
*
* @param surface_tag The surface tag.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L462
*/
std::array<double, 3> get_normal_of(const int surface_tag) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <array>
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns the corresponding node tags of the target entity (out.first)
* and the source entity (out.second)
*
* @param target_entity Target entity.
* @param source_entity Optional output of the source entity.
* @param affine_transform Optional output of the affine transformation.
*/
std::pair<std::vector<std::size_t>, std::vector<std::size_t>>
get_periodic_nodes_of(
const std::pair<int, int> &target_entity,
std::pair<int, int> *source_entity = nullptr,
std::array<double, 16> *affine_transform = nullptr) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns the physical groups in the model.
*
* @param dim The dimension of the physical groups to return, if < 0, the groups
* of all dimensions are returned.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L223
*/
std::vector<std::pair<int, int>>
get_physical_groups(const int dim = -1) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns tags of all points of an entity.
*
* @param entity The entity.
*/
std::vector<int> get_points_of(const std::pair<int, int> &entity) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include "ae108/meshing/BoundingBox.h"
#include <array>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Matches points between all periodic surfaces in the source and target
* domain. If a point on the source surface is missing on the target surface,
* it will be added to the target surface. Assumption: Source and target domain
* are translational periodic.
*
* @param source Source domain spanned by a bounding box.
* @param target Target domain spanned by a bounding box.
* @param tol Tolerance for point matching.
*/
void heal_periodic_domains(const BoundingBox<std::array<double, 3>> &source,
const BoundingBox<std::array<double, 3>> &target,
const double tol = 1e-9) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <array>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Matches points between source and target surface. If a point on the
* source surface is missing on the target surface, it will be added to the
* target surface. Source and target surface are translational periodic.
*
* @param source Source surface tag.
* @param target Target surface tag.
* @param translation Translation vector from source to target.
* @param tol Tolerance for point matching.
*
*/
void heal_periodic_surfaces(const int source, const int target,
const std::array<double, 3> &translation,
const double tol = 1e-9) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <string>
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Imports shapes from a BREP, STEP or IGES file.
* @param fileName Name of the imported file.
* @param highestDimOnly If true, only the highest dimensional entities are
* imported.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L2770
*/
std::vector<std::pair<int, int>>
import_shapes(const std::string &fileName,
const bool highestDimOnly = true) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Returns vector of intersected entities.
*
* @param object_entities Object entities.
* @param tool_entities Tool entities.
* @param remove_object If true, the object entities will be removed after the
* intersection was performed.
* @param remove_tool If true, the tool entities will be removed after the
* intersection was performed.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L2616
*/
std::vector<std::pair<int, int>>
intersect_entities(const std::vector<std::pair<int, int>> &object_entities,
const std::vector<std::pair<int, int>> &tool_entities,
const bool remove_object = true,
const bool remove_tool = true) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <string>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Reads a file. The export format is determined by the file
* extension (e.g. *.vtk).
*
* @param file_name The file name.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L77
*/
void read_file(const std::string &file_name) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Removes the given entities.
*
* @param entities Entities to remove.
* @param recursive If true, all entities on the boundaries of the given entity
* are removed as well, down to dimension 0 (points).
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L2737
*/
void remove_entities(const std::vector<std::pair<int, int>> &entities,
const bool recursive = false) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2022 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include <array>
#include <vector>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Rotates the given entities.
*
* @param entities Entities to rotate.
* @param center Center of rotation.
* @param direction Direction of the axis of rotation.
* @param angle Angle of rotation measured in radians.
* @note https://gitlab.onelab.info/gmsh/gmsh/-/blob/gmsh_4_8_4/api/gmsh.h#L2673
*/
void rotate_entities(const std::vector<std::pair<int, int>> &entities,
const std::array<double, 3> &center,
const std::array<double, 3> &direction,
double angle) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
// © 2021 ETH Zurich, Mechanics and Materials Lab
//
// ae108 is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or any
// later version.
//
// ae108 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with ae108. If not, see <https://www.gnu.org/licenses/>.
#pragma once
#include "ae108/meshing/BoundingBox.h"
#include <array>
namespace ae108 {
namespace meshing {
namespace cppgmsh {
/**
* @brief Set the meshes of the entities in domain target as
* periodic copies of the meshes of entities in domain source
*
* @param source Source domain.
* @param target Target domain.
* @param dim Dimension of the entities (1 or 2).
* @param tol Spatial tolerance for entity matching.
*/
void set_domain_entities_periodic(
const BoundingBox<std::array<double, 3>> &source,
const BoundingBox<std::array<double, 3>> &target, const int dim,
const double tol = 1e-9) noexcept;
} // namespace cppgmsh
} // namespace meshing
} // namespace ae108
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment