Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
ElmerCSC
GitHub Repository: ElmerCSC/elmerfem
Path: blob/devel/meshgen2d/src/BoundaryLayer.cpp
3196 views
1
#include "BoundaryLayer.h"
2
#include <algorithm>
3
#include "Border.h"
4
#include "BGMesh.h"
5
#include "MGError.h"
6
7
#include <list>
8
#include <vector>
9
#include <iostream>
10
#include <algorithm>
11
#ifdef _NO_STD_MINMAX
12
#include "minmaxpatch.h"
13
#endif
14
15
void BoundaryLayer::initialize()
16
{
17
bounds->collectGeometryNodes( nodes );
18
bounds->collectGeometryEdges( edges, directions );
19
if(!bg->isInitialized()) bg->initialize( nodes, edges );
20
}
21
22
/*
23
Basically a do nothing. The boundaries have been already discretized.
24
*/
25
void BoundaryLayer::
26
discretize(NodeMap& fixedNodes, NodeMap& allNodes, std::list< Element* >& allElements)
27
{
28
exportNodes( allNodes, allElements );
29
}
30
31
void BoundaryLayer::
32
exportNodes( NodeMap& allNodes, std::list< Element* >& allElements )
33
{
34
int i, len;
35
std::vector< Node * > nodes;
36
bounds->collectNodes( nodes );
37
38
len = nodes.size();
39
40
for ( i = 0; i < len; i++)
41
{
42
allNodes[nodes[i]->tag] = nodes[i];
43
}
44
45
std::vector< BoundaryElement * > bels;
46
bounds->collectBoundaryElements( bels );
47
48
len = bels.size();
49
50
for( i = 0; i < len; ++i )
51
{
52
bels[i]->setRight(-1);
53
}
54
}
55
56