1616
1717#include " ASMs2D.h"
1818#include " ASMmxBase.h"
19- #include < memory>
2019
2120
2221/* !
@@ -35,7 +34,7 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
3534 // ! \brief The constructor initializes the dimension of each basis.
3635 ASMs2Dmx (unsigned char n_s, const CharVec& n_f);
3736 // ! \brief Copy constructor.
38- ASMs2Dmx (const ASMs2Dmx& patch, const CharVec& n_f = CharVec( 2 , 0 ) );
37+ ASMs2Dmx (const ASMs2Dmx& patch, const CharVec& n_f);
3938 // ! \brief Empty destructor.
4039 virtual ~ASMs2Dmx () {}
4140
@@ -50,9 +49,6 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
5049 // Methods for model generation
5150 // ============================
5251
53- // ! \brief Writes the geometry/basis of the patch to given stream.
54- virtual bool write (std::ostream& os, int basis = 0 ) const ;
55-
5652 // ! \brief Generates the finite element topology data for the patch.
5753 // ! \details The data generated are the element-to-node connectivity array,
5854 // ! the node-to-IJ-index array, as well as global node and element numbers.
@@ -73,6 +69,9 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
7369 // ! \param[in] inod 1-based node index local to current patch
7470 virtual Vec3 getCoord (size_t inod) const ;
7571
72+ // ! \brief Writes the geometry/basis of the patch to given stream.
73+ virtual bool write (std::ostream& os, int basis = 0 ) const ;
74+
7675 // ! \brief Returns the number of bases.
7776 virtual size_t getNoBasis () const { return m_basis.size (); }
7877 // ! \brief Returns the total number of nodes in this patch.
@@ -85,17 +84,25 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
8584 // ! \brief Returns the classification of a node.
8685 // ! \param[in] inod 1-based node index local to current patch
8786 virtual char getNodeType (size_t inod) const ;
88- // ! \brief Returns the area in the parameter space for an element.
89- // ! \param[in] iel Element index
90- virtual double getParametricArea (int iel) const ;
91- // ! \brief Returns boundary edge length in the parameter space for an element.
92- // ! \param[in] iel Element index
93- // ! \param[in] dir Local index of the boundary edge
94- double getParametricLength (int iel, int dir) const ;
9587
9688 // ! \brief Initializes the patch level MADOF array for mixed problems.
9789 virtual void initMADOF (const int * sysMadof);
9890
91+ // ! \brief Constrains all DOFs on a given boundary edge.
92+ // ! \param[in] dir Parameter direction defining the edge to constrain
93+ // ! \param[in] open If \e true, exclude the end points of the edge
94+ // ! \param[in] dof Which DOFs to constrain at each node along the edge
95+ // ! \param[in] code Inhomogeneous dirichlet condition code
96+ // ! \param[in] basis Which basis to constrain edge for (0 means check all)
97+ virtual void constrainEdge (int dir, bool open, int dof, int code, char basis);
98+ // ! \brief Constrains a corner node identified by the two parameter indices.
99+ // ! \param[in] I Parameter index in u-direction
100+ // ! \param[in] J Parameter index in v-direction
101+ // ! \param[in] dof Which DOFs to constrain at the node
102+ // ! \param[in] code Inhomogeneous dirichlet condition code
103+ // ! \param[in] basis Which basis to constrain node for (0 means check all)
104+ virtual void constrainCorner (int I, int J, int dof, int code, char basis);
105+
99106 // ! \brief Connects all matching nodes on two adjacent boundary edges.
100107 // ! \param[in] edge Local edge index of this patch, in range [1,4]
101108 // ! \param neighbor The neighbor patch
@@ -105,7 +112,7 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
105112 // ! \param[in] coordCheck False to disable coordinate checks (periodic connections)
106113 // ! \param[in] thick Thickness of connection
107114 virtual bool connectPatch (int edge, ASM2D& neighbor, int nedge, bool revers,
108- int basis = 0 , bool coordCheck = true , int thick = 1 );
115+ int basis, bool coordCheck, int thick);
109116
110117 // ! \brief Makes two opposite boundary edges periodic.
111118 // ! \param[in] dir Parameter direction defining the periodic edges
@@ -137,7 +144,8 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
137144 // ! \param[in] time Parameters for nonlinear/time-dependent simulations
138145 // ! \param[in] iChk Object checking if an element interface has contributions
139146 virtual bool integrate (Integrand& integrand, GlobalIntegral& glbInt,
140- const TimeDomain& time, const ASM::InterfaceChecker& iChk);
147+ const TimeDomain& time,
148+ const ASM::InterfaceChecker& iChk);
141149
142150
143151 // Post-processing methods
@@ -199,18 +207,18 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
199207 virtual void extractNodeVec (const Vector& globVec, Vector& nodeVec,
200208 unsigned char = 0 , int basis = 0 ) const ;
201209
202- // ! \brief Inject nodal results for this patch into a global vector.
210+ // ! \brief Injects nodal results for this patch into a global vector.
203211 // ! \param[in] nodeVec Nodal result vector for this patch
204212 // ! \param[out] globVec Global solution vector in DOF-order
205213 // ! \param[in] basis Which basis (or 0 for both) to extract nodal values for
206214 virtual bool injectNodeVec (const Vector& nodeVec, Vector& globVec,
207- unsigned char = 0 , int basis = 0 ) const ;
215+ unsigned char = 0 , int basis = 0 ) const ;
208216
209217 using ASMs2D::generateThreadGroups;
210218 // ! \brief Generates element groups for multi-threading of interior integrals.
211219 // ! \param[in] integrand Object with problem-specific data and methods
212220 // ! \param[in] silence If \e true, suppress threading group outprint
213- // ! \param[in] ignoreGlobalLM If \e true, ignore global multipliers in sanity check
221+ // ! \param[in] ignoreGlobalLM Sanity check option
214222 virtual void generateThreadGroups (const Integrand& integrand, bool silence,
215223 bool ignoreGlobalLM);
216224
@@ -221,16 +229,25 @@ class ASMs2Dmx : public ASMs2D, private ASMmxBase
221229 // ! \param[in] basis Which basis to return size parameters for
222230 virtual bool getSize (int & n1, int & n2, int basis = 0 ) const ;
223231
232+ protected:
233+ // ! \brief Returns the area in the parameter space for an element.
234+ // ! \param[in] iel Element index
235+ double getParametricArea (int iel) const ;
236+ // ! \brief Returns boundary edge length in the parameter space for an element.
237+ // ! \param[in] iel Element index
238+ // ! \param[in] dir Local index of the boundary edge
239+ double getParametricLength (int iel, int dir) const ;
240+
224241 // ! \brief Finds the global (or patch-local) node numbers on a patch boundary.
225242 // ! \param[in] lIndex Local index of the boundary edge
226243 // ! \param nodes Array of node numbers
227244 // ! \param[in] basis Which basis to grab nodes for (0 for all)
228245 // ! \param[in] thick Thickness of connection
229246 // ! \param[in] local If \e true return patch-local node numbers
230247 virtual void getBoundaryNodes (int lIndex, IntVec& nodes, int basis,
231- int thick = 1 , int = 0 , bool local = false ) const ;
248+ int thick, int , bool local) const ;
232249
233- protected :
250+ private :
234251 std::vector<std::shared_ptr<Go::SplineSurface>> m_basis; // !< Vector of bases
235252};
236253
0 commit comments