37 geometryMap G = A.
getMap(mp);
46 solver->compute(A.
matrix());
47 result = solver->solve(A.
rhs());
69 geometryMap G = A.
getMap(geometry);
78 solver->compute(A.
matrix());
79 solVector = solver->solve(A.
rhs());
98 geometryMap G = A.
getMap(geometry);
107 solver->compute(A.
matrix());
108 result = solver->solve(A.
rhs());
117 const gsMappedBasis<2,T> & basis,
126 geometryMap G = A.
getMap(geometry);
135 solver->compute(A.
matrix());
136 result = solver->solve(A.
rhs());
158 geometryMap G = A.
getMap(geometry);
167 solver->compute(A.
matrix());
168 solVector = solver->solve(A.
rhs());
189 geometryMap G = A.
getMap(geometry);
198 solver->compute(A.
matrix());
199 result = solver->solve(A.
rhs());
207 const gsMappedBasis<2,T>& basis,
217 geometryMap G = A.
getMap(geometry);
226 solver->compute(A.
matrix());
227 result = solver->solve(A.
rhs());
247 geometryMap G = A.
getMap(geometry);
249 std::vector<gsMultiPatch<T>> coords(geometry.
geoDim());
251 coords[p] = geometry.coord(p);
256 for (
typename gsMultiPatch<T>::const_biterator bit = geometry.
bBegin(); bit != geometry.
bEnd(); ++bit)
259 u.setup(bc, dirichlet::l2Projection, 0);
267 solver->compute(A.
matrix());
268 solVector = solver->solve(A.
rhs());
292 geometryMap G = A.
getMap(geometry);
294 element el = A.getElement();
296 std::vector<gsMultiPatch<T>> coords(geometry.
geoDim());
298 coords[p] = geometry.coord(p);
303 for (
typename gsMultiPatch<T>::const_biterator bit = geometry.
bBegin(); bit != geometry.
bEnd(); ++bit)
307 u.setup(bc, dirichlet::l2Projection, -1);
310 std::vector<boundaryInterface> iFace;
311 for (
typename gsMultiPatch<T>::const_iiterator iit = geometry.
iBegin(); iit != geometry.
iEnd(); ++iit)
312 iFace.push_back(*iit);
319 bc.
get(
"Weak Dirichlet"),
320 -(penalty / el.area(G) * u * u.tr()) *
tv(G).norm()
324 penalty / el.area(G) * u.left() * u.left().tr() *
tv(G).norm()
326 - penalty / el.area(G) * u.right()* u.left() .tr() *
tv(G).norm()
328 - penalty / el.area(G) * u.left() * u.right().tr() *
tv(G).norm()
330 penalty / el.area(G) * u.right()* u.right().tr() *
tv(G).norm()
334 solver->compute(A.
matrix());
335 solVector = solver->solve(A.
rhs());
index_t addPatch(typename gsGeometry< T >::uPtr g)
Add a patch from a gsGeometry<T>::uPtr.
Definition: gsMultiPatch.hpp:210
Abstract base class representing a geometry map.
Definition: gsGeometry.h:92
T integral(const expr::_expr< E > &expr)
Calculates the integral of the expression expr on the whole integration domain.
Definition: gsExprEvaluator.h:154
Definition: gsExprAssembler.h:30
void clear()
Clear (delete) all patches.
Definition: gsMultiPatch.h:319
Dirichlet type.
Definition: gsBoundaryConditions.h:31
short_t geoDim() const
Dimension of the geometry (must match for all patches).
Definition: gsMultiPatch.hpp:149
Provides structs and classes related to interfaces and boundaries.
const_iiterator iBegin() const
Definition: gsBoxTopology.h:119
static T projectGeometryPenalty(const gsMultiBasis< T > &basis, const gsMultiPatch< T > &geometry, gsMultiPatch< T > &result, T penalty=1e3)
Projects a source geometry onto basis and returns it in result. Penalizes interfaces and boundaries...
Definition: gsL2Projection.hpp:279
const_biterator bBegin() const
Definition: gsBoxTopology.h:139
abstract interfaces for solvers and wrapper around Eigen solvers
EIGEN_STRONG_INLINE tangent_expr< T > tv(const gsGeometryMap< T > &u)
The tangent boundary vector of a geometry map in 2D.
Definition: gsExpressions.h:4515
void assemble(const expr &...args)
Adds the expressions args to the system matrix/rhs The arguments are considered as integrals over the...
Definition: gsExprAssembler.h:756
#define index_t
Definition: gsConfig.h:32
static T projectGeometry(const gsBasis< T > &basis, const gsGeometry< T > &geometry, gsMatrix< T > &result)
Projects a source geometry onto basis and returns it in result.
Definition: gsL2Projection.hpp:23
bcRefList get(const std::string &label, const short_t unk=0, int comp=-1) const
Definition: gsBoundaryConditions.h:420
virtual short_t targetDim() const
Dimension of the target space.
Definition: gsFunctionSet.h:560
const gsMatrix< T > & rhs() const
Returns the right-hand side vector(s)
Definition: gsExprAssembler.h:129
Generic expressions evaluator.
const gsSparseMatrix< T > & matrix() const
Returns the left-hand global matrix.
Definition: gsExprAssembler.h:116
static T projectGeometryBoundaries(const gsMultiBasis< T > &basis, const gsMultiPatch< T > &geometry, gsMultiPatch< T > &result)
Projects a source geometry onto basis and returns it in result. Fixes the boundaries.
Definition: gsL2Projection.hpp:235
Holds a set of patch-wise bases and their topology information.
Definition: gsMultiBasis.h:36
short_t targetDim() const
Dimension of the target space.
Definition: gsMultiPatch.h:192
Definition: gsDirichletValues.h:23
Interface for the set of functions defined on a domain (the total number of functions in the set equa...
Definition: gsFuncData.h:23
const_iiterator iEnd() const
Definition: gsBoxTopology.h:124
geometryMap getMap(const gsFunctionSet< T > &g)
Registers g as an isogeometric geometry map and return a handle to it.
Definition: gsExprAssembler.h:161
Container class for a set of geometry patches and their topology, that is, the interface connections ...
Definition: gsMultiPatch.h:33
Generic evaluator of isogeometric expressions.
Definition: gsExprEvaluator.h:38
space getSpace(const gsFunctionSet< T > &mp, index_t dim=1, index_t id=0)
Definition: gsExprAssembler.h:166
void closeGaps(T tol=1e-4)
Attempt to close gaps between the interfaces. Assumes that the topology is computed, ie. computeTopology() has been called.
Definition: gsMultiPatch.hpp:566
Class containing a set of boundary conditions.
Definition: gsBoundaryConditions.h:341
void addCondition(int p, boxSide s, condition_type::type t, gsFunctionSet< T > *f, short_t unknown=0, bool parametric=false, int comp=-1)
Adds another boundary condition.
Definition: gsBoundaryConditions.h:650
Provides gsBoundaryConditions class.
Abstract class for solvers. The solver interface is base on 3 methods: -compute set the system matrix...
Definition: gsSparseSolver.h:66
EIGEN_STRONG_INLINE meas_expr< T > meas(const gsGeometryMap< T > &G)
The measure of a geometry map.
Definition: gsExpressions.h:4557
void setGeoMap(const gsFunctionSet< T > &gm)
Set the geometry map to evaluate boundary conditions.
Definition: gsBoundaryConditions.h:916
void setIntegrationElements(const gsMultiBasis< T > &mesh)
Sets the domain of integration.
Definition: gsExprAssembler.h:136
const_biterator bEnd() const
Definition: gsBoxTopology.h:144
solution getSolution(const expr::gsFeSpace< T > &s, gsMatrix< T > &cf) const
Registers a representation of a solution variable from space s, based on the vector cf...
Definition: gsExprAssembler.h:274
void initSystem(const index_t numRhs=1)
Initializes the sparse system (sparse matrix and rhs)
Definition: gsExprAssembler.h:290
variable getCoeff(const gsFunctionSet< T > &func)
Definition: gsExprAssembler.h:260
Generic expressions matrix assembly.
void assembleBdr(const bcRefList &BCs, expr &...args)
Adds the expressions args to the system matrix/rhs The arguments are considered as integrals over the...
Definition: gsExprAssembler.h:837
static T projectFunction(const gsMultiBasis< T > &basis, const gsFunctionSet< T > &source, const gsMultiPatch< T > &geometry, gsMatrix< T > &result)
Projects a function on a basis.
Definition: gsL2Projection.hpp:178
A basis represents a family of scalar basis functions defined over a common parameter domain...
Definition: gsBasis.h:78
bool computeTopology(T tol=1e-4, bool cornersOnly=false, bool tjunctions=false)
Attempt to compute interfaces and boundaries automatically.
Definition: gsMultiPatch.hpp:366