carputils
Doxygen code documentation for the python framework controlling openCARP
All Classes Namespaces Files Functions Variables Properties Pages
Functions | Variables
carputils.model.generate_carpentry Namespace Reference

Functions

def wrap (text, linelen=80, pad=0)
 Wrap lines of text. More...
 
def param_sort (keys, kappa_first=True)
 
def param_iterate (params)
 
def write_param_desc (name, default=None)
 
def write_class (name, parent, description, modelid=None, plugin=None, shortname=None, params={}, region=True)
 
def write_maps (mapping)
 
def write_summary (modeltype, modelattr=[])
 
def mechanics_materials (elasticity)
 
def tension_plugin (name, directory)
 
def limpet_read_imps (limpetdir)
 Append LIMPET path ahead of other PATH includes. More...
 
def limpet_params (name, directory)
 Scrub most of the parmeters and default values from the source code. More...
 
def ionic_models (limpetdir)
 
def active_tension_models (limpetdir)
 

Variables

string HEADER
 
dictionary NAMEMAP
 
dictionary DESCRIPTION_NAMEMAP
 
dictionary PARAM_TYPES
 
dictionary PARAM_DESC
 
 parser = argparse.ArgumentParser()
 
 help
 
 args = parser.parse_args()
 
 model_dir = os.path.dirname(__file__)
 
 elasticity = os.path.join(args.carp_source, 'elasticity')
 
 limpet = os.path.join(args.carp_source, 'LIMPET')
 

Function Documentation

◆ active_tension_models()

def carputils.model.generate_carpentry.active_tension_models (   limpetdir)

◆ ionic_models()

def carputils.model.generate_carpentry.ionic_models (   limpetdir)

◆ limpet_params()

def carputils.model.generate_carpentry.limpet_params (   name,
  directory 
)

Scrub most of the parmeters and default values from the source code.

◆ limpet_read_imps()

def carputils.model.generate_carpentry.limpet_read_imps (   limpetdir)

Append LIMPET path ahead of other PATH includes.

Matters across different CARP versions.

◆ mechanics_materials()

def carputils.model.generate_carpentry.mechanics_materials (   elasticity)

◆ param_iterate()

def carputils.model.generate_carpentry.param_iterate (   params)

◆ param_sort()

def carputils.model.generate_carpentry.param_sort (   keys,
  kappa_first = True 
)

◆ tension_plugin()

def carputils.model.generate_carpentry.tension_plugin (   name,
  directory 
)

◆ wrap()

def carputils.model.generate_carpentry.wrap (   text,
  linelen = 80,
  pad = 0 
)

Wrap lines of text.

◆ write_class()

def carputils.model.generate_carpentry.write_class (   name,
  parent,
  description,
  modelid = None,
  plugin = None,
  shortname = None,
  params = {},
  region = True 
)

◆ write_maps()

def carputils.model.generate_carpentry.write_maps (   mapping)

◆ write_param_desc()

def carputils.model.generate_carpentry.write_param_desc (   name,
  default = None 
)

◆ write_summary()

def carputils.model.generate_carpentry.write_summary (   modeltype,
  modelattr = [] 
)

Variable Documentation

◆ args

carputils.model.generate_carpentry.args = parser.parse_args()

◆ DESCRIPTION_NAMEMAP

dictionary carputils.model.generate_carpentry.DESCRIPTION_NAMEMAP
Initial value:
1 = {'Neohooke': 'neo-Hookean',
2  'NHSstress': 'Niederer-Hunter-Smith',
3  'NPStress': 'Nash-Panfilov',
4  'Muscon': 'Hunter-McCulloch-ter Keurs',
5  'LandStress': 'Land'}

◆ elasticity

carputils.model.generate_carpentry.elasticity = os.path.join(args.carp_source, 'elasticity')

◆ HEADER

string carputils.model.generate_carpentry.HEADER
Initial value:
1 = "\
2 #\n\
3 # This file is part of openCARP\n\
4 # (see https://www.openCARP.org).\n\
5 #\n\
6 # The openCARP project licenses this file to you under the\n\
7 # Apache License, Version 2.0 (the \"License\");\n\
8 # you may not use this file except in compliance\n\
9 # with the License. You may obtain a copy of the License at\n\
10 #\n\
11 # http://www.apache.org/licenses/LICENSE-2.0\n\
12 #\n\
13 # Unless required by applicable law or agreed to in writing,\n\
14 # software distributed under the License is distributed on an\n\
15 # \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n\
16 # KIND, either express or implied. See the License for the\n\
17 # specific language governing permissions and limitations\n\
18 # under the License.\n\
19 #\n"

◆ help

carputils.model.generate_carpentry.help

◆ limpet

carputils.model.generate_carpentry.limpet = os.path.join(args.carp_source, 'LIMPET')

◆ model_dir

carputils.model.generate_carpentry.model_dir = os.path.dirname(__file__)

◆ NAMEMAP

dictionary carputils.model.generate_carpentry.NAMEMAP
Initial value:
1 = {'Neohooke': 'NeoHookean',
2  'StVK': 'StVenantKirchhoff',
3  'Artery': 'HolzapfelArterial',
4  'Myocardium': 'HolzapfelOgden',
5  'NHSstress': 'NHS',
6  'LandStress': 'Land',
7  'LandHumanStress': 'LandHuman',
8  'FxStress': 'Fx',
9  'TanhStress': 'Tanh',
10  'NPStress': 'NP'}

◆ PARAM_DESC

dictionary carputils.model.generate_carpentry.PARAM_DESC
Initial value:
1 = {'name': 'The name of the model material region',
2  'IDs': 'The element IDs to be included in this material region',
3  'kappa': 'Value of the incompressibility penalty'}

◆ PARAM_TYPES

dictionary carputils.model.generate_carpentry.PARAM_TYPES
Initial value:
1 = {'name': 'str',
2  'IDs': 'list of int'}

◆ parser

carputils.model.generate_carpentry.parser = argparse.ArgumentParser()