TexGen
PeriodicBoundaries.h
Go to the documentation of this file.
1/*=============================================================================
2TexGen: Geometric textile modeller.
3Copyright (C) 2010 Louise Brown
4
5This program is free software; you can redistribute it and/or
6modify it under the terms of the GNU General Public License
7as published by the Free Software Foundation; either version 2
8of the License, or (at your option) any later version.
9
10This program is distributed in the hope that it will be useful,
11but WITHOUT ANY WARRANTY; without even the implied warranty of
12MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with this program; if not, write to the Free Software
17Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18=============================================================================*/
19
20#pragma once
21
22namespace TexGen
23{
24 //class CMaterial;
25
26 using namespace std;
27
30 {
31 public:
32 CPeriodicBoundaries(int NumEdges = 12, int NumVertices = 8);
34
35 void CreatePeriodicBoundaries( ostream& Output, int iDummyNodeNum, CTextile& Textile, int iBoundarConditions, bool bMatrixOnly );
36
37 virtual void SetDomainSize( const CMesh& Mesh );
38 void SetFaceA( vector<int>& A1, vector<int>& A2 );
39 void SetFaceB( vector<int>& B1, vector<int>& B2 );
40 void SetFaceC( vector<int>& C1, vector<int>& C2 );
41 virtual void SetFaceD( vector<int>&D1, vector<int>& D2 ){};
42 void SetEdges( vector<int>& Edge );
43 void SetVertex( int Vertex );
44
45 virtual void SetOffset( double Offset ){};
46
47 // Functions which create stream and then call protected functions (for use when called from Python)
49 void OutputDummyNodeSets( string Filename, int iDummyNodeNum );
50
52 void OutputStep( string Filename, int iBoundaryConditions );
53
54 protected:
56 pair< vector<int>, vector<int> > m_FaceA;
57 pair< vector<int>, vector<int> > m_FaceB;
58 pair< vector<int>, vector<int> > m_FaceC;
59
61 vector< vector<int> > m_Edges;
63
65 vector<int> m_Vertices;
67
70 virtual void OutputEquations( ostream& Output, int iBoundarConditions );
72 void OutputSets( ostream& Output, vector<int>& Set, string SetName );
74 void OutputDummyNodeSets( ostream& Output, int iDummyNodeNum );
76 virtual void OutputFaceSets( ostream& Output );
78 void OutputEdgeSets( ostream& Output );
80 void OutputVertexSets(ostream& Output );
82 void OutputStep( ostream& Output, int iBoundaryConditions );
84 void OutputLoadCase( ostream& Output, int iCase );
85
86 };
87}; // namespace TexGen
#define CLASS_DECLSPEC
Definition: Misc.h:35
Defines the nodes and elements of a surface or volume mesh.
Definition: Mesh.h:58
Class used to generate Abaqus output for periodic boundary conditions.
virtual void SetFaceD(vector< int > &D1, vector< int > &D2)
pair< vector< int >, vector< int > > m_FaceA
Pairs of node sets for opposite faces.
pair< vector< int >, vector< int > > m_FaceB
vector< vector< int > > m_Edges
Array of vectors containing nodes for edge sets.
pair< vector< int >, vector< int > > m_FaceC
virtual void SetOffset(double Offset)
vector< int > m_Vertices
Array of corner nodes.
Represents a textile cell containing yarns.
Definition: Textile.h:39
Namespace containing a series of customised math operations not found in the standard c++ library.
Struct for representing points in 3D space.
Definition: mymath.h:56