Skip to content
Snippets Groups Projects
Commit de3ff2a2 authored by Matti Pellika's avatar Matti Pellika
Browse files

Update homolgy api demo

parent 70677d01
No related branches found
No related tags found
No related merge requests found
......@@ -32,11 +32,8 @@ int main(int argc, char **argv)
// initialize
Homology* homology = new Homology(m, domain, subdomain);
// save all resulting chains to a file as physical groups
homology->setFileName("homology.msh");
// construct cell complex of the meshed domain
CellComplex *cc = homology->createCellComplex();
CellComplex* cc = homology->createCellComplex();
// find homology basis elements
homology->findHomologyBasis(cc);
......@@ -47,6 +44,13 @@ int main(int argc, char **argv)
// find cohomology basis elements
homology->findCohomologyBasis(cc);
// add 1 and 2 dimensional result chains to model
homology->addChainsToModel(1);
homology->addChainsToModel(2);
// write mesh with (co)homology computation result chains
m->writeMSh("model_hom.msh");
delete cc;
delete homology;
delete m;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment