BELFEM
0.9.0
Berkeley Lab Finite Element Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
cl_Cohomology.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_Cochain.hpp
"
14
#include "
cl_BeltedTree.hpp
"
15
#include "
cl_SimplicialComplex.hpp
"
16
#include "
cl_Chain.hpp
"
17
#include "
fn_Smith.hpp
"
18
#include "
cl_Map.hpp
"
19
#include "
cl_Cell.hpp
"
20
#include "
cl_Progressbar.hpp
"
21
22
#ifndef BELFEM_CL_COHOMOLOGY_HPP
23
#define BELFEM_CL_COHOMOLOGY_HPP
24
25
namespace
belfem
26
{
27
namespace
mesh
28
{
29
//-----------------------------------------------------------------------------
36
class
Cohomology
37
{
38
39
Cell <Cell< Cochain * >> mGenerators;
40
41
Cell <Cell< int >> mOrders;
42
43
Map<int, Matrix< int >
> mV;
44
45
Map<int, Matrix< int >
> mW;
46
47
Map<int, Matrix< int >
> mU;
48
49
Map<int, Matrix< int >
> mB;
50
51
Map<int, uint >
ms;
52
53
Map<int, uint >
mt;
54
55
Cell< Matrix< int >
> mD;
56
57
SimplicialComplex
* mSimplicialComplex =
nullptr
;
58
59
bool
mflagProp =
false
;
60
61
Mesh
* mMesh ;
62
63
Progressbar
* mProgress = nullptr ;
64
65
66
//-----------------------------------------------------------------------------
67
public
:
68
//-----------------------------------------------------------------------------
69
70
Cohomology
(
SimplicialComplex
* aSimplicialComplex,
Mesh
* aMesh );
71
72
//-----------------------------------------------------------------------------
73
74
Cohomology
(
SimplicialComplex
* aSimplicialComplex,
Mesh
* aMesh,
BeltedTree
* aBTree );
75
76
//-----------------------------------------------------------------------------
77
78
~Cohomology
();
79
80
//-----------------------------------------------------------------------------
81
82
void
83
cohomologyGroupOfChainComplex
();
84
85
//-----------------------------------------------------------------------------
86
87
void
88
quotientGroup
();
89
90
//-----------------------------------------------------------------------------
91
92
void
93
generatorsOfCohomology
();
94
95
//-----------------------------------------------------------------------------
96
97
void
98
clean
();
99
100
//-----------------------------------------------------------------------------
101
102
void
103
check
();
104
105
//-----------------------------------------------------------------------------
106
107
void
108
create_kGeneratorsField
(
const
uint
k,
Mesh
* aMesh,
string
aFieldName );
109
110
//-----------------------------------------------------------------------------
111
112
Cell< Matrix< int >
> &
113
get_CoboundaryMatrix
();
114
115
//-----------------------------------------------------------------------------
116
117
Cell <Cell< Cochain * >> &
118
get_Generators
();
119
120
//-----------------------------------------------------------------------------
121
122
void
123
updatekGeneratorsFromHomology
(
Cell< Chain * >
& tkGenerators,
const
uint
k);
124
125
//-----------------------------------------------------------------------------
126
127
Matrix< real >
128
coefficient_TMatrix
(
Cell< Chain * >
& mkGenerators,
const
uint
k);
129
130
//-----------------------------------------------------------------------------
131
private
:
132
//-----------------------------------------------------------------------------
133
134
void
135
clean_spfa();
136
144
void
145
remove_cut_pockets(
const
bool
aFireTierA );
146
147
};
148
}
149
}
150
151
#endif
//BELFEM_CL_COHOMOLOGY_HPP
cl_BeltedTree.hpp
cl_Cell.hpp
cl_Chain.hpp
cl_Cochain.hpp
cl_Map.hpp
cl_Mesh.hpp
cl_Progressbar.hpp
cl_SimplicialComplex.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::Matrix< real >
belfem::Mesh
Top-level container for all mesh entities.
Definition
cl_Mesh.hpp:60
belfem::Progressbar
Progress display for long-running loops.
Definition
cl_Progressbar.hpp:27
belfem::mesh::BeltedTree
Definition
cl_BeltedTree.hpp:27
belfem::mesh::Cohomology::clean
void clean()
Definition
cl_Cohomology.cpp:189
belfem::mesh::Cohomology::Cohomology
Cohomology(SimplicialComplex *aSimplicialComplex, Mesh *aMesh)
Definition
cl_Cohomology.cpp:29
belfem::mesh::Cohomology::get_CoboundaryMatrix
Cell< Matrix< int > > & get_CoboundaryMatrix()
Definition
cl_Cohomology.cpp:978
belfem::mesh::Cohomology::cohomologyGroupOfChainComplex
void cohomologyGroupOfChainComplex()
Definition
cl_Cohomology.cpp:87
belfem::mesh::Cohomology::coefficient_TMatrix
Matrix< real > coefficient_TMatrix(Cell< Chain * > &mkGenerators, const uint k)
Definition
cl_Cohomology.cpp:1216
belfem::mesh::Cohomology::updatekGeneratorsFromHomology
void updatekGeneratorsFromHomology(Cell< Chain * > &tkGenerators, const uint k)
Definition
cl_Cohomology.cpp:994
belfem::mesh::Cohomology::create_kGeneratorsField
void create_kGeneratorsField(const uint k, Mesh *aMesh, string aFieldName)
Definition
cl_Cohomology.cpp:955
belfem::mesh::Cohomology::get_Generators
Cell< Cell< Cochain * > > & get_Generators()
Definition
cl_Cohomology.cpp:986
belfem::mesh::Cohomology::quotientGroup
void quotientGroup()
Definition
cl_Cohomology.cpp:109
belfem::mesh::Cohomology::check
void check()
Definition
cl_Cohomology.cpp:908
belfem::mesh::Cohomology::generatorsOfCohomology
void generatorsOfCohomology()
Definition
cl_Cohomology.cpp:146
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_Cohomology.hpp
Generated by
1.18.0