[Kratos] Critical change in classes: Element.h and Condition.h

rrossi en cimne.upc.edu rrossi en cimne.upc.edu
Jue Mar 13 10:35:24 CET 2014


Of course to pass multiple coefficients would be to pass a Vector

indeed i think we shall pass two vectors one for LHS and the other for 
RHS

const Vector& lhs_coeffs,
const Vector$ rhs_coeffs,

an important aspect of this function is that it shall expect the input 
matrix to be correctly sized and initialized to zero (or to the number 
we want to sum to)




another comment about your modifications:

if you do a matrix or vector resize, even to 0, please remember to put 
the parameter "false" which will avoid internal copying

for example

A.resize(0,0,false);



ciao
Riccardo


On 2014-03-13 09:53, Josep Maria wrote:
> Answering to Nelson and Riccardo,
>    
>     If you prefer we can joint the calculation and the addition of
> the RHS and LHS for the mass and damping terms in one method. It
> intended to be used to perform elemental local calculations for the
> Mass and Damping matrices and forces and add them to the local system.
> 
>  Riccardo proposes
> 
>> CalculateInertialContributionLHS(...) and
>> CalculateInertialContributionRHS(...)
>> 
>> CalculateDampingContribuitionLHS(...) and
>> CalculateDampingContributionRHS(...)
> 
>      to be joined in a single method:
> 
>    CalculateAndAddInertialContributions( MatrixType&
> rLeftHandSideMatrix,
>                          
>                                       
> VectorType& rRightHandSideVector,
>                                         
>                         coefficient ?
>                                    
>                              ProcessInfo&
> rCurrentProcessInfo )
> 
>  For me it is ok, about the coefficient, giving an scalar is not
> enough for general calculations, usually you need at least two
> scalars.
> 
>  Any idea to supply n scalars in a consistent form ? They are related
> to the time integration... and the number can change.
> 
>  Regards
> 
>  Josep Maria
> 
> On 13/03/14 02:12, Nelson wrote:
>  Hi,
>  I am totally agree with the name and the change.
>  Also, should be added a method also the methods
>  "AddMass... " and "AddDamping", becauses sometimes
>  some estrucures take the mass from others sources
>  but not is weigth self.
> 
>  Acording to damping, is good to put "AddDamp"
>  due to we can damping the structure in other
>  way not be the railay damping.
> 
>  Respect to methods
> 
>>  CalculateInertialContributionLHS(...) and
>> CalculateInertialContributionRHS(...)
>> 
>>  CalculateDampingContribuitionLHS(...) and
>> CalculateDampingContributionRHS(...)
> 
>  I assume it is for rigid solid  ( i not am sure, no have experiences
> in that)
>  but should be really utils for dem applications for example. In any
> case is a change
>  in the base clases, so corresponding changes should be done in
> derivated classes
>  and in my opinion it is not a big deal.
> 
>  Regards
> 
>  Nelson
> 
> On 13/03/14 08:54, Riccardo Rossi wrote:
> 
>> Dear Josep Maria,
>>         please consider that we shall consider the
>> "KratosCore" as "stable" which implies that no one should not allow
>> himself to unilaterally change the foundational classes.
>> I believe it is both unpolite and unwise to make the sort of commit
>> you made without prior discussion,
>> and for this reason i must reiterate asking you to refrain from
>> such actions. Please also note that i will apply the same constraint
>> to myself.
>> 
>> Having said this, and regarding the specific issue you rise, i
>> shall admit that the current interface is not clean and that it
>> could use some redesign.
>> 
>> Apart for the renaming of Mass to Inertia which i share (even
>> though i am not sure if it justifies a breaking change)
>> 
>> i would go for methods of the type
>> 
>> CalculateAndAddInertiaXXXXX( destination,  coefficient,  
>> ProcessInfo ) //both to RHS and LHS
>> 
>> since with this small modification the matrix/vector is ADDED to
>> the destination, which allows avoiding one large matrix temporary,
>> as well as implementing optimizations for the case of diagonal
>> matrices.
>> I also wonder if it wouldn't be better to only provide ONE function
>> for the LHS and RHS at the same time, since this would allow further
>> savings.
>> 
>> Regarding the specific function
>> "CalculateLocalVelocityContribution", i agree that this shall not be
>> needed (and more than that, that the method is ugly).
>> Kazem, Jordi could you comment on why it was needed? Would it be
>> possible to use the methods Josep Maria Proposed instead?
>> 
>> Since we are in the discussion, i would also appreciate if others
>> could comment or make suggestions at this point, since i really
>> would like to live the interface "definitivelely" closed.
>> 
>> ciao for now
>> Riccardo
>> 
>> P.S. i forward this to the mailing list since yesterday i answered
>> to my phone and i wrongly answered to you alone.
>> 
>> On Wed, Mar 12, 2014 at 7:47 PM, Josep Maria <cpuigbo en cimne.upc.edu>
>> wrote:
>> 
>> Dear Riccardo,
>> 
>>    The existing interface has certain deficiencies. This change
>> treats to replace some methods that only concern to particular
>> applications.
>> 
>> see methods: CalculateLocalVelocityContribution(...) ,
>> AddMassMatrix(...), AddInertiaForces(...)
>> 
>> I will not double the existing methods because some of these
>> methods are moved to the " rubbish " section of the element and will
>> be eliminated in a prudential period.
>> 
>> On the other hand, in certain elements the success of a dynamic
>> analysis only is performed with some specific time discretization
>> algorithms. The element or the condition are the only entities that
>> know the contributions for the LHS and the RHS that must be added to
>> the linear system.
>> 
>> I understand that in fluid applications, the requirements for the
>> elements and conditions are resolved with the particular methods
>> already implemented. I understand that is annoying for you the
>> extension of the  base classes of kratos in a direction that is
>> unuseful for your particular goals.
>> 
>>    Anyway, If you don't like, I will delete the methods
>> introduced and I will stop the development for the dynamic part of
>> the SolidMechanicsApplication.
>> 
>> Josep Maria
>> 
>>    
>> 
>> On 03/12/2014 07:03 PM, rougered4 en gmail.com wrote:
>> 
>> Dear Josep Maria,
>> 
>> For the future please restrain yourself from making changes in the
>> foundational classes.
>> 
>> Namely i can understand the change to mass matrix and damping matrix
>> but i can not see why the other methods are needed. Can t you use
>> the existing methods? I believe that this shall be already doable
>> with the existing interface...
>> 
>> Riccardo
>> BlackBerry de movistar, allí donde estés está tu oficin@
>> 
>> -----Original Message-----
>> From: Josep Maria <cpuigbo en cimne.upc.edu>
>> Sender: kratos-bounces en listas.cimne.upc.edu
>> Date: Wed, 12 Mar 2014 17:32:07
>> To: <kratos en listas.cimne.upc.edu>
>> Subject: [Kratos] Critical change in classes: Element.h and
>> Condition.h
>> 
>> _______________________________________________
>> Kratos mailing list
>> Kratos en listas.cimne.upc.edu
>> http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos [1]
>> 
>> --
>> JOSEP MARIA CARBONELL I PUIGBÓ
>> 
>> _Email: cpuigbo en cimne.upc.edu_
>> _Telèfon: +34 93 405 40 68 [2]_
>> 
>> _Gran Capità s/n-Campus Nord UPC_
>> _Edifici C-1 1a Planta-Despatx 113B_
>> _08034-Barcelona-Catalunya_
>> _www.cimne.upc.edu [3]_
>> 
>> Abans d'imprimir aquest e-mail, assegura't de que és realment
>> necessari.
>> El medi ambient és responsabilitat de tots.
>> 
>> _AVÍS IMPORTANT_
>> _Les dades de caràcter personal contingudes en aquest missatge es
>> registraran_
>> _en un fitxer per facilitar la gestió de les comunicacions del
>> CIMNE._
>> _Es poden exercir els drets d'accés, rectificació, cancel·lació
>> i oposició,_
>> _per escrit a les nostres oficines del CIMNE:_
>> _Gran Capità s/n, Edifici C1, Campus Nord UPC, 08034 Barcelona,
>> Espanya_
>> 
>> _AVISO IMPORTANTE_
>> _Los datos de carácter personal contenidos en el mensaje, se
>> registrarán_
>> _en un fichero para facilitar la gestión de las comunicaciones de
>> CIMNE._
>> _Se pueden ejercitar los derechos de acceso, rectificación,
>> cancelación y_
>> _oposición por escrito, dirigiéndose a nuestras oficinas de
>> CIMNE:_
>> _Gran Capità s/n, Edifici C1, Campus Nord UPC, 08034 Barcelona,
>> Espanya_
>> 
>> _IMPORTANT NOTICE_
>> _All personal data contained in this mail will be processed
>> __confidentially_
>> _and stored in a file property of CIMNE in order to manage
>> corporate_
>> _communications. You may exercise the right of access,
>> rectification,_
>> _deletion and objection by letter sent to CIMNE:_
>> _Gran Capità s/n, Edifici C1, Campus Nord UPC, 08034 Barcelona,
>> Espanya_
> 
>  --
> 
> Riccardo Rossi
> 
> PhD, Civil Engineer
> 
> member of the Kratos Team: www.cimne.com/kratos [4]
> 
> lecturer at Universitat Politècnica de Catalunya, BarcelonaTech (UPC)
> 
> Research fellow at International Center for Numerical Methods in
> Engineering (CIMNE)
> 
> C/ Gran Capità, s/n, Campus Nord UPC, Ed. C1, Despatx C9
> 
> 08034 – Barcelona – Spain – www.cimne.com [5]  - 
> 
> T.(+34) 93 401 56 96 skype: ROUGERED4
> 
>  
> 
>  [6]
> 
>  [7] [8] [9] [10] [11] [12]
> 
> Les dades personals contingudes en aquest missatge són tractades amb
> la finalitat de mantenir el contacte professional entre CIMNE i voste.
> Podra exercir els drets d'accés, rectificació, cancel·lació i
> oposició, dirigint-se a cimne en cimne.upc.edu. La utilització de la
> seva adreça de correu electronic per part de CIMNE queda subjecte a
> les disposicions de la Llei 34/2002, de Serveis de la Societat de la
> Informació i el Comerç Electronic.
> 
>  Imprimiu aquest missatge, només si és estrictament necessari. [6]
> 
> --
>  JOSEP MARIA CARBONELL I PUIGBÓ
>  _Email: cpuigbo en cimne.upc.edu_
>  _Telèfon: +34 93 405 40 68_
> 
>  _Gran Capità s/n-Campus Nord UPC_
>  _Edifici C-1 1a Planta-Despatx 113B_
>  _08034-Barcelona-Catalunya_
>  _www.cimne.upc.edu [3]_
> 
>  Abans d'imprimir aquest e-mail, assegura't de que és realment
> necessari.
>  El medi ambient és responsabilitat de tots.
> 
>  _AVÍS IMPORTANT_
>  _Les dades de caràcter personal contingudes en aquest missatge es
> registraran_
>  _en un fitxer per facilitar la gestió de les comunicacions del
> CIMNE._
>  _Es poden exercir els drets d'accés, rectificació, cancel·lació i
> oposició,_
> 


   _per escrit a les nostres oficines del CIMNE:_
>  _Gran Capità s/n, Edifici C1, Campus Nord UPC, 08034 Barcelona,
> Espanya_
> 
>  _AVISO IMPORTANTE_
>  _Los datos de carácter personal contenidos en el mensaje, se
> registrarán_
>  _en un fichero para facilitar la gestión de las comunicaciones de
> CIMNE._
>  _Se pueden ejercitar los derechos de acceso, rectificación,
> cancelación y_
>  _oposición por escrito, dirigiéndose a nuestras oficinas de CIMNE:_
>  _Gran Capità s/n, Edifici C1, Campus Nord UPC, 08034 Barcelona,
> Espanya_
> 
>  _IMPORTANT NOTICE_
>  _All personal data contained in this mail will be processed
> __confidentially_
>  _and stored in a file property of CIMNE in order to manage corporate_
>  _communications. You may exercise the right of access,
> rectification,_
>  _deletion and objection by letter sent to CIMNE:_
>  _Gran Capità s/n, Edifici C1, Campus Nord UPC, 08034 Barcelona,
> Espanya_
> 
> Links:
> ------
> [1] http://listas.cimne.upc.edu/cgi-bin/mailman/listinfo/kratos
> [2] tel:%2B34%2093%20405%2040%2068
> [3] http://www.cimne.upc.edu
> [4] http://www.cimne.com/kratos
> [5] http://www.cimne.com
> [6] http://www.cimne.com/
> [7] https://www.facebook.com/cimne
> [8] http://blog.cimne.com/
> [9] http://vimeo.com/cimne
> [10] http://www.youtube.com/user/CIMNEvideos
> [11] http://www.linkedin.com/company/cimne
> [12] https://twitter.com/cimne


Más información sobre la lista de distribución Kratos