IFEM 90A354
ASM3D.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _ASM_3D_H
15#define _ASM_3D_H
16
17#include "ASMenums.h"
18#include <vector>
19#include <cstddef>
20
21class ASMbase;
22class Vec3;
23
24
32class ASM3D
33{
34protected:
36 ASM3D() {}
37
38public:
40 virtual ~ASM3D() {}
41
42 typedef std::vector<unsigned char> CharVec;
43
49 const CharVec& nf, bool mixedFEM = false);
50
54 static ASMbase* create(ASM::Discretization type, unsigned char nf = 1);
55
64 ASMbase* clone(const CharVec& nf = CharVec()) const;
65
67 virtual bool checkRightHandSystem() { return false; }
68
72 virtual bool uniformRefine(int dir, int nInsert) = 0;
78 virtual bool raiseOrder(int ru, int rv, int rw, bool setOrder = false) = 0;
82 virtual bool refine(int dir, const std::vector<double>& xi) = 0;
83
90 virtual void constrainFace(int dir, bool open, int dof,
91 int code = 0, char basis = 1) = 0;
100 virtual size_t constrainFaceLocal(int dir, bool open, int dof, int code = 0,
101 bool project = false, char T1 = '\0') = 0;
102
109 virtual void constrainEdge(int lEdge, bool open, int dof, int code = 0,
110 char basis = 1) = 0;
126 virtual void constrainLine(int fdir, int ldir, double xi, int dof = 123,
127 int code = 0, char basis = 1) = 0;
128
140 virtual void constrainCorner(int I, int J, int K, int dof = 123,
141 int code = 0, char basis = 1) = 0;
154 virtual void constrainNode(double xi, double eta, double zeta,
155 int dof = 123, int code = 0) = 0;
156
161 virtual bool getGridParameters(std::vector<double>& prm,
162 int dir, int nSegSpan) const = 0;
163
165 virtual int getCorner(int I, int J, int K, int basis) const = 0;
166
180 virtual bool connectPatch(int face, ASM3D& neighbor, int nface, int norient,
181 int = 0, bool coordCheck = true, int thick = 1) = 0;
182
183protected:
185 static double getElementSize(const std::vector<Vec3>& XC);
186};
187
188#endif
Various enums for assembly scope.
static SystemMatrix * K
Pointer to coefficient matrix A.
Definition EigSolver.C:91
static const double T1[2]
1-point rule coordinates.
Definition TriangleQuadrature.C:19
Abstract interface for 3D spline patches.
Definition ASM3D.h:33
virtual size_t constrainFaceLocal(int dir, bool open, int dof, int code=0, bool project=false, char T1='\0')=0
Constrains all DOFs in local directions on a given boundary face.
std::vector< unsigned char > CharVec
Convenience type.
Definition ASM3D.h:42
static double getElementSize(const std::vector< Vec3 > &XC)
Returns characteristic element size based on corner coordinates.
Definition ASM3D.C:92
virtual ~ASM3D()
Empty destructor.
Definition ASM3D.h:40
virtual bool connectPatch(int face, ASM3D &neighbor, int nface, int norient, int=0, bool coordCheck=true, int thick=1)=0
Connects all matching nodes on two adjacent boundary faces.
ASMbase * clone(const CharVec &nf=CharVec()) const
Returns a copy of this patch with identical FE discretization.
Definition ASM3D.C:73
virtual void constrainNode(double xi, double eta, double zeta, int dof=123, int code=0)=0
Constrains a node identified by three relative parameter values.
virtual void constrainLine(int fdir, int ldir, double xi, int dof=123, int code=0, char basis=1)=0
Constrains all DOFs along a line on a given boundary face.
virtual bool getGridParameters(std::vector< double > &prm, int dir, int nSegSpan) const =0
Calculates parameter values for visualization nodal points.
ASM3D()
The constructor is protected to allow objects of sub-classes only.
Definition ASM3D.h:36
virtual void constrainEdge(int lEdge, bool open, int dof, int code=0, char basis=1)=0
Constrains all DOFs on a given boundary edge.
virtual bool checkRightHandSystem()
Checks that the patch is modelled in a right-hand-side system.
Definition ASM3D.h:67
static ASMbase * create(ASM::Discretization type, const CharVec &nf, bool mixedFEM=false)
Creates a three-parametric patch of specified discretization type.
Definition ASM3D.C:32
virtual int getCorner(int I, int J, int K, int basis) const =0
Returns the node index for a given corner.
virtual bool raiseOrder(int ru, int rv, int rw, bool setOrder=false)=0
Raises the order of the spline object for this patch.
virtual void constrainFace(int dir, bool open, int dof, int code=0, char basis=1)=0
Constrains all DOFs on a given boundary face.
virtual void constrainCorner(int I, int J, int K, int dof=123, int code=0, char basis=1)=0
Constrains a corner node identified by the three parameter indices.
virtual bool refine(int dir, const std::vector< double > &xi)=0
Refines the parametrization by inserting extra knots.
virtual bool uniformRefine(int dir, int nInsert)=0
Refines the parametrization by inserting extra knots uniformly.
Base class for spline-based finite element (FE) assembly drivers.
Definition ASMbase.h:72
Simple class for representing a point in 3D space.
Definition Vec3.h:27
Discretization
Enum defining the available discretization methods.
Definition ASMenums.h:22