IFEM 90A354
ASMmxBase.h
Go to the documentation of this file.
1// $Id$
2//==============================================================================
12//==============================================================================
13
14#ifndef _ASM_MX_BASE_H
15#define _ASM_MX_BASE_H
16
17#include "MatVec.h"
18#include <memory>
19
20namespace Go {
21 class SplineSurface;
22 class SplineVolume;
23}
24
25namespace SplineUtils {
26 enum class AdjustOp;
27}
28
29
35{
36protected:
39 explicit ASMmxBase(const std::vector<unsigned char>& n_f) : nfx(n_f) {}
40
44 void initMx(const std::vector<int>& MLGN, const int* sysMadof);
45
50 void extractNodeVecMx(const RealArray& glbVec, RealArray& nodVec,
51 int basis) const;
52
57 void injectNodeVecMx(RealArray& glbVec, const RealArray& nodVec,
58 int basis) const;
59
64 bool getSolutionMx(Matrix& sField, const Vector& locSol,
65 const std::vector<int>& nodes) const;
66
67public:
78
79 static MixedType Type;
80 static char itgBasis;
81 bool piola = false;
82 static bool includeExtra;
83
84protected:
85 typedef std::vector<std::shared_ptr<Go::SplineSurface>> SurfaceVec;
86 typedef std::vector<std::shared_ptr<Go::SplineVolume>> VolumeVec;
87
92 static SurfaceVec establishBases(Go::SplineSurface* surf, MixedType type);
93
98 static VolumeVec establishBases(Go::SplineVolume* svol, MixedType type);
99
101 static Go::SplineSurface* adjustBasis(const Go::SplineSurface& surf,
102 const std::array<SplineUtils::AdjustOp,2>& ops);
104 static Go::SplineVolume* adjustBasis(const Go::SplineVolume& svol,
105 const std::array<SplineUtils::AdjustOp,3>& ops);
106
107private:
108 std::vector<int> MADOF;
109
110protected:
112 std::vector<size_t> elem_size;
114 std::vector<size_t> nb;
115
116 std::vector<unsigned char> nfx;
117};
118
119#endif
std::vector< Real > RealArray
A real-valued array without algebraic operations.
Definition ImmersedBoundaries.h:32
Global algebraic operations on index 1-based matrices and vectors.
Base class for spline-based mixed finite element assembly drivers.
Definition ASMmxBase.h:35
static bool includeExtra
True to include extra basis (geometry/projection) as FE basis.
Definition ASMmxBase.h:82
bool piola
True if last used integrand was Piola mapped.
Definition ASMmxBase.h:81
void extractNodeVecMx(const RealArray &glbVec, RealArray &nodVec, int basis) const
Extracts nodal results for this patch from the global vector.
Definition ASMmxBase.C:38
std::vector< std::shared_ptr< Go::SplineVolume > > VolumeVec
Convenience type.
Definition ASMmxBase.h:86
void injectNodeVecMx(RealArray &glbVec, const RealArray &nodVec, int basis) const
Injects nodal results for this patch into a global vector.
Definition ASMmxBase.C:70
std::vector< int > MADOF
Matrix of accumulated DOFs for this patch.
Definition ASMmxBase.h:108
static Go::SplineSurface * adjustBasis(const Go::SplineSurface &surf, const std::array< SplineUtils::AdjustOp, 2 > &ops)
Returns a C^p-1 basis of one degree higher than *surf.
Definition ASMmxBase.C:260
std::vector< size_t > elem_size
Number of basis functions per element in each basis.
Definition ASMmxBase.h:112
std::vector< size_t > nb
Total number of basis functions in each basis.
Definition ASMmxBase.h:114
static MixedType Type
Type of mixed formulation used.
Definition ASMmxBase.h:79
std::vector< unsigned char > nfx
Number of fields on each basis.
Definition ASMmxBase.h:116
bool getSolutionMx(Matrix &sField, const Vector &locSol, const std::vector< int > &nodes) const
Extracts the primary solution field at the specified nodes.
Definition ASMmxBase.C:94
static SurfaceVec establishBases(Go::SplineSurface *surf, MixedType type)
Establish mixed bases in 2D.
Definition ASMmxBase.C:129
MixedType
Enum defining available mixed formulation types.
Definition ASMmxBase.h:69
@ FULL_CONT_RAISE_BASIS2
Full continuity, raise order and use as basis 2.
Definition ASMmxBase.h:73
@ NONE
No Mixed formulation.
Definition ASMmxBase.h:70
@ REDUCED_CONT_RAISE_BASIS1
Reduced continuity, raise order and use as basis 1.
Definition ASMmxBase.h:72
@ FULL_CONT_RAISE_BASIS1
Full continuity, raise order and use as basis 1.
Definition ASMmxBase.h:71
@ DIV_COMPATIBLE
Div-compatible space for incompressible problems.
Definition ASMmxBase.h:75
@ REDUCED_CONT_RAISE_BASIS2
Reduced continuity, raise order and use as basis 2.
Definition ASMmxBase.h:74
@ SUBGRID
Sub-grid spaces.
Definition ASMmxBase.h:76
static char itgBasis
1-based index of basis representing the integration elements
Definition ASMmxBase.h:80
std::vector< std::shared_ptr< Go::SplineSurface > > SurfaceVec
Convenience type.
Definition ASMmxBase.h:85
ASMmxBase(const std::vector< unsigned char > &n_f)
The constructor sets the number of field variables.
Definition ASMmxBase.h:39
void initMx(const std::vector< int > &MLGN, const int *sysMadof)
Initializes the patch level MADOF array.
Definition ASMmxBase.C:29
A vector class with some added algebraic operations.
Definition matrix.h:64
Various utility functions on spline objects.
Definition ASMmxBase.h:25
AdjustOp
Enumeration of basis adjustment operations.
Definition SplineUtils.h:100