Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 105 additions & 0 deletions arcane/src/arcane/core/IMeshSection.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
// -*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-
//-----------------------------------------------------------------------------
// Copyright 2000-2026 CEA (www.cea.fr) IFPEN (www.ifpenergiesnouvelles.com)
// See the top-level COPYRIGHT file for details.
// SPDX-License-Identifier: Apache-2.0
//-----------------------------------------------------------------------------
/*---------------------------------------------------------------------------*/
/* IMeshSection.h (C) 2000-2026 */

Check warning on line 8 in arcane/src/arcane/core/IMeshSection.h

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove the commented out code.

See more on https://sonarcloud.io/project/issues?id=arcaneframework_framework&issues=AZ-4LpF0wmvfhRM0MNra&open=AZ-4LpF0wmvfhRM0MNra&pullRequest=2711
/* */
/* Service interface allowing the creation of a mesh with a section of */
/* another mesh. */
/*---------------------------------------------------------------------------*/
#ifndef ARCANE_CORE_IMESHSECTION_H
#define ARCANE_CORE_IMESHSECTION_H
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

#include "arcane/core/ArcaneTypes.h"

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

namespace Arcane
{

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

class VariableCollection;
class MeshHandle;

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

/*!
* \brief Service interface allowing the creation of a mesh with a section of
* another mesh.
*/
class ARCANE_CORE_EXPORT IMeshSection
{
public:

//! Releases resources
virtual ~IMeshSection() = default;

public:

/*!
* \brief Method allowing to add a plane to the cut service. The use of
* these planes depends on the service.
*
* \param p0 Point of the plane.
* \param normal Normal of the plane.
*/
virtual void addPlane(const Real3& p0, const Real3& normal) = 0;

/*!
* \brief Method allowing to add a set of variables to copy on the
* new mesh.
*
* \param variables A set of variable on the original mesh.
*/
virtual void setVariables(VariableCollection variables) = 0;

/*!
* \brief Method allowing to get a set of variables copied on the new
* mesh.
*
* \return A set of variables on the cloned mesh.
*/
virtual VariableCollection variables() = 0;

/*!
* \brief Method allowing to set a unique id allowing to create multiple
* section services for a mesh.
*
* \param unique_id Mesh unique id to apply.
*/
virtual void setServiceMeshUniqueId(Int32 unique_id) = 0;

/*!
* \brief Method allowing to update the mesh section with all planes.
*
* If a previous call has edited the mesh, all the cells will be destroyed
* before update.
*/
virtual void updateSection() = 0;

/*!
* \brief Méthod allowing to get the mesh section.
*
* \return The mesh section.
*/
virtual MeshHandle meshSection() = 0;
};

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

} // namespace Arcane

/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/

#endif
1 change: 1 addition & 0 deletions arcane/src/arcane/core/srcs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ set(ARCANE_ORIGINAL_SOURCES
IMeshPartitionConstraintMng.h
IMeshPartitioner.h
IMeshPartitionerBase.h
IMeshSection.h
IMeshStats.h
IMeshSubMeshTransition.h
IMeshUniqueIdMng.h
Expand Down
21 changes: 21 additions & 0 deletions arcane/src/arcane/std/MeshCut.axl
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" ?>

<service name="MeshCut" type="caseoption" type2="subdomain">
<description>
Service allowing the creation of a mesh with a cut of another mesh.
</description>

<interface name="Arcane::IMeshSection" inherited="true"/>

<variables>
</variables>

<options>
<simple name="unique-id-service-mesh" type="int32" default="0">
<description>
UniqueID of service mesh. Useful if you need to create multiple instances of this service for a mesh.
</description>
</simple>
</options>

</service>
Loading
Loading