@@ -46,7 +46,7 @@ gsThinShellAssembler<d, T, bending>::gsThinShellAssembler(const gsMultiPatch<T>
4646 m_materialMatrices(materialMatrices)
4747{
4848 // surface forces defined in the parametric domain (ONLY WORKS FOR 3D)
49- m_parametricForce = (surface_force.domainDim ()==2 && d==3 );
49+ m_parametricForce = (surface_force.domainDim ()==2 && ( d==2 ||d== 3 ) );
5050
5151 this ->_defaultOptions ();
5252 this ->_getOptions ();
@@ -87,7 +87,7 @@ gsThinShellAssembler<d, T, bending>::gsThinShellAssembler(const gsMultiPatch<T>
8787 m_materialMatrices.set (p,materialMatrix);
8888
8989 // surface forces defined in the parametric domain (ONLY WORKS FOR 3D)
90- m_parametricForce = (surface_force.domainDim ()==2 && d==3 );
90+ m_parametricForce = (surface_force.domainDim ()==2 && ( d==2 ||d== 3 ) );
9191
9292 this ->_defaultOptions ();
9393 this ->_getOptions ();
@@ -109,6 +109,7 @@ gsThinShellAssembler<d, T, bending>& gsThinShellAssembler<d, T, bending>::operat
109109 m_bcs=other.m_bcs ;
110110 m_ddofs=other.m_ddofs ;
111111 m_mass=other.m_mass ;
112+ m_parametricForce=other.m_parametricForce ;
112113 m_forceFun=other.m_forceFun ;
113114 m_foundFun=other.m_foundFun ;
114115 m_pressFun=other.m_pressFun ;
@@ -156,6 +157,7 @@ gsThinShellAssembler<d, T, bending>& gsThinShellAssembler<d, T, bending>::operat
156157 m_bcs=give (other.m_bcs );
157158 m_ddofs=give (other.m_ddofs );
158159 m_mass=give (other.m_mass );
160+ m_parametricForce=give (other.m_parametricForce );
159161 m_forceFun=give (other.m_forceFun );
160162 m_foundFun=give (other.m_foundFun );
161163 m_pressFun=give (other.m_pressFun );
@@ -1645,7 +1647,7 @@ gsThinShellAssembler<d, T, bending>::assemble_impl()
16451647 auto mmA = m_assembler.getCoeff (m_mmA);
16461648
16471649 space m_space = m_assembler.trialSpace (0 );
1648- auto m_physforce = m_assembler. getCoeff (*m_forceFun,m_ori); // force defined in physical domain
1650+ GISMO_ASSERT (m_parametricForce, " The force must be defined in the parametric domain for 2D problems " );
16491651 auto m_parforce = m_assembler.getCoeff (*m_forceFun); // force defined in parametric domain
16501652
16511653 auto jacG = jac (m_def);
@@ -1671,10 +1673,7 @@ gsThinShellAssembler<d, T, bending>::assemble_impl()
16711673 ) * meas (m_ori)
16721674 );
16731675
1674- if (m_parametricForce) // Assemble the force defined in the parameter domain
1675- m_assembler.assemble (m_space * m_parforce * meas (m_ori));
1676- else // Assemble the force defined in the physical domain
1677- m_assembler.assemble (m_space * m_physforce * meas (m_ori));
1676+ m_assembler.assemble (m_space * m_parforce * meas (m_ori));
16781677
16791678 this ->_assembleWeakBCs <true >();
16801679 this ->_assembleWeakBCs <false >();
0 commit comments