IFEM  90A354
ASM1D.h
Go to the documentation of this file.
1 // $Id$
2 //==============================================================================
12 //==============================================================================
13 
14 #ifndef _ASM_1D_H
15 #define _ASM_1D_H
16 
17 #include "ASMenums.h"
18 #include <vector>
19 #include <cstddef>
20 
21 class ASMbase;
22 class Vec3;
23 
24 
30 class ASM1D
31 {
32 protected:
34  ASM1D() {}
35 
36 public:
38  virtual ~ASM1D() {}
39 
44  static ASMbase* create(ASM::Discretization type,
45  unsigned char nd, unsigned char nf);
49  static ASMbase* create(ASM::Discretization type, unsigned char nf = 1);
50 
59  ASMbase* clone(unsigned char* nf = nullptr) const;
60 
63  virtual bool uniformRefine(int nInsert) = 0;
66  virtual bool raiseOrder(int ru) = 0;
69  virtual bool refine(const std::vector<double>& xi) = 0;
70 
82  virtual int constrainNode(double xi, int dof, int code = 0) = 0;
87  virtual size_t constrainEndLocal(int dir, int dof, int code = 0) = 0;
88 
92  virtual bool getGridParameters(std::vector<double>& prm,
93  int nSegSpan) const = 0;
94 
100  virtual bool connectPatch(int vertex, ASM1D& neighbor, int nvertex,
101  int thick = 1) = 0;
102 
104  static double getElementSize(const std::vector<Vec3>& XC);
105 };
106 
107 #endif
Various enums for assembly scope.
Abstract interface for 1D spline patches.
Definition: ASM1D.h:31
virtual bool connectPatch(int vertex, ASM1D &neighbor, int nvertex, int thick=1)=0
Connects matching nodes on two adjacent vertices.
ASMbase * clone(unsigned char *nf=nullptr) const
Returns a copy of this patch with identical FE discretization.
Definition: ASM1D.C:56
virtual ~ASM1D()
Empty destructor.
Definition: ASM1D.h:38
virtual bool raiseOrder(int ru)=0
Raises the order of the spline object for this patch.
virtual int constrainNode(double xi, int dof, int code=0)=0
Constrains a node identified by two relative parameter values.
ASM1D()
The constructor is protected to allow objects of sub-classes only.
Definition: ASM1D.h:34
static ASMbase * create(ASM::Discretization type, unsigned char nd, unsigned char nf)
Creates a one-parametric patch of specified discretization type.
Definition: ASM1D.C:27
virtual bool getGridParameters(std::vector< double > &prm, int nSegSpan) const =0
Calculates parameter values for visualization nodal points.
static double getElementSize(const std::vector< Vec3 > &XC)
Returns characteristic element size based on end point coordinates.
Definition: ASM1D.C:70
virtual size_t constrainEndLocal(int dir, int dof, int code=0)=0
Constrains all DOFs in local directions at a given end point.
virtual bool refine(const std::vector< double > &xi)=0
Refines the parametrization by inserting extra knots.
virtual bool uniformRefine(int nInsert)=0
Refines the parametrization by inserting extra knots uniformly.
Base class for spline-based finite element (FE) assembly drivers.
Definition: ASMbase.h:70
Simple class for representing a point in 3D space.
Definition: Vec3.h:27
Discretization
Enum defining the available discretization methods.
Definition: ASMenums.h:22