MoReFEM
|
This class holds descriptors that can be used to tailor a sub-domain of a Mesh. More...
#include <Domain.hpp>
Public Types | |
using | unique_id_parent |
Convenient alias. | |
using | const_unique_ptr = std::unique_ptr<const Domain> |
Alias for unique_ptr. | |
using | vector_const_unique_ptr = std::vector<const_unique_ptr> |
Vector of unique pointers. | |
Public Member Functions | |
bool | IsGeometricEltInside (const GeometricElt &geometric_element) const |
Whether the given geometric element belongs to the domain or not. | |
bool | DoRefGeomEltMatchCriteria (const RefGeomElt &ref_geom_elt) const |
Whether geom_ref_element match the criteria of Domain. | |
const std::vector< std::size_t > & | GetDimensionList () const noexcept |
Dimensions consider inside the domain. | |
Accessors. | |
const MeshLabel::vector_const_shared_ptr & | GetMeshLabelList () const noexcept |
Mesh labels in the domain. | |
MeshNS::unique_id | GetMeshIdentifier () const noexcept |
Returns the mesh identifier. | |
const Mesh & | GetMesh () const |
Return the Mesh. | |
const std::vector< Advanced::GeometricEltEnum > & | GetRefGeometricEltIdList () const noexcept |
List of geometric element type handled in the domain. | |
template<Advanced::DomainNS::Criterion CriterionT> | |
bool | IsConstraintOn () const noexcept |
Whether the domain imposes a constraint upon the selected criterion. | |
Static Public Member Functions | |
static const std::string & | ClassName () |
Returns the name of the class (required for some Singleton-related errors). | |
Private Member Functions | |
Mutators. | |
void | SetDimensionList (const std::vector< std::size_t > &dimension_list) |
Set the dimensions to consider in the domain. | |
void | SetMesh (const std::vector< MeshNS::unique_id > &mesh_unique_id) |
Set the mesh onto which the domain is defined (if any). | |
void | SetRefGeometricEltIdList (const std::vector< Advanced::GeomEltNS::GenericName > &name_list) |
Set the list of geometric element type to consider. | |
void | SetLabelList (const std::vector< std::size_t > &label_index_list) |
Set label list. | |
Low-level methods of the class, to check validity of operations. | |
void | SetConditionType (Advanced::DomainNS::Criterion constraint_type) |
template<Advanced::DomainNS::Criterion CriterionT, class GeometricObjectT > | |
bool | IsConstraintFulfilled (const GeometricObjectT &object) const |
Whether a given constraint is fulfilled or not. | |
template<Advanced::DomainNS::Criterion CriterionT, class GeometricObjectT > | |
bool | CheckConstraintIfRelevant (const GeometricObjectT &object) const |
Check if appropriate whether a constraint has been fulfilled for a given geometric object. | |
Private Attributes | |
MeshNS::unique_id | mesh_identifier_ = MeshNS::unique_id{ NumericNS::UninitializedIndex<std::size_t>() } |
Identifier of the mesh upon which the domain is defined. | |
std::vector< std::size_t > | dimension_list_ |
Dimensions consider inside the domain. | |
MeshLabel::vector_const_shared_ptr | mesh_label_list_ |
Mesh labels in the domain. | |
std::vector< Advanced::GeometricEltEnum > | geometric_type_list_ |
List of geometric element type handled in the domain. | |
std::bitset< static_cast< std::size_t >(Advanced::DomainNS::Criterion::End)> | are_constraints_on_ |
Keep track of the conditions upon which the current domain imposes constraints. | |
Friends | |
class | DomainManager |
Frienship to Domain manager, to allow it to create domain objects. | |
Special members. | |
Domain () | |
Default constructor that restricts nothing. | |
~Domain ()=default | |
Destructor. | |
Domain (const Domain &rhs)=delete | |
The copy constructor. | |
Domain (Domain &&rhs)=delete | |
The move constructor. | |
Domain & | operator= (const Domain &rhs)=delete |
The (copy) operator=. | |
Domain & | operator= (Domain &&rhs)=delete |
The (move) operator=. | |
Domain (DomainNS::unique_id unique_id, const std::vector<::MoReFEM::MeshNS::unique_id > &mesh_index, const std::vector< std::size_t > &dimension_list, const std::vector< std::size_t > &mesh_label_list, const std::vector< Advanced::GeomEltNS::GenericName > &geometric_type_list) | |
Constructor from input data file. | |
Domain (DomainNS::unique_id unique_id, const ::MoReFEM::MeshNS::unique_id mesh_index, const std::vector< std::size_t > &mesh_label_index_list) | |
Constructor used by LightweightDomainList. | |
This class holds descriptors that can be used to tailor a sub-domain of a Mesh.
[internal]
At the moment this is merely a prototype; full Domain class should be much more complete and for instance allow intersections, unions of domains. See #162.
The principle is that for each criterion (dimension, geometric element type, mesh labels at the moment) either Domain includes the list of all values supported, or there is an information inside a bitset that tells there are no constraints on this topic.
Objects of this class can only be created through the DomainManager (except the Domain that impose absolutely no restriction).
Convenient alias.
|
private |
Constructor from input data file.
This constructor is intended to be used when constructing a domain from the input data file; otherwise it would have been structured differently to avoid many adjacent arguments with the exact same type.
[in] | unique_id | Identifier of the domain, that must be unique. It is in the input data file the figure that is in the block name, e.g. 1 for Domain1 = { .... }. |
[in] | mesh_index | There might be here one index, that indicates in which mesh the domain is defined. If the domain is not limited to one mesh, leave it empty. |
[in] | dimension_list | List of dimensions to consider. If empty, no restriction on dimension. |
[in] | mesh_label_list | List of mesh labels to consider. If empty, no restriction on it. This argument must mandatorily be empty if mesh_index is empty: a mesh label is closely related to one given mesh. |
[in] | geometric_type_list | List of geometric element types to consider in the domain. List of elements available is given by Advanced::GeometricEltFactory::GetNameList(); most if not all of them should been displayed in the comment in the input data file. |
|
private |
Constructor used by LightweightDomainList.
[in] | unique_id | Identifier of the domain, that must be unique. |
[in] | mesh_index | Index of the mesh to which the Domain is related (mandatory in this case). |
[in] | mesh_label_index_list | List of mesh labels to consider. |
|
delete |
The copy constructor.
[in] | rhs | The object from which the construction occurs. |
|
delete |
The move constructor.
[in] | rhs | The object from which the construction occurs. |
|
static |
Returns the name of the class (required for some Singleton-related errors).
The (copy) operator=.
[in] | rhs | The object from which the affectation occurs. |
The (move) operator=.
[in] | rhs | The object from which the affectation occurs. |
bool MoReFEM::Domain::IsGeometricEltInside | ( | const GeometricElt & | geometric_element | ) | const |
bool MoReFEM::Domain::DoRefGeomEltMatchCriteria | ( | const RefGeomElt & | ref_geom_elt | ) | const |
Whether geom_ref_element match the criteria of Domain.
[in] | ref_geom_elt | RefGeometricElt under investigation. |
The main usage is for instance when a GlobalVariationalOperator is defined: it is handy to be able to restrict an operator for instance to a given set of dimensions (for instance elastic and hyperelastic stiffness make sense only for dimension >= 2).
|
noexcept |
Dimensions consider inside the domain.
Relevant only if Advanced::DomainNS::Criterion::dimension is enforced.
[internal]
This list is sort in increasing order.
|
noexcept |
|
noexcept |
Returns the mesh identifier.
Relevant only if Advanced::DomainNS::Criterion::mesh is enforced.
const Mesh & MoReFEM::Domain::GetMesh | ( | ) | const |
|
noexcept |
List of geometric element type handled in the domain.
Relevant only if Criterion::geometric_elt_type is enforced.
|
noexcept |
Whether the domain imposes a constraint upon the selected criterion.
By all means, you should treat this as a private member: it is public only because:
|
private |
Set the dimensions to consider in the domain.
[in] | dimension_list | List of dimensions to be covered by the domain. |
|
private |
Set the mesh onto which the domain is defined (if any).
[in] | mesh_unique_id | Unique id of the mesh to be covered by the domain. |
|
private |
Set the list of geometric element type to consider.
[in] | name_list | List of names of the RefGeomElt to be considered in the Domain. |
[internal]
"Convert" the list of strings that give the geometric element types to consider in the domain into something more efficient to use. The elements are ordered to fasten access through binary_search.
|
private |
|
private |
Tells the domain defines a specific kind of constraints.
[in] | constraint_type | A type of constraint the current Domain should consider. |
|
private |
Whether a given constraint is fulfilled or not.
It is assumed here that CriterionT is enforced in the domain.
[in] | object | Geometric object upon which the constraint is tested. It might be a GeometricElt or a RefGeomElt. |
|
private |
Check if appropriate whether a constraint has been fulfilled for a given geometric object.
CriterionT | The criterion being investigated. |
GeometricObjectT | Either GeometricElt or RefGeomElt. |
[in] | object | Geometric object upon which the test is performed. |
|
private |
Identifier of the mesh upon which the domain is defined.
Relevant only if DomainNS::Criterion::mesh is enforced.
|
private |
Dimensions consider inside the domain.
Relevant only if DomainNS::Criterion::dimension is enforced.
[internal]
This list is sort in increasing order.
|
private |
Mesh labels in the domain.
Relevant only if DomainNS::Criterion::label is enforced.
[internal]
This list is sort in increasing order.
|
private |
List of geometric element type handled in the domain.
Relevant only if DomainNS::Criterion::geometric_elt_type is enforced.
|
private |
Keep track of the conditions upon which the current domain imposes constraints.
enum class IsConditionOn is used to access the elements within.