Mordicus.Core.Containers.FieldHandlers.FieldHandlerBase module

class Mordicus.Core.Containers.FieldHandlers.FieldHandlerBase.FieldHandlerBase[source]

Bases: object

Class containing a FieldHandlerBase, with an internal storage hidden to all its children classes

__storage
Type

typeToDefine

ConvertFromLocalField(field)[source]
Parameters

field (localFieldType) – field in the local Type

Returns

numpy array of field values

Return type

np.array

ConvertToLocalField(structure, vector)[source]
Parameters
  • structure (SolutionStructure) – Structure instance as defined by mordicus datamodel

  • vector (nparray) – numpy array of solution to convert

Returns

field in the local Type

Return type

localFieldType

DoublContractedProduct(field1, field2)[source]
Parameters
  • field1 (localFieldType) – first symmetric 3x3 tensor s

  • field2 (localFieldType) – second symmetric 3x3 tensor e

Returns

s

Return type

e, i.e. s(1)*e(1) + s(2)*e(2) + s(3)*e(3) + 2*s(4)*e(4) + 2*s(5)*e(5) + 2*s(6)*s(6)

GaussPointsCoordinates(solutionStructureGauss)[source]

Get the Gauss point coordinate a family of solutions relies on

Parameters
  • solutionStructureGauss – a solution structure with discretization on Gauss points (any number of components)

  • Returns

  • -------

  • ndarray – numpy array of Gauss points coordinates for the given solutionStructureGauss

GetInternalStorage()[source]
Returns

internal storage

Return type

typeToDefine

GetVolume(solutionStructureGauss)[source]

Compute volume getting Gauss points from a sample field

Parameters

solutionStructureGauss – a solution structure with discretization on Gauss points (any number of components)

Returns

volume of the domain the family of solutions is defined on

Return type

double

Integral(field, componentNumber)[source]
Parameters
  • field (localFieldType) – field to integrate over its whole domain Omega

  • componentNumber (int) – number of the component number to integrate

Returns

double

Return type

integral over Omega of field(componentNumber)

SetInternalStorage(_FieldHandlerBase__storage)[source]

Sets the internal storage

Parameters

__storage (typeToDefine) –

SymetricGradient(field, solutionStructureGauss, solutionStructureNode)[source]
Parameters
  • field (localFieldType) – local field to derive

  • solutionStructureGauss (SolutionStructure) – solution structure of the result

  • solutionStructureNode (SolutionStructure) – solutionStructure of the field to derive

Returns

field

Return type

localFieldType