From 940376cb4512b6f5455af2b6b666aee17f9e7cdb Mon Sep 17 00:00:00 2001 From: Francesco Ranaudo Date: Tue, 19 Dec 2023 16:45:18 +0100 Subject: [PATCH] documentation working --- docs/api/compas_fea2.model.rst | 20 +++++++------- docs/api/compas_fea2.problem.rst | 10 +++---- src/compas_fea2/model/materials/concrete.py | 30 +++++++-------------- src/compas_fea2/model/materials/material.py | 28 +++++-------------- src/compas_fea2/model/materials/steel.py | 4 +-- 5 files changed, 33 insertions(+), 59 deletions(-) diff --git a/docs/api/compas_fea2.model.rst b/docs/api/compas_fea2.model.rst index 546320d94..42e27dad1 100644 --- a/docs/api/compas_fea2.model.rst +++ b/docs/api/compas_fea2.model.rst @@ -35,7 +35,7 @@ Elements .. autosummary:: :toctree: generated/ - Element + _Element MassElement BeamElement SpringElement @@ -44,7 +44,7 @@ Elements TieElement ShellElement MembraneElement - Element3D + _Element3D TetrahedronElement HexahedronElement @@ -54,7 +54,7 @@ Releases .. autosummary:: :toctree: generated/ - BeamEndRelease + _BeamEndRelease BeamEndPinRelease BeamEndSliderRelease @@ -64,8 +64,8 @@ Constraints .. autosummary:: :toctree: generated/ - Constraint - MultiPointConstraint + _Constraint + _MultiPointConstraint TieMPC BeamMPC TieConstraint @@ -76,7 +76,7 @@ Materials .. autosummary:: :toctree: generated/ - Material + _Material UserMaterial Stiff ElasticIsotropic @@ -94,7 +94,7 @@ Sections .. autosummary:: :toctree: generated/ - Section + _Section BeamSection SpringSection AngleSection @@ -119,7 +119,7 @@ Boundary Conditions .. autosummary:: :toctree: generated/ - BoundaryCondition + _BoundaryCondition GeneralBC FixedBC PinnedBC @@ -139,7 +139,7 @@ Initial Conditions .. autosummary:: :toctree: generated/ - InitialCondition + _InitialCondition InitialTemperatureField InitialStressField @@ -149,7 +149,7 @@ Groups .. autosummary:: :toctree: generated/ - Group + _Group NodesGroup ElementsGroup FacesGroup diff --git a/docs/api/compas_fea2.problem.rst b/docs/api/compas_fea2.problem.rst index 19f4027b5..afce98e50 100644 --- a/docs/api/compas_fea2.problem.rst +++ b/docs/api/compas_fea2.problem.rst @@ -18,9 +18,9 @@ Steps .. autosummary:: :toctree: generated/ - Step - GeneralStep - Perturbation + _Step + _GeneralStep + _Perturbation ModalAnalysis ComplexEigenValue StaticStep @@ -36,7 +36,7 @@ Prescribed Fields .. autosummary:: :toctree: generated/ - PrescribedField + _PrescribedField PrescribedTemperatureField Loads @@ -45,7 +45,7 @@ Loads .. autosummary:: :toctree: generated/ - Load + _Load PrestressLoad PointLoad LineLoad diff --git a/src/compas_fea2/model/materials/concrete.py b/src/compas_fea2/model/materials/concrete.py index 62da29108..d7d2b46f7 100644 --- a/src/compas_fea2/model/materials/concrete.py +++ b/src/compas_fea2/model/materials/concrete.py @@ -7,18 +7,10 @@ from ...utilities._utils import extend_docstring class Concrete(_Material): - """ - Concrete - ======== - Elastic and plastic-cracking Eurocode based concrete material - - Note - ---- - The concrete model is based on Eurocode 2 up to fck=90 MPa. + """Elastic and plastic-cracking Eurocode based concrete material - - Additional Parameters and attributes - ------------------------------------ + Parameters + ---------- fck : float Characteristic (5%) 28 day cylinder strength [MPa]. v : float @@ -101,16 +93,12 @@ def __str__(self): self.name, self.density, self.E, self.v, self.G, self.fck, self.fr ) -@extend_docstring(_Material) +# @extend_docstring(_Material) class ConcreteSmearedCrack(_Material): - """ - ConcreteSmearedCrack - ==================== - Elastic and plastic, cracking concrete material. + """Elastic and plastic, cracking concrete material. - - Additional Parameters and Attributes - ------------------------------------ + Parameters + ---------- E : float Young's modulus E. v : float @@ -126,8 +114,8 @@ class ConcreteSmearedCrack(_Material): fr : list Failure ratios. - Additional Attributes - --------------------- + Attributes + ---------- E : float Young's modulus E. v : float diff --git a/src/compas_fea2/model/materials/material.py b/src/compas_fea2/model/materials/material.py index 845adf419..db0dec200 100644 --- a/src/compas_fea2/model/materials/material.py +++ b/src/compas_fea2/model/materials/material.py @@ -6,8 +6,7 @@ from compas_fea2.utilities._utils import extend_docstring class _Material(FEAData): - """Basic Material parameters and attributes - ======================================== + """Basic Material Parameters ---------- @@ -77,14 +76,9 @@ def __html__(self): # ============================================================================== # linear elastic # ============================================================================== -@extend_docstring(_Material) +# @extend_docstring(_Material) class ElasticOrthotropic(_Material): - """ - ElasticOrthotropic material - =========================== - Elastic, orthotropic and homogeneous material - - Additional paramenters and attributes: + """Elastic, orthotropic and homogeneous material Parameters ---------- @@ -175,11 +169,9 @@ def __str__(self): self.Gzx, ) -@extend_docstring(_Material) +# @extend_docstring(_Material) class ElasticIsotropic(_Material): - """ - Elastic, isotropic and homogeneous material - =========================================== + """Elastic, isotropic and homogeneous material Parameters ---------- @@ -234,15 +226,9 @@ def __init__(self, *, density, expansion=None, name=None, **kwargs): # ============================================================================== # non-linear general # ============================================================================== -@extend_docstring(_Material) +# @extend_docstring(_Material) class ElasticPlastic(ElasticIsotropic): - """ - ElasticPlastic - ============== - - Elastic and plastic, isotropic and homogeneous material. - - Additional parameters and attributes. + """Elastic and plastic, isotropic and homogeneous material. Parameters ---------- diff --git a/src/compas_fea2/model/materials/steel.py b/src/compas_fea2/model/materials/steel.py index c079f1340..c022850d1 100644 --- a/src/compas_fea2/model/materials/steel.py +++ b/src/compas_fea2/model/materials/steel.py @@ -24,8 +24,8 @@ class Steel(ElasticIsotropic): eu : float Ultimate strain. - Attributes - ---------- + Additional Attributes + --------------------- E : float Young's modulus E. v : float