BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_Homology.hpp
Go to the documentation of this file.
1
/*
2
* BELFEM -- The Berkeley Lab Finite Element Framework
3
* Copyright (c) 2026, The Regents of the University of California,
4
* through Lawrence Berkeley National Laboratory (subject to receipt of any required
5
* approvals from the U.S. Dept. of Energy). All rights reserved.
6
*
7
* Developers: Christian Messe, Gregory Giard
8
*
9
* See the top-level LICENSE file for the complete license and disclaimer.
10
*/
11
12
#include "
cl_Mesh.hpp
"
13
#include "
cl_Chain.hpp
"
14
#include "
cl_SimplicialComplex.hpp
"
15
#include "
cl_Element_Factory.hpp
"
16
#include "
fn_Smith.hpp
"
17
#include "
cl_Map.hpp
"
18
#include "
cl_Cell.hpp
"
19
#include "
cl_Vector.hpp
"
20
21
#ifndef BELFEM_CL_HOMOLOGY_HPP
22
#define BELFEM_CL_HOMOLOGY_HPP
23
24
namespace
belfem
25
{
26
namespace
mesh
27
{
28
//-----------------------------------------------------------------------------
35
class
Homology
36
{
37
38
Cell <Cell< Chain * >> mGenerators;
39
40
Cell <Cell< int >> mOrders;
41
42
Map<int, Matrix< int >
> mV;
43
44
Map<int, Matrix< int >
> mW;
45
46
Map<int, Matrix< int >
> mU;
47
48
Map<int, Matrix< int >
> mB;
49
50
Map<int, uint >
ms;
51
52
Map<int, uint >
mt;
53
54
Cell< Matrix< int >
> mD;
55
56
SimplicialComplex
* mSimplicialComplex;
57
58
//Mesh
59
Mesh
* mMesh ;
60
61
62
//-----------------------------------------------------------------------------
63
public
:
64
65
//-----------------------------------------------------------------------------
66
67
Homology
(
Mesh
* aMesh,
Cell
<
Cell< id_t >
> aTerminals,
68
Cell< id_t >
aThinShellIndices ) ;
69
70
//-----------------------------------------------------------------------------
71
72
Homology
(
SimplicialComplex
* aSimplicialComplex,
Mesh
* aMesh);
73
74
//-----------------------------------------------------------------------------
75
76
~Homology
();
77
78
//-----------------------------------------------------------------------------
79
80
void
81
reset
();
82
83
//-----------------------------------------------------------------------------
84
85
void
86
homologyGroupOfChainComplex
();
87
88
//-----------------------------------------------------------------------------
89
90
void
91
quotientGroup
();
92
93
//-----------------------------------------------------------------------------
94
95
void
96
generatorsOfHomology
();
97
98
//-----------------------------------------------------------------------------
99
100
void
101
create_kGeneratorsField
(
const
uint
k,
Mesh
* aMesh,
string
tFieldName );
102
103
//-----------------------------------------------------------------------------
104
105
void
106
suggest_Homology
(
Cell
<
Cell< id_t >
> aTerminals,
107
Cell< id_t >
aThinShellIndices );
108
109
//-----------------------------------------------------------------------------
110
111
Cell< Matrix< int >
> &
112
get_BoundaryMatrix
();
113
114
//-----------------------------------------------------------------------------
115
116
Cell <Cell< Chain * >> &
117
get_Generators
();
118
119
//-----------------------------------------------------------------------------
120
121
void
122
create_self_intersecting
(
const
uint
tGeneratorIndex);
123
124
//-----------------------------------------------------------------------------
125
126
Cell < int >
127
generators_orientation
(
Cell
< Vector <real> > & aDirections);
128
129
//-----------------------------------------------------------------------------
130
131
void
132
reorient_generators
();
133
134
//-----------------------------------------------------------------------------
135
136
};
137
}
138
}
139
140
#endif
//BELFEM_CL_HOMOLOGY_HPP
cl_Cell.hpp
cl_Chain.hpp
cl_Element_Factory.hpp
cl_Map.hpp
cl_Mesh.hpp
cl_SimplicialComplex.hpp
cl_Vector.hpp
belfem::Cell
Cell is a wrapper around the standard vector.
Definition
cl_Cell.hpp:42
belfem::Map
Hash map (unordered key-value).
Definition
cl_Map.hpp:75
belfem::Mesh
Top-level container for all mesh entities.
Definition
cl_Mesh.hpp:60
belfem::mesh::Homology::get_BoundaryMatrix
Cell< Matrix< int > > & get_BoundaryMatrix()
Definition
cl_Homology.cpp:413
belfem::mesh::Homology::get_Generators
Cell< Cell< Chain * > > & get_Generators()
Definition
cl_Homology.cpp:421
belfem::mesh::Homology::homologyGroupOfChainComplex
void homologyGroupOfChainComplex()
Definition
cl_Homology.cpp:77
belfem::mesh::Homology::Homology
Homology(Mesh *aMesh, Cell< Cell< id_t > > aTerminals, Cell< id_t > aThinShellIndices)
Definition
cl_Homology.cpp:22
belfem::mesh::Homology::reset
void reset()
Definition
cl_Homology.cpp:55
belfem::mesh::Homology::create_kGeneratorsField
void create_kGeneratorsField(const uint k, Mesh *aMesh, string tFieldName)
Definition
cl_Homology.cpp:180
belfem::mesh::Homology::reorient_generators
void reorient_generators()
Definition
cl_Homology.cpp:657
belfem::mesh::Homology::create_self_intersecting
void create_self_intersecting(const uint tGeneratorIndex)
Definition
cl_Homology.cpp:430
belfem::mesh::Homology::generatorsOfHomology
void generatorsOfHomology()
Definition
cl_Homology.cpp:137
belfem::mesh::Homology::generators_orientation
Cell< int > generators_orientation(Cell< Vector< real > > &aDirections)
Definition
cl_Homology.cpp:505
belfem::mesh::Homology::suggest_Homology
void suggest_Homology(Cell< Cell< id_t > > aTerminals, Cell< id_t > aThinShellIndices)
Definition
cl_Homology.cpp:204
belfem::mesh::Homology::quotientGroup
void quotientGroup()
Definition
cl_Homology.cpp:99
belfem::mesh::SimplicialComplex
Simplicial complex reduction engine underlying the homology and cohomology computation.
Definition
cl_SimplicialComplex.hpp:37
fn_Smith.hpp
belfem::mesh
Definition
cl_EF_EdgeFunction.hpp:17
belfem
USER GUIDES:
Definition
cl_Capacitor.cpp:16
belfem::uint
unsigned int uint
Definition
typedefs.hpp:30
src
homology
cl_Homology.hpp
Generated by
1.18.0